mirror of
https://github.com/holub/mame
synced 2025-04-23 17:00:53 +03:00
video/mc6845.cpp: Don't enable line timer until valid parameters are set. (#11803)
Fixes hang in ma7551t.
This commit is contained in:
parent
f20914929e
commit
94a9338a95
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user