nds-bootstrap loader: Run commercial NDS backups from an SD Card

nds-bootstrap:

Thanks to the work of ahezard, Gericom, Apache, Robz8, _catcatcat, and shutterbug2000 and other contributors, we can now load NDS games from the SD card, without any flashcard/SLOT-1 card.

Don't expect high compatibility, but do expect many, many updates.

:arrow: Compatibility listing:
https://docs.google.com/spreadsheets/d/1LRTkXOUXraTMjg1eedz_f7b5jiuyMv2x6e_jY_nyHSc/edit#gid=0

:arrow: The official Discord server for nds-bootstrap:
https://discordapp.com/invite/7bxTQfZ

:arrow: The thread for the recommended loader (by Robz8):
https://gbatemp.net/threads/twloader-ctr-mode-nds-app.448375/

:arrow: SRLoader for softmodded DSis (by Robz8):
https://gbatemp.net/threads/srloader-nds-app-for-dsi.472200/

:arrow: If you're more of a forwarder person:
https://gbatemp.net/threads/nds-forwarder-cias-for-your-home-menu.426174/

:arrow: Link to the releases page:
https://github.com/ahezard/nds-bootstrap/releases

:arrow: Anti-Piracy patch list by Robz8
https://gbatemp.net/threads/ap-patch-preservation.477536/

Also, thank you to our testers:
Historian
JoshuaDoes
thejsa
Alerdy
PokeAcer


Also, a video thanks to Robz8:


And another thanks to Alerdy:
 
Last edited by shutterbug2000,

stanleyopar2000

RIP Yuzu. "It is always morally correct..."
Member
Joined
Jun 22, 2007
Messages
4,805
Trophies
2
Location
C-137
Website
www.youtube.com
XP
3,667
Country
United States
Holy fucking shit better late than never at all. Bra-vo

26c.jpg
 
Last edited by stanleyopar2000,

DrgnMasterKota

Well-Known Member
Member
Joined
Feb 24, 2020
Messages
164
Trophies
0
Age
30
Location
Roppongi Hills
XP
2,043
Country
Japan
Does this happen to fix the issues with playing rom hacks of Pokémon Heart Gold and Soul Silver that cause the program to crash? Amazing work either way thank you for all your continued hard work!
 

Noroxus

Margen67 Supporter
Member
Joined
Jul 7, 2013
Messages
443
Trophies
1
Location
Glorious Nippon
XP
873
Country
Germany
Does this happen to fix the issues with playing rom hacks of Pokémon Heart Gold and Soul Silver that cause the program to crash? Amazing work either way thank you for all your continued hard work!
Ive been playing Sacred Gold for 88h+ now and the game never crashed for me... The only bad thing that happens all the time in HeartGold and SS for me is the constant slowdowns that occur randomly where both sound and animations lag for 1-2sec

you playing on DS hardware or 3DS?
 

The Catboy

GBAtemp Official Catboy™: Boywife
Member
Joined
Sep 13, 2009
Messages
27,952
Trophies
4
Location
Making a non-binary fuss
XP
39,376
Country
Antarctica
v1.0.0: Rise of The Sun
Included in TWiLight Menu++ v26.1.0 (GBATemp thread)

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.
Victory screech!!!!
 

DrgnMasterKota

Well-Known Member
Member
Joined
Feb 24, 2020
Messages
164
Trophies
0
Age
30
Location
Roppongi Hills
XP
2,043
Country
Japan
Ive been playing Sacred Gold for 88h+ now and the game never crashed for me... The only bad thing that happens all the time in HeartGold and SS for me is the constant slowdowns that occur randomly where both sound and animations lag for 1-2sec

you playing on DS hardware or 3DS?

I'm playing on my 3DS XL using a rom hack of Pokémon Soul Silver.
 

kineticUk

Well-Known Member
Member
Joined
Sep 14, 2009
Messages
543
Trophies
1
Location
Inside
XP
1,007
Country
United Kingdom
I noticed Face Training takes a little while to load the first time because it uses a 64MB save and I’m not sure but the Japan DS game it’s based on uses a 2Mbit save?
 

RocketRobz

Stylish TWiLight Hero
Developer
Joined
Oct 1, 2010
Messages
16,614
Trophies
3
Age
24
XP
21,033
Country
United States
I noticed Face Training takes a little while to load the first time because it uses a 64MB save and I’m not sure but the Japan DS game it’s based on uses a 2Mbit save?
Sounds like Face Training stores photos in the save file (which is a NAND type), and the Japanese version doesn't.
 

kineticUk

Well-Known Member
Member
Joined
Sep 14, 2009
Messages
543
Trophies
1
Location
Inside
XP
1,007
Country
United Kingdom
Sounds like Face Training stores photos in the save file (which is a NAND type), and the Japanese version doesn't.
I thought that might be the reason. Would have been nice if the DCIM folder had been used by games too but it’s Nintendo idk.

Thanks for the super software and support :)
 

SylverReZ

The planet is fine. The people are crazy.
Member
GBAtemp Patron
Joined
Sep 13, 2022
Messages
7,224
Trophies
3
Location
The Wired
Website
m4x1mumrez87.neocities.org
XP
22,123
Country
United Kingdom

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: Nah we need a device where we can ask an assistant that can fit in our pockets too bad Samsung...