mm58174: Small fixes

- Initialize interrupt control register (prevents fatal error in wicat on some builds)
- Set interrupt period to attotime::never instead of zero when lower 3 bits of control register are 0
- Eliminate device_reset method (IC does not have a reset input)
This commit is contained in:
AJR 2021-03-07 08:01:06 -05:00
parent 728fe8912e
commit 4ad0bbb965
2 changed files with 6 additions and 14 deletions

View File

@ -35,8 +35,11 @@ DEFINE_DEVICE_TYPE(MM58174, mm58174_device, "mm58174", "National Semiconductor M
mm58174_device::mm58174_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, MM58174, tag, owner, clock),
device_rtc_interface(mconfig, *this)
: device_t(mconfig, MM58174, tag, owner, clock)
, device_rtc_interface(mconfig, *this)
, m_control(0)
, m_int_ctl(0)
, m_tenths(0)
{
}
@ -68,16 +71,6 @@ void mm58174_device::device_start()
save_item(NAME(m_tenths));
}
//-------------------------------------------------
// device_reset - device-specific reset
//-------------------------------------------------
void mm58174_device::device_reset()
{
m_tenths = 0;
m_control = 0;
}
//-------------------------------------------------
// rtc_clock_updated -
//-------------------------------------------------
@ -103,7 +96,7 @@ attotime mm58174_device::interrupt_period_table(int val)
{
switch(val)
{
case 0: return attotime::from_msec(0);
case 0: return attotime::never;
case 1: return attotime::from_msec(500);
case 2: return attotime::from_seconds(5);
case 4: return attotime::from_seconds(60);

View File

@ -23,7 +23,6 @@ public:
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
// device_rtc_interface overrides