diff options
author | AJR <ajrhacker@users.noreply.github.com> | 2017-08-29 11:27:39 -0400 |
---|---|---|
committer | AJR <ajrhacker@users.noreply.github.com> | 2017-08-29 11:27:39 -0400 |
commit | fd32629f147375cf7eb635ef6071302641c3604f (patch) | |
tree | 44f326924c4bde0464949d76eeeedd5b869ab937 | |
parent | 9cd6d74afaf41221f7b195d61901e1291d28cc99 (diff) |
aquarium: Add watchdog (nw)
-rw-r--r-- | src/mame/drivers/aquarium.cpp | 11 | ||||
-rw-r--r-- | src/mame/includes/aquarium.h | 6 |
2 files changed, 15 insertions, 2 deletions
diff --git a/src/mame/drivers/aquarium.cpp b/src/mame/drivers/aquarium.cpp index d75c08e14cf..c4278c1346d 100644 --- a/src/mame/drivers/aquarium.cpp +++ b/src/mame/drivers/aquarium.cpp @@ -59,6 +59,12 @@ Notes: #include "speaker.h" +WRITE8_MEMBER(aquarium_state::aquarium_watchdog_w) +{ + m_watchdog->write_line_ck(BIT(data, 7)); + // bits 0 & 1 also used +} + WRITE8_MEMBER(aquarium_state::aquarium_z80_bank_w) { // uses bits ---x --xx @@ -106,7 +112,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, aquarium_state ) AM_RANGE(0xd80082, 0xd80083) AM_READNOP /* stored but not read back ? check code at 0x01f440 */ AM_RANGE(0xd80084, 0xd80085) AM_READ_PORT("INPUTS") AM_RANGE(0xd80086, 0xd80087) AM_READ_PORT("SYSTEM") - AM_RANGE(0xd80088, 0xd80089) AM_WRITENOP /* ?? video related */ + AM_RANGE(0xd80088, 0xd80089) AM_WRITE8(aquarium_watchdog_w, 0xff00) AM_RANGE(0xd8008a, 0xd8008b) AM_DEVWRITE8("soundlatch", generic_latch_8_device, write, 0x00ff) AM_RANGE(0xff0000, 0xffffff) AM_RAM ADDRESS_MAP_END @@ -289,6 +295,9 @@ static MACHINE_CONFIG_START( aquarium ) MCFG_CPU_PROGRAM_MAP(snd_map) MCFG_CPU_IO_MAP(snd_portmap) + // Is this the actual IC type? Some other Excellent games from this period use a MAX693. + MCFG_DEVICE_ADD("watchdog", MB3773, 0) + /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) diff --git a/src/mame/includes/aquarium.h b/src/mame/includes/aquarium.h index 25fd296304e..e7ae1823942 100644 --- a/src/mame/includes/aquarium.h +++ b/src/mame/includes/aquarium.h @@ -2,6 +2,7 @@ // copyright-holders:David Haywood #include "machine/gen_latch.h" +#include "machine/mb3773.h" #include "sound/okim6295.h" #include "video/excellent_spr.h" #include "screen.h" @@ -22,7 +23,8 @@ public: m_palette(*this, "palette"), m_sprgen(*this, "spritegen"), m_screen(*this, "screen"), - m_soundlatch(*this, "soundlatch") + m_soundlatch(*this, "soundlatch"), + m_watchdog(*this, "watchdog") { } /* memory pointers */ @@ -45,7 +47,9 @@ public: required_device<excellent_spr_device> m_sprgen; required_device<screen_device> m_screen; required_device<generic_latch_8_device> m_soundlatch; + required_device<mb3773_device> m_watchdog; + DECLARE_WRITE8_MEMBER(aquarium_watchdog_w); DECLARE_WRITE8_MEMBER(aquarium_z80_bank_w); DECLARE_READ8_MEMBER(aquarium_oki_r); DECLARE_WRITE8_MEMBER(aquarium_oki_w); |