ZigGBA
ZigGBA copied to clipboard
Expose save ram to the API
Memory map: 0E000000-0E00FFFF Game Pak SRAM (max 64 KBytes) - 8bit Bus width
- Maybe simple SaveRam.save(saveRamType: comptime type, saveRam: saveRamType)
It's worth noting that the specific behaviour of the SRAM memory block depends on the makeup of the game cartridge - you can pretend it's flat memory and emulators will (probably - autodetection is fickle) oblige you, since battery-backed or ferroelectric RAM were possible configurations, but a more complex API would let you handle cases where the cartridge contains flash memory (which is commanded via a JEDEC protocol written to magic addresses in the 0x0E00xxxx region) or an EEPROM.