mirror of
https://github.com/holub/mame
synced 2025-05-06 06:14:45 +03:00
(MESS) msx.c: Added MIDI ports to the NMS1205 music module; haven't been able to test them yet. (nw)
This commit is contained in:
parent
bd38d76c55
commit
c6395e985d
@ -32,7 +32,7 @@ The keyboards:
|
|||||||
|
|
||||||
|
|
||||||
TODO:
|
TODO:
|
||||||
- Implement MIDI in/out/through
|
- Test MIDI in/out/through
|
||||||
- Sample RAM
|
- Sample RAM
|
||||||
- Implement NMS-1160 keyboard
|
- Implement NMS-1160 keyboard
|
||||||
- HX-MU901: ENTER/SELECT keys and multi sensors
|
- HX-MU901: ENTER/SELECT keys and multi sensors
|
||||||
@ -112,6 +112,8 @@ msx_cart_msx_audio_nms1205::msx_cart_msx_audio_nms1205(const machine_config &mco
|
|||||||
, msx_cart_interface(mconfig, *this)
|
, msx_cart_interface(mconfig, *this)
|
||||||
, m_y8950(*this, "y8950")
|
, m_y8950(*this, "y8950")
|
||||||
, m_acia6850(*this, "acia6850")
|
, m_acia6850(*this, "acia6850")
|
||||||
|
, m_mdout(*this, "mdout")
|
||||||
|
, m_mdthru(*this, "mdthru")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -128,6 +130,14 @@ static MACHINE_CONFIG_FRAGMENT( msx_audio_nms1205 )
|
|||||||
|
|
||||||
// There is a 2 MHz crystal on the PCB, the 6850 TX and RX clocks are derived from it
|
// There is a 2 MHz crystal on the PCB, the 6850 TX and RX clocks are derived from it
|
||||||
MCFG_DEVICE_ADD("acia6850", ACIA6850, 0)
|
MCFG_DEVICE_ADD("acia6850", ACIA6850, 0)
|
||||||
|
MCFG_ACIA6850_TXD_HANDLER(DEVWRITELINE("mdout", midi_port_device, write_txd))
|
||||||
|
|
||||||
|
MCFG_MIDI_PORT_ADD("mdin", midiin_slot, "midiin")
|
||||||
|
MCFG_MIDI_RX_HANDLER(WRITELINE(msx_cart_msx_audio_nms1205, midi_in))
|
||||||
|
|
||||||
|
MCFG_MIDI_PORT_ADD("mdthru", midiout_slot, "midiout")
|
||||||
|
|
||||||
|
MCFG_MIDI_PORT_ADD("mdout", midiout_slot, "midiout")
|
||||||
MACHINE_CONFIG_END
|
MACHINE_CONFIG_END
|
||||||
|
|
||||||
|
|
||||||
@ -148,12 +158,24 @@ const rom_entry *msx_cart_msx_audio_nms1205::device_rom_region() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
WRITE_LINE_MEMBER(msx_cart_msx_audio_nms1205::midi_in)
|
||||||
|
{
|
||||||
|
// MIDI in signals is sent to both the 6850 and the MIDI thru output port
|
||||||
|
m_acia6850->write_rxd(state);
|
||||||
|
m_mdthru->write_txd(state);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void msx_cart_msx_audio_nms1205::device_start()
|
void msx_cart_msx_audio_nms1205::device_start()
|
||||||
{
|
{
|
||||||
// Install IO read/write handlers
|
// Install IO read/write handlers
|
||||||
address_space &space = machine().device<cpu_device>("maincpu")->space(AS_IO);
|
address_space &space = machine().device<cpu_device>("maincpu")->space(AS_IO);
|
||||||
space.install_write_handler(0xc0, 0xc1, write8_delegate(FUNC(y8950_device::write), m_y8950.target()));
|
space.install_write_handler(0xc0, 0xc1, write8_delegate(FUNC(y8950_device::write), m_y8950.target()));
|
||||||
space.install_read_handler(0xc0, 0xc1, read8_delegate(FUNC(y8950_device::read), m_y8950.target()));
|
space.install_read_handler(0xc0, 0xc1, read8_delegate(FUNC(y8950_device::read), m_y8950.target()));
|
||||||
|
space.install_write_handler(0x00, 0x00, write8_delegate(FUNC(acia6850_device::control_w), m_acia6850.target()));
|
||||||
|
space.install_write_handler(0x01, 0x01, write8_delegate(FUNC(acia6850_device::data_w), m_acia6850.target()));
|
||||||
|
space.install_read_handler(0x04,0x04, read8_delegate(FUNC(acia6850_device::status_r), m_acia6850.target()));
|
||||||
|
space.install_read_handler(0x05,0x05, read8_delegate(FUNC(acia6850_device::data_r), m_acia6850.target()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include "bus/msx_cart/cartridge.h"
|
#include "bus/msx_cart/cartridge.h"
|
||||||
#include "sound/8950intf.h"
|
#include "sound/8950intf.h"
|
||||||
#include "machine/6850acia.h"
|
#include "machine/6850acia.h"
|
||||||
|
#include "bus/midi/midi.h"
|
||||||
|
|
||||||
|
|
||||||
extern const device_type MSX_CART_MSX_AUDIO_NMS1205;
|
extern const device_type MSX_CART_MSX_AUDIO_NMS1205;
|
||||||
@ -45,9 +46,13 @@ public:
|
|||||||
|
|
||||||
virtual DECLARE_READ8_MEMBER(read_cart);
|
virtual DECLARE_READ8_MEMBER(read_cart);
|
||||||
|
|
||||||
|
DECLARE_WRITE_LINE_MEMBER(midi_in);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
required_device<y8950_device> m_y8950;
|
required_device<y8950_device> m_y8950;
|
||||||
required_device<acia6850_device> m_acia6850;
|
required_device<acia6850_device> m_acia6850;
|
||||||
|
required_device<midi_port_device> m_mdout;
|
||||||
|
required_device<midi_port_device> m_mdthru;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user