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.
In a nutshell the flash cart is a serial (SPI) flash memory chip hooked up to a voltage levelshifter and Arduboy’s test pads.
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.
Eagle PCB design
( (Homemade) Arduboy facing top - front view male pinheader)
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
Adapter board for when using loose chips with SOP8 package
SOP8 to DIP adapter board
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)
EEPROM start (0xFFFF none)Optional size of application data (in 256 byte pages, mandatory when save data is used)
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:
- Application title
- General info or instructions
- 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