Romhacking => ROM Hacking Discussion => Topic started by: TheMuffinsAvenger on October 25, 2020, 03:31:20 pm

Title: Kamigami PSP
Post by: TheMuffinsAvenger on October 25, 2020, 03:31:20 pm
Hello everyone. I have a post in the newbie forum about this project, and an idea came to mind listening to suggestions. I used the GE Debugger to see if I could find any information from where the game was pulling from. I found a texture address (08A11FD0), but I'm not sure where to search for it. I'm sorry if this is a silly question, this is my first time working on a PSP/Rom game, so I am a little lost. I didn't find anything in the memory, and I'm not familiar with the debugger yet, so I am a little lost. I'm probably looking over something crucial (or looking in the wrong area entirely). Any suggestions?


Title: Re: Kamigami PSP
Post by: [Unknown] on October 25, 2020, 07:03:58 pm
PSP games often allocate memory dynamically, including textures.  Unlike simpler systems, RAM addresses are not just mapped to the disc.  Instead, the game intentionally loads data into RAM itself.

What I'd suggest is:

1. Create a save state from before that texture is likely to be loaded.  This might be well before the scene.

2. From that save state, trigger the scene and confirm the texture address.

3. Reload the save state, and set a memory breakpoint on the address for 0x10 bytes.  You can do this from the Disassembly window.  You're only interested in write, not read.

4. If your save state was early enough, you should see where it loads the data into that memory address.  It could be too early, though, and you might see it loading something else.

5. Keep continuing to count how many times the breakpoint trips.  The last time it trips is the one you want, but you'll pass it confirming that and have to load the save state once more.

Title: Re: Kamigami PSP
Post by: TheMuffinsAvenger on October 31, 2020, 11:32:28 am
Hey everyone. Sorry to bump, I went and posted my question in the wrong forum again.


I have run into the dreaded font problem that happens with many Japanese ROM translations. I'm not certain if this is a character spacing issue (or can be fixed character space changes) or a font width issue. Any suggestions on how to tackle this first?
Title: Re: Kamigami PSP
Post by: Risae on October 31, 2020, 04:40:24 pm
It seems like the game (currently) only supports fixed width font. What you need is a so called "Variable Width Font".
I recommend doing the following:

- If you can, try to figure out how the text routine is build up and see if there is anything that might resemble a character width table. There are PSP games that do have a width table sitting somewhere and you could adjust the width of the characters and make it look all nice and shiny
Here's an example what a width table can look like in a PS2 game:


Each 1 byte corresponds to the ASCII table character and holds the width value.

- If that doesn't work/the width table doesn't exist and everything is fixed width, then you might have to create a VWF in the executable file/ELF/eboot. Technically you would have to reroute (jump) the current text routine to your VWF code that for example, once alphabet characters are being used, the game should perform a VWF routine to draw each character on the screen and then go back to the original text routine. This probably would have to be done in the MIPS assembly code.

Update 1: Here are also some notes from a buddy on my team:

Seems like the guy already found some text, and judging by the GE debugger screenshot the game draws the text every frame (I hope it does it with quads/triangles instead of strips)
Next step would be putting a breakpoint on the text and see what function read it
Whatever the function does read it would most likely be the one that does the text rendering (or is some preprocessing, depends)
Then they can just scan the function for a fixed value add instruction
That's should be the one that would be used to set the coordinates for the display list
Defer that to some blank space on ram with some test VWF code and if it works you got most of the way there

November 01, 2020, 05:47:01 am - (Auto Merged - Double Posts are not allowed before 7 days.)
Update 2: Ethanol, our super MIPS hacker, took a closer look at how the game creates the text and he found out the following:



If you want to talk directly to him, you can visit us at our Growlanser 6 discord server here:

Hope this can help you!
Title: Re: Kamigami PSP
Post by: TheMuffinsAvenger on November 01, 2020, 08:33:57 am
YES! Thank you. The Xoring I knew from before, but I couldn't figure out how it played into the calling of the function. I spent a few hours working on it, and i found that it looked like it was pulling images (or sprites) rather than words. It's really roundabout. I would love to talk to someone else about this since I am mostly spinning my wheels at this point.