cxd1095: Implement reset behavior (nw)

This commit is contained in:
AJR 2017-04-11 00:39:35 -04:00
parent 644fa749c6
commit c9424f3f5b
2 changed files with 10 additions and 1 deletions

View File

@ -53,13 +53,21 @@ void cxd1095_device::device_start()
cb.resolve();
std::fill(std::begin(m_data_latch), std::end(m_data_latch), 0);
std::fill(std::begin(m_data_dir), std::end(m_data_dir), 0xff);
// save state
save_item(NAME(m_data_latch));
save_item(NAME(m_data_dir));
}
//-------------------------------------------------
// device_reset - device-specific reset
//-------------------------------------------------
void cxd1095_device::device_reset()
{
std::fill(std::begin(m_data_dir), std::end(m_data_dir), 0xff);
}
//-------------------------------------------------
// read - read from an input port
//-------------------------------------------------

View File

@ -103,6 +103,7 @@ public:
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
private:
// input/output callbacks