ZigGBA icon indicating copy to clipboard operation
ZigGBA copied to clipboard

Expose save ram to the API

Open wendigojaeger opened this issue 6 years ago • 1 comments

Memory map: 0E000000-0E00FFFF Game Pak SRAM (max 64 KBytes) - 8bit Bus width

  • Maybe simple SaveRam.save(saveRamType: comptime type, saveRam: saveRamType)

wendigojaeger avatar Jan 03 '20 22:01 wendigojaeger

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.

ketsuban avatar Aug 30 '20 19:08 ketsuban