diff options
author | 2012-01-29 15:18:45 +0000 | |
---|---|---|
committer | 2012-01-29 15:18:45 +0000 | |
commit | 5d0cb30e84215504e368130db9e4573c37e458f2 (patch) | |
tree | 8c1a1de1bab0b27b2eadca0b077dd0b4722ac14e /src | |
parent | 2eb1ea08f8279e81a4226367a5fc079addb10897 (diff) |
Fixed VGA memory map writes [Grull Osgo]
Diffstat (limited to 'src')
-rw-r--r-- | src/emu/video/pc_vga.c | 24 | ||||
-rw-r--r-- | src/mame/drivers/multfish.c | 2 |
2 files changed, 22 insertions, 4 deletions
diff --git a/src/emu/video/pc_vga.c b/src/emu/video/pc_vga.c index cc0471143bf..281dfea3aba 100644 --- a/src/emu/video/pc_vga.c +++ b/src/emu/video/pc_vga.c @@ -1266,6 +1266,7 @@ void pc_vga_reset(running_machine &machine) READ8_HANDLER(vga_mem_r) { + #if 0 switch((vga.gc.data[6] >> 2) & 0x03) { case 0: break; @@ -1273,6 +1274,7 @@ READ8_HANDLER(vga_mem_r) case 2: offset -= 0x10000; offset &= 0x07fff; break; case 3: offset -= 0x18000; offset &= 0x07fff; break; } + #endif if(vga.sequencer.data[4] & 4) { @@ -1319,12 +1321,28 @@ READ8_HANDLER(vga_mem_r) WRITE8_HANDLER(vga_mem_w) { + //Inside each case must prevent writes to non-mapped VGA memory regions, not only mask the offset. switch((vga.gc.data[6] >> 2) & 0x03) { case 0: break; - case 1: offset &= 0x0ffff; break; - case 2: offset -= 0x10000; offset &= 0x07fff; break; - case 3: offset -= 0x18000; offset &= 0x07fff; break; + case 1: + if(offset & 0x10000) + return; + + offset &= 0x0ffff; + break; + case 2: + if((offset & 0x18000) != 0x10000) + return; + + offset &= 0x07fff; + break; + case 3: + if((offset & 0x18000) != 0x18000) + return; + + offset &= 0x07fff; + break; } { diff --git a/src/mame/drivers/multfish.c b/src/mame/drivers/multfish.c index 1866751fb37..7d47d83b13e 100644 --- a/src/mame/drivers/multfish.c +++ b/src/mame/drivers/multfish.c @@ -4404,7 +4404,7 @@ ROM_END ROM_START( fcockt2_4c ) // 081105 custom alteras, modified graphics, bank F9, many texts changed, changed version text to "VIDEO GAME-1 FR02" ROM_REGION( 0x40000, "maincpu", 0 ) // z80 code, banked ROM_LOAD( "bootleg_fc2_m_081105b.rom", 0x00000, 0x40000, CRC(b627f7d6) SHA1(0bcdb1cd808055d0a9e965f2c6ff522ac3fe6949) ) /* Not officially listed on Igrosoft's web site hash page */ - + ROM_REGION( 0x400000, "gfx", 0 ) ROM_LOAD( "bootleg_1b", 0x000000, 0x80000, CRC(68b62355) SHA1(387da330fddaa685cb7aca32bf861e44d5cdbe58) ) ROM_LOAD( "bootleg_2b", 0x100000, 0x80000, CRC(d36e8704) SHA1(80a84a24b3a43a0110a00ed3b01c7156218ccbf3) ) |