diff options
author | Angelo Salese <angelosa@users.noreply.github.com> | 2010-12-22 21:12:20 +0000 |
---|---|---|
committer | Angelo Salese <angelosa@users.noreply.github.com> | 2010-12-22 21:12:20 +0000 |
commit | 8ac798287baa3b04df2de1063f07bcdc0e835d14 (patch) | |
tree | 2785cd908caf728e8385dae8022e93fcb9203502 /src/mame/drivers/ghosteo.c | |
parent | 5bb3980fb54ba0048503a1a8859216d67c6b1850 (diff) |
Added idle skip for Ghost Eolith driver [David Haywood]
Diffstat (limited to 'src/mame/drivers/ghosteo.c')
-rw-r--r-- | src/mame/drivers/ghosteo.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/mame/drivers/ghosteo.c b/src/mame/drivers/ghosteo.c index 2e85ecf5d72..cb711916b3d 100644 --- a/src/mame/drivers/ghosteo.c +++ b/src/mame/drivers/ghosteo.c @@ -390,6 +390,39 @@ static const i2cmem_interface i2cmem_interface = I2CMEM_SLAVE_ADDRESS, 0, 256 }; + +running_device* s3c2410; + +static READ32_HANDLER( bballoon_speedup_r ) +{ + UINT32 ret = s3c24xx_lcd_r(s3c2410, offset+0x10/4, mem_mask); + + + int pc = cpu_get_pc(space->cpu); + + // these are vblank waits + if (pc == 0x3001c0e4 || pc == 0x3001c0d8) + { + // BnB Arcade + cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(20)); + } + else if (pc == 0x3002b580 || pc == 0x3002b550) + { + // Happy Tour + cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(20)); + } + //else + // printf("speedup %08x %08x\n", pc, ret); + + return ret; +} + +static MACHINE_RESET( bballoon ) +{ + memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x4d000010, 0x4d000013, 0, 0, bballoon_speedup_r); + s3c2410 = machine->device("s3c2410"); +} + static MACHINE_CONFIG_START( bballoon, driver_device ) /* basic machine hardware */ @@ -405,6 +438,8 @@ static MACHINE_CONFIG_START( bballoon, driver_device ) MDRV_PALETTE_LENGTH(256) + MDRV_MACHINE_RESET( bballoon ) + MDRV_VIDEO_START(s3c2410) MDRV_VIDEO_UPDATE(s3c2410) |