diff options
author | Aaron Giles <aaron@aarongiles.com> | 2010-06-30 23:35:26 +0000 |
---|---|---|
committer | Aaron Giles <aaron@aarongiles.com> | 2010-06-30 23:35:26 +0000 |
commit | dfc04871c447c7fe041d15023b472a641454ffc7 (patch) | |
tree | fbbcb84862556a6df35269839a6f35c78bad9d9c /src/mame/drivers/tp84.c | |
parent | daccd1f46c08857fec1f5e9bcebc2c700244b780 (diff) |
Remove most other instances of cpu_get_total_cycles.
Diffstat (limited to 'src/mame/drivers/tp84.c')
-rw-r--r-- | src/mame/drivers/tp84.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mame/drivers/tp84.c b/src/mame/drivers/tp84.c index 83437dd761a..766e566a7c7 100644 --- a/src/mame/drivers/tp84.c +++ b/src/mame/drivers/tp84.c @@ -89,6 +89,13 @@ PALETTE_INIT( tp84 ); VIDEO_START( tp84 ); VIDEO_UPDATE( tp84 ); +static cpu_device *audiocpu; + + +static MACHINE_START( tp84 ) +{ + audiocpu = machine->device<cpu_device>("audiocpu"); +} static READ8_HANDLER( tp84_sh_timer_r ) @@ -97,7 +104,7 @@ static READ8_HANDLER( tp84_sh_timer_r ) /* divided by 2048 to get this timer */ /* (divide by (2048/2), and not 1024, because the CPU cycle counter is */ /* incremented every other state change of the clock) */ - return (cpu_get_total_cycles(space->cpu) / (2048/2)) & 0x0f; + return (audiocpu->total_cycles() / (2048/2)) & 0x0f; } @@ -300,6 +307,9 @@ static MACHINE_DRIVER_START( tp84 ) MDRV_QUANTUM_TIME(HZ(6000)) /* 100 CPU slices per frame - an high value to ensure proper */ /* synchronization of the CPUs */ + + MDRV_MACHINE_START(tp84) + /* video hardware */ MDRV_SCREEN_ADD("screen", RASTER) MDRV_SCREEN_REFRESH_RATE(60) |