Global user settings

Libraries, utilities, bootloaders...

Global user settings

Postby Myndale » Fri Mar 21, 2014 6:56 am

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.
Myndale
 
Posts: 507
Joined: Sat Mar 01, 2014 1:25 am

Re: Global user settings

Postby Xadiant » Fri Mar 21, 2014 6:04 pm

This sounds like a good idea. By hiding such variables in the boot-loader you won't have to trust developers nearly as much with EEPROM.
Xadiant
 
Posts: 14
Joined: Tue Mar 04, 2014 6:48 pm

Re: Global user settings

Postby rodot » Sat Mar 22, 2014 8:10 am

Very good idea, but how would change these settings as the program can't write in the bootloader?
User avatar
rodot
Site Admin
 
Posts: 1290
Joined: Mon Nov 19, 2012 11:54 pm
Location: France

Re: Global user settings

Postby Loopingstar » Sat Mar 22, 2014 11:11 am

Yes it is a good idea!
Maybe we can create one or download skins and save in memory? (lovely Amiga slin (^_-) )
Or create user icon for score tables :)
Loopingstar
 
Posts: 4
Joined: Sat Mar 01, 2014 9:34 am

Re: Global user settings

Postby Skyrunner65 » Sat Mar 22, 2014 9:32 pm

You could apply this to scoreboards in order to eliminate the need to type your name, and also to quiet down that start-up noise. However, you will have to put a limit on the username's length (for obvious reasons) and (maybe?) be connected to the internet via computer to make sure the name is not taken.
User avatar
Skyrunner65
 
Posts: 371
Joined: Thu Mar 20, 2014 5:37 pm
Location: NC,USA

Re: Global user settings

Postby Myndale » Sun Mar 23, 2014 2:19 am

@rodot: the bootloader would have to provide functions to get/set the parameters and the game code would simply call them.
Myndale
 
Posts: 507
Joined: Sat Mar 01, 2014 1:25 am

Re: Global user settings

Postby rodot » Sun Mar 23, 2014 9:54 am

@Myndale: And you're saying that you could fit all that in 2KB ?.. Are you kidding me, or you are doing black magic? :lol:
That'd be awesome... as usual, Myndale.
User avatar
rodot
Site Admin
 
Posts: 1290
Joined: Mon Nov 19, 2012 11:54 pm
Location: France


Return to Software Development

Who is online

Users browsing this forum: No registered users and 24 guests

cron