FX flash time + options

I’m working on a personal project to learn the ins and outs of Arduboy and was looking at the flashcart writer utility: https://github.com/MrBlinky/Arduboy-Python-Utilities/blob/main/flashcart-writer.py. I see that the baud rate is 57600, which I believe is 7200 bytes per second. I also downloaded what I thought was one of the larger carts from http://www.bloggingadeadhorse.com/cart/Cart.html at over 9MB. Assuming no losses (which I’m sure there will be), I wanted to make sure I’m actually looking at over 20 minutes of flashing the cart to the Arduboy. Is that correct?

With that in mind, I also see that there’s a flashcart “decompiler”: https://github.com/MrBlinky/Arduboy-Python-Utilities/blob/main/flashcart-decompiler.py. Given the format is reasonably structured, would it be feasible to add a category at the “end” of the cart, which for normal users would be a “free for all” for their personal games, and which a script could use to “append” games to the cart by reading the relevant sectors/pages, finding the next place to put the data, placing it, then updating whatever index there is? This would of course be with the understanding that this function would only ever APPEND games; if you wanted to update an existing game, it would be more complicated (or you just flash the whole thing again). I understand this might be a niche use case, but this way, indecisive people basically “poke” at their arduboy, adding games as they wish without waiting 20 minutes per single game found, or carefully curating the flashcart before flashing all games.

Also… is there already something which does this? Just wondering.

I downloaded the same cart not too long ago (maybe a month or so, but there have only been three games added since then, IIRC) and I don’t remember the exact time it took to flash, but I believe it was under five minutes.

1 Like

Of course this is really a question for @Mr.Blinky but, you need the index with the png file to be updated at the same time as the games hex and potentially .bin file.

As far as I know, that data isn’t stored sequentially in such a way you can add more to the end.

Not sure where the index is stored, but I’m assuming it’s at the front in which case edits to that would push the rest of the data out.

So basically, it’s likely you’ll always need to rebuild and reflash the whole cart to make any modifications other than just one game.

1 Like

Ah cool, that’s not so bad then.

Aw man, well combined with the shorter than expected time, I guess it’s not really worth it. Thank you both for the info!

Oh, the flash time, it’s a little over 2 minutes for the whole thing.

1 Like

Two minutes sounds about right. You can occupy the time by playing a game or two in the cart sites built in Ardens emulator!

1 Like

Thank you both! I was able to get it working and verified the time + proper functioning of flashing the fx cart. I was putting it off because I thought I’d be sitting there debugging a 20 minute process repeatedly, glad it worked + only takes 2 minutes.

Arduboy is fun! Love how no-nonsense and low level it is.

6 Likes