diff options
author | 2019-03-25 23:13:40 +0100 | |
---|---|---|
committer | 2019-03-25 23:13:40 +0100 | |
commit | b380514764cf857469bae61c11143a19f79a74c5 (patch) | |
tree | 63c8012e262618f08a332da31dd714281aa2c5ed /src/devices/bus/x68k/x68k_midi.cpp | |
parent | c24473ddff715ecec2e258a6eb38960cf8c8e98e (diff) |
Revert "conflict resolution (nw)"
This reverts commit c24473ddff715ecec2e258a6eb38960cf8c8e98e, reversing
changes made to 009cba4fb8102102168ef32870892438327f3705.
Diffstat (limited to 'src/devices/bus/x68k/x68k_midi.cpp')
-rw-r--r-- | src/devices/bus/x68k/x68k_midi.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/devices/bus/x68k/x68k_midi.cpp b/src/devices/bus/x68k/x68k_midi.cpp index abcc0b34955..b4f27554b70 100644 --- a/src/devices/bus/x68k/x68k_midi.cpp +++ b/src/devices/bus/x68k/x68k_midi.cpp @@ -1,7 +1,7 @@ // license:BSD-3-Clause // copyright-holders:Barry Rodewald /* - * x68k_midi.cpp + * x68k_midi.c * * X68000 MIDI interface - YM3802 * @@ -17,16 +17,16 @@ DEFINE_DEVICE_TYPE(X68K_MIDI, x68k_midi_device, "x68k_midi", "X68000 MIDI Interface") -void x68k_midi_device::device_add_mconfig(machine_config &config) -{ +MACHINE_CONFIG_START(x68k_midi_device::device_add_mconfig) YM3802(config, m_midi, XTAL(1'000'000)); // clock is unknown m_midi->txd_handler().set("mdout", FUNC(midi_port_device::write_txd)); m_midi->irq_handler().set(FUNC(x68k_midi_device::irq_w)); - MIDI_PORT(config, "mdin", midiin_slot, "midiin"); - MIDI_PORT(config, "mdout", midiout_slot, "midiout"); -// MIDI_PORT(config, "mdthru", midiout_slot, "midiout"); + MCFG_MIDI_PORT_ADD("mdin", midiin_slot, "midiin") + MCFG_MIDI_PORT_ADD("mdout", midiout_slot, "midiout") +// MCFG_MIDI_PORT_ADD("mdthru", midiout_slot, "midiout") // TODO: Add serial data handlers -} + +MACHINE_CONFIG_END x68k_midi_device::x68k_midi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) @@ -39,8 +39,10 @@ x68k_midi_device::x68k_midi_device(const machine_config &mconfig, const char *ta void x68k_midi_device::device_start() { + device_t* cpu = machine().device("maincpu"); + address_space& space = cpu->memory().space(AS_PROGRAM); m_slot = dynamic_cast<x68k_expansion_slot_device *>(owner()); - m_slot->space().install_readwrite_handler(0xeafa00,0xeafa0f,read8_delegate(FUNC(x68k_midi_device::x68k_midi_reg_r),this),write8_delegate(FUNC(x68k_midi_device::x68k_midi_reg_w),this),0x00ff00ff); + space.install_readwrite_handler(0xeafa00,0xeafa0f,read8_delegate(FUNC(x68k_midi_device::x68k_midi_reg_r),this),write8_delegate(FUNC(x68k_midi_device::x68k_midi_reg_w),this),0x00ff00ff); } void x68k_midi_device::device_reset() |