aquarium: Add watchdog (nw)

This commit is contained in:
AJR 2017-08-29 11:27:39 -04:00
parent 9cd6d74afa
commit fd32629f14
2 changed files with 15 additions and 2 deletions

View File

@ -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)

View File

@ -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);