gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS Flash Equipment > Using file on a flash cart..

#125411 - DS_LitE - Fri Apr 13, 2007 3:43 am

Some of the homebrew that is avalible(DSFTP,LMP-ng ,some others)
use other files, how do i include these files on my gba f2a 64mb flash
cartrige?(e.g DSFTP uses a config file)

#125419 - dantheman - Fri Apr 13, 2007 4:31 am

You'll want to build an FCSR image and append it to the original file to create a file that has its own built-in filesystem that homebrew can access through DLDI.

For the sake of not retyping long instructions again, I'll quote a post I made over at another site I cannot link to, with certain parts edited to reflect your situation (original post was for SNEmulDS):

Quote:
There's a method you can use for storing it on GBA flash carts using something called FCSR (FlashCart SRAM) for it. Basically, you create your own filesystem and add it to the DS binary. It's a complicated affair, but it works.

Go to http://gpf.dcemu.co.uk/ and look on the left hand side for fcsrimage.zip and fcsrDLDI.zip. Extract both of those, then copy the 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

Now it gets tricky. Get the DSFTP.nds file and prepend a loader to it to make it a .ds.gba one. Use the following command in the command shell:
Code:
copy /b ndsmall.bin + DSFTP.nds DSFTP.ds.gba

NOTE TO DS_LitE: you can just use the DSFTP.ds.gba file from the beginning and skip this step

Then you need to padbin it. Go to tepples's GBA page and download the GBFS distribution, copying the padbin.exe file from there into the working folder. Type the following command:
Code:
padbin.exe 512 DSFTP.ds.gba


Go to the "fcsr" subfolder, add a couple of random files (it won't work otherwise for some reason), then add a DATA directory and add your CONFIG folder and config files to it. Go back to the main folder and type this command:
Code:
build.bat image.img fcsr


Then combine the padbin'd .ds.gba file with the image you just created with
Code:
copy /b DSFTP.ds.gba + image.img final.ds.gba


All you need to do now is DLDI patch the final.ds.gba file. Go to http://chishm.drunkencoders.com/DLDI and download dlditool.exe and put it in your working folder. Type:
Code:
dlditool.exe fcsr.dldi final.ds.gba


Test the resulting file in No$GBA to ensure that it worked. I haven't tested it on an actual GBA flash cart, but I would imagine that it would work.


I have personally used this method to get LMP-ng working in No$GBA. It was slow and choppy due to my slow computer, but it recognized the songs and was able to play them back.

#125474 - DS_LitE - Fri Apr 13, 2007 6:55 pm

thnx worked great! but know im working on my own DSFTP like application.