summaryrefslogtreecommitdiffstats
path: root/src/devices/bus/nes/aladdin.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/nes/aladdin.h')
-rw-r--r--src/devices/bus/nes/aladdin.h23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/devices/bus/nes/aladdin.h b/src/devices/bus/nes/aladdin.h
index 9014bf6969a..de6725bb9f1 100644
--- a/src/devices/bus/nes/aladdin.h
+++ b/src/devices/bus/nes/aladdin.h
@@ -24,7 +24,7 @@ public:
virtual ~aladdin_cart_interface();
// reading and writing
- virtual uint8_t read(offs_t offset);
+ virtual DECLARE_READ8_MEMBER(read);
uint8_t *get_cart_base() { return m_rom; }
void set_cart_size(uint32_t size) { m_rom_size = size; m_rom_mask = (size / 0x4000) - 1; }
@@ -50,16 +50,6 @@ class nes_aladdin_slot_device : public device_t,
friend class nes_aladdin_device;
public:
// construction/destruction
- template <typename T>
- nes_aladdin_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts)
- : nes_aladdin_slot_device(mconfig, tag, owner, (uint32_t)0)
- {
- option_reset();
- opts(*this);
- set_default_option(nullptr);
- set_fixed(false);
- }
-
nes_aladdin_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual ~nes_aladdin_slot_device();
@@ -82,7 +72,7 @@ public:
// slot interface overrides
virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override;
- uint8_t read(offs_t offset);
+ virtual DECLARE_READ8_MEMBER(read);
void write_prg(uint32_t offset, uint8_t data) { if (m_cart) m_cart->write_prg(offset, data); }
protected:
@@ -93,6 +83,11 @@ protected:
DECLARE_DEVICE_TYPE(NES_ALADDIN_SLOT, nes_aladdin_slot_device)
+#define MCFG_ALADDIN_MINICART_ADD(_tag, _slot_intf) \
+ MCFG_DEVICE_ADD(_tag, NES_ALADDIN_SLOT, 0) \
+ MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, nullptr, false)
+
+
//----------------------------------
//
// Aladdin Minicart implementation
@@ -160,8 +155,8 @@ public:
// construction/destruction
nes_aladdin_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- virtual uint8_t read_h(offs_t offset) override;
- virtual void write_h(offs_t offset, uint8_t data) override;
+ virtual DECLARE_READ8_MEMBER(read_h) override;
+ virtual DECLARE_WRITE8_MEMBER(write_h) override;
virtual void pcb_reset() override;