-
Notifications
You must be signed in to change notification settings - Fork 852
Open
Labels
bugcomponent: mapperMemory mappers (mappers/)Memory mappers (mappers/)difficulty: mediumModerate change requiring understanding of one subsystemModerate change requiring understanding of one subsystempriority: mediumIncorrect behavior for specific games or edge casesIncorrect behavior for specific games or edge cases
Description
Summary
Only 6 of 21 mapper implementations have custom toJSON()/fromJSON() methods. The rest inherit from Mapper0, which only serializes base class state. Mapper-specific bank registers, IRQ state, and other fields are lost on save/restore.
Affected mappers
Missing serialization: Mapper 2 (UxROM), 3 (CNROM), 5 (MMC5), 7 (AxROM), 11 (Color Dreams), 34 (BNROM), 66 (GxROM), 71 (Camerica), 79 (NINA), 94 (UN1ROM), 180 (UNROM variant), 240, 241
Impact
Save states with these mappers will restore to the wrong bank configuration, causing games to crash or show garbled graphics after loading a save state.
Fix
Each mapper needs to serialize its bank registers and any other mutable state. For simple mappers like UxROM (just a bank number), this is a one-line addition.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugcomponent: mapperMemory mappers (mappers/)Memory mappers (mappers/)difficulty: mediumModerate change requiring understanding of one subsystemModerate change requiring understanding of one subsystempriority: mediumIncorrect behavior for specific games or edge casesIncorrect behavior for specific games or edge cases