src/mame/machine/snes.c
| r7791 | r7792 | |
| 994 | 994 | } |
| 995 | 995 | else if ((snes_cart.mode == SNES_MODE_21) && (snes_cart.sram > 0)) |
| 996 | 996 | { |
| 997 | | int mask = (snes_cart.sram - 1); /* Limit SRAM size to what's actually present */ |
| 998 | | offset -= 0x6000; |
| 999 | | value = snes_ram[0x306000 + (offset & mask)]; |
| 997 | value = snes_ram[0x300000 + offset]; |
| 1000 | 998 | } |
| 1001 | 999 | else |
| 1002 | 1000 | { |
| r7791 | r7792 | |
| 1157 | 1155 | value = memory_read_byte(space, offset); |
| 1158 | 1156 | else if ((offset >= 0x300000) && (snes_cart.sram > 0)) |
| 1159 | 1157 | { |
| 1160 | | int mask = (snes_cart.sram - 1); /* Limit SRAM size to what's actually present */ |
| 1161 | | offset -= 0x6000; |
| 1162 | | value = snes_ram[0x806000 + (offset & mask)]; /* SRAM */ |
| 1158 | value = snes_ram[0x800000 + offset]; /* SRAM */ |
| 1163 | 1159 | } |
| 1164 | 1160 | else /* Area 0x6000-0x8000 with offset < 0x300000 is reserved */ |
| 1165 | 1161 | { |