summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/bzone.cpp
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2016-04-30 16:31:47 -0400
committer AJR <ajrhacker@users.noreply.github.com>2016-04-30 16:39:27 -0400
commitdafe4d8e22d41a6d2f79c1d1d076ca1a18291401 (patch)
tree11a27122fbf7a667498a60c1270443e6c75c4e27 /src/mame/drivers/bzone.cpp
parenta717ba24ede14435f1c4f0dd15f76b2812db27b7 (diff)
Make watchdog timer a separate device
- Separate watchdog implementation from running_machine (once again) and driver_device - Old-style methods, now hidden behind #ifdefs, will probably be safe to remove soon
Diffstat (limited to 'src/mame/drivers/bzone.cpp')
-rw-r--r--src/mame/drivers/bzone.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mame/drivers/bzone.cpp b/src/mame/drivers/bzone.cpp
index 787b8914163..f95bf75f3d7 100644
--- a/src/mame/drivers/bzone.cpp
+++ b/src/mame/drivers/bzone.cpp
@@ -208,6 +208,7 @@
#include "emu.h"
#include "cpu/m6502/m6502.h"
+#include "machine/watchdog.h"
#include "video/vector.h"
#include "video/avgdvg.h"
#include "machine/atari_vg.h"
@@ -304,7 +305,7 @@ static ADDRESS_MAP_START( bzone_map, AS_PROGRAM, 8, bzone_state )
AM_RANGE(0x0c00, 0x0c00) AM_READ_PORT("DSW1")
AM_RANGE(0x1000, 0x1000) AM_WRITE(bzone_coin_counter_w)
AM_RANGE(0x1200, 0x1200) AM_DEVWRITE("avg", avg_bzone_device, go_w)
- AM_RANGE(0x1400, 0x1400) AM_WRITE(watchdog_reset_w)
+ AM_RANGE(0x1400, 0x1400) AM_DEVWRITE("watchdog", watchdog_timer_device, reset_w)
AM_RANGE(0x1600, 0x1600) AM_DEVWRITE("avg", avg_bzone_device, reset_w)
AM_RANGE(0x1800, 0x1800) AM_DEVREAD("mathbox", mathbox_device, status_r)
AM_RANGE(0x1810, 0x1810) AM_DEVREAD("mathbox", mathbox_device, lo_r)
@@ -324,7 +325,7 @@ static ADDRESS_MAP_START( redbaron_map, AS_PROGRAM, 8, bzone_state )
AM_RANGE(0x0c00, 0x0c00) AM_READ_PORT("DSW1")
AM_RANGE(0x1000, 0x1000) AM_WRITENOP /* coin out - Manual states this is "Coin Counter" */
AM_RANGE(0x1200, 0x1200) AM_DEVWRITE("avg", avg_bzone_device, go_w)
- AM_RANGE(0x1400, 0x1400) AM_WRITE(watchdog_reset_w)
+ AM_RANGE(0x1400, 0x1400) AM_DEVWRITE("watchdog", watchdog_timer_device, reset_w)
AM_RANGE(0x1600, 0x1600) AM_DEVWRITE("avg", avg_bzone_device, reset_w)
AM_RANGE(0x1800, 0x1800) AM_DEVREAD("mathbox", mathbox_device, status_r)
AM_RANGE(0x1802, 0x1802) AM_READ_PORT("IN4")
@@ -538,6 +539,8 @@ static MACHINE_CONFIG_START( bzone_base, bzone_state )
MCFG_CPU_PROGRAM_MAP(bzone_map)
MCFG_CPU_PERIODIC_INT_DRIVER(bzone_state, bzone_interrupt, BZONE_CLOCK_3KHZ / 12)
+ MCFG_WATCHDOG_ADD("watchdog")
+
/* video hardware */
MCFG_VECTOR_ADD("vector")
MCFG_SCREEN_ADD("screen", VECTOR)