diff options
author | AJR <ajrhacker@users.noreply.github.com> | 2017-06-29 08:53:09 -0400 |
---|---|---|
committer | AJR <ajrhacker@users.noreply.github.com> | 2017-06-29 08:53:09 -0400 |
commit | be0bdba54156373f3509aa0bea678b3067aa16cc (patch) | |
tree | 8b1c6d1a10447fad01edddb908b9e12e0d1ddc65 | |
parent | 150ffecbdbc3019d2b6b5c8ea78e5c537196a366 (diff) |
docastle.cpp: Clarify reset behavior (nw)
-rw-r--r-- | src/mame/drivers/docastle.cpp | 8 | ||||
-rw-r--r-- | src/mame/includes/docastle.h | 6 | ||||
-rw-r--r-- | src/mame/video/docastle.cpp | 6 |
3 files changed, 13 insertions, 7 deletions
diff --git a/src/mame/drivers/docastle.cpp b/src/mame/drivers/docastle.cpp index 0eb7d0e3d4e..b342ffa20c2 100644 --- a/src/mame/drivers/docastle.cpp +++ b/src/mame/drivers/docastle.cpp @@ -550,6 +550,14 @@ void docastle_state::machine_reset() m_adpcm_pos = m_adpcm_idle = 0; m_adpcm_data = -1; m_adpcm_status = 0; + + for (i = 0; i < 2; i++) + { + m_inp[i]->write_ms(0); // pin 5 tied low + //m_inp[i]->write_ce(1); // pin 4 tied high + m_inp[i]->write_s(machine().dummy_space(), 0, 0); // cleared with LS273 + } + flip_screen_set(0); // cleared with LS273 } void docastle_state::machine_start() diff --git a/src/mame/includes/docastle.h b/src/mame/includes/docastle.h index 8552ba318fa..eade0a610ec 100644 --- a/src/mame/includes/docastle.h +++ b/src/mame/includes/docastle.h @@ -20,8 +20,7 @@ public: m_cpu3(*this, "cpu3"), m_crtc(*this, "crtc"), m_msm(*this, "msm"), - m_inp1(*this, "inp1"), - m_inp2(*this, "inp2"), + m_inp(*this, "inp%u", 1), m_videoram(*this, "videoram"), m_colorram(*this, "colorram"), m_spriteram(*this, "spriteram"), @@ -35,8 +34,7 @@ public: required_device<cpu_device> m_cpu3; required_device<h46505_device> m_crtc; optional_device<msm5205_device> m_msm; - required_device<tms1025_device> m_inp1; - required_device<tms1025_device> m_inp2; + required_device_array<tms1025_device, 2> m_inp; /* memory pointers */ required_shared_ptr<uint8_t> m_videoram; diff --git a/src/mame/video/docastle.cpp b/src/mame/video/docastle.cpp index 43315f5565a..38ed7995853 100644 --- a/src/mame/video/docastle.cpp +++ b/src/mame/video/docastle.cpp @@ -79,12 +79,12 @@ WRITE8_MEMBER(docastle_state::docastle_colorram_w) READ8_MEMBER(docastle_state::inputs_flipscreen_r) { // inputs pass through LS244 non-inverting buffer - uint8_t buf = (m_inp2->read_h(space, 0) << 4) | m_inp1->read_h(space, 0); + uint8_t buf = (m_inp[1]->read_h(space, 0) << 4) | m_inp[0]->read_h(space, 0); // LS273 latches address bits on rising edge of address decode flip_screen_set(BIT(offset, 7)); - m_inp1->write_s(space, 0, offset & 7); - m_inp2->write_s(space, 0, offset & 7); + m_inp[0]->write_s(space, 0, offset & 7); + m_inp[1]->write_s(space, 0, offset & 7); return buf; } |