-
-
Notifications
You must be signed in to change notification settings - Fork 81
Description
SRAM mapping in hirom is a bit more complicated in then in lowram LoROM (unless SRAM is < 8KiByte when SRAM is > 8KiB in size)
https://snes.nesdev.org/wiki/Memory_map#HiROM
SNESdev Wiki
Memory map
The SNES natively provides access to RAM and I/O at specific locations. The cartridge is free to provide whatever it wants in the remaining space, and there are specific address ranges that are conventionally used to add access to additional hardware such as extra RAM or a coprocessor. Different address ranges are accessed at different speeds, a...
For HIROM, you would want to change
BANK_SRAM to $30
The sta 0,y in line 190 to sta $6000,y
The lda 0,y in line 236 to lda $6000,y
And that would get consoleCopySram() and consoleLoadSram() temporarily working for HIROM if SRAM size <= 8KiByte
(I think)
A proper fix would use ifdefs and use defines for SRAM bank, starting address and bank size.