Results 1 to 7 of 7

Thread: Kernal apps

                  
   
  1. #1
    PSP Coder benh's Avatar
    Join Date
    Mar 2006
    Location
    linclonshire, England
    Posts
    362
    Rep Power
    71

    Question Kernal apps

    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!
    Benh = Coder, main language C other language LUA

    Check out my first C app Super - flasher here

    visit my dev site where you can download all of my coding projects - http://benh-pspdev.bravehost.com/



    Please visit my site www.pspfanatic.bravehost.com
    and join the forums

  2. #2
    PSP User Davidov's Avatar
    Join Date
    Mar 2006
    Location
    Scotland
    Posts
    46
    Rep Power
    0

    Smile

    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 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.

  3. #3
    PSP Coder benh's Avatar
    Join Date
    Mar 2006
    Location
    linclonshire, England
    Posts
    362
    Rep Power
    71

    Default

    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
    Benh = Coder, main language C other language LUA

    Check out my first C app Super - flasher here

    visit my dev site where you can download all of my coding projects - http://benh-pspdev.bravehost.com/



    Please visit my site www.pspfanatic.bravehost.com
    and join the forums

  4. #4
    DCEmu Newbie
    Join Date
    May 2006
    Posts
    5
    Rep Power
    0

    Default

    completely off topic, but why the hell people insist on calling the core of the OS "kernal"? It's KERNEL, for god's sake.

  5. #5
    PSP User Davidov's Avatar
    Join Date
    Mar 2006
    Location
    Scotland
    Posts
    46
    Rep Power
    0

    Default

    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++


    Quote Originally Posted by msaraiva
    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 BUT you are absolutely correct Msaraiva.

  6. #6
    DCEmu Old Pro BL4Z3D247's Avatar
    Join Date
    Jun 2006
    Location
    BL4Z3D 24/7 in CT
    Posts
    1,970
    Rep Power
    83

    Default

    Quote Originally Posted by msaraiva
    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?

  7. #7
    PSP Coder benh's Avatar
    Join Date
    Mar 2006
    Location
    linclonshire, England
    Posts
    362
    Rep Power
    71

    Default

    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!
    Benh = Coder, main language C other language LUA

    Check out my first C app Super - flasher here

    visit my dev site where you can download all of my coding projects - http://benh-pspdev.bravehost.com/



    Please visit my site www.pspfanatic.bravehost.com
    and join the forums

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •