trunk/src/emu/bus/msx_cart/msx_audio.c
| r30640 | r30641 | |
| 32 | 32 | |
| 33 | 33 | |
| 34 | 34 | TODO: |
| 35 | | - Implement MIDI in/out/through |
| 35 | - Test MIDI in/out/through |
| 36 | 36 | - Sample RAM |
| 37 | 37 | - Implement NMS-1160 keyboard |
| 38 | 38 | - HX-MU901: ENTER/SELECT keys and multi sensors |
| r30640 | r30641 | |
| 112 | 112 | , msx_cart_interface(mconfig, *this) |
| 113 | 113 | , m_y8950(*this, "y8950") |
| 114 | 114 | , m_acia6850(*this, "acia6850") |
| 115 | , m_mdout(*this, "mdout") |
| 116 | , m_mdthru(*this, "mdthru") |
| 115 | 117 | { |
| 116 | 118 | } |
| 117 | 119 | |
| r30640 | r30641 | |
| 128 | 130 | |
| 129 | 131 | // There is a 2 MHz crystal on the PCB, the 6850 TX and RX clocks are derived from it |
| 130 | 132 | MCFG_DEVICE_ADD("acia6850", ACIA6850, 0) |
| 133 | MCFG_ACIA6850_TXD_HANDLER(DEVWRITELINE("mdout", midi_port_device, write_txd)) |
| 134 | |
| 135 | MCFG_MIDI_PORT_ADD("mdin", midiin_slot, "midiin") |
| 136 | MCFG_MIDI_RX_HANDLER(WRITELINE(msx_cart_msx_audio_nms1205, midi_in)) |
| 137 | |
| 138 | MCFG_MIDI_PORT_ADD("mdthru", midiout_slot, "midiout") |
| 139 | |
| 140 | MCFG_MIDI_PORT_ADD("mdout", midiout_slot, "midiout") |
| 131 | 141 | MACHINE_CONFIG_END |
| 132 | 142 | |
| 133 | 143 | |
| r30640 | r30641 | |
| 148 | 158 | } |
| 149 | 159 | |
| 150 | 160 | |
| 161 | WRITE_LINE_MEMBER(msx_cart_msx_audio_nms1205::midi_in) |
| 162 | { |
| 163 | // MIDI in signals is sent to both the 6850 and the MIDI thru output port |
| 164 | m_acia6850->write_rxd(state); |
| 165 | m_mdthru->write_txd(state); |
| 166 | } |
| 167 | |
| 168 | |
| 151 | 169 | void msx_cart_msx_audio_nms1205::device_start() |
| 152 | 170 | { |
| 153 | 171 | // Install IO read/write handlers |
| 154 | 172 | address_space &space = machine().device<cpu_device>("maincpu")->space(AS_IO); |
| 155 | 173 | space.install_write_handler(0xc0, 0xc1, write8_delegate(FUNC(y8950_device::write), m_y8950.target())); |
| 156 | 174 | space.install_read_handler(0xc0, 0xc1, read8_delegate(FUNC(y8950_device::read), m_y8950.target())); |
| 175 | space.install_write_handler(0x00, 0x00, write8_delegate(FUNC(acia6850_device::control_w), m_acia6850.target())); |
| 176 | space.install_write_handler(0x01, 0x01, write8_delegate(FUNC(acia6850_device::data_w), m_acia6850.target())); |
| 177 | space.install_read_handler(0x04,0x04, read8_delegate(FUNC(acia6850_device::status_r), m_acia6850.target())); |
| 178 | space.install_read_handler(0x05,0x05, read8_delegate(FUNC(acia6850_device::data_r), m_acia6850.target())); |
| 157 | 179 | } |
| 158 | 180 | |
| 159 | 181 | |
trunk/src/emu/bus/msx_cart/msx_audio.h
| r30640 | r30641 | |
| 4 | 4 | #include "bus/msx_cart/cartridge.h" |
| 5 | 5 | #include "sound/8950intf.h" |
| 6 | 6 | #include "machine/6850acia.h" |
| 7 | #include "bus/midi/midi.h" |
| 7 | 8 | |
| 8 | 9 | |
| 9 | 10 | extern const device_type MSX_CART_MSX_AUDIO_NMS1205; |
| r30640 | r30641 | |
| 45 | 46 | |
| 46 | 47 | virtual DECLARE_READ8_MEMBER(read_cart); |
| 47 | 48 | |
| 49 | DECLARE_WRITE_LINE_MEMBER(midi_in); |
| 50 | |
| 48 | 51 | private: |
| 49 | 52 | required_device<y8950_device> m_y8950; |
| 50 | 53 | required_device<acia6850_device> m_acia6850; |
| 54 | required_device<midi_port_device> m_mdout; |
| 55 | required_device<midi_port_device> m_mdthru; |
| 51 | 56 | }; |
| 52 | 57 | |
| 53 | 58 | |