summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/msx_slot/slot.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/msx_slot/slot.h')
-rw-r--r--src/devices/bus/msx_slot/slot.h20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/devices/bus/msx_slot/slot.h b/src/devices/bus/msx_slot/slot.h
index 3a95c7b6b75..ad51f0c4f9d 100644
--- a/src/devices/bus/msx_slot/slot.h
+++ b/src/devices/bus/msx_slot/slot.h
@@ -15,29 +15,25 @@ pages; and multiple pieces of rom/ram/components can occur in a single slot.
#pragma once
+#define MCFG_MSX_INTERNAL_SLOT_ADD(_tag, _type, _startpage, _numpages) \
+ MCFG_DEVICE_ADD(_tag, _type, 0) \
+ dynamic_cast<msx_internal_slot_interface &>(*device).set_start_address(_startpage * 0x4000); \
+ dynamic_cast<msx_internal_slot_interface &>(*device).set_size(_numpages * 0x4000);
+
class msx_internal_slot_interface
{
public:
- msx_internal_slot_interface(const machine_config &mconfig, device_t &device);
- msx_internal_slot_interface(const msx_internal_slot_interface &device) = delete;
+ msx_internal_slot_interface();
virtual ~msx_internal_slot_interface() { }
// configuration helpers
- template <typename T> void set_memory_space(T &&tag, int spacenum) { m_mem_space.set_tag(std::forward<T>(tag), spacenum); }
- template <typename T> void set_io_space(T &&tag, int spacenum) { m_io_space.set_tag(std::forward<T>(tag), spacenum); }
void set_start_address(uint32_t start_address) { m_start_address = start_address; m_end_address = m_start_address + m_size; }
void set_size(uint32_t size) { m_size = size; m_end_address = m_start_address + m_size; }
- virtual uint8_t read(offs_t offset) { return 0xFF; }
- virtual void write(offs_t offset, uint8_t data) { }
-
- address_space &memory_space() const { return *m_mem_space; }
- address_space &io_space() const { return *m_io_space; }
+ virtual DECLARE_READ8_MEMBER(read) { return 0xFF; }
+ virtual DECLARE_WRITE8_MEMBER(write) { }
protected:
- required_address_space m_mem_space;
- required_address_space m_io_space;
-
uint32_t m_start_address;
uint32_t m_size;
uint32_t m_end_address;