summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2017-09-05 10:31:37 -0400
committer AJR <ajrhacker@users.noreply.github.com>2017-09-05 10:32:50 -0400
commita0ffbe0762d84d60f318a28d5e2dc9250803da78 (patch)
treebee2e9d19f4ed91878ad5ff06b97bf15b4b2ab31
parent371e87b6e21e6a8202487561c1f7c5af2b38a69b (diff)
kiwame: Replace bogus "kiwame_nvram" with TMP68301 parallel interface (nw)
-rw-r--r--src/mame/drivers/seta.cpp20
-rw-r--r--src/mame/includes/seta.h7
2 files changed, 10 insertions, 17 deletions
diff --git a/src/mame/drivers/seta.cpp b/src/mame/drivers/seta.cpp
index b29c391c47a..53d7c4263f7 100644
--- a/src/mame/drivers/seta.cpp
+++ b/src/mame/drivers/seta.cpp
@@ -1378,6 +1378,7 @@ Note: on screen copyright is (c)1998 Coinmaster.
#include "machine/msm6242.h"
#include "machine/nvram.h"
#include "machine/pit8253.h"
+#include "machine/tmp68301.h"
#include "machine/upd4701.h"
#include "machine/watchdog.h"
#include "sound/2203intf.h"
@@ -2806,23 +2807,14 @@ ADDRESS_MAP_END
Pro Mahjong Kiwame
***************************************************************************/
-// TODO: not NVRAM!!!
-READ16_MEMBER(seta_state::kiwame_nvram_r)
+WRITE16_MEMBER(seta_state::kiwame_row_select_w)
{
- return m_kiwame_nvram[offset] & 0xff;
-}
-
-WRITE16_MEMBER(seta_state::kiwame_nvram_w)
-{
- if (ACCESSING_BITS_0_7)
- {
- COMBINE_DATA( &m_kiwame_nvram[offset] );
- }
+ m_kiwame_row_select = data & 0x001f;
}
READ16_MEMBER(seta_state::kiwame_input_r)
{
- int row_select = kiwame_nvram_r( space, 0x10a/2,0x00ff ) & 0x1f;
+ int row_select = m_kiwame_row_select;
int i;
static const char *const keynames[] = { "KEY0", "KEY1", "KEY2", "KEY3", "KEY4" };
@@ -2854,7 +2846,7 @@ static ADDRESS_MAP_START( kiwame_map, AS_PROGRAM, 16, seta_state )
AM_RANGE(0xc00000, 0xc03fff) AM_DEVREADWRITE("x1snd", x1_010_device, word_r, word_w) // Sound
AM_RANGE(0xd00000, 0xd00009) AM_READ(kiwame_input_r) // mahjong panel
AM_RANGE(0xe00000, 0xe00003) AM_READ(seta_dsw_r) // DSW
- AM_RANGE(0xfffc00, 0xffffff) AM_READWRITE(kiwame_nvram_r, kiwame_nvram_w) AM_SHARE("kiwame_nvram") // TODO: actual unknown device
+ AM_RANGE(0xfffc00, 0xffffff) AM_DEVREADWRITE("tmp68301", tmp68301_device, regs_r, regs_w)
ADDRESS_MAP_END
@@ -9178,6 +9170,8 @@ static MACHINE_CONFIG_START( kiwame )
MCFG_CPU_PROGRAM_MAP(kiwame_map)
/* lev 1-7 are the same. WARNING: the interrupt table is written to. */
MCFG_CPU_VBLANK_INT_DRIVER("screen", seta_state, irq1_line_hold)
+ MCFG_DEVICE_ADD("tmp68301", TMP68301, 0)
+ MCFG_TMP68301_OUT_PARALLEL_CB(WRITE16(seta_state, kiwame_row_select_w))
MCFG_NVRAM_ADD_0FILL("nvram")
diff --git a/src/mame/includes/seta.h b/src/mame/includes/seta.h
index b22749e7fb1..73f2da1ef34 100644
--- a/src/mame/includes/seta.h
+++ b/src/mame/includes/seta.h
@@ -61,7 +61,6 @@ public:
m_vctrl_2(*this,"vctrl_2"),
m_paletteram(*this,"paletteram"),
m_paletteram2(*this,"paletteram2"),
- m_kiwame_nvram(*this,"kiwame_nvram"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette") { }
@@ -92,7 +91,6 @@ public:
optional_shared_ptr<uint16_t> m_vctrl_2;
optional_shared_ptr<uint16_t> m_paletteram;
optional_shared_ptr<uint16_t> m_paletteram2;
- optional_shared_ptr<uint16_t> m_kiwame_nvram;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
@@ -135,6 +133,8 @@ public:
uint16_t m_pairslove_protram_old[0x200];
uint16_t m_downtown_protection[0x200/2];
+ uint16_t m_kiwame_row_select;
+
DECLARE_WRITE16_MEMBER(seta_vregs_w);
DECLARE_WRITE16_MEMBER(seta_vram_0_w);
DECLARE_WRITE16_MEMBER(seta_vram_2_w);
@@ -156,8 +156,7 @@ public:
DECLARE_READ16_MEMBER(keroppi_coin_r);
DECLARE_WRITE16_MEMBER(keroppi_prize_w);
DECLARE_WRITE16_MEMBER(msgundam_vregs_w);
- DECLARE_READ16_MEMBER(kiwame_nvram_r);
- DECLARE_WRITE16_MEMBER(kiwame_nvram_w);
+ DECLARE_WRITE16_MEMBER(kiwame_row_select_w);
DECLARE_READ16_MEMBER(kiwame_input_r);
DECLARE_READ16_MEMBER(thunderl_protection_r);
DECLARE_WRITE16_MEMBER(thunderl_protection_w);