ApacheThunder / dsxTool

A tool for dumping/writing to the hidden region of nand on DS-Xtreme.
GNU General Public License v3.0
3 stars 0 forks source link

Support for DS Fire Card dumping #1

Closed m4x10187 closed 11 months ago

m4x10187 commented 11 months ago

Will there be any support for the DS Fire Card as well in the near future?

ApacheThunder commented 11 months ago

I do not currently own one so I can't even begin to look into that. Sorry.

I am looking to acquire one though and hope to maybe get one in October. Currently DLDI for these cards are not open source so it's unknown whether a tool like this will work for them.

Also unclear if someone manages to brick their card would be able to recover it. The slot2 usb device might still work but udisk nds file would have to be booted via a different flashcart first....and udisk may not boot correctly on what ever alt device you use it on.

Do you have one? Can you let me know if you are able to use GodMode9i to access it with? I did have to build a highly modified build of GM9i to allow simultaneous access of DSi SD and slot 1 on my DS-Xtreme (an older nand based cart like the Fire card but a bit more fancy) so in theory nothing special is needed for standard file transfers to the normal file system on nand. It's just whether or not they have a hidden section like the DSX does that is in question.

Possible the DS LInker and their clones are more friendly. DSX does not like DLDI init happening in TWL mode and/or without booting from the cart first for some reason.

m4x10187 commented 11 months ago

I have two DS Fire Card cartridges - an 8G cart and a 16G card. They both get recognized by GM9i just fine. While I can dump them just fine, I cannot read the NAND's filesystem to search what games are on it, so they must be hidden somewhat and only the cartridge can access it. Clones such as the DS Linker and the N-Card are the same cartridges, albeit, with a different firmware with their own unique features.

I have attached dumps of my DS Fire Cards if you would like to experiment with them. Best of luck. ds-fire-card-dumps.zip

ApacheThunder commented 11 months ago

Do you have the firmware files to that card? I was able to find DS Linker and N-Card firmware but not your's specifically.

Mainly want to look at udisk.nds....it appears udisk.nds is what the usb firmware update tool uses and the one for DS Linker anyways looks very similar to those rom dumps. It may be as simple as using a custom udisk.nds file but unless I see the firmware files for a DS Fire card I wouldn't know for sure.

m4x10187 commented 11 months ago

https://www.linfoxdomain.com/nintendo/ds/dl/DS_Fire_Link_v1.45_v2.52.rar https://www.linfoxdomain.com/nintendo/ds/dl/DS_Fire_Link_firmware_v1.23o.zip https://www.linfoxdomain.com/nintendo/ds/dl/DS_Fire_Link_OS_v1.23o.zip https://www.linfoxdomain.com/nintendo/ds/dl/DS_Fire_Link_v1.23.zip https://www.linfoxdomain.com/nintendo/ds/dl/DS_Fire_Link_Kernel_v1.23.zip

ApacheThunder commented 11 months ago

Oh I just realized why you might be having issues getting GM9i to browse the N-Card. GM9i uses a limited set of embedded DLDI code/binaries when it's booted from DSi SD.

I built a custom version that forces NTR mode but with SD access enabled and I forced it to always use the DLDI bin patched into the SRL via fatInitDefault. For DSXtreme I have to launch this on the cart due to a quirk with how it's DLDI works. Forcing NTR mode and NTR clock speeds I had to do specifically for the DSX as well and may not be required for your card.

Regardless this custom build should work with your card in theory. I would be interested to know if it's able mount the card's filesystem from DSi mode. Assuming you have Unlaunch installed of coarse. You might have to launch this with Unlaunch though as I'm sure Twilight will cause issues due to it's default behavior of turning off the slot when booting homebrew off DSi SD card:

https://files.catbox.moe/bjbg54.ZIP

Let me know if that works. You will need to DLDI patch the NDS file with your card's DLDI. It should then work. But if not let me know. You can contact me on Discord and we can try and sort out the Gm9i support issue. ;)

I am on the DSI mode hacking server on Discord and can send you a invite link if you are not on it currently.

m4x10187 commented 11 months ago

Tried patching the .NDS file with the "dldi_ncard.dldi" file, and when I launch it through Unlaunch, it freezes on the mounting devices screen. Without patching the GM9i .NDS file, it would boot, but only two drives are present: the SD card and a Nitro game image. The game image is none other than the cache that was created by GM9i, whereas the SD card is the DSi SD.

m4x10187 commented 11 months ago

Frankly, I don't have a DS lite or original DS to transfer this onto the card. So either I might have to wait till I get one, or find another solution.

ApacheThunder commented 11 months ago

Ahh the freezing on mount. It happens with the DSX too. I had to put it on the DSX cart and boot it with NTR Launcher with SCFG unlocked before it would work.

Here's one final build I can try for you. This is still able to mount my AceKard 2i despite forcing NTR mode and other things. I tested this as a installed app on System Menu. If you have HiyaCFW, copy the title folder on to SD and allow it to overwrite folders. This app is the only one present in the sub folders so it won't replace anything you already have.

DLDI patch it first of coarse.

https://files.catbox.moe/c0usak.zip

If that still doesn't work then like DSX you might have to boot it from the cart after launching the cart using NTR Launcher with the SCFG unlock setting enabled.

Oh forgot to ask, does your Fire Card show up in System Menu when you insert it? If not that might be one reason. System Menu powers down the slot if it doesn't detect a proper cart when you boot DSiWare. Even DSiWare with header that says slot should be accessible. It does that with my R4.

This is not an issue on 3DS however due to different boot process. R4 and similar cards show up as white icon on those consoles.

If that's the case let me know. I might try one more tweak by telling the slot to power on when the app boots up. I might need to run some cart init code in arm9 before DLDI mount too. My R4 might be a good test case because I can't really get that cart to work with Gm9i either. :P (it's an original R4, not the newer SDHC clones)

ApacheThunder commented 11 months ago

Ok the DLDI init issue with DSX was resolved. Turned out that the DLDI code was relying on certain bits in the header to be set for it to work. We fixed it by hardcoding the card command bits related to that to always use the ones DSX expects.

Since Fire Card and clones don't have open source DLDI, I'm not sure if the same can be done to them. But knowing what part of the header sets the card commands. I updated the section of the header for the SRL related to that to match what the header from your dump used. (specifically the 16g cart but they both probably use same values here. Specifically the 0x60 region of the header)

Anyways here's one last build for you to try:

https://files.catbox.moe/vfkf17.zip

This one will run fatInitDefault instead of fatMountSimple like my previous build. After I used the fixed dldi this is what made my DSX work. Maybe the case for you too. That's assuming System Menu applies the 0x60 bits to the cart even when not booting from the cart. (otherwise the DLDI code itself may need to reverse engineered to find if the same fix would apply to them and then make the needed changes). I could try later using just the bits from header from DSX with the old dldi driver to simulate if that would have fixed it too but it's getting late here so this is the last thing I can do for today.

The titles folder is for if you have HiyaCFW. You should DLDI patch the .app found in there too if you intend to try using it with System Menu. The NDS file can be launched with Unlaunch. I still needed to lock SCFG registers though as trying to load the DLDI driver for my DSX as an embedded binary in the source via fatMountSimple did not appear to work correctly. (this was not the case with dsxTool however. Must be a quirk with GM9i's complicated drive mounting system)

Let me know if this does anything different for you.