Is it possible to access the entire 8MB of the flash chip as data from one Arduboy application? For example, would it be possible to store say an ebook on the flash extension chip and then have an ebook reader app running which reads the data from the FX chip and displays it?
Yes, the best example so far is this app:
Wonderful. I am definitely going to try this once I have an FX Arduboy.
I guess this would then also mean that certain applications, which were too large for the original Arduboy, could work on the FX by moving data to the external flash and then only pulling it in as it is needed. This should free up at least some of the flash for additional executable code space.
Yes, before the launch I tried to motivate some developers to write some games that would take advantage of this feature so they could be featured on the device when it was produced.
Nobody stepped up to the plate.
They said they wanted to see that it was real.
Now it is real, nobody seems to care so… whatever
I am not much of a game developer, but some of the applications I am working on, which push the progmem and will likely not fit into the regular Arduboy, may be possible on the FX. In any case, the ebook reader app is a really good example for an application that requires a lot of data but otherwise does not need a lot of progmem. It is ideal for the FX.
Yes, the Arduboy has total control over it.
There are a number of technical limitations in regards to how the flash memory works, but something like a book is certainly possible. (One of the things I was planning was to adapt my half-finished visual novel engine to run off the chip.)
I started writing some FAQs a while back but never finished them. The info may be of use so I’ll just dump it here for now. Note that some of it might be incorrect, I never actually finished anything so I never got round to fact-checking.
As I recall, the problem was (and I believe still is to some extent) that nobody was entirely sure how the development process was supposed to work. People understood the concept but not how to make use of the chip.
That’s how it was from my perspective at least, perhaps the situation was different for others?
That’s kind of a gaffe to me because I’m a pretty terrible programmer, and I figured it out. There is an example sketch and I did a step by step instruction on how to do it.
Plus @Mr.Blinky is around to answer questions.
People just not motivated, I think if people want to make bigger games they will try out a new platform.
I think I’d be keen to try out some new things with the FX chip to see what can be done, but there are a few inherent technical restrictions as @Pharap pointed out. You can’t really use it as extra RAM or execute code from it (unless you make a virtual machine) which tend to be some of the most constraining parts of writing an Arduboy game. I can see it being really useful for games that have lots of levels or text in them though.
Some thoughts on my existing games:
MicroCity could have extra save slots for multiple cities. However it wouldn’t be possible to have larger cities due to the RAM limitations.
Catacombs of the Damned! could have bespoke levels instead of procedurally generated ones. Maybe some extra enemies. It is pretty close to the PROGMEM limit though (mostly due to the code complexity of the renderer etc) so not much opportunity for extra gameplay features.
My interactive fiction engine would be perfect for the FX chip as it is essentially a virtual machine and all the script code + text could be stored on the FX. I actually made this with something like the FX in mind.
I’m a bit busy with other projects at the moment but have been dying to make an upgraded engine similar to Shattered Lands that uses the FX chip for storing all monster graphics, dialog, maps, and possibly tilesets (if doable then tilesets could be greater than 16-tiles per set). The idea was to use a similar battle system but have 2 characters in your party and have the second character similar to Final Fantasy Mystic Quest (you play the main character and allies come and go throughout the story).
There’s a possibility of doing a Shattered Lands FX Remastered edition that has all the features I originally intended but had to cut due to space limitations. Either that or keep Shattered Lands as is and eventually finish it’s sequels and then do a different game (really any tilemap based game would do well since levels and tiles could be streamed from the FX chip).
Looking at @Mr.Blinky’s render from FX example it shouldn’t be difficult to draw tiles and 2 or 3 sprites from the FX chip.
I was able to draw 100 8x8 unique transparent sprites all “streamed” from the external memory and the bottle neck was the graphics rendering, not the fetching of data.
It does obviously require you to consider your games structure, but if you are doing an RPG this gives you insanely high limits for resources.
Once you’ve got a game “engine” you can store all of your item, spell, character, enemy stats, sprites, animations and dialogue on the external flash.
Going further, if you built your data structure around lookup tables as trees, you only need your pure game logic and a start address.
Then your game pulls it’s master table data, and uses that logic to determine where in the table you are, then that table references another address space to pull in different sprite data.
It’s correct that you have to be very careful about how you form your data structures, it is not as easy as just dumping executable code in the external memory, or being able to treat it as extra ram (keeping it loaded). It forces you to “stream” all of this stuff from the flash chip.
I just think it breaks convention for how memory systems are usually formed in systems and only Arduboy will work this way so that’s where people throw their hands up I think.
We even discussed the ability to then write back to the flash, and while you wouldn’t want to use it for rapidly changing values, like, how many hit points your dude has, that will probably still stay in RAM. But you could easily have a “save file” like data structure that you pull from when you want to know what is in your inventory.
Or save the state of the world as RPG do, set your flags for what missions you have done, or what decisions you made in dialogue trees.
I wouldn’t be concerned about wearing out the flash, but I’m sure someone will mention it. I think so long as you aren’t doing it continuously, as long as the writes are only so frequent as a couple times a minute or so it should still last many many years or more.
Someone make cyberpunk for Arduboy and I’ll gift you 2% equity stake in the company.
Sounds like a theme for the next GameJam!
Use the FX for something the original Arduboy couldn’t do ?
Does that come with liabilities? Make it an even 10% and I will give it a shot!
I’ll split the Kickstarter profit with you, which, was the original pitch I gave to developers, which apparently wasn’t enough so. shrug