ROM Hack Need help with pointers in Resident Evil DS

lps

man with no face
OP
Newcomer
Joined
Sep 13, 2009
Messages
55
Trophies
1
Location
Crimea, UA
Website
tagteam.ru
XP
335
Country
Hi all, i wanna make translation of RE DS and trying to understand text format:

Pointers:
0x03B0 - first pointer 4 bytes, to address 0x3290, first 3 special bytes, and text from 0x3293
0x03B4 - second pointer 4 bytes, to address 0x32A9, first 3 special bytes, and text from 0x32AC

0x3280 - last pointer 4 bytes, to addres 0x016447

End of pointers block, last 4 bytes - 0x328c before text on 0x3290

Sometimes between pointers we have 4 special bytes 0x00730000. (???)
Sometimes we have 2 or more pointers to the same text string.

Encoding - ascii
line brake - 0x01
string end - 0x00
Some special bytes:
0x0300 - ??
0x0301 - ??
0x0302 - ??
0x060002 - wait for input
0x0600 - end of string with 0x060002, after 0x0600 always 0x00

some variables:
0x040105000400
0x040105000400
example: "Would you take %item%?" is "Would you take 0x040105000400?"

Maybe somebody can help me?
Sorry for bad english.
sample
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,284
Country
United Kingdom
I have yet to bother to set up properly on this machine for hacking so I am a bit limited in what I can do. Still having watched a few minutes of a playthrough it appears there is both text that appears all at once and other text that gets typed on the screen, such things are a good bet for that kind of markup. However the text location in the file seems to bear little resemblance to what order it comes up in the game (or at least Chris' playthrough).

Have you tried to see what happens when you change the special bytes? If you do then make sure to load the game and use a normal save/start a new game. Using a savestate might not work. Alternatively if you can find the text in RAM then you might be able to edit that there.
 

snake7beckham

Member
Newcomer
Joined
Aug 9, 2009
Messages
21
Trophies
0
XP
163
Country
Dump the script with Cartographer using this table and this command file. The script will contain duplicate strings, just translate them all. Strings that contain control codes only, put them as they are without changing anything.

After translating the script, put the following text at the top of the script file:
Code:
#VAR(MyTable, TABLE)
#ADDTBL("Resident_Evil_DS.tbl", MyTable)
#ACTIVETBL(MyTable)
#JMP($3290)

Then reinsert the script with Atlas using the same table file but remove "\n\n" from value "/0=<END>".

The end credits are located in arm9.bin: 0x12E9BC. Pointers come after it: 0x12F2B8.

The graphics are compressed in cpac_2d.bin.

If you need any help, don't hesitate to ask.
 
  • Like
Reactions: lps

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,284
Country
United Kingdom
Impressive. Have you previously tackled this game?

Some interesting parts of that table as well. "11011181118311861101=<S.T.A.R.S.>" is something I do not often see in DS games.
 
  • Like
Reactions: lps

lps

man with no face
OP
Newcomer
Joined
Sep 13, 2009
Messages
55
Trophies
1
Location
Crimea, UA
Website
tagteam.ru
XP
335
Country
I'm trying to make test text insertion, but i dont see any changes in msgdat.en :/
snake7beckham, can you check it? Here
Ind can you tell me, how can i decompress gfx to editing it?
 

snake7beckham

Member
Newcomer
Joined
Aug 9, 2009
Messages
21
Trophies
0
XP
163
Country
Notice that you're translating commented strings. You have to put the translated text in the line after the commented string. If you want to translate the text directly, change #COMMENTS value to No in command file. Also do not forget to add the text I put up there at the top of the script file before insertion.

As for graphics, open cpac_2d.bin in CrystalTile2 then: Tools -> LZ77/HUFFMAN compression Search...
In the new window press Find and the result is 428. You have to Extract them one by one otherwise the program will crash. The program will also crash while extracting some of the addresses. I guess not all of them are compressed graphics. I had a list of all the images I managed to extract but I forgot where I saved it :(
Here are some of addresses:
Main Menu: 0x000AEA84
CAPCOM - Licensed by Nintendo: 0x00008450
Player Selection: 0x00010530

After editing the graphics, re-compress them with CrystalTile. Tools -> LZ volume compression...
As for reinserting them, here is how I do it:
Open cpac_2d.bin in Windhex. Click Edit -> insert Binary Data. Select the compressed file you want to reinsert and enter its address in Start Offset field then press enter and save.
 
  • Like
Reactions: lps

Auryn

Well-Known Member
Member
Joined
Jul 21, 2011
Messages
559
Trophies
1
Age
51
XP
706
Country
Swaziland
@snake7beckham: if CT2 crashed while batch extracting, you had some false positives on the list (some entries that CT2 identify as compressed files but they are not). Sad you don't find that list, lps could just have deleted the false positives from the list and then batch extract.
 
  • Like
Reactions: snake7beckham

lps

man with no face
OP
Newcomer
Joined
Sep 13, 2009
Messages
55
Trophies
1
Location
Crimea, UA
Website
tagteam.ru
XP
335
Country
snake7beckham: thx for your help, now i'm have another software for text editing with tbl file based on yours. After end of translation maybe i'll share it. (Now ~30% already translated).
So, now i'm need help with palettes for compressed gfx. How i can find it? Or you just edits it on grayscale palette with CT2?
 

snake7beckham

Member
Newcomer
Joined
Aug 9, 2009
Messages
21
Trophies
0
XP
163
Country
gudenaurock: I don't understand what you mean but if you mean it's gonna be trouble dealing with pointers, Atlas will do that for you.

lps: Actually the letters for "yes/no" are taken directly from the font file (fontsds.cfnt).
3b069yl.jpg
 

snake7beckham

Member
Newcomer
Joined
Aug 9, 2009
Messages
21
Trophies
0
XP
163
Country
0xAF75C - Resident Evil logo (End Credits)

Slideshow graphics:
0x4C5FC - Umbrella (Bio-Organic Weapon Official Report)
0x4CF60 - CERBERUS (MA-39)
0x4E7A0 - NEPTUNE (Fi-3)
0x4FE48 - HUNTER (MA-121)
0x51728 - TYRANT (T-002)
 
  • Like
Reactions: lps

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: