dirkwhoffmann / vAmiga

vAmiga is a user-friendly Amiga 500, 1000, 2000 emulator for macOS
https://dirkwhoffmann.github.io/vAmiga
Other
293 stars 24 forks source link

Snapshots containing more than 512 KB Slow RAM are reported as corrupted #770

Closed dirkwhoffmann closed 1 year ago

dirkwhoffmann commented 1 year ago

The error is due to this piece code:

    isize Memory::didLoadFromBuffer(const u8 *buffer) {  

         ...

        // Check the integrity of the new values before we allocate memory
        if (romSize > KB(512)) throw VAError(ERROR_SNAP_CORRUPTED);
        if (womSize > KB(256)) throw VAError(ERROR_SNAP_CORRUPTED);
        if (extSize > KB(512)) throw VAError(ERROR_SNAP_CORRUPTED);
        if (chipSize > MB(2)) throw VAError(ERROR_SNAP_CORRUPTED);
        if (slowSize > KB(512)) throw VAError(ERROR_SNAP_CORRUPTED);
        if (fastSize > MB(8)) throw VAError(ERROR_SNAP_CORRUPTED);

        ...
    }

Update: Fixed on the v2.2 branch