video/mc6845.cpp: Don't enable line timer until valid parameters are set. (#11803)

Fixes hang in ma7551t.
This commit is contained in:
Mark Garlanger 2023-12-07 09:48:22 -06:00 committed by GitHub
parent f20914929e
commit 94a9338a95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,6 +82,7 @@ DEFINE_DEVICE_TYPE(AMS40489, ams40489_device, "ams40489", "AMS40489 ASIC (CRTC)"
mc6845_device::mc6845_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, type, tag, owner, clock)
, device_video_interface(mconfig, *this, false)
, m_line_timer(nullptr)
, m_show_border_area(true)
, m_noninterlace_adjust(0)
, m_interlace_adjust(0)
@ -531,6 +532,10 @@ void mc6845_device::recompute_parameters(bool postload)
m_hsync_off_pos = hsync_off_pos;
m_vsync_on_pos = vsync_on_pos;
m_vsync_off_pos = vsync_off_pos;
if (m_line_timer && !m_line_timer->enabled() && m_has_valid_parameters)
{
m_line_timer->adjust(cclks_to_attotime(m_horiz_char_total + 1));
}
if ( (!m_reconfigure_cb.isnull()) && (!postload) )
m_line_counter = 0;
}
@ -1301,8 +1306,10 @@ void mc6845_device::device_reset()
m_out_vsync_cb(false);
if (!m_line_timer->enabled())
if (!m_line_timer->enabled() && m_has_valid_parameters)
{
m_line_timer->adjust(cclks_to_attotime(m_horiz_char_total + 1));
}
m_light_pen_latched = false;