diff options
author | 2019-12-06 23:56:12 +1100 | |
---|---|---|
committer | 2019-12-06 23:56:12 +1100 | |
commit | a36dd336b898007c821ebaf8f0bd5109571bf75c (patch) | |
tree | 34bf7f0b2887af2d4a48d3d25214862deaec86cd | |
parent | be7476e81bafad3ec7b5c4f501fbd131bfdf1911 (diff) |
osborne1.cpp: don't need the timer to run every scanline if it's only for the beep (doesn't really improve performance)
-rw-r--r-- | src/mame/machine/osborne1.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mame/machine/osborne1.cpp b/src/mame/machine/osborne1.cpp index f76215ddbed..9bbe9f153d5 100644 --- a/src/mame/machine/osborne1.cpp +++ b/src/mame/machine/osborne1.cpp @@ -464,15 +464,15 @@ uint32_t osborne1sp_state::screen_update(screen_device &screen, bitmap_ind16 &bi TIMER_CALLBACK_MEMBER(osborne1_state::video_callback) { - int const y = m_screen->vpos(); - uint8_t const ra = y % 10; - uint8_t const port_b = m_pia1->b_output(); + int const y(m_screen->vpos()); + uint8_t const ra(y % 10); // The beeper is gated so it's active four out of every ten scanlines m_beep_state = (ra & 0x04) ? 1 : 0; - m_speaker->level_w((BIT(port_b, 5) && m_beep_state) ? 1 : 0); + m_speaker->level_w((m_beep_state && BIT(m_pia1->b_output(), 5)) ? 1 : 0); - m_video_timer->adjust(m_screen->time_until_pos(y + 1, 0)); + int const next((10 * (y / 10)) + ((ra < 4) ? 4 : (ra < 8) ? 8 : 14)); + m_video_timer->adjust(m_screen->time_until_pos((m_screen->height() > next) ? next : 0, 0)); } TIMER_CALLBACK_MEMBER(osborne1_state::acia_rxc_txc_callback) |