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,

Jotunheim

Member
Newcomer
Joined
Jul 4, 2023
Messages
19
Trophies
0
Age
26
XP
130
Country
Brazil
Hi, I downloaded and installed the latest version of the devkitPro (v3.0.3) to try merge two versions of nds-bootstrap, the latest one (nds-bootstrap v0.72.1) with the only version that loads correctly Dragon Quest V: Hand of the Heavenly Bride (nds-bootstrap v0.63.0). I want to see the code and moves just the part about the bug fix for Dragon Quest V: Hand of the Heavenly Bride. @RocketRobz said on the v0.63.0 Bug fixes section that Dragon Quest V: Hand of the Heavenly Bride runs well if the card data cache is disabled, so I want to merge the latest version of the nds-bootstrap with the line which disable the card data cache to Dragon Quest V: Hand of the Heavenly Bride.

So, I installed the devkitPro as I said before but when I will try to install the needed libraries like says in the Compiling section here I don't know what to do after, nothing is clear. I work with others things, I'm not a dev but I want to do it for myself, I don't want wait a stable version for my games so I preferred to do it alone, the pic below is where I got stuck.

Can please someone help me?


1688537277469.png
 
Last edited by Jotunheim,

RocketRobz

Stylish TWiLight Hero
Developer
Joined
Oct 1, 2010
Messages
16,614
Trophies
3
Age
24
XP
21,032
Country
United States
Hi, I downloaded and installed the last version of the devkitPro (v3.0.3) to try merge two versions of nds-bootstrap, the last one (nds-bootstrap v0.72.1) with the only version that loads correctly Dragon Quest V: Hand of the Heavenly Bride (nds-bootstrap v0.63.0). I want to see the code and moves just the part about the bug fix for Dragon Quest V: Hand of the Heavenly Bride. @RocketRobz said on the v0.63.0 Bug fixes section that Dragon Quest V: Hand of the Heavenly Bride runs well if the card data cache is disabled, so I want to merge the last version of the nds-bootstrap with the line which disable the card data cache to Dragon Quest V: Hand of the Heavenly Bride.

So, I installed the devkitPro as I said before but when I will try to install the needed libraries like says in the Compiling section here I don't know what to do after, nothing is clear. I work with others things, I'm not a dev but I want to do it for myself, I don't want wait a stable version for my games so I preferred to do it alone, the pic below is where I got stuck.

Can please someone help me?


View attachment 381677
Just press Enter to install everything.
Also, latest nds-bootstrap commit re-enables the card data cache in order to (almost) fix the issue, so you can try the latest nightly build, if you want.
 

Jotunheim

Member
Newcomer
Joined
Jul 4, 2023
Messages
19
Trophies
0
Age
26
XP
130
Country
Brazil
Just press Enter to install everything.
Also, latest nds-bootstrap commit re-enables the card data cache in order to (almost) fix the issue, so you can try the latest nightly build, if you want.
The latest nightly build is the v0.72.1? If yes, I'm already using this build and getting the loop on the start page of the Dragon Quest V: Hand of the Heavenly Bride.

Also, as I said before, I'm not a dev, but I discovered a function on GitHub that allows to compare builds, then I compared v0.63.0 with the v0.72.1 and got this result:

1688540893670.png



Apparently what I'm trying to do (merge v0.63.0 line about Dragon Quest V: Hand of the Heavenly Bride with the entire build v0.72.1) is already made. But why the game is looping on the start page? Don't know.

Thanks for answer me!
 
Last edited by Jotunheim,

RocketRobz

Stylish TWiLight Hero
Developer
Joined
Oct 1, 2010
Messages
16,614
Trophies
3
Age
24
XP
21,032
Country
United States
The latest nightly build is the v0.72.1? If yes, I'm already using this build and getting the loop on the start page of the Dragon Quest V: Hand of the Heavenly Bride.

Also, as I said before, I'm not a dev, but I discovered a function on GitHub that allows to compare builds, then I compared v0.63.0 with the v0.72.1 and got this result:

View attachment 381682


