diff options
author | AJR <ajrhacker@users.noreply.github.com> | 2021-03-07 08:01:06 -0500 |
---|---|---|
committer | AJR <ajrhacker@users.noreply.github.com> | 2021-03-07 08:02:07 -0500 |
commit | 4ad0bbb9657486031d414298641ead7ae27d8953 (patch) | |
tree | d40b69e193d046dfa4ace4d6d27ba82253a75870 /src/devices | |
parent | 728fe8912e075d7b19494db0856b960d99848e3d (diff) |
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)
Diffstat (limited to 'src/devices')
-rw-r--r-- | src/devices/machine/mm58174.cpp | 19 | ||||
-rw-r--r-- | src/devices/machine/mm58174.h | 1 |
2 files changed, 6 insertions, 14 deletions
diff --git a/src/devices/machine/mm58174.cpp b/src/devices/machine/mm58174.cpp index fe24c8091b5..53d23bdc4e3 100644 --- a/src/devices/machine/mm58174.cpp +++ b/src/devices/machine/mm58174.cpp @@ -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) { } @@ -69,16 +72,6 @@ void mm58174_device::device_start() } //------------------------------------------------- -// 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); diff --git a/src/devices/machine/mm58174.h b/src/devices/machine/mm58174.h index 5d755627084..7d592e258b8 100644 --- a/src/devices/machine/mm58174.h +++ b/src/devices/machine/mm58174.h @@ -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 |