diff options
author | AJR <ajrhacker@users.noreply.github.com> | 2018-01-28 13:20:27 -0500 |
---|---|---|
committer | AJR <ajrhacker@users.noreply.github.com> | 2018-01-28 13:20:27 -0500 |
commit | b2c69470cfd0a6e52ac93feecdc2a49904375dbb (patch) | |
tree | 670abb02fc7abcca2d9b3485c70d2572c479ea30 | |
parent | 515fc54f57d2b33da1929cb14b54fc89db41b7aa (diff) |
Revert "asteroid: Use LS153 device for DSW1"
This reverts commit 4be97024ea036d5f53b645edc3f819032748445c.
-rw-r--r-- | src/mame/drivers/asteroid.cpp | 2 | ||||
-rw-r--r-- | src/mame/includes/asteroid.h | 5 | ||||
-rw-r--r-- | src/mame/machine/asteroid.cpp | 21 |
3 files changed, 5 insertions, 23 deletions
diff --git a/src/mame/drivers/asteroid.cpp b/src/mame/drivers/asteroid.cpp index af1671e45a0..b456b64fb1e 100644 --- a/src/mame/drivers/asteroid.cpp +++ b/src/mame/drivers/asteroid.cpp @@ -658,8 +658,6 @@ MACHINE_CONFIG_START(asteroid_state::asteroid_base) MCFG_WATCHDOG_ADD("watchdog") - MCFG_TTL153_ADD("dsw_sel") - /* video hardware */ MCFG_VECTOR_ADD("vector") MCFG_SCREEN_ADD("screen", VECTOR) diff --git a/src/mame/includes/asteroid.h b/src/mame/includes/asteroid.h index a805fe794c8..302a2742677 100644 --- a/src/mame/includes/asteroid.h +++ b/src/mame/includes/asteroid.h @@ -8,7 +8,6 @@ #include "sound/discrete.h" #include "video/avgdvg.h" -#include "machine/74153.h" class asteroid_state : public driver_device { @@ -18,8 +17,6 @@ public: m_maincpu(*this, "maincpu"), m_dvg(*this, "dvg"), m_discrete(*this, "discrete"), - m_dsw1(*this, "DSW1"), - m_dsw_sel(*this, "dsw_sel"), m_ram1(*this, "ram1"), m_ram2(*this, "ram2") { } @@ -27,8 +24,6 @@ public: required_device<cpu_device> m_maincpu; required_device<dvg_device> m_dvg; required_device<discrete_device> m_discrete; - required_ioport m_dsw1; - required_device<ttl153_device> m_dsw_sel; /* memory banks */ optional_memory_bank m_ram1; diff --git a/src/mame/machine/asteroid.cpp b/src/mame/machine/asteroid.cpp index 80eebff4c2f..43154e8dc46 100644 --- a/src/mame/machine/asteroid.cpp +++ b/src/mame/machine/asteroid.cpp @@ -84,24 +84,13 @@ READ8_MEMBER(asteroid_state::asteroid_IN1_r) READ8_MEMBER(asteroid_state::asteroid_DSW1_r) { - // 765432-- not used - // ------1- ls253 dsw selector 2y - // -------0 ls253 dsw selector 1y + int res; + int res1; - uint8_t val = m_dsw1->read(); + res1 = ioport("DSW1")->read(); - m_dsw_sel->i3a_w(BIT(val, 0)); - m_dsw_sel->i3b_w(BIT(val, 1)); - m_dsw_sel->i2a_w(BIT(val, 2)); - m_dsw_sel->i2b_w(BIT(val, 3)); - m_dsw_sel->i1a_w(BIT(val, 4)); - m_dsw_sel->i1b_w(BIT(val, 5)); - m_dsw_sel->i0a_w(BIT(val, 6)); - m_dsw_sel->i0b_w(BIT(val, 7)); - - m_dsw_sel->s_w(space, 0, offset & 0x03); - - return 0xfc | (m_dsw_sel->zb_r() << 1) | m_dsw_sel->za_r(); + res = 0xfc | ((res1 >> (2 * (3 - (offset & 0x3)))) & 0x3); + return res; } |