Flash cart(ridge)

I start this thread as a place holder for the Arduboy flash cart project that I’m working on.

Like many others I also fancy playing multiple games on the go. @eried made an awesome looking Arduboy dock to be able to do that and many would love to see SD card support. I gave this a thought too but decided to go for a more console-ish approach: a (game) flash cart.
Not just for a more authentic feel but also because flash is faster and easier to handle for Arduboy than SD cards.

What is this flash cart for Arduboy?

In a nutshell the flash cart is a serial (SPI) flash memory chip hooked up to a voltage levelshifter and Arduboy’s test pads.

Initially the idea was to built it inside Arduboy but with @n602 replacement backplate design and discussing ideas, a removable flash cart was born.

What will it be usable for?

The most important feature will be that a game can be selected from a menu in bootloader mode and that it can be programmed into Arduboy memory right away. No loader app is used wearing down program memory and It takes about a second to program a game. You can follow the development of the custom bootloader that makes this possible here

Another feature will be that sketches can access the flash cart and store additional game data and graphics on it freeing up precious program data in Arduboy program memory.

Schematic - using TXB0104 levelshifter :


Schematic - using diode and resistor level shifter :


Schematic - using flashchip only :


Eagle PCB design

Proposed connector pinout

Flash cart/ Expansion connector pinout

( (Homemade) Arduboy facing top - front view male pinheader)

12 11 10 9 8 7 6 5 4 3 2 1
12 11 10 9 8 7 6 5 4 3 2 1
Note: Arduboy FX uses the New wiring scheme
TX*  - Serial Transmitter output
RX   - Serial Receiver input ( Flash cart chip select original wiring)
SCL* - I2C/TWI serial clock I/O
SDA* - I2C/TWI serial data I/O  ( Flash cart chip select new wiring)
NC   - Not connected (reserved for future use)
KEY  - Key pin. should be filled to block pin insertion (reverse insert protection)
MISO - SPI/ICSP Master Input, Slave Output
MOSI - SPI/ICSP Master Output, Slave Input
CLK  - SPI/ICSP clock
RST  - MCU/ICSP reset
GND  - Ground (0V)
Vcc  - 5V (~3.0V to ~4.1V on Arduboy)
(*) Not available when using Pro Micro with Alternate Wiring

Example parts / modules

TXB0104 level shifter module

64Mbit / 8Mbyte storage (256+ games):
W25Q64 64Mbit Flash loose chip SOP8 package
W25Q64 64Mbit Flash loose chip DIP package
W25Q64 64Mbit Flash module

128Mbit / 16Mbyte storage (512+ games):
W25Q128 128Mbit Flash loose chip SOP8 package
W25Q128 128Mbit Flash loose chip DIP package
W25Q128 128Mbit Flash module

Adapter board for when using loose chips with SOP8 package
SOP8 to DIP adapter board

Flash storage format

Flash can be read randomly at byte level. But writing to flash is done in pages of 256 bytes and erasing flash in sectors of 4K (4096 bytes). Applications are stored in a number of adjacent pages called a slot. Slots are linked together with a forward and backwards link.

Slot format

  • header (1 page)
  • title screen (4 pages)
  • Optional application code (0 to 116 pages for Cathy3K)
  • Optional Application data (0 to 65534 pages)
  • Optional save data aligment gap (0 to 15 pages)
  • Optional save data (0 to multiple of 16 pages)

Header format

mandatory data

  • 7 ARDUBOY signature string
  • 1 list number (0 bootloader title screen)
  • 2 previous slot page address (0xFFFF for first slot)
  • 2 next slot page address
  • 2 slot size in pages
  • 1 application flash size in 128 byte blocks (0 for none)

optional data

  • 2 page address of application program data (0xFFFF none)

  • 2 page addr application data file ( 0xFFFF none)

  • 2 page addr application save data (0xFFFF none)

  • 2 EEPROM start (0xFFFF none) Optional size of application data (in 256 byte pages, mandatory when save data is used)

  • 2 EEPROM end (0xFFFF none) Reserved (0xFFFF)

  • 32 SHA256 application signature (calculated over hex file data (before hex file vectors are patched) padded with 0xFF to a multiple length of 256 and fx data (also padded to a multiple of 256 bytes), for categories this area is unused) The use of this signature is for external tools to quickly identify a game and not to check game integrity.

  • 199 UTF-8 zero terminated strings:

