Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: Memory/Settings Creation Question
From: Mike Holden (rockbox_at_mikeholden.uklinux.net)
Date: 2003-05-04


Björn Stenberg said:
> Dave Jones wrote:
>> I can't tell from the settings.c file if there is room for them in the
>> Config block saved to Ram. I would guess from my rudimentary
>> knowledge that this space is full.
>
> Yes. However there is space in the bigger block saved to disk.
>
> Look at the top of settings.c and you'll see a description of the
> 512-byte config block. Offset 0x0-0x2A are taken, as is 0xAE-0x1FF. I
> recommend using the remaining 7 bits of 0xAE.

Do the principles stated here still stand? It looks like currently the
first 2 bits of 0xAE are used, so I can take up to 6 bits from bit 3
upwards to bit 8, and then any bytes from 0xAD downwards all the way to
0x00?

I'm looking to store the last used radio frequency, so need to store a
value in the range 8000 to 11000, which can scale to 0-3000, and currently
in increments of 5 (frequency increases by 0.05 Mhz), so could be scaled
to 0-600, so long as we are settled on these, but these could still be up
in the air, pending discussions on here. I can start off taking 2 bytes,
giving plenty of range, and scale these later to use less space in the
config block.

Maybe a bit more info in settings.c wouldn't go amiss, to explain the
usage and allocation rules?

-- 
Mike Holden



Page was last modified "Jan 10 2012" The Rockbox Crew
aaa