Apparently what I'm trying to do (merge v0.63.0 line about Dragon Quest V: Hand of the Heavenly Bride with the entire build v0.72.1) is already made. But why the game is looping on the start page? Don't know.

Thanks for answer me!
v0.72.1 is a release build, not a nightly build.
To get the latest nightly build, you need to build from latest source code, or download from the TWLBot repo, or if you're on 3DS/2DS, download it using Universal-Updater.
After you've gotten the nightly build, and if you have not used Universal-Updater, place the "nds-bootstrap-nightly.nds" and the .ver files in "sd:/_nds/".
On your console, open the per-game settings in TWLMenu++ by pressing the Y button, then change the "Bootstrap" setting to "Nightly".
 

Jotunheim

Member
Newcomer
Joined
Jul 4, 2023
Messages
19
Trophies
0
Age
26
XP
130
Country
Brazil
v0.72.1 is a release build, not a nightly build.
To get the latest nightly build, you need to build from latest source code, or download from the TWLBot repo, or if you're on 3DS/2DS, download it using Universal-Updater.
After you've gotten the nightly build, and if you have not used Universal-Updater, place the "nds-bootstrap-nightly.nds" and the .ver files in "sd:/_nds/".
On your console, open the per-game settings in TWLMenu++ by pressing the Y button, then change the "Bootstrap" setting to "Nightly".

Nice, understood.

I tested the TWLBot repo and the nightly version from Universal-Updater, both works fine (:toot:) but I needed to change the name of 3 files. I considered the change fine and comfy but a question came in my head: this is normal (the need to change the name of the files) or there are something wrong with my files? I say that too thinking about people who download trough the Universal-Updater, if they don't know about how files are loaded maybe they will get stuck in this part, but I see it as a protection too, considering that nightly builds can be unstable.

I have one doubt: the nightly build from TWLBot repo is the same build that we can download trough the Universal-Updater or there are some delay between the files?

Thanks, man. Your work helps a lot.
 

RocketRobz

Stylish TWiLight Hero
Developer
Joined
Oct 1, 2010
Messages
16,614
Trophies
3
Age
24
XP
21,032
Country
United States
Nice, understood.

I tested the TWLBot repo and the nightly version from Universal-Updater, both works fine (:toot:) but I needed to change the name of 3 files. I considered the change fine and comfy but a question came in my head: this is normal (the need to change the name of the files) or there are something wrong with my files? I say that too thinking about people who download trough the Universal-Updater, if they don't know about how files are loaded maybe they will get stuck in this part, but I see it as a protection too, considering that nightly builds can be unstable.
If you changed the name from "nightly" to "release", then you have not changed the "Bootstrap" setting to "Nightly" in the per-game settings menu.
Otherwise, I don't understand.
I have one doubt: the nightly build from TWLBot repo is the same build that we can download trough the Universal-Updater or there are some delay between the files?

Thanks, man. Your work helps a lot.
It is the same one downloaded by Universal-Updater.
 
  • Like
Reactions: Jotunheim

Jotunheim

Member
Newcomer
Joined
Jul 4, 2023
Messages
19
Trophies
0
Age
26
XP
130
Country
Brazil
If you changed the name from "nightly" to "release", then you have not changed the "Bootstrap" setting to "Nightly" in the per-game settings menu.

Is this a Twilight Menu option? Because I'm using NDS Forwarder Generator, therefore I can open the game in the main menu directly, that's why I needed to change the file titles.

It is the same one downloaded by Universal-Updater.

Understood. Good to know.

-

Thanks for your help, Rocket! :)
 

RocketRobz

Stylish TWiLight Hero
Developer
Joined
Oct 1, 2010
Messages
16,614
Trophies
3
Age
24
XP
21,032
Country
United States
Is this a Twilight Menu option? Because I'm using NDS Forwarder Generator, therefore I can open the game in the main menu directly, that's why I needed to change the file titles.
Yes, and it's also a forwarder setting. You can change the setting in the forwarder by launching it, and then holding Y button before the game boots to open per-game settings.
 
  • Like
Reactions: Jotunheim

RocketRobz

