diff options
author | Aaron Giles <aaron@aarongiles.com> | 2008-01-14 17:38:37 +0000 |
---|---|---|
committer | Aaron Giles <aaron@aarongiles.com> | 2008-01-14 17:38:37 +0000 |
commit | 81feac74f6906620c6be408e9f89d1835daedc1c (patch) | |
tree | f19f0db4b0cb78a2351f2576a7897c5029831b4f | |
parent | 375c3df7d8080c6ec3c0f35a92bea9a01ea57ab1 (diff) |
(From AtariAce)
Subject: [patch] Fix megaplay.c0122u4red
This fixes the crash reported as megaplay.c0122u4red. The driver
doesn't map the offset into the correct range for the handler. -bios 1
still shows corrupt graphics, but at least it doesn't crash anymore.
-rw-r--r-- | src/mame/drivers/megaplay.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mame/drivers/megaplay.c b/src/mame/drivers/megaplay.c index d0e2db94ecf..b8570f1a9ea 100644 --- a/src/mame/drivers/megaplay.c +++ b/src/mame/drivers/megaplay.c @@ -464,7 +464,7 @@ static READ8_HANDLER( bank_r ) UINT8* game = memory_region(REGION_CPU1); if(game_banksel == 0x142) // Genesis I/O - return megaplay_genesis_io_r((offset/2) & 0x1f, 0xffff); + return megaplay_genesis_io_r((offset & 0x1f) / 2, 0xffff); if(bios_mode & MP_ROM) { @@ -497,7 +497,7 @@ static READ8_HANDLER( bank_r ) static WRITE8_HANDLER ( bank_w ) { if(game_banksel == 0x142) // Genesis I/O - genesis_io_w((offset/2) & 0x1f, data, 0xffff); + genesis_io_w((offset & 0x1f) / 2, data, 0xffff); if(offset <= 0x1fff && (bios_width & 0x08)) ic37_ram[(0x2000 * (bios_bank & 0x03)) + offset] = data; |