Fix a number of uninitialized variables

This commit is contained in:
Olivier Galibert 2022-07-18 18:47:38 -04:00
parent 78812be9d4
commit 4f5bb1e9f7
3 changed files with 8 additions and 0 deletions

View File

@ -72,6 +72,11 @@ void ncr5380_device::device_start()
m_irq_handler.resolve_safe();
m_drq_handler.resolve_safe();
// Need to be cleared here so that set_irq/drq called from reset
// does not compare with uninitialized
m_irq_state = false;
m_drq_state = false;
m_state_timer = timer_alloc(FUNC(ncr5380_device::state_timer), this);
save_item(NAME(m_state));

View File

@ -416,6 +416,7 @@ inline void z80scc_channel::out_dtr_cb(int state)
z80scc_device::z80scc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant)
: device_t(mconfig, type, tag, owner, clock),
device_z80daisy_interface(mconfig, *this),
m_wr9(0),
m_chanA(*this, CHANA_TAG),
m_chanB(*this, CHANB_TAG),
m_rxca(0),

View File

@ -166,6 +166,8 @@ void vasp_device::device_reset()
m_pseudovia_regs[1] = 0x06;
m_pseudovia_regs[2] = 0x7f;
m_pseudovia_regs[3] = 0;
m_pseudovia_ier = 0;
m_pseudovia_ifr = 0;
m_via_interrupt = m_via2_interrupt = m_scc_interrupt = 0;
m_last_taken_interrupt = -1;