trunk/src/mess/drivers/esq5505.c
| r20234 | r20235 | |
| 106 | 106 | #include "machine/wd_fdc.h" |
| 107 | 107 | #include "machine/hd63450.h" // compatible with MC68450, which is what these really have |
| 108 | 108 | #include "formats/esq16_dsk.h" |
| 109 | | |
| 110 | 109 | #include "machine/esqvfd.h" |
| 111 | 110 | #include "machine/esqpanel.h" |
| 111 | #include "machine/serial.h" |
| 112 | #include "machine/midiinport.h" |
| 112 | 113 | |
| 113 | 114 | #define GENERIC (0) |
| 114 | 115 | #define EPS (1) |
| r20234 | r20235 | |
| 756 | 757 | DEVCB_DEVICE_LINE_MEMBER("duart", duartn68681_device, rx_b_w) |
| 757 | 758 | }; |
| 758 | 759 | |
| 760 | static SLOT_INTERFACE_START(midiin_slot) |
| 761 | SLOT_INTERFACE("midiin", MIDIIN_PORT) |
| 762 | SLOT_INTERFACE_END |
| 763 | |
| 764 | static const serial_port_interface midiin_intf = |
| 765 | { |
| 766 | DEVCB_DEVICE_LINE_MEMBER("duart", duartn68681_device, rx_a_w) // route MIDI Tx send directly to 68681 channel A Rx |
| 767 | }; |
| 768 | |
| 769 | static SLOT_INTERFACE_START(midiout_slot) |
| 770 | SLOT_INTERFACE_END |
| 771 | |
| 772 | static const serial_port_interface midiout_intf = |
| 773 | { |
| 774 | DEVCB_NULL // midi out ports don't transmit inward |
| 775 | }; |
| 776 | |
| 759 | 777 | static MACHINE_CONFIG_START( vfx, esq5505_state ) |
| 760 | 778 | MCFG_CPU_ADD("maincpu", M68000, XTAL_10MHz) |
| 761 | 779 | MCFG_CPU_PROGRAM_MAP(vfx_map) |
| r20234 | r20235 | |
| 764 | 782 | |
| 765 | 783 | MCFG_DUARTN68681_ADD("duart", 4000000, duart_config) |
| 766 | 784 | |
| 785 | MCFG_SERIAL_PORT_ADD("mdin", midiin_intf, midiin_slot, "midiin", NULL) |
| 786 | MCFG_SERIAL_PORT_ADD("mdout", midiout_intf, midiout_slot, NULL, NULL) |
| 787 | |
| 767 | 788 | MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
| 768 | 789 | MCFG_SOUND_ADD("ensoniq", ES5505, XTAL_10MHz) |
| 769 | 790 | MCFG_SOUND_CONFIG(es5505_config) |
| r20234 | r20235 | |
| 801 | 822 | |
| 802 | 823 | MCFG_DUARTN68681_ADD("duart", 4000000, duart_config) |
| 803 | 824 | |
| 825 | MCFG_SERIAL_PORT_ADD("mdin", midiin_intf, midiin_slot, "midiin", NULL) |
| 826 | MCFG_SERIAL_PORT_ADD("mdout", midiout_intf, midiout_slot, NULL, NULL) |
| 827 | |
| 804 | 828 | MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
| 805 | 829 | MCFG_SOUND_ADD("ensoniq", ES5505, XTAL_30_4761MHz / 2) |
| 806 | 830 | MCFG_SOUND_CONFIG(es5505_config) |
trunk/src/mess/machine/midiinport.c
| r0 | r20235 | |
| 1 | /********************************************************************* |
| 2 | |
| 3 | midiinport.c |
| 4 | |
| 5 | MIDI In serial port - glues the image device to the pluggable serial port |
| 6 | |
| 7 | *********************************************************************/ |
| 8 | |
| 9 | #include "machine/midiinport.h" |
| 10 | |
| 11 | const device_type MIDIIN_PORT = &device_creator<midiin_port_device>; |
| 12 | |
| 13 | midiin_port_device::midiin_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 14 | : device_t(mconfig, MIDIIN_PORT, "MIDI In port", tag, owner, clock), |
| 15 | device_serial_port_interface(mconfig, *this), |
| 16 | m_midiin(*this, "midiin") |
| 17 | { |
| 18 | } |
| 19 | |
| 20 | static midiin_config midiin_port_image_config = |
| 21 | { |
| 22 | DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, midiin_port_device, read) |
| 23 | }; |
| 24 | |
| 25 | static MACHINE_CONFIG_FRAGMENT(midiin_port_config) |
| 26 | MCFG_MIDIIN_ADD("midiin", midiin_port_image_config) |
| 27 | MACHINE_CONFIG_END |
| 28 | |
| 29 | machine_config_constructor midiin_port_device::device_mconfig_additions() const |
| 30 | { |
| 31 | return MACHINE_CONFIG_NAME(midiin_port_config); |
| 32 | } |
trunk/src/mess/machine/midiinport.h
| r0 | r20235 | |
| 1 | /********************************************************************* |
| 2 | |
| 3 | midiinport.h |
| 4 | |
| 5 | MIDI In serial port - glues the image device to the pluggable serial port |
| 6 | |
| 7 | *********************************************************************/ |
| 8 | |
| 9 | #ifndef _MIDIINPORT_H_ |
| 10 | #define _MIDIINPORT_H_ |
| 11 | |
| 12 | #include "emu.h" |
| 13 | #include "machine/serial.h" |
| 14 | #include "imagedev/midiin.h" |
| 15 | |
| 16 | class midiin_port_device : |
| 17 | public device_t, |
| 18 | public device_serial_port_interface |
| 19 | { |
| 20 | public: |
| 21 | midiin_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 22 | virtual machine_config_constructor device_mconfig_additions() const; |
| 23 | DECLARE_WRITE_LINE_MEMBER( read ) { m_owner->out_rx(state); } |
| 24 | virtual void tx(UINT8 state) { } |
| 25 | protected: |
| 26 | virtual void device_start() { m_owner = dynamic_cast<serial_port_device *>(owner()); } |
| 27 | virtual void device_reset() { } |
| 28 | virtual void device_config_complete() { m_shortname = "midiin_port"; } |
| 29 | private: |
| 30 | serial_port_device *m_owner; |
| 31 | required_device<midiin_device> m_midiin; |
| 32 | }; |
| 33 | |
| 34 | extern const device_type MIDIIN_PORT; |
| 35 | #endif |