Stylish TWiLight Hero
Developer
Joined
Oct 1, 2010
Messages
16,614
Trophies
3
Age
24
XP
21,032
Country
United States
v0.73.0
Included in TWiLight Menu++ v26.0.0 (GBATemp thread)

What's new?​

  • LRU cache size now takes up almost the whole extra RAM space after the first 4MB!
    • The ROM pre-load size limit has also been affected to do the same.
  • When starting an NTR-type game in DSi mode, the heap size is now increased from 4MB to 8MB!
    • Useful for some ROM hacks that somehow go above the normal heap size.
    • Due to a limitation of SDK2.0, it does not affect games made with that SDK version.
  • Main screen setting is now saved per-game.

B4DS mode

  • Added support for 39 more DSiWare titles to be playable on DS/DS lite (plus 7 more for debug consoles)!
    • Scroll down to see which titles are now supported.
    • Click >here< for the full list of supported titles.
  • Any SDK5 DS game can now be set as a Donor ROM to run DSiWare!
    • Useful if you don't have an existing ROM dump of a DSi-Enhanced game.
    • Lufia: Curse of the Sinistrals (currently known to be the only SDK5 game to contain a VRAM-WiFi type of arm7 binary) is required by certain DSiWare titles (listed below) to use much memory (aka RAM space) as possible. On debug/dev consoles, it is not required.
      • If it's the only game set as a Donor ROM, DSiWare which use wireless will be unable to use those features.
    • Ubongo is the only DSiWare title which still specifically requires a DSi-Enhanced game to be set as a Donor ROM.
  • Picture Perfect Hair Salon, one of the few DSi-Exclusives released on cartridge, is now playable on DS/DS lite!
    • Audio does not play outside of debug/dev consoles.
  • Full version of Digidrive is now supported on debug/dev consoles!
  • The Europe/Australia & Japanese versions of Bejeweled Twist are now supported!
    • Europe/Australia version requires Lufia set as a Donor ROM.

Bug fixes​

  • For TWL-type games running in DSi mode on DSi consoles, heap shrink has once again been reduced (by 256KB), leaving only 256KB of heap being shrunk.
    • This should fix more crashes in some of those games.
  • Fixed & optimized card ID start offset search.
    • This fixes certain games not booting the first time, and/or with card read DMA turned on.
    • This seems to fix game compatibility on certain flashcards.
  • The Incredibles: Rise of the Underminer now boots!
  • Other minor fixes.

B4DS mode

  • The Legend of Zelda: Four Swords: Anniversary Edition now plays audio outside of debug/dev consoles!
    • Additionally, the crash when completing a stage and before saving data is now fixed!
  • Fixed Oscar in Toyland 2 crashing after completing a stage.
  • Flipper now plays music outside of debug/dev consoles!
  • The title screen in Robot Rescue no longer shows a black stripe on the bottom screen.
  • Certain AP-fixes now work without a Memory Expansion Pak!
  • Fixed where the AP-fix for Mario & Luigi: Bowser's Inside Story would get overwritten, causing the AP-fix to not work.

DSiWare titles now supported on DS & DS lite​

