Arduboy Semi-Official EEPROM Table

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);
    //...
}

@Mr.Blinky - I’ve just added in your latest ‘puzzle’ additions. Great progress! :slight_smile:
Our details disagree on 4 games by @obono, see:

  • Chie Magari Ita
  • Psi Colo
  • Reversi
  • Stairs Sweep

Here the author (Obono) created the entries… Perhaps it’s worth discussing the details in the specific game threads?

It’d be awesome if you wanted to directly add to the GoogleDoc- it’s open for the whole community.

2 Likes

@crait After seeing the large number of programs (and their sources) it would be very time consuming to add some kind of management system to games. besides that games that use a large portion of EEPROM would still have collision issues.

So I’ll be focusing on my backup/restore idea for the bootloader again.

Relocating games is still recommended though to reduce the wear on the same EEPROM locations and a backup / restore will also use the EEPROM location size info for a partial backup / restore to reduce wear

I guess @obono was misled by his own remarks in the source. Which do not match the actual record sizes used. He probaby forgot to update them.

I’m working with an offline excelsheet which works better for me and I’m not done with the list yet.

1 Like

I think this is where it would be helpful to have my sorting done, because in practice you could focus work on just the top few on that category with the understanding that carts below a certain point are “not optimized and may corrupt EEPROM (save games)”.

This kind of flag, or sorting would be helpful for certain games like microcity that take up most of it anyways.

I am not sure where this is going.

Are you trying to understand what each is using in order to alter games to avoid collisions? If so, you will obviously have to decide which games to focus on as you will not be able to cater for all the games in the limited EEPROM available - especially if some use a lot of EEPROM.

Are you looking to change some of the games to ‘even’ out EEPROM usage? Again, what games are you / we focusing on?

Are you / we looking to change the FX cart system to back up the EEPROM before switching games? In this case, you probably want to move all of the data to the same spots in the EEPROM so that the backup / restore routine can be simplified. (I assume backing up the entire EEPROM is inefficient but I know little of the FX mod to comment).

One great outcome of this exercise is to identify the games that overwrite the reserved EEPROM or sections of it.

Thats what I mentioned, creating a sort order for the categories so that the “favorites” are picked, and we try to make a best effort to prevent the EEPROM collisions from the “greatest hits”.

Developers will also be encouraged to make edits as well.

I mean, I’m pretty sure we can do this tens of thousands of times without issue, but in general I think if the top 50ish games don’t cause collisions I will say we have done a good job. Anything more than that I think will be really amazing. None of it is that “necessary” I don’t think, because I don’t get a lot of complaints of people going “oh my save game is corrupted”… however the likelihood of that goes up when people are encouraged to swap between games in rapid order.

I knew as I was writing this that someone would mention the read / write limits … these are really not an issue if we are talking about normal use.

Having only 50 really good is better than having 50 good games buried amongst 200 half finsihed finished games, IMHO. Of course, the 50 good games is subjective.

It’s not misled. :slightly_smiling_face:
RECORD_T remark in common.h is correct, at least under my environment.
It may be affected by the build condition.