diff options
author | 2017-03-02 16:42:45 -0500 | |
---|---|---|
committer | 2017-03-02 16:42:45 -0500 | |
commit | 4e59ab6ffe18b23ef4da44707ddf8728c01d5c5b (patch) | |
tree | 2ecab322c18f928df67b9cf75b226aec725a6c91 /src/devices/bus/ieee488 | |
parent | 71656df5c3a0751113f0cbb90da1ad284219a098 (diff) |
Device fixups (nw)
- c2040fdc, c64h156: Calculate clock period in device_clock_changed rather than in constructor
- isa8, isa16: Eliminate device_config_complete (probably unnecessary, since m_maincpu is already set in device_start)
These changes prevent assert failures with the new ad-hoc device construction in -listxml, though they are otherwise independent.
Diffstat (limited to 'src/devices/bus/ieee488')
-rw-r--r-- | src/devices/bus/ieee488/c2040fdc.cpp | 13 | ||||
-rw-r--r-- | src/devices/bus/ieee488/c2040fdc.h | 1 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/devices/bus/ieee488/c2040fdc.cpp b/src/devices/bus/ieee488/c2040fdc.cpp index 493cdb8ee69..7256457371f 100644 --- a/src/devices/bus/ieee488/c2040fdc.cpp +++ b/src/devices/bus/ieee488/c2040fdc.cpp @@ -88,7 +88,7 @@ c2040_fdc_t::c2040_fdc_t(const machine_config &mconfig, const char *tag, device_ m_drv_sel(0), m_mode_sel(0), m_rw_sel(0), m_odd_hd(0), m_pi(0), - m_period(attotime::from_hz(clock)), t_gen(nullptr) + t_gen(nullptr) { cur_live.tm = attotime::never; cur_live.state = IDLE; @@ -128,6 +128,17 @@ void c2040_fdc_t::device_start() //------------------------------------------------- +// device_clock_changed - called when the +// device clock is altered in any way +//------------------------------------------------- + +void c2040_fdc_t::device_clock_changed() +{ + m_period = attotime::from_hz(clock()); +} + + +//------------------------------------------------- // device_reset - device-specific reset //------------------------------------------------- diff --git a/src/devices/bus/ieee488/c2040fdc.h b/src/devices/bus/ieee488/c2040fdc.h index 74dcb750544..45690295b9a 100644 --- a/src/devices/bus/ieee488/c2040fdc.h +++ b/src/devices/bus/ieee488/c2040fdc.h @@ -73,6 +73,7 @@ public: protected: // device-level overrides virtual void device_start() override; + virtual void device_clock_changed() override; virtual void device_reset() override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; |