src/mame/machine/snes.c
| r7793 | r7794 | |
| 1304 | 1304 | } |
| 1305 | 1305 | else if ((snes_cart.mode == SNES_MODE_21) && (snes_cart.sram > 0)) |
| 1306 | 1306 | { |
| 1307 | | int mask = (snes_cart.sram - 1); /* Limit SRAM size to what's actually present */ |
| 1308 | | offset -= 0x6000; |
| 1309 | | snes_ram[0x306000 + (offset & mask)] = data; |
| 1307 | snes_ram[0x300000 + offset] = data; |
| 1310 | 1308 | } |
| 1311 | 1309 | else |
| 1312 | 1310 | logerror("snes_w_bank2: Attempt to write to reserved address: %X = %02x\n", offset + 0x300000, data); |
| r7793 | r7794 | |
| 1401 | 1399 | memory_write_byte(space, offset, data); |
| 1402 | 1400 | else if ((offset >= 0x300000) && (snes_cart.sram > 0)) |
| 1403 | 1401 | { |
| 1404 | | int mask = (snes_cart.sram - 1); /* Limit SRAM size to what's actually present */ |
| 1405 | | offset -= 0x6000; |
| 1406 | | snes_ram[0xb06000 + (offset & mask)] = data; |
| 1402 | snes_ram[0xb00000 + offset] = data; |
| 1407 | 1403 | } |
| 1408 | 1404 | else /* Area in 0x6000-0x8000 && offset < 0x300000 is Reserved! */ |
| 1409 | 1405 | logerror("snes_w_bank6: Attempt to write to reserved address: %X = %02x\n", offset + 0x800000, data); |