summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Angelo Salese <angelosa@users.noreply.github.com>2009-09-22 13:23:06 +0000
committer Angelo Salese <angelosa@users.noreply.github.com>2009-09-22 13:23:06 +0000
commit3197009b1fcddb40d3160e14192c92629e308088 (patch)
tree660240f2d32fecfbc76b6a326c9636c80066461c
parentecffbf4c3b59ccc50edb735e9ab78b3c7351ab7a (diff)
SNES: Fixed CG ram reading address
-rw-r--r--src/mame/machine/snes.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mame/machine/snes.c b/src/mame/machine/snes.c
index 759fda12a30..eb9e59ac545 100644
--- a/src/mame/machine/snes.c
+++ b/src/mame/machine/snes.c
@@ -526,12 +526,12 @@ READ8_HANDLER( snes_r_io )
case RCGDATA: /* Read data from CGRAM */
if (cgram_address & 0x01)
{
- snes_ppu.ppu2_open_bus = ((UINT8 *)snes_cgram)[cgram_address] & 0xff;
+ snes_ppu.ppu2_open_bus = ((UINT8 *)snes_cgram)[cgram_address & 0xff];
}
else
{
snes_ppu.ppu2_open_bus &= 0x80;
- snes_ppu.ppu2_open_bus |= ((UINT8 *)snes_cgram)[cgram_address] & 0x7f;
+ snes_ppu.ppu2_open_bus |= ((UINT8 *)snes_cgram)[cgram_address & 0x7f];
}
cgram_address = (cgram_address + 1) % (SNES_CGRAM_SIZE - 2);