ROM Hack Toshin Toshi (RE)

chaoskagami

G̷̘̫̍̈́̊̓̈l̴̙͔̞͠i̵̳͊ţ̸̙͇͒̓c̵̬̪̯̥̳͒͌̚h̵̹̭͛̒̊̽̚
OP
Developer
Joined
Mar 26, 2016
Messages
1,365
Trophies
1
Location
↑↑↓↓←→←→BA
Website
github.com
XP
2,287
Country
United States
I'm probably not going to ever finish my research on the game, but for anyone who wants a translation of Toshin Toshi: Girl's Gift RPG, here's some RE I've done (warning - wall of text):

BIN files
Most .bin files in the romfs are regular gzip files (not tar.) To decompress the game's data, you can literally just gzip -d. The game will also happily load decompressed bin files, which will aid testing. You can recompress them with gzip on any old linux system as well, including -9 (which actually produces a smaller romfs, incidentally.)

Data files
Most of these data files when extracted have the following header, at least so far as I've decoded:
{
u32 unknown;
u32 ptr1;
u32 ptr2;
...
}

unknown seems to be roughly the same for folders sharing the same data, e.g. everything in btl seems to start the same (aside from btl_resident.bin)

One of ptr1 or ptr2 will always point to a string table, regardless of the file. These strings are utf8-encoded, packed together without padding, and zero terminated. Some bits you'll need to know - <player/> substitutes the player's name, <p0/> and the like are for when numbers are used, such as money and stats. Not all files have in game strings - if it begins with 'root', don't mess with it, those seem to be scripting commands.

The main files containing translations for the actual story are in map. Other translatable strings are located in the item, shop, menu, btl, and the *_resident bins.

There's room to work with because UTF8 takes more space than SJIS.

A whole textbox's worth contains '\n's or 0x0A to separate lines. You can also end-pad the line with zeroes which means the offset of text in-table is directly referenced earlier in the file.

The game also has a proper VWF, but see issues below.

test folder
The test folder contains some files which likely are intermediate files (and probably weren't meant to be left on the cart.)

NTMD is likely some kind of image or model format, for example. It appears to be organized into chunks that are multiples of 0x80 bytes. SCPT seems to be a header in use, as well. There's also a "hello world" script in the test folder, which if you could find a way for the game to run it, would potentially help with RE of the actual script format. Unfortunately no tools were left behind, and you can't simply swap nor inject the hello world script anywhere - there appear to be size checks.

Issues
The game won't display more than the maximum fullwidth characters in a textbox, which means you likely need a code patch to show halfwidth properly.

In summary - with a code patch to display more text on screen, this is probably translatable as-is with careful text considerations. There's absolutely zero crypto or obfuscation involved, just custom datafiles.

Misc info
It appears some files contain debugging information - I'm rather sure that D:\... isn't a valid path on the 3ds, so it's likely this was once built and tested on a computer.

tl;dr - There's no fancy crypto involved, no checksums, nothing but a custom data format which someone more skilled than me could likely build an unpacker for. I'm dumping this here for anyone who wants to go further than me.

As an aside, the game also runs nigh-perfect in citra, so it's probably possible to debug how it does things.
 
Last edited by chaoskagami,

chaoskagami

G̷̘̫̍̈́̊̓̈l̴̙͔̞͠i̵̳͊ţ̸̙͇͒̓c̵̬̪̯̥̳͒͌̚h̵̹̭͛̒̊̽̚
OP
Developer
Joined
Mar 26, 2016
Messages
1,365
Trophies
1
Location
↑↑↓↓←→←→BA
Website
github.com
XP
2,287
Country
United States

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: Just 6 but dual band 6 lol