I spent some time recently on helping someone to translate PSG2 into english. I've made a tool to extract and reinsert text (you can test it at pscave board
), I've figured out how to change characters' size (easy) and how to make them right aligned in menus (much harder).
I precise I'm not a skilled romhacker (it's the first time I dive into a game code) and I had to learn some stuff (noticeably MIPS assembler language) but I have some knowledge on coding.
What I'd like to do is to change the encoding of text.
They are encoded in a subset of SHIFT-JIS, with 2 bytes per character, and I'd like to have them in a 1 byte encoding (ASCII, or a custom one).
I know where the encoding table is stored : in the ELF file (named SLPM_625.53), it begins at 0x152b08. Once in memory, it must be located at 0x251b08.
The problem is that in the disassembled code (I use ps2dis), there is no pointer to this address. There are some pointers to addresses a little before of a little after the table, but all the pieces of code I have checked use these areas for storing registers values, and don't read anything in the table area.
I have tried to check portion of codes where there seems to be a loop where a register is incremented by 2, but as you may imagine, there are some thousands of possible portions.
Do you have an idea of a strategy to find the portion of code I should study to change the encoding ?
If you don't, do you know documents, tools (especially, is it possible to use ome debug mode of PCSX2 ?), websites that could help me for that purpose ?
Thanks in advance.
EDIT : I think I've localized the area. Now trying to figure out how to change it without breaking everything...