diff --git a/scripts/src/sound.lua b/scripts/src/sound.lua index 1d6bed6ddb1..eff666cd356 100644 --- a/scripts/src/sound.lua +++ b/scripts/src/sound.lua @@ -1536,6 +1536,18 @@ if (SOUNDS["SWP30"]~=null) then } end +--------------------------------------------------- +-- +--@src/devices/sound/mu100b.h,SOUNDS["MU100B"] = true +--------------------------------------------------- + +if (SOUNDS["MU100B"]~=null) then + files { + MAME_DIR .. "src/devices/sound/mu100b.cpp", + MAME_DIR .. "src/devices/sound/mu100b.h", + } +end + --------------------------------------------------- -- Roland sample players --@src/devices/sound/rolandpcm.h,SOUNDS["ROLANDPCM"] = true diff --git a/scripts/target/mame/arcade.lua b/scripts/target/mame/arcade.lua index 4e3ac6b2d58..1c4f68c9e73 100644 --- a/scripts/target/mame/arcade.lua +++ b/scripts/target/mame/arcade.lua @@ -293,6 +293,8 @@ SOUNDS["KS0164"] = true SOUNDS["TT5665"] = true --SOUNDS["RP2C33_SOUND"] = true --SOUNDS["UDA1344"] = true +SOUNDS["SWP30"] = true +SOUNDS["MU100B"] = true -------------------------------------------------- -- specify available video cores diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua index 79d6c8a5da3..20dd16c820e 100644 --- a/scripts/target/mame/mess.lua +++ b/scripts/target/mame/mess.lua @@ -314,6 +314,7 @@ SOUNDS["IOPSPU"] = true SOUNDS["SWP00"] = true SOUNDS["SWP20"] = true SOUNDS["SWP30"] = true +--SOUNDS["MU100B"] = true SOUNDS["S_DSP"] = true SOUNDS["ROLANDPCM"] = true --SOUNDS["TT5665"] = true diff --git a/src/devices/sound/mu100b.cpp b/src/devices/sound/mu100b.cpp new file mode 100644 index 00000000000..30fb9cf5514 --- /dev/null +++ b/src/devices/sound/mu100b.cpp @@ -0,0 +1,97 @@ +// license:BSD-3-Clause +// copyright-holders:R. Belmont, Olivier Galibert + +/************************************************************************************* + + Yamaha MU-100B : 32-voice polyphonic/multitimbral General MIDI/GS/XG tone modules + + Embedded version + +**************************************************************************************/ + +#include "emu.h" + +#include "mu100b.h" + +#include "bus/midi/midiinport.h" +#include "bus/midi/midioutport.h" + +DEFINE_DEVICE_TYPE(MU100B, mu100b_device, "mu100b_emb", "Yamaha MU100B synth (embedded version)") + +#define ROM_LOAD16_WORD_SWAP_BIOS(bios,name,offset,length,hash) \ + ROMX_LOAD(name, offset, length, hash, ROM_GROUPWORD | ROM_REVERSE | ROM_BIOS(bios)) + +ROM_START( mu100b ) + ROM_REGION( 0x200000, "maincpu", 0 ) + // MU-100B v1.08 (Nov. 28, 1997) + ROM_LOAD16_WORD_SWAP( "xu50710-m27c160.bin", 0x000000, 0x200000, CRC(4b10bd27) SHA1(12d7c6e1bce7974b34916e1bfa5057ab55867476) ) + + ROM_REGION( 0x1800000, "swp30", ROMREGION_ERASE00 ) + ROM_LOAD32_WORD( "sx518b0.ic34", 0x0000000, 0x400000, CRC(2550d44f) SHA1(fd3cce228c7d389a2fde25c808a5b26080588cba) ) + ROM_LOAD32_WORD( "sx743b0.ic35", 0x0000002, 0x400000, CRC(a9109a6c) SHA1(a67bb49378a38a2d809bd717d286e18bc6496db0) ) + ROM_LOAD32_WORD( "xt445a0-828.ic36", 0x0800000, 0x200000, CRC(225c2280) SHA1(23b5e046fd2e2ac01af3e6dc6357c5c6547b286b) ) + ROM_LOAD32_WORD( "xt461a0-829.ic37", 0x0800002, 0x200000, CRC(a1d138a3) SHA1(46a7a7225cd7e1818ba551325d2af5ac1bf5b2bf) ) + ROM_LOAD32_WORD( "xt462a0.ic39", 0x1000000, 0x400000, CRC(cbf037da) SHA1(37449e741243305de38cb913b17041942ad334cd) ) + ROM_LOAD32_WORD( "xt463a0.ic38", 0x1000002, 0x400000, CRC(cce5f8d3) SHA1(bdca8c5158f452f2b5535c7d658c9b22c6d66048) ) +ROM_END + +mu100b_device::mu100b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : device_t(mconfig, MU100B, tag, owner, clock) + , device_mixer_interface(mconfig, *this, 2) + , m_maincpu(*this, "maincpu") + , m_swp30(*this, "swp30") + , m_midi_serial(*this, "maincpu:sci1") +{ +} + +const tiny_rom_entry *mu100b_device::device_rom_region() const +{ + return ROM_NAME(mu100b); +} + +void mu100b_device::device_start() +{ +} + +void mu100b_device::device_reset() +{ +} + +void mu100b_device::mu100_map(address_map &map) +{ + map(0x000000, 0x1fffff).rom().region("maincpu", 0); + map(0x200000, 0x21ffff).ram(); // 128K work RAM + map(0x400000, 0x401fff).m(m_swp30, FUNC(swp30_device::map)); +} + +void mu100b_device::mu100_iomap(address_map &map) +{ + map(h8_device::ADC_0, h8_device::ADC_0).lr16(NAME([]() -> u16 { return 0; })); + map(h8_device::ADC_1, h8_device::ADC_1).lr16(NAME([]() -> u16 { return 0; })); + map(h8_device::ADC_2, h8_device::ADC_2).lr16(NAME([]() -> u16 { return 0; })); + map(h8_device::ADC_1, h8_device::ADC_3).lr16(NAME([]() -> u16 { return 0; })); + map(h8_device::ADC_4, h8_device::ADC_4).lr16(NAME([]() -> u16 { return 0; })); + map(h8_device::ADC_5, h8_device::ADC_5).lr16(NAME([]() -> u16 { return 0; })); + map(h8_device::ADC_6, h8_device::ADC_6).lr16(NAME([]() -> u16 { return 0x200; })); + map(h8_device::ADC_7, h8_device::ADC_7).lr16(NAME([]() -> u16 { return 0x200; })); +} + +void mu100b_device::swp30_map(address_map &map) +{ + map(0x000000*4, 0x200000*4-1).rom().region("swp30", 0).mirror(4*0x200000); + map(0x400000*4, 0x500000*4-1).rom().region("swp30", 0x800000).mirror(4*0x300000); + map(0x800000*4, 0xa00000*4-1).rom().region("swp30", 0x1000000).mirror(4*0x200000); +} + +void mu100b_device::device_add_mconfig(machine_config &config) +{ + H8S2655(config, m_maincpu, 16_MHz_XTAL); + m_maincpu->set_addrmap(AS_PROGRAM, &mu100b_device::mu100_map); + m_maincpu->set_addrmap(AS_IO, &mu100b_device::mu100_iomap); + + SWP30(config, m_swp30); + m_swp30->set_addrmap(0, &mu100b_device::swp30_map); + m_swp30->add_route(0, *this, 1.0, AUTO_ALLOC_INPUT, 0); + m_swp30->add_route(1, *this, 1.0, AUTO_ALLOC_INPUT, 1); +} + diff --git a/src/devices/sound/mu100b.h b/src/devices/sound/mu100b.h new file mode 100644 index 00000000000..1c0fd25abdd --- /dev/null +++ b/src/devices/sound/mu100b.h @@ -0,0 +1,43 @@ +// license:BSD-3-Clause +// copyright-holders:R. Belmont, Olivier Galibert + +/************************************************************************************* + + Yamaha MU-100B : 32-voice polyphonic/multitimbral General MIDI/GS/XG tone modules + + Embedded version + +**************************************************************************************/ + +#ifndef DEVICE_SOUND_MU100B_H +#define DEVICE_SOUND_MU100B_H + +#include "cpu/h8/h8s2655.h" +#include "sound/swp30.h" + +class mu100b_device : public device_t, public device_mixer_interface +{ +public: + mu100b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + + void midi_w(int state) { m_midi_serial->rx_w(state); } + +protected: + virtual void device_start() override; + virtual void device_reset() override; + virtual void device_add_mconfig(machine_config &config) override; + virtual const tiny_rom_entry *device_rom_region() const override; + +private: + required_device m_maincpu; + required_device m_swp30; + required_device m_midi_serial; + + void mu100_iomap(address_map &map); + void mu100_map(address_map &map); + void swp30_map(address_map &map); +}; + +DECLARE_DEVICE_TYPE(MU100B, mu100b_device) + +#endif diff --git a/src/mame/drivers/firebeat.cpp b/src/mame/drivers/firebeat.cpp index 32d26a77695..781cf5129f9 100644 --- a/src/mame/drivers/firebeat.cpp +++ b/src/mame/drivers/firebeat.cpp @@ -153,6 +153,7 @@ #include "machine/rtc65271.h" #include "machine/timer.h" #include "sound/cdda.h" +#include "sound/mu100b.h" #include "sound/rf5c400.h" #include "sound/ymz280b.h" #include "video/k057714.h" @@ -1878,6 +1879,12 @@ void firebeat_kbm_state::firebeat_kbm(machine_config &config) auto &midi_chan0(NS16550(config, "duart_midi:chan0", XTAL(24'000'000))); MIDI_KBD(config, m_kbd[1], 31250).tx_callback().set(midi_chan0, FUNC(ins8250_uart_device::rx_w)); midi_chan0.out_int_callback().set(FUNC(firebeat_kbm_state::midi_keyboard_right_irq_callback)); + + // Synth card + auto &mu100b(MU100B(config, "mu100b")); + midi_chan1.out_tx_callback().set(mu100b, FUNC(mu100b_device::midi_w)); + mu100b.add_route(0, "lspeaker", 1.0); + mu100b.add_route(1, "rspeaker", 1.0); } void firebeat_kbm_state::firebeat_kbm_map(address_map &map)