summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/tms32025/tms32025.h
diff options
context:
space:
mode:
author Ivan Vangelista <mesgnet@yahoo.it>2016-06-22 15:54:13 +0200
committer Ivan Vangelista <mesgnet@yahoo.it>2016-06-22 15:54:13 +0200
commit47ac9a7bda6d9e54907c43a5efbedcc04302cdfe (patch)
treef3613865c3b9d01110d4ff76dd5589dba21724bd /src/devices/cpu/tms32025/tms32025.h
parent597b2417b4b7d6ad180ab7a2c86c0d1204a3a14d (diff)
tms32025.cpp: devcb instead of memory map for ports (nw)
Diffstat (limited to 'src/devices/cpu/tms32025/tms32025.h')
-rw-r--r--src/devices/cpu/tms32025/tms32025.h35
1 files changed, 29 insertions, 6 deletions
diff --git a/src/devices/cpu/tms32025/tms32025.h b/src/devices/cpu/tms32025/tms32025.h
index daac81c8314..0d414c1cb4f 100644
--- a/src/devices/cpu/tms32025/tms32025.h
+++ b/src/devices/cpu/tms32025/tms32025.h
@@ -23,17 +23,25 @@
#define __TMS32025_H__
+#define MCFG_TMS32025_BIO_IN_CB(_devcb) \
+ devcb = &tms32025_device::set_bio_in_cb(*device, DEVCB_##_devcb); /* BIO input */
+#define MCFG_TMS32025_HOLD_IN_CB(_devcb) \
+ devcb = &tms32025_device::set_hold_in_cb(*device, DEVCB_##_devcb); /* HOLD input */
-#define TMS32025_BIO 0x10000 /* BIO input */
-#define TMS32025_HOLD 0x10001 /* HOLD input */
-#define TMS32025_HOLDA 0x10001 /* HOLD Acknowledge output */
-#define TMS32025_XF 0x10002 /* XF output */
-#define TMS32025_DR 0x10003 /* Serial Data Receive input */
-#define TMS32025_DX 0x10003 /* Serial Data Transmit output */
+#define MCFG_TMS32025_HOLD_ACK_OUT_CB(_devcb) \
+ devcb = &tms32025_device::set_hold_ack_out_cb(*device, DEVCB_##_devcb); /* HOLD Acknowledge output */
+
+#define MCFG_TMS32025_XF_OUT_CB(_devcb) \
+ devcb = &tms32025_device::set_xf_out_cb(*device, DEVCB_##_devcb); /* XF output */
+#define MCFG_TMS32025_DR_IN_CB(_devcb) \
+ devcb = &tms32025_device::set_dr_in_cb(*device, DEVCB_##_devcb); /* Serial Data Receive input */
+#define MCFG_TMS32025_DX_OUT_CB(_devcb) \
+ devcb = &tms32025_device::set_dx_out_cb(*device, DEVCB_##_devcb); /* Serial Data Transmit output */
+
/****************************************************************************
* Interrupt constants
*/
@@ -75,6 +83,14 @@ public:
// construction/destruction
tms32025_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
tms32025_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
+
+ // static configuration helpers
+ template<class _Object> static devcb_base & set_bio_in_cb(device_t &device, _Object object) { return downcast<tms32025_device &>(device).m_bio_in.set_callback(object); }
+ template<class _Object> static devcb_base & set_hold_in_cb(device_t &device, _Object object) { return downcast<tms32025_device &>(device).m_hold_in.set_callback(object); }
+ template<class _Object> static devcb_base & set_hold_ack_out_cb(device_t &device, _Object object) { return downcast<tms32025_device &>(device).m_hold_ack_out.set_callback(object); }
+ template<class _Object> static devcb_base & set_xf_out_cb(device_t &device, _Object object) { return downcast<tms32025_device &>(device).m_xf_out.set_callback(object); }
+ template<class _Object> static devcb_base & set_dr_in_cb(device_t &device, _Object object) { return downcast<tms32025_device &>(device).m_dr_in.set_callback(object); }
+ template<class _Object> static devcb_base & set_dx_out_cb(device_t &device, _Object object) { return downcast<tms32025_device &>(device).m_dx_out.set_callback(object); }
protected:
// device-level overrides
@@ -119,6 +135,13 @@ private:
static const tms32025_opcode s_opcode_CE_subset[256];
static const tms32025_opcode s_opcode_Dx_subset[8];
+ devcb_read16 m_bio_in;
+ devcb_read16 m_hold_in;
+ devcb_write16 m_hold_ack_out;
+ devcb_write16 m_xf_out;
+ devcb_read16 m_dr_in;
+ devcb_write16 m_dx_out;
+
/******************** CPU Internal Registers *******************/
UINT16 m_PREVPC; /* previous program counter */