NDS/FCSR Tutorial

From Dev-Scene

< NDS

[edit] What is FCSR?

  • FCSR stands for FlashCart + SRam. Nobody really uses the SRAM part though (it's too advanced, only chishm possesses the knowledge to do it.)
  • It is a way of using libfat/DLDI on old-style GBA flashcarts or emulators, things which do not support DLDI. It will NOT work on slot-1 devices.

[edit] HOWTO

In essence, a FAT12 virtual filesystem is created and appended to the DS binary. Note however that FCSR is read-only, so you will not be able to save your progress.

  • Go to http://gpf.dcemu.co.uk/ and look on the left hand side for fcsrimage.zip and fcsrDLDI.zip.
  • Extract both of those files, then copy the fcsr.dldi file over from the fcsfDLDI folder to the fcsrimage folder. Move this working folder to a location that has no spaces in the filename, something like C:\fcsrimage
  • You will then need to padbin the .nds file. padbin.exe is included in your devkitARM install.

Type the following command:

padbin.exe 512 homebrew.nds
  • Go to the "fcsr" subfolder, add whatever files you want to access from the homebrew. In essence, the "fcsr" folder becomes the root of the virtual filesystem.
  • Go back to the main folder and type this command:
build.bat image.img fcsr
  • You will then combine the padbin'd homebrew.ds.gba file with the image you just created with
copy /b homebrew.nds + image.img final.nds
  • All you need to do now is DLDI patch the final.ds.gba file. Go to the DLDI homepage and download dlditool.exe and put it in your working folder. Type:
dlditool.exe fcsr.dldi final.nds
  • Test the resulting file in No$GBA to ensure that it worked. It should be able to get past the filesystem checks and show you your list of games. Note that all games might not work in no$GBA, but this is due to inaccurate emulation.

[edit] Notes

  • If you already have devKitARM installed, you should already have the tools 'padbin' and 'dlditool'.
  • Using the -o option in ndstool will overwrite the embedded boot code for gba cart space. Either don't use this option (recommended) or use dsbuild on the final.nds to get a final.ds.gba.
  • Experimental FCS2 driver with crappy write support: http://davr.org/ds2/fcs2.zip (includes source). Simply replace 'fcsr.dldi' with 'fcs2.dldi' in the above instructions. It will give you very basic write support (Total writes limited to size of SRAM minus 0.5KB. Data cannot be deleted. Will silently fail once you run out of space). Really it's only good for testing simple load&save code in an emulator.
Dev-Scene (c) Ashley "MrShlee" Hull.