summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/machine/midiinport.c
diff options
context:
space:
mode:
author R. Belmont <rb6502@users.noreply.github.com>2013-01-13 03:50:33 +0000
committer R. Belmont <rb6502@users.noreply.github.com>2013-01-13 03:50:33 +0000
commit098c5a9064c9e8b87c4057e20f9ea4d43d485258 (patch)
tree93ac3ed0ec3658e5e220fec17c524ea6204ffe48 /src/mess/machine/midiinport.c
parentf6c44c6e9bbf1720d481707cbee73aadbae21572 (diff)
(MESS) esq5505: add MIDI In capability to all of these drivers. [R. Belmont]
Diffstat (limited to 'src/mess/machine/midiinport.c')
-rw-r--r--src/mess/machine/midiinport.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/mess/machine/midiinport.c b/src/mess/machine/midiinport.c
new file mode 100644
index 00000000000..5a90999c02f
--- /dev/null
+++ b/src/mess/machine/midiinport.c
@@ -0,0 +1,32 @@
+/*********************************************************************
+
+ midiinport.c
+
+ MIDI In serial port - glues the image device to the pluggable serial port
+
+*********************************************************************/
+
+#include "machine/midiinport.h"
+
+const device_type MIDIIN_PORT = &device_creator<midiin_port_device>;
+
+midiin_port_device::midiin_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : device_t(mconfig, MIDIIN_PORT, "MIDI In port", tag, owner, clock),
+ device_serial_port_interface(mconfig, *this),
+ m_midiin(*this, "midiin")
+{
+}
+
+static midiin_config midiin_port_image_config =
+{
+ DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, midiin_port_device, read)
+};
+
+static MACHINE_CONFIG_FRAGMENT(midiin_port_config)
+ MCFG_MIDIIN_ADD("midiin", midiin_port_image_config)
+MACHINE_CONFIG_END
+
+machine_config_constructor midiin_port_device::device_mconfig_additions() const
+{
+ return MACHINE_CONFIG_NAME(midiin_port_config);
+}