I'm currently adding a last feature to the boot loader code and I'm pretty sure we'll have a few bytes at the end to use for whatever we want. One of those things could be global user settings.
The Arduino memory is divided into two areas, and broadly speaking one is for applications and the other is for the boot loader (not technically correct, the application can take the lot if it wants but humor me). Code in the application block can't Flash code itself, but code in the bootloader can, and although I haven't tried it myself I believe it can also flash itself. What this means is that we can reserve a few bytes in the bootloader for variables that change only very infrequently, and the bootloader can provide functions to read and/or modify these variables. Typical examples off the top of my head include:
- Default volume/mute
- LCD contrast
- LCD brightness
- User nickname (for identification in multiplayer games)
Anyone have any thoughts about this? Games would be under no obligation to use this info of course, but the ones that choose to could do so secure in the knowledge that all apps are free to do whatever they want with EEPROM and these settings will remain safe and secure in the bootloader Flash memory and will never change without deliberate action by the user.