summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/h8/h83002.h
diff options
context:
space:
mode:
author BartmanAbyss <bwodok@shinen.com>2017-04-24 22:37:35 +0200
committer Olivier Galibert <galibert@pobox.com>2017-04-24 22:37:35 +0200
commit19823bab94efb1283e684ad56ae4eca769ea095c (patch)
tree0d5b2ea1125ec70651b592bb337faea481a76711 /src/devices/cpu/h8/h83002.h
parent2a1cc17f330ee21244ff59a3123b5f6bc28eeab0 (diff)
Fixed h8 instruction eepmov.b (used r4h instead of r4l) (#2253)
Added support for non-autorequest DMA (DREQ edge, DREQ level) in h8 Added support for H8/300H to h8_dma (previously only H8/300S supported) Added DMA channels to H8/3002 Added RTMCSR register to H8/3002
Diffstat (limited to 'src/devices/cpu/h8/h83002.h')
-rw-r--r--src/devices/cpu/h8/h83002.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/devices/cpu/h8/h83002.h b/src/devices/cpu/h8/h83002.h
index 4f524c6f0b9..0b0b1a2c76c 100644
--- a/src/devices/cpu/h8/h83002.h
+++ b/src/devices/cpu/h8/h83002.h
@@ -16,22 +16,37 @@
#include "h8h.h"
#include "h8_adc.h"
+#include "h8_dma.h"
#include "h8_port.h"
#include "h8_intc.h"
#include "h8_timer16.h"
#include "h8_sci.h"
#include "h8_watchdog.h"
+#define MCFG_H83002_TEND0_CALLBACK(_devcb) \
+ devcb = &h83002_device::set_tend0_callback(*device, DEVCB_##_devcb);
+#define MCFG_H83002_TEND1_CALLBACK(_devcb) \
+ devcb = &h83002_device::set_tend1_callback(*device, DEVCB_##_devcb);
+
class h83002_device : public h8h_device {
public:
h83002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ template<class _Object> static devcb_base &set_tend0_callback(device_t &device, _Object object) { return downcast<h83002_device&>(device).tend0_cb.set_callback(object); }
+ template<class _Object> static devcb_base &set_tend1_callback(device_t &device, _Object object) { return downcast<h83002_device&>(device).tend1_cb.set_callback(object); }
+
DECLARE_READ8_MEMBER(syscr_r);
DECLARE_WRITE8_MEMBER(syscr_w);
+ DECLARE_READ8_MEMBER(rtmcsr_r);
+ DECLARE_WRITE8_MEMBER(rtmcsr_w);
+
protected:
required_device<h8h_intc_device> intc;
required_device<h8_adc_device> adc;
+ optional_device<h8_dma_device> dma;
+ optional_device<h8_dma_channel_device> dma0;
+ optional_device<h8_dma_channel_device> dma1;
required_device<h8_port_device> port4;
required_device<h8_port_device> port6;
required_device<h8_port_device> port7;
@@ -50,6 +65,9 @@ protected:
required_device<h8_watchdog_device> watchdog;
uint8_t syscr;
+ uint8_t rtmcsr;
+
+ devcb_write_line tend0_cb, tend1_cb;
virtual void update_irq_filter() override;
virtual void interrupt_taken() override;