The rough idea
As I explained, the starting point for this project was the DSpico project itself. A repro cartridge only needs the internal memory and nothing more (no microSD). Meaning that in this case the hardware side of the project should be to remove both the microSD and microUSB ports from the cartridge, as well as adding a way to insert the ROM in the cartridge.
Also, on the software side, the DSpico's bootloader, which contains the code to open the microSD ROM launcher, should also be able to be replaced by the custom ROM we want to run, which thankfully they already include a guide on how to do that. Although I'll add some notes about this later in this post.
All in all, the rough idea is this: simplifying the hardware and replacing the software. So let me start the project progress.
Making the cartridge's hardware
Screenshot of the original PCB designed by LNH-team
As previously said, I started off with this existing design; the steps to take were to first remove the microUSB port and also the microSD card slot. Additionally, I had to come up with a way to program the RP2040 with the firmware. In the end I came up with exposing some big pads in the back that could be easily connected to a USB breakout board. That way I wouldn't be depending on other boards as some reproduction boards require.
Even though having to make the contacts with separate cables can sound a bit tedious to make for larger productions. A friend of mine showed me this test burner tool that could be used to easily connect the board and program it. Conveniently, I placed the pads at a distance of 2.54mm so it would be easy to find adapters for that connection.
Screenshot of the modified PCB
Additionally, I removed the reset button in order to save me a few cents. In that place I left two holes (top right in the image above) that can be easily bridged in order to reset the RP2040 in case you want to reprogram it.
You can check the source KiCad files used for this board here: GerardGascon/fanzine-ds-hardware.
There's already a warning in the repository, but I'll repeat it here. In case you want to try to fit this inside an existing game's shell, the board lacks the two holes in the middle that make it fit inside a real shell, as well as being a tiny bit taller than an original PCB.
So the current design won't fit inside a real shell unless you do some sanding to the shell.
Making the cartridge's software
For this project, I wanted to make a reader for a fanzine that a friend of mine had made a couple of years ago. For that, I tried using various homebrew DS libraries, like libNDS and BlocksDS. For some reason (I suspect the initialization process of the DSpico), the programs kept crashing in both versions (even though they worked fine inside the ROM loader).
In the end, I ended up modifying the original DSpico's bootloader, which is made with libTWL (an extension of BlocksDS).
I suspect the main issue was due to the initialization code the bootloader executes, but a typical homebrew game doesn't. A potential solution to this issue could be updating the RP2040 firmware to avoid having to do that initialization process, but I could be wrong with that.
You can check the source code for this fanzine here: GerardGascon/fanzine-ds.
About the ROM Size
First off, the maximum flash memory size that the RP2040 can use is 16MB. But because memory is expensive and the DSpico doesn't need that much, the DSpico and, by extension, this flash cartridge both have only 2MB onboard. Which...
Read more »
Geri
Anders Nielsen
Dave Collins
brtnst
Attila Sukosd