I am so close to getting the whole thing together, but a nagging issue persists.
The mbed online compiler sticks some bytes after the key in the memory and apparently it needs those bytes. I’ve tried to move them but to no avail
I know where the problem is, I am working on it, there are many ways to solve this but I want to get it working so that newbie users using the mbed online ide do not have to worry about it.
So, its ongoing.
But do not be alarmed if you can’t load from the SD at the moment. I know theres a bug.
Here’s the bug for those who are interested. After copying the game asterock.bin from SD card, you see that the bytes after the bootloader key are different. And the stupid mbed compiler forces these somehow and they are needed.
Honestly I’ve also faced the problem with bootloader working only the first time. I was sure @jonne was already aware of the problem so just a matter of time to get it fixed.
And while I am at it, I am going to fix some other things as well, as in: auto-updating & versioning of the bootloader. I already noticed that maintaining it is a chore, so now its going to be automagic.
I am working on a new loader (am testing it already).
The big benefit of this new loader is that it is “auto-updating”. I noticed when I was constantly recompiling the binaries on mbed community page, that maintaining a new version of loader is going to get very complicated over time.
The way it works is as follows:
pokitto boots, and user asks for loader
pokitto checks what is the version of loader resident in memory
if POK_ENABLE_LOADER_UPDATES is true, Pokitto looks for a file called LOA.DER on SD
Pokitto checks if version on SD card is more recent than the one in memory
If yes, Pokitto reprograms loader from SD to memory
In this way, if you want to keep the loader up-to-date, the only thing you need to do is to keep a new version of LOA.DER on SD card. All programs will automatically update loader if necessary.
An added bonus here is that the SD card loading can be accelerated a little bit. But more on that later.
Currently you can set these on a per-game basis when compiling, but I agree that it should be an option in the boot loader instead. Is this possible @jonne ?
Using a similar design to the .arduboy files (or maybe just a txt file near the bin file) it would be also nice to provide a little text while the game is loading. Example:
pixonia.bin
pixonia.txt
Pixonia
The adventure begins when blah blah
Controls: bla blah
So when the file is loading you get a little textbox that makes the experience feel faster
But, I guess you are super overloaded with stuff to do right now. These suggestions can wait until I get fully into pokitto hacking.
Oh! did see that, looks super sweet, so the same data could be used in the loader, awesome. And the icon.
Maybe the whole collection can look like tiny catridges in shelves, no text list. And you get the author, description and controls after loading (loading screen contains all that information and B goes back to the list, A loads the game retaining the info in screen), something like: