The compression is not very fast (17 seconds on my Core2Duo 2.7 Ghz) but works fine : http://www.hiei-tf.fr/DBZ_RPG_1.rar
- "decompress_font.bat" to decompress/extract the font to a file ("decompressed_font_japanese.bin").
- "compress_font.bat" to compress/insert the font back to the rom.
You can see the source code in the .lua files.
The code was made by Bahabulle (http://www.romhacking.net/forum/index.php?action=profile;u=14762
) on a request from me for a future japanese-french translation planned with a friend.
The pointers of the different banks for the texts are a bit mess up in the japanese rom and it took me some times to move them without any bugs. If you're also interested, I have an .IPS patch I made which expand the rom and move the japanese texts to the expanded part, with all the pointers already fixed (I had to add some sentences twice to be sure the extraction of the script isn't a mess). I also have a working tool/scripts to dump/reinsert those texts (moved in the expanded part).
The only thing that I haven't dumped correctly is the battle texts, as each first byte is the length of the string, and it's dumped as a japanese character in my dump :
But that's not a problem for me, as I can manually edit those bytes after, in an hex editor, to fit the new length of the strings.
About the length of the menu windows, it's at 0x160F2 for the one of the bottom-left corner of the map, with the actions "Fly/etc...". (four bytes for each window : Width, Height, X axis, Y axis), etc...
Then you have to modify the coordinates of the texts of the window, in this example, it's at 0x15AB6 (16-bits pointers at 0x15A16).
1 byte (+1) : number of characters per word.
1 byte (+1) : number of words
2 bytes : location of the first word on the screen
n bytes : menu texts
And finally, the cursor position at 0x16233.
(All those infos are, again, from Bahabulle).
And no, the text is not compressed at all. That's probably the only thing uncompressed in the rom. For example, the main script start at 0x302DC and end at 0x35108 (or something like that for the end of the text, not sure it's the final value as I now only use my expanded version, which use differents address for the texts). There are 366 (16-bits) pointers for the main text, located at 0x30000.
And the 24-bits pointer of the 16-bits pointer table of the main text (if you want to move the pointers table and the texts in another bank to have more free room for the text) is at 0x38F1C.