trunk/src/mame/video/jaguar.c
| r20970 | r20971 | |
| 617 | 617 | case PIT1: |
| 618 | 618 | if (m_gpu_regs[PIT0] && m_gpu_regs[PIT0] != 0xffff) //FIXME: avoid too much small timers for now |
| 619 | 619 | { |
| 620 | | sample_period = attotime::from_nsec(((m_gpu->unscaled_clock()*PIT_MULT_DBG_HACK) / (1+m_gpu_regs[PIT0])) / (1+m_gpu_regs[PIT1])); |
| 620 | sample_period = attotime::from_ticks((1+m_gpu_regs[PIT0]) * (1+m_gpu_regs[PIT1]), JAGUAR_CLOCK); |
| 621 | 621 | timer_set(sample_period, TID_PIT); |
| 622 | 622 | } |
| 623 | 623 | break; |
| r20970 | r20971 | |
| 723 | 723 | break; |
| 724 | 724 | |
| 725 | 725 | case TID_PIT: |
| 726 | | m_cpu_irq_state |= 4; |
| 727 | | update_cpu_irq(); |
| 726 | if (m_gpu_regs[INT1] & 0x8) |
| 727 | { |
| 728 | m_cpu_irq_state |= 8; |
| 729 | update_cpu_irq(); |
| 730 | } |
| 728 | 731 | if (m_gpu_regs[PIT0] != 0) |
| 729 | 732 | { |
| 730 | | attotime sample_period = attotime::from_nsec(((m_gpu->unscaled_clock()*PIT_MULT_DBG_HACK) / (1+m_gpu_regs[PIT0])) / (1+m_gpu_regs[PIT1])); |
| 733 | attotime sample_period = attotime::from_ticks((1+m_gpu_regs[PIT0]) * (1+m_gpu_regs[PIT1]), JAGUAR_CLOCK); |
| 731 | 734 | timer_set(sample_period, TID_PIT); |
| 732 | 735 | } |
| 733 | 736 | break; |