Titles marked in Bold will only boot on debug/dev consoles.
  • 2Puzzle It: Fantasy
    • Does not save
  • AiRace: Tunnel
    • Audio does not play outside of debug/dev consoles
    • Crashes when selecting another tunnel after first selecting one, worked around by selecting either Credits or Controls (occurs outside of debug/dev consoles)
  • Drift Street International
    • Race music does not play outside of debug/dev consoles
  • Electroplankton: Beatnes
    • Previously only supported on debug/dev consoles
  • Electroplankton: Trapy
    • Previously only supported on debug/dev consoles
  • G.G Series: Air Pinball Hockey
    • Does not save
  • G.G Series: All Breaker
    • Does not save
  • G.G Series: Altered Weapon
    • Does not save
    • Requires Lufia set as a Donor ROM
  • G.G Series: Assault Buster
    • Only Japanese version saves
  • G.G Series: Black x Block
    • Only Japanese version saves
  • G.G Series: Conveyor Toy Packing
    • Only Japanese version saves
  • G.G Series: Cosmo Rally!!
    • Does not save
  • G.G Series: D-Tank
  • G.G Series: Dark Spirits
  • G.G Series: Drift Circuit
  • G.G Series: Drift Circuit 2
    • Requires Lufia set as a Donor ROM
  • G.G Series: Drilling Attack!!
    • Only Japanese version saves
  • G.G Series: Energy Chain
    • Only Japanese version saves
  • G.G Series: Exciting River
    • Does not save
  • G.G Series: Great Whip Adventure
    • Does not save
  • G.G Series: Hero Puzzle
    • Does not save
  • G.G Series: The Hidden Ninja Kagemaru
    • Does not save
  • G.G Series: Horizontal Bar
  • G.G Series: The Last Knight
    • Does not save
    • Requires Lufia set as a Donor ROM
  • G.G Series: Ninja Karakuri Den
  • G.G Series: Ninja Karakuri Den 2
  • G.G Series: Nyokki
    • Does not save
  • G.G Series: Run & Strike
    • Does not save
  • G.G Series: Score Attacker
    • Does not save
  • G.G Series: Shadow Army
    • Does not save
  • G.G Series: The Spiky Blowfish
    • Does not save
  • G.G Series: Super Hero Ogre
  • G.G Series: Super Hero Ogre 2
  • G.G Series: Throw Out
    • Only Japanese version saves
  • G.G Series: Vector
    • Does not save
  • G.G Series: Vertex
    • Only Japanese version saves
  • G.G Series: Wonder Land
    • USA version does not save
  • G.G Series: Z-One
  • G.G Series: Z-One 2
  • iSpot Japan
    • Does not save
  • Korogashi Pazuru: Katamari Damacy
  • My Little Restaurant
  • Need for Speed: Nitro-X
    • Previously only supported on debug/dev consoles
    • Does not save
    • Crashes after a race
    • Requires Lufia set as a Donor ROM
  • Oscar in Movieland
  • Oscar's World Tour
  • Phantasy Star 0 Mini
    • Previously only supported on debug/dev consoles
    • To cut down RAM usage, only each one character animation gets loaded for each of the three characters. As a result, the animation will not change when switching weapons.
    • Crashes when progressing through one of the later areas
    • Requires Lufia set as a Donor ROM
Post automatically merged:

v0.73.1 (hotfix)
Included in TWiLight Menu++ v26.0.1 (GBAtemp thread)

Bug fix​

  • Fixed an overlooked bug where the LRU cache would be written at RAM address 0x02FE0000, which would cause a crash when running a DSi-Enhanced game in DS mode on 3DS consoles.
 
Last edited by RocketRobz,

shoemaker

Well-Known Member
Member
Joined
Jul 22, 2014
Messages
125
Trophies
0
Age
32
XP
206
Country
United States
Is there a way to automatically skip past the multiple “Press Start” button prompts when launching a game? My backups are all working properly, just wondering if I can directly boot into them without needing to input those prompts each time.
 

RocketRobz

Stylish TWiLight Hero
Developer
Joined
Oct 1, 2010
Messages
16,614
Trophies
3
Age
24
XP
21,032
Country
United States
Is there a way to automatically skip past the multiple “Press Start” button prompts when launching a game? My backups are all working properly, just wondering if I can directly boot into them without needing to input those prompts each time.
You need to turn off the debug setting in the nds-bootstrap page of TWLMenu++ Settings.
 

RocketRobz

Stylish TWiLight Hero
Developer
Joined
Oct 1, 2010
Messages
16,614
Trophies
3
Age
24
XP
21,032
Country
United States
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.
 

ShadowOne333

QVID PRO QVO
Editorial Team
Joined
Jan 17, 2013
Messages
12,212
Trophies
2
XP
34,071
Country
Mexico
Congrats on achieving this, both nailing down GSDD and getting to version 1.0.0 ! 🥳 I'm very impressed by what you, and of course everyone else who's helped out, have been able to figure out and accomplish.

Would it be possible to have this on the front page, @ShadowOne333? 👍
If Rob wants, for sure I can make this frontpage and redirect all discussion here, or to the TWL thread instead.
I'll wait for Rob's input on this :D
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: Who live with a pineapple shoved in his ass!