Skip to content

v1.0.0: Rise of The Sun

Compare
Choose a tag to compare
@RocketRobz RocketRobz released this 09 Sep 03:23
· 187 commits to master since this release

Included in TWiLight Menu++ v26.1.0

Instructions:

  1. Download the .7z file.
  2. Extract the nds-bootstrap .nds and .ver files, to root:/_nds/.

What's new?

  • nds-bootstrap has supported many popular DS games, such as Super Mario 64 DS, New Super Mario Bros., the Kirby games, the MegaMan ZX games, the Castlevania games, the Sonic Rush series of games, The Legendary Starfy, and many more!
    For a long time though, one of them has not been supported... until now.
    That's right! You've asked and we listened, and now, Golden Sun: Dark Dawn is finally supported!
    • To know how it's finally supported, scroll down below.
    • This does not apply to B4DS mode.
  • Nintendo programs such as NTR EVA/Aging and Wii Sequencer are now supported.

Improvements

  • The heap of TWL titles is no longer shrunk in order to maintain compatibility!
    • This does not apply to B4DS mode.
    • On DSi, for cart-based games, only 128KB of heap is shrunk if the game is running from the SD card, and/or if cheats are enabled.
    • ce7i binary has been moved to DSi WRAM for a minor speed boost.
  • To fit a bit more small ROMs into RAM, those which do not contain overlays are now loaded without the arm7 binary.

Bug fixes

  • Fixed certain SDK3-4 games not booting, due to the cluster cache of the save file being compressed.
  • Fixed an overlooked bug where TWL (DSi-Enhanced/Exclusive) games would crash later on 3DS consoles.
  • Error exception screen is now triggered for NTR-type games running in DSi mode, or if using DSiWarehax.
  • Fixed certain games not booting by improving MPU search code.
  • Fixed soft-reset button combo not working in Foto Showdown.
    • The game actually uses the soft-reset function meant to be used in DSiWare titles, rather than the normal cart version.
  • On DSi, TWLCFG from TWLNAND is now re-loaded, if it's not detected in RAM.
  • Fixed an overlooked bug which went unnoticed since DSiWare got supported on DS & DS Lite. The bug being where on DS or DS Lite, starting a DSiWare title which has WiFi support would wipe the WiFi data off of the console.
  • The EUR/AUS version of Bomberman Blitz now boots on DS & DS Lite.

How is Golden Sun: Dark Dawn working now? What has been done?

NOTE: This is a lengthy read. If you don't want to know the full specifics, scroll down to In short.

For the longest time since nds-bootstrap's first release supporting retail/commercial games, one of those games has never worked, despite the many compatibility fixes implemented throughout each later release.
That game is Golden Sun: Dark Dawn. When trying to boot it, it would only show two black screens.

The reason for that, is due to an AP measure in the game itself, and the AP-fix included with TWiLight Menu++ has unfortunately never patched it out, despite it being known to work with flashcards.
You might be wondering, but then how does the demo version boot sucessfully? It simply didn't include any AP measures.

After a long wait, and gaining a little bit of ARM ASM knowledge from playing around with it and getting DSiWare games working on DS/DS Lite, I've decided to implement a new AP-fix for Golden Sun: Dark Dawn, with some help from Gericom (the GBARunner2/3 developer) and the NO$GBA debugging emulator.

The first AP measure takes place in overlay 335, which contains DSProtect v2.01s.
By comparing what happens in the game's code with and without nds-bootstrap, I was able to patch the overlay to reproduce what occurs without nds-bootstrap.
As a result, the game now boots into the company logos and the title screen.
From there, the name entry menu would appear, and after entering the name, the company logos would then appear again, and after fading out, the game crashes.

The next step was to patch overlay 334, which contains DSProtect v2.01 (with no s at the end, and works differently from the other one).
After applying the patch, as well as a new checksum for the overlay, the game no longer crashes, and the title screen appears once again.

To make the company logos and title screen not appear again after entering the character's name, the next step was to make the patch for overlay 334 return the proper value the game expects (which is 0x11F).
As a result, the game's opening cutscene now plays. Unfortunately, after it has played, the game once again goes back to the company logos and title screen.
To fix that, the patch for overlay 334 has been made to only return the 0x11F after name entry, and the game's first cutscene after the opening one now plays.

After going through the dialog boxes, the game's main protagonist can now be moved in the overworld, right? Well, sort of.
The overworld is nothing but a black screen and a few icons at the screen corners.
The protagonist can be moved to the right for him to appear, and the background of Haidhia Lookout will shift in close to him as a flat texture.
Touching the bottom-left icon (or pressing the X button) will open the main menu, and can be navigated normally, but when exiting the menu, a battle against Dim Dragon will trigger.
The battle gets triggered because there's still an instance of the overlay 334 checksum which hasn't been patched with the new one.
Patching the checksum instances found in the USA ROM has not removed the battle encounter, but it has been sucessfully removed in the European ROM.
Apparently, some checksum instances are encrypted along with the overlay's code.
To remove the battle encounter in the USA ROM, the patch code has been made so that it looks for an instance of the checksum, once an overlay has loaded.

Furthermore, when I tried a save file which gets past the black area, some features wouldn't work correctly, such as using Psynergy.
It would only work when one is assigned to either the L or R buttons.
Getting an item would also either appear as the wrong one, or crash the game.

The final step is to fix those remaining AP issues, and to do that, the patch code has been slightly reworked to not affect the checksum, but that alone will not fix it.
After some more looking into and patching, the patch code for overlay 335 has been ported over to 334.

For those who understand ASM code, here's what nds-bootstrap does to the overlay code (offsets are for the USA/AUS region, but the patch works with other regions):

Overlay 335 (DSProtect v2.01s)

  1. At 0x021F8284, change the beq instruction (0A000005) to b.
  2. At 0x021F82D8, change the ldr instruction (E59D1028) to mov r1, 0h.
  3. At 0x021F82DC, change the ldr instruction (E59D0040) to mov r0, 0h.
  4. Change instructions at 021F82E4 & 021F82E8 to nop.

Overlay 334 (DSProtect v2.01)

  1. At 0x021F910C, change the beq instruction (0A00000E) to b.
  2. At 0x021F91A8, change the ldr instruction (E59D102C) to mov r1, 0h.
  3. At 0x021F91AC, change the ldr instruction (E59D0044) to mov r0, 0h.
  4. Change instructions at 021F91B4 & 021F91B8 to nop.

After all of this looking into and fixing/patching, Golden Sun: Dark Dawn is finally supported by nds-bootstrap!

In short

The AP-fix that has been included with TWLMenu++ for a while was broken, so a new & better AP-fix has been implemented into nds-bootstrap. It has taken 8 days with lots of changes & improvements to the code to ensure that everything was working properly.