Flash cart(ridge)

Mr. chamekan, I am very happy to see that Flash Cart was made by you and that it is being utilized by you.
And, as you tweet about it, a lot of people seem to be interested in it.
Thank you.

If the Flash Cart can be used easily for storing data such as games etc, it will be very convenient and wonderful.

For example, suppose that there are puzzle games that consist of many of stages.
Since it has many many stages, it has to be divided into several programs.

…I imagine if Flash Cart could be utilized as follows.

Make a program consisting only of a few stage data (–>main program) and a program consisting almost entirely of stage data (–>data program) and send them to Flash Cart.
The main program identifies the area of the data program in the Flash Cart and accesses it.
Then, the main program can access the data of many stages in the Flash Cart, and can play huge number of stage data…

Is it possible?
Or is it already considered as a concept of using Flash Cart?
Is there anything already developing a method to realize such a function?

Apparently, it seems to be a difficult task for me. :roll_eyes:

It’'s nice to see another Arduboy with flashcart :slight_smile:

I’ve not fully worked it out yet. but the basic idea is to access it as raw memory rather then a filesystem:

  • A reserved vector in the sketch will contain the absolute page address of flash memory reserved for the sketch (set by the flasher utility)
  • A function like flash.SeekData(uint16_t page, uint8_t byte) will select flash address as abs_page + page
  • arduboy.SPItransfer* is used to transfer data

(* currently only SPItransfer of Arduboy2 library in homebrew package supports read)

I’ll see if I can cook up a demo.

Yes the idea is to use also to store game data (and savedata) and graphics on the flashcart (i plan to write a flash.drawSprite() function too)

1 Like

Wow. I 'll read the code.
Thank you.

It’d be awesome having some large epic rpgs that utilize external flash for saves, animation, assets and the like! It’s amazing what can fit into 32kB but imagine what we could do with MBs!!!

1 Like

I’m not good at low level programming.
In Arduboy Lib, SPI CS is always selected for OLED.
Can someone show me a simple sample of using multiple SPI devices in Arduboy?
It is good enough to read JEDEC ID of flash.
Perhaps I can do the rest of it.

I’ve added a test / example sketch to my github to show how sketch data stored in flash can be accessed :

To see this sketch in action you can burn the example flash image file from here

To build a flash image with data files you need to grab the latest flash-builder from here:

After you’ve burned the flash image file to the flashcart, select Flashcart test from the loader menu and you can enjoy the bad apple animation on the go :smiley:


Thank you very much, Mr.Blinky!!

Off the subject, I made a paddle controller for arduboy, and modified ArduBreakout for it.

This cartrige system is very nice!


That’s pretty cool … what about a joystick?


Thank you, @Mr.Blinky for updating and adding various information and sketches.:smiley:
I will refer to them and try on utilizing the flash cart.

…By the way it is a trivial consideration about “arduboyloader.png”.
I still get lost about Arduboy’s two buttons, “A” and “B”.
(Perhaps some people think so.)
In this way, the actual layout of the button and the screen match.:sweat:

1 Like

Yeah. I did it.

I’ll read the code and make some original program.
Thank you.


Yay! feel free to ask questions.

The cart code is still very primitive.

You’ve got a point there. I had trouble in the beginning but then I started using the ArduBoy name as a reminder. A is left of B :smiley: and never had a problem again.
I’ll update the image so it’s more intuitive

1 Like

I was wondering how hard would it be to have the flashcart also able to backup independent saves to the serial flash and restore them to eeprom? For instance if a game uses eeprom it could set a flag and whenever the game is loaded, the prior game’s save (if applicable) is backed up to the serial flash and the new game’s save is written from serial flash to eeprom.

Not a huge deal breaker, but it would be a nice feature to have. Haven’t looked at how the games are all stored in the serial flash, but should be easy to allocate some kind of look up table like a vector table at the head or end of the map that would tell which games have eeprom saves and where in the flash memory those saves are allocated.


I had an idea for that but I stoped persuing it when I reached the 3K bootloader size ( I just like the 1K extra space too much :grin: ) and a sketch will get access to exclusive save data in flash too.

What I had in mind is that each game header has a page address pointing to a 4K block
where the EEPROM data is backuped to/ restored from (4K because of minimum erase size)
That same page address is also stored in one of the reserved interrupt vectors of the flashed sketch (this is done by the flash builder tool) just like it’s done to access the sketch data file in flash now.

Prior to flashing a new sketch the EEPROM page is read from the vector, the 4K block at that address is erased and EEPROM is backed up to it. Then the new sketch is burned, the EEPROM page address is read from the vector and the EEPROM backup is written to EEPROM.

The 16 byte system EEPROM area wouldn’t be backed up for convenience and sanity :slight_smile:


Lol whaaaaaaaaat is this? @n602 did you take down one of the kickstarter update videos and transcode it to run on an Arduboy? Please tell me there is a video of this?

I know I’m late to the party as always on this but wooooow!!

Oh, it was not me that converted it for Arduboy :sweat_smile:
Mr. Blinky taught me where to find it as a video to check the operation of Flash-Cart.
Somewhere in Mr. Blinky 's website, I guess that it still exists, but I am confused as to whether I can make it public.
Please ask Mr.Blinky about it.:wink:

It was me :slight_smile: I downloaded the YouTube video extracted the frames and converted them to monochrome bitmaps using IrfanView then used a python script to put the bitmaps into a binary


@chame your paddle is cool. I want to make one too. Where can I found the analog version of the breakout game ?

Sorry I didn’t upoaded it yet.
Please wait for a few days.
I will explain it as a new topic.


One-step closer to the original PONG game.
Great idea of using the arduboy cartridge connector.

What’s the name for this connector interface?
??? ???

Man I need to stop chatting and get back to work!!!