1. ChepChep

    OP ChepChep GBAtemp Advanced Fan
    Member

    Joined:
    Feb 9, 2011
    Messages:
    605
    Country:
    United States
    I am going to try doing it myself with Kelebek's description. I will learn more if I figure it out with help then just letting someone else do it for me. I rather struggle a bit and get it since then I will understand what is going on.
     
    Pablitox likes this.
  2. Scorp

    Scorp GBAtemp Regular
    Member

    Joined:
    Sep 23, 2010
    Messages:
    248
    Country:
    Kazakhstan
    Well, if you would figure, what is big meaning in sections, why they intersect with program (and sometimes not) - please share. As by now I just ignore them, just fixing offsets.

    And, if you would succeed (well, not if - when) with your proportional print routine, can you please do some tutorial? Would be helpful, I think.
     
  3. ChepChep

    OP ChepChep GBAtemp Advanced Fan
    Member

    Joined:
    Feb 9, 2011
    Messages:
    605
    Country:
    United States
    So with Kelebek help(mostly his work), I was able to expand the eboot.bin by 0x1000 bytes. It turns out I was modifying an already modified eboot and needed a clean one (stupid mistake on my part). Also didn't add 0x20 to that section header table pointer (the pointer at 0x20 in the file), and also 0x20 to the iPaddr.

    I just added 0x1000 bytes (all 00's) to the end of the eboot.

    Here is a screenshot of the before and after in case it helps anyone:
    Original Eboot
    [​IMG]
    Edited Eboot
    [​IMG]
     
    flame1234 and Pablitox like this.
  4. thexyz

    thexyz Member
    Newcomer

    Joined:
    Jan 8, 2014
    Messages:
    40
    Country:
    Serbia, Republic of
    GHANMI and Scorp like this.
  5. Scorp

    Scorp GBAtemp Regular
    Member

    Joined:
    Sep 23, 2010
    Messages:
    248
    Country:
    Kazakhstan
    That's great info! Very interesting to read for me.
     
  6. JamRules

    JamRules .....
    Member

    Joined:
    Jan 9, 2014
    Messages:
    520
    Country:
    United States
    Just added an initial vwf attempt, what I did
    -Find the point were the constant width/spacing value is added to the x pos for the next letter (In my case the width value is added after the vertex for each letter is saved and the x pos is stored, not calculated each which would be a problem)
    -Trace back to where this width was loaded (luckily it was reloaded for each char)
    -Extend the eboot to allow for the extra code and char table (big thanks to Kelebek)
    -Inject when a char is loaded and save it for later
    -Inject before the width is loaded and save a new width value by comparing the char saved earlier to the char table added to the eboot

    [​IMG]

    [​IMG]

    The font still renders full size but the white space on the right is overlapped,
    I still need to align all the letters to the left the letters to look correct
     
    Cyberdrive, Scorp, ChepChep and 2 others like this.
  7. Scorp

    Scorp GBAtemp Regular
    Member

    Joined:
    Sep 23, 2010
    Messages:
    248
    Country:
    Kazakhstan
    Very interesting! Just one thing:

    What is the fastest way to find that? Apart tracing whole text, obv. Seems using GE Debug somehow (sorry for noob questions)?
     
  8. JamRules

    JamRules .....
    Member

    Joined:
    Jan 9, 2014
    Messages:
    520
    Country:
    United States
    Yeah using GE debugger step texture until the font and then step primative, this only works if the letters are rendered seperately though
     
  9. flame1234

    flame1234 GBAtemp Advanced Fan
    Member

    Joined:
    May 17, 2009
    Messages:
    734
    Country:
    United States
    I don't even know what's what.
    What is the meaning of instruction c.lt?
    How do you see the values of register f12 and f14?
    How do you know how big to make each letter? Is there a list somewhere of recommended widths?

    It looks like you have a bunch of eight-byte entries. What kind of number format is the last two bytes (which I think might be the width)?
     
  10. JamRules

    JamRules .....
    Member

    Joined:
    Jan 9, 2014
    Messages:
    520
    Country:
    United States
    What is the meaning of instruction c.lt?

    Compare Less Than, but this just the original instruction I replaced with a jump.

    How do you see the values of register f12 and f14?

    The float coprocessor registers (f12, etc.) can be seen by clicking FPU above the standard register list.

    How do you know how big to make each letter? Is there a list somewhere of recommended widths?

    I changed the ram at run-time until it looked right, then I can update the eboot.

    It looks like you have a bunch of eight-byte entries. What kind of number format is the last two bytes (which I think might be the width)?

    4 bytes for the char, 4 bytes for a float which is loaded into a float register


    The code's not the best and has some redundant opcodes as I made it up as I went along, also PPSSPP had a weird fit with lw s2, 0x4(s5) so I had to use addiu s5, s5, 0x4, lw s2, 0x0(s5)
     
  11. StorMyu

    StorMyu "I'm too old for this"
    Member

    Joined:
    Jan 2, 2010
    Messages:
    925
    Country:
    France
    I'm more interested in what you use to insert your code. Have you heard about .sym ?
     
  12. JamRules

    JamRules .....
    Member

    Joined:
    Jan 9, 2014
    Messages:
    520
    Country:
    United States

    Actually no, I just used the assemble opcode function of the debugger.

    Edit: basically you mean to symbolcate it so its more human readable?
    Names for constants, etc.
     
  13. Scorp

    Scorp GBAtemp Regular
    Member

    Joined:
    Sep 23, 2010
    Messages:
    248
    Country:
    Kazakhstan
    Please explain, what is that .sym and how it would help in inserting the code. As I thought the way everyone do (e.g. coding in debugger (maybe also assembler? never tried to find one for MIPS) and putting few bytes in some free space) is the only way :)
     
  14. thexyz

    thexyz Member
    Newcomer

    Joined:
    Jan 8, 2014
    Messages:
    40
    Country:
    Serbia, Republic of
  15. StorMyu

    StorMyu "I'm too old for this"
    Member

    Joined:
    Jan 2, 2010
    Messages:
    925
    Country:
    France
    almost, it's just a thing that Martin Korth started with his debuggers and Kingcom made it for PPSSPP too.
    I don't have any new screenshots for that so I'll just use an old with NoGba but the concept is the same:

    [​IMG]

    You can assign any memory address to a label that will appear on the debugger, it's especially useful since you can "Text Search" inside the assembly window (in PPSSPP too) thexyz is using Armips, as I do, it's an assembler that will allow you to output a .sym file and you just have to have the same name in the same directory for ppsspp to recognize it.
    - Sol Trigger.iso / Sol Trigger.sym for example.

    Then it's easy to just track down your own code to see if there's something wrong, you define labels like that:

    Code:
    .org 0x08922200
     
    Font:
     
    .ifdef English
        .import Data\Font\Italian.raw
    .endif
    .ifdef French
        .import Data\Font\French.raw
    .endif
    .ifdef Italian
        .import Data\Font\Italian.raw
    .endif
    .ifdef Spanish
        .import Data\Font\Spanish.raw
    .endif
    I've shown you this because you can see that you can also ifdef, which is nice (for my Tales of Rebirth translation on multiple languages in this case ^^)
    Anyway, that will replace 0x08922200 by Font in PPSSPP, and then you can just Ctrl+S to check for it. It'll even allow you to see where it's called, stuff like "li a0,font" (very unlikely but I had no good examples in mind)

    Note that you can also load Directories in PPSSPP, reducing the time to build an iso so a quick change to the EBOOT is not hard to do, armips is quite fast. You'll be able to test your changes in a matter of seconds without fear of gamebreaking freeze / mistakes and your whole code will be in your .asm file so easy to change.
     
    JamRules and Cyberdrive like this.
  16. JamRules

    JamRules .....
    Member

    Joined:
    Jan 9, 2014
    Messages:
    520
    Country:
    United States
    Very interesting didn't know that existed, I'll have to try it.
    Thanks for the tips.

    Edit: gave it a quick go

    [​IMG]
     
  17. StorMyu

    StorMyu "I'm too old for this"
    Member

    Joined:
    Jan 2, 2010
    Messages:
    925
    Country:
    France
    better to read heh ? :lol:
     
    JamRules likes this.
  18. JamRules

    JamRules .....
    Member

    Joined:
    Jan 9, 2014
    Messages:
    520
    Country:
    United States

    Useful when planning to insert complex additions
     
  19. Scorp

    Scorp GBAtemp Regular
    Member

    Joined:
    Sep 23, 2010
    Messages:
    248
    Country:
    Kazakhstan
    Well, I personally seems too die-hard, so I still think, that symbolic only useful, if you really want to disassemble a lot. By me when there is 50 bytes of code and 3 label there is not so big need for translating addresses to label. But convenient sometimes, yes :) So if you assemble in separate tool, could be useful, I think.
     
    JamRules likes this.
  20. StorMyu

    StorMyu "I'm too old for this"
    Member

    Joined:
    Jan 2, 2010
    Messages:
    925
    Country:
    France
    It's not like it's difficult. I insert my code with armips anyway, the symbols are just a bonus.
     
Draft saved Draft deleted
Loading...

Hide similar threads Similar threads with keywords - Variable, Hacking, Width