summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/msx_slot/cartridge.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/msx_slot/cartridge.h')
-rw-r--r--src/devices/bus/msx_slot/cartridge.h21
1 files changed, 5 insertions, 16 deletions
diff --git a/src/devices/bus/msx_slot/cartridge.h b/src/devices/bus/msx_slot/cartridge.h
index be0856e8d82..faabf394042 100644
--- a/src/devices/bus/msx_slot/cartridge.h
+++ b/src/devices/bus/msx_slot/cartridge.h
@@ -14,18 +14,6 @@ DECLARE_DEVICE_TYPE(MSX_SLOT_CARTRIDGE, msx_slot_cartridge_device)
DECLARE_DEVICE_TYPE(MSX_SLOT_YAMAHA_EXPANSION, msx_slot_yamaha_expansion_device)
-#define MCFG_MSX_SLOT_CARTRIDGE_ADD(_tag, _devcb) \
- MCFG_DEVICE_ADD(_tag, MSX_SLOT_CARTRIDGE, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(msx_cart, nullptr, false) \
- downcast<msx_slot_cartridge_device &>(*device).set_irq_handler(DEVCB_##_devcb);
-
-
-#define MCFG_MSX_SLOT_YAMAHA_EXPANSION_ADD(_tag, _devcb, _default) \
- MCFG_DEVICE_ADD(_tag, MSX_SLOT_YAMAHA_EXPANSION, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(msx_yamaha_60pin, _default, false) \
- downcast<msx_slot_cartridge_device &>(*device).set_irq_handler(DEVCB_##_devcb);
-
-
class msx_slot_cartridge_device : public device_t
, public device_image_interface
, public device_slot_interface
@@ -35,8 +23,8 @@ public:
// construction/destruction
msx_slot_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // static configuration helpers
- template <class Object> devcb_base &set_irq_handler(Object &&cb) { return m_irq_handler.set_callback(std::forward<Object>(cb)); }
+ // configuration helpers
+ auto irq_handler() { return m_irq_handler.bind(); }
// image-level overrides
virtual image_init_result call_load() override;
@@ -57,8 +45,8 @@ public:
virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override;
// msx_internal_slot-level overrides
- virtual DECLARE_READ8_MEMBER(read) override;
- virtual DECLARE_WRITE8_MEMBER(write) override;
+ virtual uint8_t read(offs_t offset) override;
+ virtual void write(offs_t offset, uint8_t data) override;
DECLARE_WRITE_LINE_MEMBER(irq_out);
@@ -66,6 +54,7 @@ protected:
msx_slot_cartridge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
+ virtual void device_resolve_objects() override;
virtual void device_start() override;
devcb_write_line m_irq_handler;