summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/53c810.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/53c810.h')
-rw-r--r--src/devices/machine/53c810.h28
1 files changed, 3 insertions, 25 deletions
diff --git a/src/devices/machine/53c810.h b/src/devices/machine/53c810.h
index 720e1039327..b80c0aa2c4a 100644
--- a/src/devices/machine/53c810.h
+++ b/src/devices/machine/53c810.h
@@ -7,11 +7,6 @@
#include "legscsi.h"
-#define LSI53C810_IRQ_CB(name) void name(int state)
-#define LSI53C810_DMA_CB(name) void name(uint32_t src, uint32_t dst, int length, int byteswap)
-#define LSI53C810_FETCH_CB(name) uint32_t name(uint32_t dsp)
-
-
class lsi53c810_device : public legacy_scsi_host_adapter
{
public:
@@ -22,27 +17,20 @@ public:
// construction/destruction
lsi53c810_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
- template <typename Object> void set_irq_callback(Object &&cb) { m_irq_cb = std::forward<Object>(cb); }
- template <typename Object> void set_dma_callback(Object &&cb) { m_dma_cb = std::forward<Object>(cb); }
- template <typename Object> void set_fetch_callback(Object &&cb) { m_fetch_cb = std::forward<Object>(cb); }
-
template <class FunctionClass> void set_irq_callback(void (FunctionClass::*callback)(int), const char *name)
{
- set_irq_callback(irq_delegate(callback, name, nullptr, static_cast<FunctionClass *>(nullptr)));
+ m_irq_cb = irq_delegate(callback, name, nullptr, static_cast<FunctionClass *>(nullptr));
}
- void set_irq_callback(irq_delegate callback) { m_irq_cb = callback; }
template <class FunctionClass> void set_dma_callback(void (FunctionClass::*callback)(uint32_t, uint32_t, int, int), const char *name)
{
- set_dma_callback(dma_delegate(callback, name, nullptr, static_cast<FunctionClass *>(nullptr)));
+ m_dma_cb = dma_delegate(callback, name, nullptr, static_cast<FunctionClass *>(nullptr));
}
- void set_dma_callback(dma_delegate callback) { m_dma_cb = callback; }
template <class FunctionClass> void set_fetch_callback(uint32_t (FunctionClass::*callback)(uint32_t), const char *name)
{
- set_fetch_callback(fetch_delegate(callback, name, nullptr, static_cast<FunctionClass *>(nullptr)));
+ m_fetch_cb = fetch_delegate(callback, name, nullptr, static_cast<FunctionClass *>(nullptr));
}
- void set_fetch_callback(fetch_delegate callback) { m_fetch_cb = callback; }
uint8_t reg_r(int offset);
void reg_w(int offset, uint8_t data);
@@ -119,14 +107,4 @@ private:
// device type definition
DECLARE_DEVICE_TYPE(LSI53C810, lsi53c810_device)
-
-#define MCFG_LSI53C810_IRQ_CB(_class, _method) \
- downcast<lsi53c810_device &>(*device).set_irq_callback(lsi53c810_device::irq_delegate(&_class::_method, #_class "::" #_method, this));
-
-#define MCFG_LSI53C810_DMA_CB(_class, _method) \
- downcast<lsi53c810_device &>(*device).set_dma_callback(lsi53c810_device::dma_delegate(&_class::_method, #_class "::" #_method, this));
-
-#define MCFG_LSI53C810_FETCH_CB(_class, _method) \
- downcast<lsi53c810_device &>(*device).set_fetch_callback(lsi53c810_device::fetch_delegate(&_class::_method, #_class "::" #_method, this));
-
#endif // MAME_MACHINE_53C810_H