ROM Hack arm9.bin Hacking Guidance Needed

riceball7852

A person with a life.
OP
Member
Joined
Dec 14, 2010
Messages
103
Trophies
0
Location
Building...
XP
101
Country
United States
I know this is my third time asking for help about hacking/translating a ROM.
Okay, so here we go...

I'm currently translating a game from Japanese to English (as a practice for the future to translate other ROMS) and I'm currently trying to extract/edit some contents within the arm9.bin file (ex. font table/data, some text, etc.)

It would be nice if someone can point me out which tools are necessary for this process or tell me the steps in hacking the arm9.bin file.

Thanks again for helping me out!
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,285
Country
United Kingdom
The ARM9.bin files are probably all going to be different without a simple method of extraction via a premade tool. Certainly you can direct a tool to trim the file to your desired sizes. http://crackerscrap.com/projects.php (filecutter) and equally http://crackerscrap.com/ under documentation has some of the better worked examples of DS Assembly hacking out there. Perhaps the most notable of tools is something to handle the binary compression (the DS binaries and overlays use a custom type of compression called BLZ which differs from the standard LZ compressions otherwise seen on the DS) - crystaltile2 has issues recompressing to the format so for anything other than simple disassembly purposes it tends not to be used. Still http://gbatemp.net/topic/313278-nintendo-dsgba-compressors/ and http://code.google.com/p/dsdecmp/ can handle extraction and compression. After that a disassembler, assembler and a debugging grade emulator for the DS are useful.

Disassembly- IDA (the standard paid debugging tool for almost all hackers although the free version might be able to get something done), crystlatile2 and ndsdis2 ( http://hp.vector.co.jp/authors/VA018359/nds/ndshack.html ) and the emulators all afford a measure of static disassembly.

Debugging emulator
no$gba is the best right now but I am still not sure if it can be purchased again and running newer games is a pain as well.
desmume has some debugging functions- disassembly, memory viewers and more but no no$gba or VBA-SDL-h grade tools.
iDeaS ( http://ciacin.site90.com/ ) has a basic run to selection command as well as stepping commands- not enough for a full tracing session but you can get an awful lot done with it.

Assembler
ARM ASM kit from http://crackerscrap.com/projects.php which is a frontend to arm-eabi which http://www.romhacking.net/utilities/456/ also does
ARMips http://www.romhacking.net/utilities/635/
Crystaltile2 and IDA have some abilities here as well.

Tools and basic usage I covered most of in the recent version of my ROM hacking guide http://filetrip.net/nds-downloads/utilities/latest-gba-and-ds-rom-hacking-guide-f29988.html

Text in the ARM9 then- many of the wifi debug messages are in the ARM9 and it is certainly not unheard of to have the text within either the ARM9.bin or an overlay for it. It it kind of unfortunate when it does as it makes life harder than it might be for the basic file level stuff most of DS translation is concerned with. It need not just be text either and I seen lots in there (mainly graphics, fonts and things like character stats) before we even get to the weird stuff like Rockman EXE Operation Shooting Star where almost everything was an overlay or otherwise in the binary.

"font table/data"
Do you want to run a debugger to find the text encoding and/or pointers because there are many easier ways to find the encoding if so.

Frankly most of it is fairly normal but for the pointers- where on the DS they might be file or section level and so be fairly simple numbers here as the binary is loaded into and run exclusively from memory (same for overlays) the pointers are either fixed width/markup style (neither unheard of) or they are memory locations (or some minor maths on a given location).
Better yet if you have the pointers you have the section lengths (or end markers for it) which can be used to guide filecutter or something like it. Short version is where your file level pointers are probably four or eight hex digits (00 padded in the case of eight) almost certainly starting at the file or the usual offset/relative stuff these will look something like 02?????? unless they have a 02?????? value to start with and then some more standard relative stuff (it is easy enough to add to a number and may even be quicker- certainly I have seen a pointer in a register and then things added to it from memory before).

Then comes the space issue- repointing is fine if you do not change the overall length but that is easier said than done for most translations as far as making it the same or shorter. Frankly if it is a single word or phrase bust out the thesaurus but otherwise you are finding a location in the RAM (often far easier said than done) or making some (remember the wifi debug messages- they are always there in RAM, usually several kilobytes in length and rarely used so go nuts).

After this I guess it is talking about font handling and similar such things. This more likely ties into graphics hacking unless you want to cover 16 to 8 bit encoding conversion which is another good way to generate more space actually. Short version is you find the location that deals with decoding the text and either get it to read 8 bits at a time or carry on with 16 but decode two characters from it.

I know you tried not to but you have asked a really general question and I agree where a lot of it has not been covered in as much depth as other parts of either graphics hacking or text hacking it will be a repeat of some stuff or otherwise typing at length.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Xdqwerty @ Xdqwerty:
    also gonna install twilight menu in my r4 flashcard
  • Psionic Roshambo @ Psionic Roshambo:
    One thing that just occurred to me.... The sound on the 2600 sucked less back then the harsh sound we hear now is from infinitely better speakers we have now, back when the 2600 was new speakers produced a almost muffled sound, like CRTs made old graphics look slightly better.
  • Psionic Roshambo @ Psionic Roshambo:
    I wonder if I could recommend that to some emulation devs that perhaps the sound could use some smoothing out to simulate those old TVs
  • Psionic Roshambo @ Psionic Roshambo:
    I think a few of the early systems could benefit from that, at least up to the 8 bit generation, by the 16 bit generation I think TVs had gotten a lot better in almost every way
  • Xdqwerty @ Xdqwerty:
    i dont have an sd card adapter but I have an usb sd card adapter
  • K3Nv2 @ K3Nv2:
    Old people games
  • Xdqwerty @ Xdqwerty:
    its not the one that comes with the r4
  • Xdqwerty @ Xdqwerty:
    doesnt work (my flashcard is from r4isdhc.com)
  • Xdqwerty @ Xdqwerty:
    might install ysmenu first
  • Psionic Roshambo @ Psionic Roshambo:
    Try Wood firmware
  • Psionic Roshambo @ Psionic Roshambo:
    For your R4
  • Psionic Roshambo @ Psionic Roshambo:
    It's old but it's the best firmware out for DS stuff
  • Xdqwerty @ Xdqwerty:
    it says it only works for the original R4, R4i Gold (r4ids.cn), R4iDSN (r4idsn.com) and Acekard R.P.G.
  • Xdqwerty @ Xdqwerty:
    nvm it does support mine
  • Xdqwerty @ Xdqwerty:
    but why choose it over ysmenu @Psionic Roshambo?
  • Xdqwerty @ Xdqwerty:
    bc im stupid?
  • Xdqwerty @ Xdqwerty:
    yea ik im stupid
  • Xdqwerty @ Xdqwerty:
    good night
  • Psionic Roshambo @ Psionic Roshambo:
    Just give it a try, but honestly if you have a 3DS you can play DS games without a card just off the internal SD card
  • Psionic Roshambo @ Psionic Roshambo:
    Slightly slower loading but a bit more convenient
  • BakerMan @ BakerMan:
    guys, my fuckin headphones have an out of place speaker
  • K3Nv2 @ K3Nv2:
    Did you try wearing them?
    B @ btjunior: @Xdqwerty 16