summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/msx_slot/ram.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/msx_slot/ram.h')
-rw-r--r--src/devices/bus/msx_slot/ram.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/devices/bus/msx_slot/ram.h b/src/devices/bus/msx_slot/ram.h
new file mode 100644
index 00000000000..1b85ee8ac5d
--- /dev/null
+++ b/src/devices/bus/msx_slot/ram.h
@@ -0,0 +1,36 @@
+// license:BSD-3-Clause
+// copyright-holders:Wilbert Pol
+#ifndef __MSX_SLOT_RAM_H
+#define __MSX_SLOT_RAM_H
+
+#include "slot.h"
+
+#define MCFG_MSX_SLOT_RAM_ADD(_tag, _startpage, _numpages) \
+ MCFG_MSX_INTERNAL_SLOT_ADD(_tag, MSX_SLOT_RAM, _startpage, _numpages)
+
+#define MCFG_MSX_SLOT_RAM_8KB \
+ msx_slot_ram_device::force_start_address(*device, 0xe000);
+
+
+class msx_slot_ram_device : public device_t,
+ public msx_internal_slot_interface
+{
+public:
+ msx_slot_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+ static void force_start_address(device_t &device, UINT16 start) { downcast<msx_slot_ram_device &>(device).m_start_address = start; }
+
+ virtual void device_start();
+
+ virtual DECLARE_READ8_MEMBER(read);
+ virtual DECLARE_WRITE8_MEMBER(write);
+
+private:
+ std::vector<UINT8> m_ram;
+};
+
+
+extern const device_type MSX_SLOT_RAM;
+
+
+#endif