Work-around for too small timers, not worth mentioning

This commit is contained in:
Angelo Salese 2010-08-20 15:02:39 +00:00
parent eed6b16b3f
commit 4512bc3122

View File

@ -710,10 +710,9 @@ WRITE16_HANDLER( jaguar_tom_regs_w )
break; break;
case PIT0: case PIT0:
case PIT1: case PIT1:
if (gpu_regs[PIT0]) if (gpu_regs[PIT0] && gpu_regs[PIT0] != 0xffff) //FIXME: avoid too much small timers for now
{ {
sample_period = ATTOTIME_IN_NSEC(((space->machine->device("gpu")->unscaled_clock()*PIT_MULT_DBG_HACK) / (1+gpu_regs[PIT0])) / (1+gpu_regs[PIT1])); sample_period = ATTOTIME_IN_NSEC(((space->machine->device("gpu")->unscaled_clock()*PIT_MULT_DBG_HACK) / (1+gpu_regs[PIT0])) / (1+gpu_regs[PIT1]));
//printf("%08x %08x",gpu_regs[PIT0]+1,gpu_regs[PIT1]+1);
timer_set(space->machine, sample_period, NULL, 0, jaguar_pit); timer_set(space->machine, sample_period, NULL, 0, jaguar_pit);
} }
break; break;