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!
Printable View
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!
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:
the 0x1000 is the activator for kernal (replace it with 0 if you intend to make a user mode prog)Quote:
PSP_MODULE_INFO("Program name", 0x1000, 0, 1);
In the SDK there is a sample for locking and unlocking the nand flash memory locations. check here 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. :)
Thanks for your reply
A couple more questions though
What do you replace with 0 to make a user mode program?Quote:
(replace it with 0 if you intend to make a user mode prog)
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
completely off topic, but why the hell people insist on calling the core of the OS "kernal"? It's KERNEL, for god's sake.
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
Answer: cause I started coding years ago on a Commodore C16 Plus where they called kernel, kernal and its stuck.... see here BUT you are absolutely correct Msaraiva.Quote:
Originally Posted by msaraiva
i always think that too but i never say anything, i try not to be a know-it-all :)Quote:
Originally Posted by msaraiva
benh what kind of app u planing on making for ur first whack at a kernel app?
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!