Good morning everyone and thank you very much for your help,
I introduce myself first, I am nokiajavi and I have been translating the PS2 game Jade Cocoon 2 into Spanish for years.
From the beginning I tried to find the pointer table to be able to make the best possible translation, but I have not been successful in finding it, I have tried the formula that is used with other nes roms and others without success.
I think it is possible that the table of pointers is integrated in a single file, I put you in situation.
This game has mainly 2 files in which the game text and menus are located.
On the one hand there is the file SLES_507.35 that includes the texts of the user interface and the character table and on the other hand we have a file called CDDATA.000 that includes the images of the game and dialogues above all.
The SLES file is accompanied by 2 other files called SLES_5 ~ 1.XMA and SLES_5 ~ 2.XMA with extension .XMA, which is plain text, it is like a trace or something for the SLES file, I think it could indicate the pointers to that file.
00671CD8 00000007 .rodata @ 272 (modesel.c)
00671CE0 00000002 .rodata @ 273 (modesel.c)
00671CF0 0000001A .rodata @ 479 (m2Main.c)
00671D10 00000017 .rodata @ 480 (m2Main.c)
00671D30 00000017 .rodata @ 481 (m2Main.c)
00671D50 00000016 .rodata @ 482 (m2Main.c)
00671D70 00000016 .rodata @ 483 (m2Main.c)
00671D90 0000001A .rodata @ 484 (m2Main.c)
00671DB0 0000001A .rodata @ 485 (m2Main.c)
00671DD0 0000001A .rodata @ 539 (m2Main.c)
00671DF0 0000001A .rodata @ 540 (m2Main.c)
00671E10 00000018 .rodata @ 541 (m2Main.c)
00671E30 00000019 .rodata @ 542 (m2Main.c)
00671E50 00000019 .rodata @ 543 (m2Main.c)
The first text that appears in the game is "New game", in the main menu, which I want to replace with "New game".
The first letter is at the offset: 5797544 = 0x5876A8 (HEX)
The last letter is at the offset: 5797551 = 0x5876AF (HEX)
I have tried applying the following formula:
Dialog pointer = (Position of the first character of the dialog)
- (header - from ROM if any) + (leave the
last four digits) + (group them in pairs) + (reverse them)
To try to find a pointer that points to the beginning or end of the text, but I don't know if there is a header here, nor the size that the pointer can occupy, 2, 3 or 4 bytes to apply the formula correctly.
SLES file fragment:
As for the CDDATA.000 file, the structure is a compressed file that includes images, textures, etc., in addition to the dialogs.
This file comes with another one called CDDATA.LOC, it is a binary or encoded file, and maybe it is to be able to unzip the file or maybe it has the pointer table of the entire CDDATA.000 file.
Likewise, the offset of the first word of the dialogues that appears in the game is: 129883904 = 7BDDF00 (HEX)
the last of the first sentence: 129883908 = 7BDDF04 (HEX)
The separation with the following phrases is by groups of 00, the number of groups varies 12 or 15 or 8, it does not follow a pattern.
I put a fragment:
Let's see if you can tell me how I could try to find that table of pointers to be able to modify them and expand the amount of text that I can display.
Thank you very much, if you need any more information to help me, ask me.