diff options
Diffstat (limited to 'src/mame/audio/taito_en.c')
-rw-r--r-- | src/mame/audio/taito_en.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mame/audio/taito_en.c b/src/mame/audio/taito_en.c index a88824958d0..15401e5e52e 100644 --- a/src/mame/audio/taito_en.c +++ b/src/mame/audio/taito_en.c @@ -74,8 +74,8 @@ static TIMER_DEVICE_CALLBACK( taito_en_timer_callback ) /* Only cause IRQ if the mask is set to allow it */ if (m68681_imr & 0x08) { - cpu_set_input_line_vector(devtag_get_device(timer->machine, "audiocpu"), 6, vector_reg); - cputag_set_input_line(timer->machine, "audiocpu", 6, ASSERT_LINE); + cpu_set_input_line_vector(devtag_get_device(timer.machine, "audiocpu"), 6, vector_reg); + cputag_set_input_line(timer.machine, "audiocpu", 6, ASSERT_LINE); imr_status |= 0x08; } } @@ -104,6 +104,7 @@ static READ16_HANDLER(f3_68681_r) static WRITE16_HANDLER(f3_68681_w) { + timer_device *timer; switch (offset) { case 0x04: /* ACR */ switch ((data>>4)&7) { @@ -119,7 +120,8 @@ static WRITE16_HANDLER(f3_68681_w) case 3: logerror("Counter: X1/Clk - divided by 16, counter is %04x, so interrupt every %d cycles\n",counter,(M68000_CLOCK/M68681_CLOCK)*counter*16); timer_mode=TIMER_SINGLESHOT; - timer_device_adjust_oneshot(devtag_get_device(space->machine, "timer_68681"), cpu_clocks_to_attotime(space->cpu, (M68000_CLOCK/M68681_CLOCK)*counter*16), 0); + timer = space->machine->device<timer_device>("timer_68681"); + timer->adjust(cpu_clocks_to_attotime(space->cpu, (M68000_CLOCK/M68681_CLOCK)*counter*16)); break; case 4: logerror("Timer: Unimplemented external IP2\n"); @@ -130,7 +132,8 @@ static WRITE16_HANDLER(f3_68681_w) case 6: logerror("Timer: X1/Clk, counter is %04x, so interrupt every %d cycles\n",counter,(M68000_CLOCK/M68681_CLOCK)*counter); timer_mode=TIMER_PULSE; - timer_device_adjust_periodic(devtag_get_device(space->machine, "timer_68681"), cpu_clocks_to_attotime(space->cpu, (M68000_CLOCK/M68681_CLOCK)*counter), 0, cpu_clocks_to_attotime(space->cpu, (M68000_CLOCK/M68681_CLOCK)*counter)); + timer = space->machine->device<timer_device>("timer_68681"); + timer->adjust(cpu_clocks_to_attotime(space->cpu, (M68000_CLOCK/M68681_CLOCK)*counter), 0, cpu_clocks_to_attotime(space->cpu, (M68000_CLOCK/M68681_CLOCK)*counter)); break; case 7: logerror("Timer: Unimplemented X1/Clk - divided by 16\n"); |