wendigojaeger / ZigGBA

Work in progress SDK for creating Game Boy Advance games using Zig programming language.
MIT License
353 stars 16 forks source link

Expose save ram to the API #9

Open wendigojaeger opened 4 years ago

wendigojaeger commented 4 years ago

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

ketsuban commented 4 years ago

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.