summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/crimfght.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/crimfght.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/crimfght.cpp')
-rw-r--r--src/mame/drivers/crimfght.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mame/drivers/crimfght.cpp b/src/mame/drivers/crimfght.cpp
index 547b8b0d486..1d77ed5b684 100644
--- a/src/mame/drivers/crimfght.cpp
+++ b/src/mame/drivers/crimfght.cpp
@@ -16,6 +16,7 @@
#include "emu.h"
#include "cpu/z80/z80.h"
#include "cpu/m6809/konami.h" /* for the callback and the firq irq definition */
+#include "machine/watchdog.h"
#include "sound/2151intf.h"
#include "includes/konamipt.h"
#include "includes/crimfght.h"
@@ -89,7 +90,7 @@ static ADDRESS_MAP_START( crimfght_map, AS_PROGRAM, 8, crimfght_state )
AM_RANGE(0x3f85, 0x3f85) AM_READ_PORT("P3")
AM_RANGE(0x3f86, 0x3f86) AM_READ_PORT("P4")
AM_RANGE(0x3f87, 0x3f87) AM_READ_PORT("DSW1")
- AM_RANGE(0x3f88, 0x3f88) AM_MIRROR(0x03) AM_READ(watchdog_reset_r) AM_WRITE(crimfght_coin_w) // 051550
+ AM_RANGE(0x3f88, 0x3f88) AM_MIRROR(0x03) AM_DEVREAD("watchdog", watchdog_timer_device, reset_r) AM_WRITE(crimfght_coin_w) // 051550
AM_RANGE(0x3f8c, 0x3f8c) AM_MIRROR(0x03) AM_WRITE(sound_w)
AM_RANGE(0x2000, 0x5fff) AM_READWRITE(k052109_051960_r, k052109_051960_w) /* video RAM + sprite RAM */
AM_RANGE(0x6000, 0x7fff) AM_ROMBANK("rombank") /* banked ROM */
@@ -312,6 +313,8 @@ static MACHINE_CONFIG_START( crimfght, crimfght_state )
MCFG_ADDRESS_MAP_BANK_ADDRBUS_WIDTH(11)
MCFG_ADDRESS_MAP_BANK_STRIDE(0x400)
+ MCFG_WATCHDOG_ADD("watchdog")
+
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_RAW_PARAMS(XTAL_24MHz/3, 528, 96, 416, 256, 16, 240) // measured 59.17