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.
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 :
Eagle PCB design
Proposed connector pinout
Flash cart/ Expansion connector pinout
( (Homemade) Arduboy facing top - front view male pinheader)
TX* - Serial Transmitter output RX - Serial Receiver input / Flash cart chip select SCL* - I2C/TWI serial clock I/O SDA* - I2C/TWI serial data I/O 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
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.
- 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)
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)
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)
2 EEPROM end (0xFFFF none)
16 MD5 application signature
214 UTF-8 zero terminated strings:
- Application Name
- Quick instructions
Numbers are stored in big-endian (Most Significant Byte first) format.
added diode-resistor schematic, MD5 signature to header format