Flashcard emulation for FAT homebrew - NotImplementedLife/libnds-practical-wiki GitHub Wiki
Suppose you want to emulate test a NDS ROM making use of the FAT capabilities. Normally emulating such a file will end up in a FAT init error
, because there is no filesystem your FAT code should address to. Your only option would be running the ROM on a physical flashcard or... emulating the flashcard itself. Here's how we do it.
1. Download this archive which is a copy of DeSmuME 0.9.9 packed along with an R4 Wood kernel and a launch script.
2. Unzip the archive to a folder named DeSmuME
or something like that.
3. Find the bios7.bin
, bios9.bin
, firmware.bin
on the internet and copy them to the DeSmuME folder. You'll need the DS bios & firmware files in order to emulate the R4.
4. Double-click run.bat
This will create/overwrite desmume.ini
config file telling DeSmuME to boot into the firmware. The script also automatically launches DeSmuME with the R4 Wood ROM loaded.
5. In DeSmuME, go to Config -> Slot1, and select R4 from the combobox. Then click Ok.
6. Go to Config -> Emulation settings, and uncheck "Use external firmware image" (later edit: unchecking "Boot from firmware" is enough to achieve the final goal). A dialog box will appear informing that the ROM needs to be reset in order to let the changes take effect. Click Yes.
7. Now DeSmuME should enter the R4 Wood menu.
In microSD Card
you will find the contents of the R4Wood folder in the DeSmuME directory. After editing the contents of R4Wood directory, close DeSmuME and repeat the steps 4-7 in order to see the changes in the emulator. Now you can run your homebrew on PC taking advantage of the R4's FAT system.
Note: The DeSmuME emulated R4 files seem to be read-only! It follows that if you attempt to write/edit a file from your homebrew, that file will only be visible during emulation, no changes are made to the R4wood folder in filesystem! If you want to re-use homebrew generated files before losing them, you need to reload the R4 kernel directly from the emulator (File->Open Recent-> ...\R4Wood.nds, the flashcard will restart and now you can access your created/updated files. Note that once you close your emulator, the changes will still be lost).