summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/machine/msx_switched.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mess/machine/msx_switched.c')
-rw-r--r--src/mess/machine/msx_switched.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/mess/machine/msx_switched.c b/src/mess/machine/msx_switched.c
new file mode 100644
index 00000000000..9b416c7df7d
--- /dev/null
+++ b/src/mess/machine/msx_switched.c
@@ -0,0 +1,21 @@
+#include "emu.h"
+#include "msx_switched.h"
+
+
+msx_switched_device::msx_switched_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
+ : device_t(mconfig, type, name, tag, owner, clock, shortname, source)
+{
+}
+
+
+void msx_switched_device::device_start()
+{
+ address_space &space = dynamic_cast<device_memory_interface*>(owner())->space();
+
+ // Install IO read/write handlers
+ UINT16 start = ( get_id() << 8 ) | 0x00;
+ UINT16 end = ( get_id() << 8 ) | 0x0f;
+ space.install_read_handler(start, end, read8_delegate(FUNC(msx_switched_device::io_read), this));
+ space.install_write_handler(start, end, write8_delegate(FUNC(msx_switched_device::io_write), this));
+}
+