View Full Version : Kernal apps
benh
October 9th, 2006, 21:31
I am currently coding in C and want to write a simple C kernal app, I want to know how to how to write code for access to the nand flash and I also want to know the code for replacing files on the nand flash chip.
Please help!
Davidov
October 9th, 2006, 22:43
you can make your code go into Kernal mode by adding in this line just after the includes and definitions of your main source file:
PSP_MODULE_INFO("Program name", 0x1000, 0, 1);
the 0x1000 is the activator for kernal (replace it with 0 if you intend to make a user mode prog)
In the SDK there is a sample for locking and unlocking the nand flash memory locations. check here (http://forums.ps2dev.org/viewtopic.php?t=3573) for more details on the code you'll need to use.
I am only a part time coder so thats about all I know of kernal mode PSP programming, hope oneday i may have something to release.
Hope that was of some use. :)
benh
October 10th, 2006, 12:46
Thanks for your reply
A couple more questions though
(replace it with 0 if you intend to make a user mode prog)
What do you replace with 0 to make a user mode program?
Just refresh my memory what does user mode do?
Also for example say if i wanted to access the flash1 what would i put to get there would i put like a link to for the memory stick ms0:/psp/game but instead it would be flash1:/vsh?
Thanks for your help so far
msaraiva
October 10th, 2006, 21:17
completely off topic, but why the hell people insist on calling the core of the OS "kernal"? It's KERNEL, for god's sake.
Davidov
October 12th, 2006, 01:22
you replace the '0x1000' with '0'
[ ie: PSP_MODULE_INFO("Program name", 0, 0, 1); will set user mode, where as for KERNEL you would put: PSP_MODULE_INFO("Program name", 0x1000, 0, 1);
Where 0x1000 is the switch thingy, the 0 after the comma is your code's major version number and the 1 in this case is the minor version number (Meaning this is version 0.1) ]
As far as Im aware User mode means you can't change anything in the flash, i guess this is for security or protection against accidently altering system files (prx's and the like), but i dont know enough about the system to say for sure, all I know is some C/C++ :D
completely off topic, but why the hell people insist on calling the core of the OS "kernal"? It's KERNEL, for god's sake.
Answer: cause I started coding years ago on a Commodore C16 Plus where they called kernel, kernal and its stuck.... see here (http://en.wikipedia.org/wiki/KERNAL) BUT you are absolutely correct Msaraiva.
BL4Z3D247
October 12th, 2006, 01:30
completely off topic, but why the hell people insist on calling the core of the OS "kernal"? It's KERNEL, for god's sake.
i always think that too but i never say anything, i try not to be a know-it-all :)
benh what kind of app u planing on making for ur first whack at a kernel app?
benh
October 12th, 2006, 11:36
Im planning something simple I'm gonna do a simple background chnager that only accesses the flash1 just to test out my skills.
One more question - What code do I use to access the onboard nand flash memory and replace files? i need to know that before i can do any more to the program!
Powered by vBulletin® Version 4.2.3 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.