How can I see the text of Captain Tsubasa Vol.II using an hex editor

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

Post Reply
User avatar
OliverTsubasa
Posts: 1
Joined: Mon Aug 24, 2020 3:22 am

How can I see the text of Captain Tsubasa Vol.II using an hex editor

Post by OliverTsubasa » Mon Aug 24, 2020 3:54 am

I want to translate Captain Tsubasa Vol. II: Super Striker to portuguese, the only problem is I can't see the text on any hex editor. Does anyone know what I need to do?

tepples
Posts: 22049
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: How can I see the text of Captain Tsubasa Vol.II using an hex editor

Post by tepples » Tue Aug 25, 2020 3:55 pm

Guesses:

The text may be encoded with an encoding other than ASCII. Use a hex editor with relative search. Or use the nametable and pattern table views in a debugging emulator (Mesen or FCEUX Windows) to look at what tile number corresponds to each letter.

The text may be compressed. This might require a lot of working backward to find where the text data written to VRAM through $2007 is ultimately coming from.

User avatar
tokumaru
Posts: 11858
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: How can I see the text of Captain Tsubasa Vol.II using an hex editor

Post by tokumaru » Tue Aug 25, 2020 5:45 pm

If the game's in Japanese, you definitely won't see any of the text just looking at the ROM in an hex editor, since Japanese characters aren't even present in the ASCII character set.

I second tepples' suggestions:

Open the name table viewers in a debugging emulator and take note of the indices of the tiles that make up part of the text you want to replace, then search for that sequence of bytes in the hex editor. If there's a match, confirm that the surrounding bytes match the rest of the text. As long as the replacement text isn't longer than the original, overwriting the strings in the hex editor should be enough.

If you can't find the text that way, it's probably compressed or encoded in some way. This will make things significantly harder: you'll have to reverse engineer the subroutines in the game that are decoding the strings and writing the tiles to VRAM. For this you'd use an emulator's debugger and set a breakpoint for writes at the exact VRAM address where the text appears. The emulator will then pause when that location is written to, and you'll be able to step through the code that's writing the characters, hopefully allowing you to identify where the data is coming from and what transformations (e.g. decompression) it's going through before being output. You need to know at least the basics of 6502 assembly in order to understand what's going on.

Pokun
Posts: 1511
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: How can I see the text of Captain Tsubasa Vol.II using an hex editor

Post by Pokun » Fri Aug 28, 2020 4:41 am

Hex editors specifically made for translation hacking such as Thingy supports custom character encoding tables, which may allow you to see kana in the text field once you have figured out the encoding and made a table for it. Windhex32 supports character tables and can display Japanese characters.

User avatar
BillyWM
Posts: 9
Joined: Sat Dec 27, 2014 10:05 am
Location: Sacramento, CA
Contact:

Re: How can I see the text of Captain Tsubasa Vol.II using an hex editor

Post by BillyWM » Wed Sep 09, 2020 11:44 am

Looks like there's a number of translations over on RHDN. They're delivered as IPS patches. An IPS patch is a list of addresses and bytes to put there, so basically those patches already contain information on where all the text is stored (and possibly other stuff, like code changes to accommodate the new text)

Did a quick search and it looks like this tool would help you look at what the IPS file is changing:

https://www.romhacking.net/utilities/1038/

And here's more technical info on the format if you're curious:

http://fileformats.archiveteam.org/wiki ... ch_format)

-------

Otherwise, yeah, if little is known then you have to get into the emulator debugger and do reverse engineering. I'm doing a translation right now of a never-translated game and located the first bits of text by just slowing the emulation down and looking at the memory access count while text was being shown. Luckily there's no compression in this case so kana (and even kanji) were one-byte-one-character and finding a block of memory that was accessed contiguously led straight to chunks of text. You still have to figure out the custom encoding from there, and there's probably control codes interspersed (again, custom) for different purposes, and so on.

Post Reply