How does the SNES handle SRAM? I've been looking for documents related to this, but the only two I've found have conflicting information, and neither seems to be correct.
On the NES, SRAM is mapped to 0x6000-0x7FFF. I'm not sure if this is an absolute, but it has been true for all the games I've seen.
Does the SNES do something similar? Are there any documents detailing the SRAM I should look at?
Thanks.
SNES SRAM memory map
Moderator: ZSNES Mods
-
- Regular
- Posts: 317
- Joined: Tue Sep 14, 2004 12:48 am
- Location: In a small padded white room
- Contact:
SNES SRAM memory map
http://jdrrant.blogspot.com/ - CODEpendent Blog
http://games.technoplaza.net/ - Emulation Goodies
http://games.technoplaza.net/ - Emulation Goodies
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
The mapper handles it, so each mapper is different.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
-
- Seen it all
- Posts: 2302
- Joined: Mon Jan 03, 2005 5:04 pm
- Location: Germany
- Contact:
No. SRAM is part of the cartridge, so it goes through that mapper.
jdratlif:
romhacking.net might have some docs about it.
jdratlif:
romhacking.net might have some docs about it.
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
bsnes launcher with recent files list
No, cartridge layout isn't fixed.Wait a moment - isnt SRAM fixed mapped in the SNES Address space?
HiROM usually maps SRAM to $[20-3f|a0-bf]:[6000-7fff], and LoROM usually maps SRAM to $[70-7f|f0-ff]:[0000-7fff], mirrored appropriately. Note that for LoROM, WRAM always overshadows SRAM in banks $7e and $7f, but you can access it at $fe and $ff where it is mirrored.
But really, it's up to the mapper. The SNES only puts the address on the bus, it's up to the cartridge memory mapper to respond. Same for writes. Luckily, most standardized on layouts that were compatible with HiROM and LoROM. But not all games did.
It's best to use $20:6000 for the start of HiROM SRAM, and $70:0000 for the start of LoROM SRAM. That's the most compatible.