summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2019-06-03 14:43:54 +0200
committer hap <happppp@users.noreply.github.com>2019-06-03 14:43:54 +0200
commit3609f8d9ad55719136086468dc1618c2020aeb96 (patch)
tree0066f2532b4908792d5c081fdd50b56da88b2601
parenta80aa6735b37858e797f89320c495549ee9a77bb (diff)
shisen: fix coinage dipswitch (nw)
-rw-r--r--src/mame/drivers/shisen.cpp39
-rw-r--r--src/mame/includes/shisen.h1
2 files changed, 10 insertions, 30 deletions
diff --git a/src/mame/drivers/shisen.cpp b/src/mame/drivers/shisen.cpp
index d6a1592d95a..e678f7283c6 100644
--- a/src/mame/drivers/shisen.cpp
+++ b/src/mame/drivers/shisen.cpp
@@ -2,7 +2,7 @@
// copyright-holders:Nicola Salmoria
/***************************************************************************
-Shisen
+Tamtex Shisensho / Match It
driver by Nicola Salmoria
@@ -20,25 +20,16 @@ driver by Nicola Salmoria
#include "speaker.h"
-READ8_MEMBER(shisen_state::dsw1_r)
+void shisen_state::shisen_map(address_map &map)
{
- int ret = ioport("DSW1")->read();
-
- /* Based on the coin mode fill in the upper bits */
- if (ioport("DSW2")->read() & 0x04)
- {
- /* Mode 1 */
- ret |= (ioport("DSW1")->read() << 4);
- }
- else
- {
- /* Mode 2 */
- ret |= (ioport("DSW1")->read() & 0xf0);
- }
-
- return ret;
+ map(0x0000, 0x7fff).rom();
+ map(0x8000, 0xbfff).bankr("bank1");
+ map(0xc800, 0xcaff).ram().w(FUNC(shisen_state::paletteram_w)).share("paletteram");
+ map(0xd000, 0xdfff).ram().w(FUNC(shisen_state::videoram_w)).share("videoram");
+ map(0xe000, 0xffff).ram();
}
+
WRITE8_MEMBER(shisen_state::coin_w)
{
if ((data & 0xf9) != 0x01) logerror("coin ctrl = %02x\n",data);
@@ -47,27 +38,17 @@ WRITE8_MEMBER(shisen_state::coin_w)
machine().bookkeeping().coin_counter_w(1, data & 0x04);
}
-
-
-void shisen_state::shisen_map(address_map &map)
-{
- map(0x0000, 0x7fff).rom();
- map(0x8000, 0xbfff).bankr("bank1");
- map(0xc800, 0xcaff).ram().w(FUNC(shisen_state::paletteram_w)).share("paletteram");
- map(0xd000, 0xdfff).ram().w(FUNC(shisen_state::videoram_w)).share("videoram");
- map(0xe000, 0xffff).ram();
-}
-
void shisen_state::shisen_io_map(address_map &map)
{
map.global_mask(0xff);
- map(0x00, 0x00).rw(FUNC(shisen_state::dsw1_r), FUNC(shisen_state::coin_w));
+ map(0x00, 0x00).portr("DSW1").w(FUNC(shisen_state::coin_w));
map(0x01, 0x01).portr("DSW2").w("soundlatch", FUNC(generic_latch_8_device::write));
map(0x02, 0x02).portr("P1").w(FUNC(shisen_state::bankswitch_w));
map(0x03, 0x03).portr("P2");
map(0x04, 0x04).portr("COIN");
}
+
void shisen_state::shisen_sound_map(address_map &map)
{
map(0x0000, 0x3fff).rom();
diff --git a/src/mame/includes/shisen.h b/src/mame/includes/shisen.h
index e17227d2537..8c5234ab35d 100644
--- a/src/mame/includes/shisen.h
+++ b/src/mame/includes/shisen.h
@@ -35,7 +35,6 @@ private:
int m_gfxbank;
tilemap_t *m_bg_tilemap;
- DECLARE_READ8_MEMBER(dsw1_r);
DECLARE_WRITE8_MEMBER(coin_w);
DECLARE_WRITE8_MEMBER(videoram_w);
DECLARE_WRITE8_MEMBER(bankswitch_w);