Arduboy Semi-Official EEPROM Table

Of course! Nice work!

image

HOLY COW. That’s a lot of fun, family-friendly, and FREE content!

1 Like

@Mr.Blinky, looks like your list doesn’t include:

@acedent, looks like your list doesn’t include:


These are just from the list of my favorite games, along with the games I’ve put out. I didn’t do a big, deep dive, or anything.

Yeah but what are their EEPROM usage? Throw us a bone @crait!

2 Likes

Yep the list is built off @Eried’s repo. some games still need to be added.

2 Likes
  • Circuit Dude: I use EEPROM.put() at EEPROM_STORAGE_SPACE_START + 412 for the leveldata progress. For custom levels, I store them from EEPROM_STORAGE_SPACE_START + 90 to (EEPROM_STORAGE_SPACE_START + 90) + 6 * 70, which is 6 levels, with 70 bytes, each.
  • Suit Shooter: I use EEPROM.put() at EEPROM_STORAGE_SPACE_START + 402 for the high score.

If you store 6 levels of 70 bytes at EEPROM_STORAGE_SPACE_START + 90
Then the 6th level will corrupt the leveldata at EEPROM_STORAGE_SPACE_START + 412


(and any save data for Suit shooter)
1 Like

The levels are located at…
Level 1: EEPROM_STORAGE_SPACE_START + 90
Level 2: (EEPROM_STORAGE_SPACE_START + 90) + 1 * 70
Level 3: (EEPROM_STORAGE_SPACE_START + 90) + 2 * 70
Level 4: (EEPROM_STORAGE_SPACE_START + 90) + 3 * 70
Level 5: (EEPROM_STORAGE_SPACE_START + 90) + 4 * 70
Level 6: (EEPROM_STORAGE_SPACE_START + 90) + 5 * 70

I tried playing it and even created a custom level to test it and it never was corrupted? To be safe, should we make the FX version have only 5 custom levels?

so then last byte of level 6 ends at EEPROM_STORAGE_SPACE_START + 6 * 70-1 right ?

I’d say just store leveldata at :
(EEPROM_STORAGE_SPACE_START + 90) + 6 * 70

Yeah!

Why do you say that?

I ment to type the leveldata progress :sleeping:

so you change:

EEPROM_STORAGE_SPACE_START + 412

to

(EEPROM_STORAGE_SPACE_START + 90) + 6 * 70

1 Like

Whoa, you’re right. There seems to be a conflict! The progress location seems to be stored somewhere in the custom level data! However, in practice, I can’t seem to actually change the progress with the editor and can’t change a custom location with completing a level??

Oh, DUH! It’s because your savedata is stored in RAM. If you edit Level 5, save it, then restart the Arduboy, it changes the progress. Gonna make a quick change on the uploaded code. :slight_smile:

4 Likes

A post was merged into an existing topic: Shared EEPROM storage management across multiple apps

@MLXXXp
It’s not quite exactly the same topic / issue from 5 years ago tho.

But this topic should be used only for maintaining and discussing the spreadsheet, not proposing new EEPROM management methods.

2 Likes

Updated my list with Puzzle category. Scanned a total of 242 programs of which 119 use EEPROM now.

2 Likes

What are the chances of not being able to support all the games’ use of EEPROM, considering we have games like MicroCity that uses all of it? (From my understanding.) Or my game, that uses like 420 bytes? What’s our plan for dealing with this?

Well what we already can tell from the unfinished list is that there are quite a few games that corrupt the system settings and those have to be fixed (preferable) or excluded (doesn’t solve corruption on manual upload). Then there a quite a few programs that use a lot of EEPROM and easily cause a collision

Since we’re recompiling everything, could we have different EEPROM banks? At the start of each sketch, we could add a line of code in setup() that would dictate the EEPROM bank being used, then swap it in/out of memory as part of the load/boot process? I know there was some discussion, but it seemed like the discussion was about saving EEPROM to a different memory space every time. This way would be only once a game loads.

In the library, it could look something like this…

void load_bank(int new_bank_location) {
    int current_bank_location = get_current_bank_location_from_EEPROM();
    if(new_bank_location == current_bank_location) {
        return;
    }
    save_bank_contents(current_bank_location);
    load_bank_contents(new_bank_location);
    put_current_bank_location_to_EEPROM(new_bank_location);
}

In the sketch…

void setup() {
    load_bank(3);
    //...
}