diff options
| author | 2021-09-11 21:40:00 -0700 | |
|---|---|---|
| committer | 2021-09-11 21:40:00 -0700 | |
| commit | a1dde21708f6764211f7d6f0a41caef7682b2693 (patch) | |
| tree | 64b87b5c1bd5190728062e7f63521eaf2ad92da9 /src/devices/machine/ym3802.cpp | |
| parent | e94edaf482f4fb5644703599108ee7ce3b5ebbd1 (diff) | |
Add adjust_periodic() to persistent_timer. Update obvious situations where it can be used. Convert a few drivers from timer devices to plain timers to avoid adding adjust_persistent() to the timer device as well.
Diffstat (limited to 'src/devices/machine/ym3802.cpp')
| -rw-r--r-- | src/devices/machine/ym3802.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/devices/machine/ym3802.cpp b/src/devices/machine/ym3802.cpp index 73805331941..52770507ccd 100644 --- a/src/devices/machine/ym3802.cpp +++ b/src/devices/machine/ym3802.cpp @@ -162,7 +162,7 @@ void ym3802_device::reset_midi_timer() } if(rate != m_prev_rate) - m_midi_timer->adjust(attotime::from_hz(rate),0,attotime::from_hz(rate)); + m_midi_timer->adjust_periodic(attotime::from_hz(rate)); m_prev_rate = rate; logerror("MIDI Timer rate set to %iHz\n",rate); } @@ -263,12 +263,12 @@ void ym3802_device::write(offs_t offset, uint8_t data) const double rate = (m_reg[REG_CCR] & 0x02) ? m_clkm_rate / 4 : m_clkm_rate / 8; // start message to click counter - m_midi_counter_timer->adjust(attotime::from_hz(rate),0,attotime::from_hz(rate)); + m_midi_counter_timer->adjust_periodic(attotime::from_hz(rate)); } if((data & 0x07) == 3) { // stop message to click counter - m_midi_counter_timer->adjust(attotime::zero,0,attotime::never); + m_midi_counter_timer->adjust(attotime::zero); } } break; |
