Repository navigation
Conversation
I don't own a DSpico, what is the intended usecase here? If it is moving data to/from the external cart SD to the internal SD or NAND, I think it makes more sense to share the drive with #9 (the RAMdrive) as people might still want to access the NAND partitions at the same time as the DSpico, but I can't imagine a usecase for moving data from the DSpico to the RAMdrive. But I'm happy to be proven wrong on this too. |
The use case is moving files between the DSpico SD and the internal SD/NAND, yes. My concern with Please let me know what you think. |
|
Then yeah, looks like we'll have to reuse this one.
I'm not against time-based timeouts, I think they're a good thing, but they shouldn't affect the critical path and ideally should only affect the error paths. If the official DLDI driver does this, then I think it's reasonable.
Do you have any performance numbers? I'm not expecting a huge change as this sounds very bus limited (4 MHz / MiB/s?) but the higher the number, the better for us, as long as it's stable. |
|
Did some extra debug, performance numbers on a 624 MB:
clock is the default 6.7 MHz, so ~6.4 MiB/s at most if it moves one byte per clock (haven't checked the gap cycles). I think the rest is the pico's per-command latency: the firmware serves one 512 byte sector per E5 and the read loop polls E4 before each one |
|
Last commit: DSpico SD can now save the .sha file, like on the regular SD card |
|
Any chance we could just add a new drive? I know @Wolfvak mentioned not seeing a reason to transfer between RAMdrive and DSPico, I could see users wanting to transfer between two DSPicos or even two different flashcarts if support is ever added. That'd also give a new place to cleanly support Gateway carts, which I've wanted to implement for a while anyways, and a new drive letter would make a nice place to standardize on. |
I think this is perfectly acceptable, nobody's expecting the NDS cart to be ultra fast, especially not when running on a microcontroller that has to deal with protocol overheads. Sorry about not making many updates here but I'm still racking my brains trying to figure out a trivial way to add this drive without messing too much with GM9's insides, but do ping me here, on Discord or IRC if I haven't gotten back to you in a timely manner. (if you figure out a way I'd be more than happy to hear it) |
|
I've been waiting for this feature for a while now. One thing I do wanna say is that I cannot mount the DSpico's SD card when the default.nds flashed onto the cart is an ntrboot image of this build (I just get Cart init failed). |
|
@Dionicio3, could you confirm if you are using this ntrboot image from the guide or a different one? If you are building one yourself, could you try implementing this PR in it? |
|
I was using a custom image I built by compiling this version of GM9, using firm-to-nds to convert to a usable nds with proper blowfish keys, and compiling it with the standard version of dspico-firmware. I did just try with edo's fork you posted right now, and while it did initially show the same error, removing and reinserting the cart got the SD to read properly. I have a feeling this may just be an issue with how you're detecting if a cart is a DSpico |
|
@Dionicio3 if you only have flashed a ntrboot image and no ds/dsi mode rom to the pico, then the detection will fail as there won't be a rom with the DSPI or NTRJ gamecode exposed |
|
Yeah that's what I figured, hopefully something can be done to find a different way to detect a DSpico |
|
Unfortunately there's no way, the dspico firmware wasn't tought with an ID command (which in hindsight would've been useful), and the moment you send an unknown command the cart locks up :(, so the only way is to check for known rom images it presents itself at. Still, with my fork you can get ntrboot while also serving a retail rom, making it work for this setup (so really having the pico only serving a ntrboot rom is not really a need). |
|
That's true, I suppose the only thing that should be addressed now is the cart not correctly initializing until it's removed and reinserted, maybe this could be solved by resetting the cart slot once it's fully booted? I want to be able to use the GM9 script runner with files from the DSpico's SD card, but the need to remove the cart initially may hinder that |
That should be accounted by the Cart_Init call here It does a cart reset which on the firmware side should trigger https://github.com/LNH-team/dspico-firmware/blob/3818a427a3932f7345295cf022a2f606a4c40f33/src/main.cpp#L92 |
|
Last commits, and marking this ready for review:
|
Adds support for the SD card of a DSpico flashcart.
H:/, and works like the regular SD cardR+SELECTunmounts or remounts it, with a warning if the cart is pulled while mountedFixes #968