Does anyone knows how to add code to an eboot?

Discussion in 'PSP - Hacking & Homebrew' started by Patrick Evers Bjoerkman, Jan 8, 2015.

  1. Patrick Evers Bjoerkman
    OP

    Patrick Evers Bjoerkman Member

    Newcomer
    10
    0
    Jun 19, 2014
    Hey I am doing a translation project for Little Busters CE! for PSP and to fix an issue with the text I need to write some MIPS to the eboot.bin. To get around the problem of offsets inside the program, I was thinking of adding the code to the end of the eboot.bin and replace a nop instruction somewhere to jump to my code using MIPS jal and return to the previous address using jr $ra afterwards. The problem is that after adding this code to the eboot.bin, PPSSPP (PSP emulator) just gives me a list of nop instructions where the new code was supposed to be (the nop are there with and without my code). Does the elf has some sort of start/end/length offset table for sections of the file or something and does anyone knows how I should attempt to make it see my added code?

    I appriciate the help.
     
  2. flame1234

    flame1234 GBAtemp Advanced Fan

    Member
    715
    402
    May 17, 2009
    United States
  3. Patrick Evers Bjoerkman
    OP

    Patrick Evers Bjoerkman Member

    Newcomer
    10
    0
    Jun 19, 2014
    ah I missed that one. Thanks for quick answer, I'll check it out further tomorow.
     
  4. Scorp

    Scorp GBAtemp Regular

    Member
    247
    82
    Sep 23, 2010
    Kazakhstan
    Well, for me that method did not work correctly, actually... Means, if I put executable code in this new part all got screwed. Would like to speak with some PSP EBOOT expert, actually, who would point me what I am doing wrong...
     
  5. JamRules

    JamRules ...

    Member
    428
    421
    Jan 9, 2014

    I had the same problem, it's because the old code is still trying to save in a set location. What I did was look for a section that wasn't being changed and move where the section starts