For applications:
  • Application title
  • Version
  • Developer
  • General info or instructions
For categories:
  • Category title
  • Category information

Numbers are stored in big-endian (Most Significant Byte first) format.

added diode-resistor schematic, SHA256 signature to header format, lite-version schematic


With your tremendous help and detailed documentation, I was able to test the operation of prototype of flash-cart just now.
Thank you @Mr.Blinky
What a genius you are


Great to see you’ve built flash cart already :+1: and taking a different approach. It looks neatly built on some veroboard. I think I overcomplicated mine trying to keep it small/thin :sweat_smile:

You’ve done all the hard work - I wonder if you and @bateske can collaborate and incorporate this into a new Arduboy design? Is there enough space to mount a header and squeeze it into the existing design and casing?


…if @bateske doesn’t design and release a super/mega Arduboy with @Mr.Blinky’s flash chip and @Keyboard_Camper’s accelerometer on board now (before someone else does) then he is just leaving money on the table! :open_mouth:


I agree!

I will buy 3 or 4 of them alone. @eried will buy the same no doubt.


Mine kind of grew into its own thing and became a pen drive.


That would be awesome with a 3d-printed case, or you could do an Arduboy-esque design and use some acrylic with an aluminum backing to it. Also I came up with a name for your pen drive: The Ardudrive


Dumb questions:

This looks very exciting, but I have some questions…

  1. How would we put files onto a Serial Flash chip?

  2. How would we choose which file to load from the Serial Flash chip? Dip Switches?

  3. Are there any serial flash chips that don’t need a level shifter? If so, we could eliminate the level shifter part (33% of the total circuit). Are 3.3v chips cheaper or faster or better for the environment?

Looks promising…


If the connector would be dedicated to flash (or 3.3V hardware) only the voltage regulator and level shifter could be embedded. But the idea is to use it also as a general expansion connector.

1 Like

I thought that it might be necessary not only for Flash memory but also for other SPI and I2C devices,
I tried making a case.

I tried to make somewhat thin cases, but they may have been a bit too big.

After all, it seems that I should have made a thin case for a Flash-cart like @Keyboard_Camper 's cool-pen-drive at first…


Looks great! Are the 3D files for the Arduboy front case available online?

1 Like

the thinner one looks better. If you scan squeeze in the top screw holes. You can make it look more like a hat :smiley: like this:
(quick mock-up with no accurate dimensions)

Also it would be nice if the screw holes where on the back and the top size was solid so you could stick a little label on there. I like the idea of the pin protector clip :+1:


or you could add a cartridge port to the backplate :wink:

1 Like

This or having it fold over the back. @n602 has a couple thickness of cases designed for a battery extension. Maybe using one of the thicker ones and making a slot at the top like the gameboy

1 Like

the cartridge port is already in the backplate. could you please elaborate?

Do you mean a recessed cartridge slot? Like a gameboy has as @Freezingsnail mentioned? That would look very nice (still need a case for the cartridge) but at the cost of a smaller battery.

1 Like

I was thinking more like a gameboy port/ slot.
I’ve also thought about rotating the header and having it clip on like a Pi hat (a little how the DMG battery cover fits if that makes sense).


Ah I see, the connector at the back. For a standard .1 header the back has to be much thicker to make it not stick out of the back.

I fancy a gameboy style slot too. The power switch would be easier accessible then too. but like I said at the cost of a smaller battery.

Note that these prototypes are quite huge for a small card. With a properly designed PCB
The cart doesn’t have to be much deeper then 0.5" (or 2x6 Lego studs :smile: ). With a nice label stuck to it, it would look like a nice little marquee at the top.

In a future stage the connector on flash card could be changed to female. But that requires a redesign of the backplate for a male connector slot. With a female connector at the flash card it will would less likely poke your fingers and a male connector at Arduboy side has less wear than a female one.


Several files for 3d printers are in Thingiverse.
“Arduboy replacement face/back plate”
If you are interested in it, please find it.


Thank you for your advise.

You can make it look more like a hat

If there is also a bump for screw holes on the top, unused clips can be fitted there.
However, it may be better to refresh the shape by making it a hat type.
I wonder if it is better or not there.

you could stick a little label on there.

That’s nice. I will try it in the next prototype.

1 Like