Hacking Hack ROM to force a Language

RadioShadow

Well-Known Member
OP
Member
Joined
Aug 30, 2007
Messages
550
Trophies
1
Age
35
Location
UK
XP
630
Country
So I noticed there was an Action Replay code to force a NDS game to force the required language: https://gbatemp.net/threads/force-the-ds-dsi-games-language-with-an-ar-code.478344/

I have figured out a way to hack the NDS rom to force the required language, instead of using Action Replay codes. I'm aware that some tools like the TwilightMenu++ allow you to do this, but this is more useful if you are injecting a NDS rom into a NDS Wii U Virtual Console game (https://gbatemp.net/threads/wii-u-nintendo-ds-virtual-console-inject-guide.480668/), and some NDS Flash Cards don't give you this option.

To find out what languages a NDS game supports, I would recommend checking this website (https://www.advanscene.com/html/index.php). It sadly doesn't explain if the supported language is selected from the firmware, or if the user can pick (sometimes both methods are used). That you have to figure out for yourself.

From the few roms I have tried, this method seems to work perfectly. I will use Super Princess Peach (Europe) as a demonstration. This game supports English, French, German, Spanish, and Italian, and selects the language that is based on the firmware setting (if the firmware's language is set to Japanese, the game will load in English).

Download the Force Language Tools:
https://gbatemp.net/attachments/force-language-tools-7z.426768/

Install Notepad++:
https://notepad-plus-plus.org/

1 - Extract the contents of the Force Language Tools.7z files.
2 - Place a copy of the NDS rom into the main Force Language Tools folder.
1.png


3 - Open DsSmuMe emulator: desmume-0.9.11-win32 > DeSmuME_0.9.11_x86.exe
4 - Click: Config > Firmware Settings
2.png


5 - Change Language to the one you want to use.
3.png


6 - The required language will have been selected. In this example, Spanish has loaded, and there is no way to select a different language in the game.
4.png


7 - Open: dsbuff_v1Final > dsbuff.exe
8 - Click Browse... and open the NDS rom.
5.png


9 - Click Unpack.
6.png


10 - Click on Info button next to the Directory text box.
7.png


11 - Locate and click on the rom folder.
Note: Check that there are no files inside the folder! If there is, then delete all the files in that folder!
8.png


12 - Click the Green Tick to unpack the contents.
9.png


13 - This will open a new folder that contains the contents of the rom.
14 - Make a copy of arm9.bin file.
10.png


15 - Place a copy of "arm9.bin into the main folder.
11.png


16 - Open: no$gba > NO$GBA.EXE
17 - Click: Debug > Define Break/Condition
12.png


18 - Type in the following: [027FFCE4]?

This will freeze the emulator if a byte is read at that address.
13.png


19 - Click: Cartridge menu (FileName)
20 - Open the NDS rom.
14.png


21 - The game should freeze on the following instruction: add r0,r12,6h
15.png


22 - What we are interested in is the instruction above. It should be: ldrh r2,[r12,64h]

What it is doing is taking the R12 Address, adding 64 Hex bytes to R12 Address, and storing the value located at the new address into R2. So doing some calculations: 027FFC80 + hex(64) = 027FFCE4

That is the RAM Address that stores the language that was set in the firmware. What we are going to do is change the instruction to always load the required language setting into R2.

Make a note of the address where ldrh is stored. In this example: 020C98FC
15b.png


23 - In the main folder, open compile.asm in Notepad++.
16.png


24 - At Line 20, place the new address after the 0x.
Take the address you made a note of in Step 22, and remove the 02 from the beginning.
For example: 020C98FC > 0C98FC

At Line 22, change the InsertLanguage text to language you want to force:
  • English
  • French
  • German
  • Spanish
  • Italian
  • Japanese
17.png


25 - Save the changes to the compile.asm file.
26 - Click on the make.bat file in the main folder.
18.png


27 - If you see this message, the instruction was changed successfully.
19.png


28 - Click the Pack icon.
29 - Click on Info button next to the ROM Contents text box.
20.png


30 - Locate and click on the rom folder.
21.png


31 - Click the Green Tick to pack the contents.
22.png


32 - Choose a location where you want to save the new NDS rom to, and give it a new name.
23.png


33 - Use the DeSmuMe emulator to test the new rom. Change the "Language" in the Firmware Settings to one that is different to the forced language (in this example, I will select English).
24.png


34 - Now the forced language will always load.
25.png


Enjoy!
 

Attachments

  • Force Language Tools.7z
    2.7 MB · Views: 8
Last edited by RadioShadow,

eyeliner

Has an itch needing to be scratched.
Member
Joined
Feb 17, 2006
Messages
2,892
Trophies
2
Age
44
XP
5,546
Country
Portugal
Good job, mate!

The Google thing to download the tools is asking us to request access.
 

RadioShadow

Well-Known Member
OP
Member
Joined
Aug 30, 2007
Messages
550
Trophies
1
Age
35
Location
UK
XP
630
Country
Good job, mate!

The Google thing to download the tools is asking us to request access.

I didn't realize that GBATemp allows users to attach files. Those are now attached, so I don't need to upload them to Google Drive. That should fix the download issues.
 
  • Like
Reactions: eyeliner

The Real Jdbye

*is birb*
Member
Joined
Mar 17, 2010
Messages
23,316
Trophies
4
Location
Space
XP
13,893
Country
Norway
I didn't realize that GBATemp allows users to attach files. Those are now attached, so I don't need to upload them to Google Drive. That should fix the download issues.
For future reference you can use the "Share" option to set the link to public access rather than just "Copy Link"
I assume you are using Google Workspace which does not set the link to public access by default (doesn't seem like there is a way to change that)
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • BakerMan @ BakerMan:
    i said i was sleeping...
  • BakerMan @ BakerMan:
    sleeping with uremum
  • K3Nv2 @ K3Nv2:
    Even my mum slept on that uremum
  • TwoSpikedHands @ TwoSpikedHands:
    yall im torn... ive been hacking away at tales of phantasia GBA (the USA version) and have so many documents of reverse engineering i've done
  • TwoSpikedHands @ TwoSpikedHands:
    I just found out that the EU version is better in literally every way, better sound quality, better lighting, and there's even a patch someone made to make the text look nicer
  • TwoSpikedHands @ TwoSpikedHands:
    Do I restart now using what i've learned on the EU version since it's a better overall experience? or do I continue with the US version since that is what ive been using, and if someone decides to play my hack, it would most likely be that version?
  • Sicklyboy @ Sicklyboy:
    @TwoSpikedHands, I'll preface this with the fact that I know nothing about the game, but, I think it depends on what your goals are. Are you trying to make a definitive version of the game? You may want to refocus your efforts on the EU version then. Or, are you trying to make a better US version? In which case, the only way to make a better US version is to keep on plugging away at that one ;)
  • Sicklyboy @ Sicklyboy:
    I'm not familiar with the technicalities of the differences between the two versions, but I'm wondering if at least some of those differences are things that you could port over to the US version in your patch without having to include copyrighted assets from the EU version
  • TwoSpikedHands @ TwoSpikedHands:
    @Sicklyboy I am wanting to fully change the game and bend it to my will lol. I would like to eventually have the ability to add more characters, enemies, even have a completely different story if i wanted. I already have the ability to change the tilemaps in the US version, so I can basically make my own map and warp to it in game - so I'm pretty far into it!
  • TwoSpikedHands @ TwoSpikedHands:
    I really would like to make a hack that I would enjoy playing, and maybe other people would too. swapping to the EU version would also mean my US friends could not legally play it
  • TwoSpikedHands @ TwoSpikedHands:
    I am definitely considering porting over some of the EU features without using the actual ROM itself, tbh that would probably be the best way to go about it... but i'm sad that the voice acting is so.... not good on the US version. May not be a way around that though
  • TwoSpikedHands @ TwoSpikedHands:
    I appreciate the insight!
  • The Real Jdbye @ The Real Jdbye:
    @TwoSpikedHands just switch, all the knowledge you learned still applies and most of the code and assets should be the same anyway
  • The Real Jdbye @ The Real Jdbye:
    and realistically they wouldn't

    be able to play it legally anyway since they need a ROM and they probably don't have the means to dump it themselves
  • The Real Jdbye @ The Real Jdbye:
    why the shit does the shitbox randomly insert newlines in my messages
  • Veho @ Veho:
    It does that when I edit a post.
  • Veho @ Veho:
    It inserts a newline in a random spot.
  • The Real Jdbye @ The Real Jdbye:
    never had that i don't think
  • Karma177 @ Karma177:
    do y'all think having an sd card that has a write speed of 700kb/s is a bad idea?
    trying to restore emunand rn but it's taking ages... (also when I finished the first time hekate decided to delete all my fucking files :wacko:)
  • The Real Jdbye @ The Real Jdbye:
    @Karma177 that sd card is 100% faulty so yes, its a bad idea
  • The Real Jdbye @ The Real Jdbye:
    even the slowest non-sdhc sd cards are a few MB/s
  • Karma177 @ Karma177:
    @The Real Jdbye it hasn't given me any error trying to write things on it so I don't really think it's faulty (pasted 40/50gb+ folders and no write errors)
  • DinohScene @ DinohScene:
    run h2testw on it
  • DinohScene @ DinohScene:
    when SD cards/microSD write speeds drop below a meg a sec, they're usually on the verge of dying
    DinohScene @ DinohScene: when SD cards/microSD write speeds drop below a meg a sec, they're usually on the verge of dying