Homebrew DS(i) Mode hacking progress thread

  • Thread starter Thread starter Billy Acuña
  • Start date Start date
  • Views Views 810,649
  • Replies Replies 4,367
  • Likes Likes 81
Very simply - when a real game is running, the flashcard talks the same language a real game card does. When the game running on the console asks to load some new information from the flashcard, the flashcard replies in exactly the same way a real game card would. Therefore none of the actual game code is being patched and as far as the game is concerned, everything is functioning like normal.

If you want to get DS games loading from the SD, then you've got a lot of hurdles to overcome.
There is nothing "in between" that you can use to intercept communication between the running code and the SD card. You have to get stuck in the game's code and rewrite every command that used to ask for data from the cartridge to instead ask for data from the SD card. This is quite delicate and could easily fall apart.

If you remember USB Loaders, Nintendont or Dios MIOS on the Wii, then this is much harder. The Wii had a chip known as the "Starlet" that managed communications between the game and all the other hardware like the disc and USB. By taking over the Starlet you could make the game load from a USB drive without it ever knowing. The PS2 also has a similar design with its IOP, which is why HDD Loaders exist for that console.
That's just not possible on the DS because of the way it's built; the games talk directly to the game card and directly to the SD card, with nothing in between to hijack.

Furthermore there are some hardware quirks that get in the way. The DS has two main processors - an ARM9 for doing most of the heavy lifting, and an ARM7 for doing some background tasks. Only the ARM7 is capable of accessing the SD card, whereas both processors are able to access the card slot.
This is a real tricky one. Not only do you have to patch game code running on the ARM7 to get data from the SD card, but you also need to set up another "server" on the ARM7 so that the ARM9 can ask it to fetch data from the SD card on its behalf. Now it's getting even more complicated.

Just to put this into context - back in the early days of DS homebrew, each flashcard had a different way of letting homebrew retrieve data from the embedded memory card's files and folders (NOT the same thing as getting the data from within the ROM file. That works the same no matter what).
To get around this all the homebrew developers and flashcard manufacturers started using DLDI. Pretty much any DS hombrew that uses files and folders on the memory card uses DLDI. DLDI means that whenever you make a homebrew for the DS, all the instructions for getting files from the memory card are left intentionally blank. That way you load the homebrew on the flashcard, you can just fill the gaps automatically with whatever language the homebrew needs to speak in order for the homebrew to be able to ask the flashcard to get files from the memory card.
Now you've got a futureproof way of being able to get DS homebrews to load files from just about anywhere you can imagine, right?

nds_bootstrap implements DLDI patching for DS homebrews so they can load from the SD card, and despite the futureproofing intended in DLDI there are still lots of glitches in a lot of homebrews. Some aren't working at all or have major lag when loading stuff. This is just because it's so complicated trying to get the ARM7 and ARM9 to communicate and pass data around in a timely and accurate manner.
Real games are only going to be harder to patch than DLDI homebrews. DLDI is made to be easy for homebrew developers to make their own interface for, regular DS games aren't going to be so kind to us.

tl;dr The DS wasn't designed for this and it's not making it easy.
Thanks! It's really informative :D
 
TWLoader progress.
PICT0129.png
 
it's a lot of time that i am not up-to date with the dsi mode hacking progress, and may i ask what is this?

It's the front end app that runs in CTR mode. It's main purpose is to allow you to choose which NDS file you want to boot. Once selected, it will modify the ndsbootstrap INI file (and other settings if specified) and then boot ndsbootstrap. That's really it. :P
 
It's the front end app that runs in CTR mode. It's main purpose is to allow you to choose which NDS file you want to boot. Once selected, it will modify the ndsbootstrap INI file (and other settings if specified) and then boot ndsbootstrap. That's really it. :P
and... about what % is it? of completion
 
not true.

The cheapest flashcard I see on nds-card is $7, or about £5.73. On Amazon I can get an 8GB Micro SD standalone for £3.45.

Even if what's available to you in your region is different, there's not much in it. Flash memory has been dirt cheap for years.
 

Site & Scene News

Popular threads in this forum