diff options
Diffstat (limited to 'src/devices/cpu/h8/h83002.cpp')
-rw-r--r-- | src/devices/cpu/h8/h83002.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/devices/cpu/h8/h83002.cpp b/src/devices/cpu/h8/h83002.cpp index 96fc201dfab..0b9a8036983 100644 --- a/src/devices/cpu/h8/h83002.cpp +++ b/src/devices/cpu/h8/h83002.cpp @@ -23,8 +23,10 @@ h83002_device::h83002_device(const machine_config &mconfig, const char *tag, dev timer16_3(*this, "timer16:3"), timer16_4(*this, "timer16:4"), sci0(*this, "sci0"), - sci1(*this, "sci1"), syscr(0) + sci1(*this, "sci1"), + watchdog(*this, "watchdog") { + syscr = 0; } static MACHINE_CONFIG_FRAGMENT(h83002) @@ -45,6 +47,7 @@ static MACHINE_CONFIG_FRAGMENT(h83002) MCFG_H8H_TIMER16_CHANNEL_ADD("timer16:4", 2, 2, "intc", 40) MCFG_H8_SCI_ADD("sci0", "intc", 52, 53, 54, 55) MCFG_H8_SCI_ADD("sci1", "intc", 56, 57, 58, 59) + MCFG_H8_WATCHDOG_ADD("watchdog", "intc", 20, h8_watchdog_device::H) MACHINE_CONFIG_END DEVICE_ADDRESS_MAP_START(map, 16, h83002_device) @@ -89,6 +92,9 @@ DEVICE_ADDRESS_MAP_START(map, 16, h83002_device) AM_RANGE(0xffff98, 0xffff9b) AM_DEVREADWRITE( "timer16:4", h8_timer16_channel_device, tgr_r, tgr_w ) AM_RANGE(0xffff9c, 0xffff9f) AM_DEVREADWRITE( "timer16:4", h8_timer16_channel_device, tbr_r, tbr_w ) + AM_RANGE(0xffffa8, 0xffffa9) AM_DEVREADWRITE( "watchdog", h8_watchdog_device, wd_r, wd_w ) + AM_RANGE(0xffffaa, 0xffffab) AM_DEVREADWRITE( "watchdog", h8_watchdog_device, rst_r, rst_w ) + AM_RANGE(0xffffb0, 0xffffb1) AM_DEVREADWRITE8("sci0", h8_sci_device, smr_r, smr_w, 0xff00) AM_RANGE(0xffffb0, 0xffffb1) AM_DEVREADWRITE8("sci0", h8_sci_device, brr_r, brr_w, 0x00ff) AM_RANGE(0xffffb2, 0xffffb3) AM_DEVREADWRITE8("sci0", h8_sci_device, scr_r, scr_w, 0xff00) @@ -191,6 +197,7 @@ void h83002_device::internal_update(UINT64 current_time) add_event(event_time, timer16_2->internal_update(current_time)); add_event(event_time, timer16_3->internal_update(current_time)); add_event(event_time, timer16_4->internal_update(current_time)); + add_event(event_time, watchdog->internal_update(current_time)); recompute_bcount(event_time); } @@ -215,5 +222,5 @@ WRITE8_MEMBER(h83002_device::syscr_w) { syscr = data; update_irq_filter(); - logerror("%s: syscr = %02x\n", tag(), data); + logerror("syscr = %02x\n", data); } |