romhack / mgsgbLz

Game Boy Metal Gear Solid: Ghost Babel script tool.
BSD 3-Clause "New" or "Revised" License
10 stars 0 forks source link

Does mgslz have any plans to support Japanese roms? #1

Open AugenKOR opened 4 years ago

AugenKOR commented 4 years ago

Hi, I am Augen working on localization of Korean game rom.

The dialogue output method is expected to be similar to the English version. However, I noticed that the "block", "message" and "MteDictionary" positions of the dialogue are different.

It is easy to work with the English version, but the number of characters that can be used is less than that of the Japanese version. English font : 00~DF Japanese font : 00~EF, F701~F7FF

Please make it to support Japanese roms. I would like to help gamers in my country to play this game in Korean. (Sorry for the poor English.)

romhack commented 4 years ago

Hello, Augen! The main problem for me is not knowing Japanese. I can't tell the difference between an improperly unpacked binary chunk and normal Japanese text. On the other side I can reverse engineer text instances addresses and support you in compiling the tool. Say, did you try to recompile mgsgblz from source? That should not be hard: just install Haskell stack, and then do

stack setup
stack build

If everything OK, I will modify source code, so you could build it and try yourself to extract full script.

AugenKOR commented 4 years ago

Thanks for the reply Let's try it!

romhack commented 4 years ago

So I have build a tool with new command key: decompress instance as binary blocks. Check out attached exe and batch file with sample commands to unpack instance 0 and 1 as set of binary blocks: mgsgbLz-master.zip I personally have no idea what is unpacked, so the target now is to check unpacked blocks and verify it. If everything is OK, you can create table, like in Eglish case: table.zip
And then use command -d -s, so mgsgblz will use your new table and extract full script in set of text instances.

AugenKOR commented 4 years ago

Thank you for your hard work I created a table according to the Japanese version and succeeded in Decode script. But there was a problem. There is a difference between the English version and the Japanese version of the rom address of mteDictionary. The Japanese version of the character name starts at 0x001483FF. If you look at the HEX above, you can see that it is different from the created mteDictionary. But I can't find the exact rom address by my ability...

I'll give you the Decode script file, name.txt, table.tbl.

https://1drv.ms/u/s!Av-otsJCarsx6XkkMTwZ2UK1hcwZ?e=zYrOtV

romhack commented 4 years ago

I'm not sure, that understood your question right. In English version first 24 MTE entries are reserved for character names. So MTE entry #0 at 0x14898D is encoded 'Snake' string. As I understand, the same goes for Japan. Do you state, that Japan MTE entry #0 at 0x1483FF is not Japan 'Snake'? Also note, that in generated binary MTE dictionary first 0x200 bytes are reserved for pointer table for MTE entries.

AugenKOR commented 4 years ago

What you understood is correct It seems to be the same principle. Japanese and English names seem to exist the same as the Japanese version and the English version.

I will attach a screenshot of the rom data. https://1drv.ms/u/s!Av-otsJCarsx6X-0Sa9Z69IKYjeB?e=zkYhRi https://1drv.ms/u/s!Av-otsJCarsx6gDhJggX58rWt_sc?e=XJ4xVJ

romhack commented 4 years ago

So, in Japan ROM MTE table starts at 0x1481FF and built mteDictionary should be inserted there. I mean, you couldn't find this ROM address?

AugenKOR commented 4 years ago

right. :D I couldn't do this on my own.