mirror of
https://github.com/holub/mame
synced 2025-06-07 13:23:50 +03:00
plg150-ap: Added
This commit is contained in:
parent
22dc01243f
commit
295b00c0e6
@ -5540,14 +5540,16 @@ end
|
||||
|
||||
---------------------------------------------------
|
||||
--
|
||||
--@src/devices/bus/plg100/plg100.h,BUSES["PLG100"] = true
|
||||
--@src/devices/bus/plg1x0/plg1x0.h,BUSES["PLG1X0"] = true
|
||||
---------------------------------------------------
|
||||
|
||||
if (BUSES["PLG100"]~=null) then
|
||||
if (BUSES["PLG1X0"]~=null) then
|
||||
files {
|
||||
MAME_DIR .. "src/devices/bus/plg100/plg100.cpp",
|
||||
MAME_DIR .. "src/devices/bus/plg100/plg100.h",
|
||||
MAME_DIR .. "src/devices/bus/plg100/vl.cpp",
|
||||
MAME_DIR .. "src/devices/bus/plg100/vl.h",
|
||||
MAME_DIR .. "src/devices/bus/plg1x0/plg1x0.cpp",
|
||||
MAME_DIR .. "src/devices/bus/plg1x0/plg1x0.h",
|
||||
MAME_DIR .. "src/devices/bus/plg1x0/plg100-vl.cpp",
|
||||
MAME_DIR .. "src/devices/bus/plg1x0/plg100-vl.h",
|
||||
MAME_DIR .. "src/devices/bus/plg1x0/plg150-ap.cpp",
|
||||
MAME_DIR .. "src/devices/bus/plg1x0/plg150-ap.h",
|
||||
}
|
||||
end
|
||||
|
@ -1,49 +0,0 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Olivier Galibert
|
||||
|
||||
#include "emu.h"
|
||||
#include "plg100.h"
|
||||
|
||||
#include "vl.h"
|
||||
|
||||
DEFINE_DEVICE_TYPE(PLG100_CONNECTOR, plg100_connector, "plg100_connector", "PLG100 extension connector")
|
||||
|
||||
plg100_connector::plg100_connector(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
|
||||
device_t(mconfig, PLG100_CONNECTOR, tag, owner, clock),
|
||||
device_single_card_slot_interface<device_plg100_interface>(mconfig, *this),
|
||||
device_mixer_interface(mconfig, *this, 2),
|
||||
m_midi_tx(*this)
|
||||
{
|
||||
}
|
||||
|
||||
void plg100_connector::device_start()
|
||||
{
|
||||
save_item(NAME(m_state_system_is_annoying));
|
||||
}
|
||||
|
||||
void plg100_connector::midi_rx(int state)
|
||||
{
|
||||
auto card = get_card_device();
|
||||
if(card)
|
||||
card->midi_rx(state);
|
||||
}
|
||||
|
||||
void plg100_intf(device_slot_interface &device)
|
||||
{
|
||||
device.option_add("vl", PLG100_VL);
|
||||
}
|
||||
|
||||
device_plg100_interface::device_plg100_interface(const machine_config &mconfig, device_t &device) :
|
||||
device_interface(device, "plg100"),
|
||||
m_connector(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
device_plg100_interface::~device_plg100_interface()
|
||||
{
|
||||
}
|
||||
|
||||
void device_plg100_interface::interface_pre_start()
|
||||
{
|
||||
m_connector = downcast<plg100_connector *>(device().owner());
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Olivier Galibert
|
||||
|
||||
#ifndef MAME_BUS_PLG100_VL_H
|
||||
#define MAME_BUS_PLG100_VL_H
|
||||
|
||||
// Yamaha PLG100-VL
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "plg100.h"
|
||||
|
||||
DECLARE_DEVICE_TYPE(PLG100_VL, device_plg100_interface)
|
||||
|
||||
#endif // MAME_BUS_PLG100_VL_H
|
@ -8,14 +8,14 @@
|
||||
// Build around a h8 for the control and a dsp-v for the synthesis
|
||||
|
||||
#include "emu.h"
|
||||
#include "vl.h"
|
||||
#include "plg100-vl.h"
|
||||
|
||||
#include "cpu/h8/h83002.h"
|
||||
#include "sound/dspv.h"
|
||||
|
||||
namespace {
|
||||
|
||||
class plg100_vl_device : public device_t, public device_plg100_interface
|
||||
class plg100_vl_device : public device_t, public device_plg1x0_interface
|
||||
{
|
||||
public:
|
||||
plg100_vl_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
|
||||
@ -38,7 +38,7 @@ private:
|
||||
|
||||
plg100_vl_device::plg100_vl_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
|
||||
device_t(mconfig, PLG100_VL, tag, owner, clock),
|
||||
device_plg100_interface(mconfig, *this),
|
||||
device_plg1x0_interface(mconfig, *this),
|
||||
m_cpu(*this, "cpu"),
|
||||
m_dspv(*this, "dspv")
|
||||
{
|
||||
@ -93,4 +93,4 @@ const tiny_rom_entry *plg100_vl_device::device_rom_region() const
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
DEFINE_DEVICE_TYPE_PRIVATE(PLG100_VL, device_plg100_interface, plg100_vl_device, "plg100_vl", "Yamaha PLG100-VL")
|
||||
DEFINE_DEVICE_TYPE_PRIVATE(PLG100_VL, device_plg1x0_interface, plg100_vl_device, "plg100_vl", "Yamaha PLG100-VL")
|
15
src/devices/bus/plg1x0/plg100-vl.h
Normal file
15
src/devices/bus/plg1x0/plg100-vl.h
Normal file
@ -0,0 +1,15 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Olivier Galibert
|
||||
|
||||
#ifndef MAME_BUS_PLG1X0_PLG100VL_H
|
||||
#define MAME_BUS_PLG1X0_PLG100VL_H
|
||||
|
||||
// Yamaha PLG100-VL
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "plg1x0.h"
|
||||
|
||||
DECLARE_DEVICE_TYPE(PLG100_VL, device_plg1x0_interface)
|
||||
|
||||
#endif // MAME_BUS_PLG1X0_PLG100_VL_H
|
89
src/devices/bus/plg1x0/plg150-ap.cpp
Normal file
89
src/devices/bus/plg1x0/plg150-ap.cpp
Normal file
@ -0,0 +1,89 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders: Olivier Galibert
|
||||
|
||||
// Yamaha PLG150-AP
|
||||
|
||||
// Acoustic Piano, a plugin dedicated to a high-quality piano sound
|
||||
|
||||
// Dual SWX00
|
||||
|
||||
#include "emu.h"
|
||||
#include "plg150-ap.h"
|
||||
|
||||
#include "cpu/h8/swx00.h"
|
||||
|
||||
namespace {
|
||||
|
||||
class plg150_ap_device : public device_t, public device_plg1x0_interface
|
||||
{
|
||||
public:
|
||||
plg150_ap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
|
||||
virtual ~plg150_ap_device();
|
||||
|
||||
virtual void midi_rx(int state) override;
|
||||
|
||||
protected:
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
const tiny_rom_entry *device_rom_region() const override;
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
|
||||
private:
|
||||
required_device<swx00_device> m_cpu;
|
||||
|
||||
void map(address_map &map);
|
||||
};
|
||||
|
||||
plg150_ap_device::plg150_ap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
|
||||
device_t(mconfig, PLG150_AP, tag, owner, clock),
|
||||
device_plg1x0_interface(mconfig, *this),
|
||||
m_cpu(*this, "cpu")
|
||||
{
|
||||
}
|
||||
|
||||
plg150_ap_device::~plg150_ap_device()
|
||||
{
|
||||
}
|
||||
|
||||
void plg150_ap_device::midi_rx(int state)
|
||||
{
|
||||
m_cpu->sci_rx_w<1>(state);
|
||||
}
|
||||
|
||||
void plg150_ap_device::map(address_map &map)
|
||||
{
|
||||
map(0x000000, 0x07ffff).rom().region("cpu", 0);
|
||||
}
|
||||
|
||||
void plg150_ap_device::device_add_mconfig(machine_config &config)
|
||||
{
|
||||
SWX00(config, m_cpu, 8.4672_MHz_XTAL, 1);
|
||||
m_cpu->set_addrmap(AS_PROGRAM, &plg150_ap_device::map);
|
||||
m_cpu->write_sci_tx<1>().set([this] (int state) { m_connector->do_midi_tx(state); });
|
||||
}
|
||||
|
||||
ROM_START( plg150_ap )
|
||||
ROM_REGION( 0x80000, "cpu", 0 )
|
||||
ROM_LOAD16_WORD_SWAP( "x5757b0.ic03", 0x00000, 0x80000, CRC(5383b363) SHA1(b8e8e0673439c80dc9aecd6638f1c20454c82080) )
|
||||
|
||||
ROM_REGION( 0x1000000, "swx00", 0 )
|
||||
ROM_LOAD( "x575810.ic09", 0x000000, 0x800000, CRC(273b4574) SHA1(b33d67f7fe3a020c19133cc52bd6a228227941c5) )
|
||||
ROM_LOAD( "x575910.ic11", 0x800000, 0x800000, CRC(32a37ef3) SHA1(c0b5dfb1fbb5a3ddd33e6303039fbc197478abd2) )
|
||||
ROM_END
|
||||
|
||||
void plg150_ap_device::device_start()
|
||||
{
|
||||
}
|
||||
|
||||
void plg150_ap_device::device_reset()
|
||||
{
|
||||
}
|
||||
|
||||
const tiny_rom_entry *plg150_ap_device::device_rom_region() const
|
||||
{
|
||||
return ROM_NAME(plg150_ap);
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
DEFINE_DEVICE_TYPE_PRIVATE(PLG150_AP, device_plg1x0_interface, plg150_ap_device, "plg150_ap", "Yamaha PLG150-AP")
|
15
src/devices/bus/plg1x0/plg150-ap.h
Normal file
15
src/devices/bus/plg1x0/plg150-ap.h
Normal file
@ -0,0 +1,15 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Olivier Galibert
|
||||
|
||||
#ifndef MAME_BUS_PLG1X0_PLG150AP_H
|
||||
#define MAME_BUS_PLG1X0_PLG150AP_H
|
||||
|
||||
// Yamaha PLG150-AP
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "plg1x0.h"
|
||||
|
||||
DECLARE_DEVICE_TYPE(PLG150_AP, device_plg1x0_interface)
|
||||
|
||||
#endif // MAME_BUS_PLG1X0_PLG150_AP_H
|
51
src/devices/bus/plg1x0/plg1x0.cpp
Normal file
51
src/devices/bus/plg1x0/plg1x0.cpp
Normal file
@ -0,0 +1,51 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Olivier Galibert
|
||||
|
||||
#include "emu.h"
|
||||
#include "plg1x0.h"
|
||||
|
||||
#include "plg100-vl.h"
|
||||
#include "plg150-ap.h"
|
||||
|
||||
DEFINE_DEVICE_TYPE(PLG1X0_CONNECTOR, plg1x0_connector, "plg1x0_connector", "PLG1x0 extension connector")
|
||||
|
||||
plg1x0_connector::plg1x0_connector(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
|
||||
device_t(mconfig, PLG1X0_CONNECTOR, tag, owner, clock),
|
||||
device_single_card_slot_interface<device_plg1x0_interface>(mconfig, *this),
|
||||
device_mixer_interface(mconfig, *this, 2),
|
||||
m_midi_tx(*this)
|
||||
{
|
||||
}
|
||||
|
||||
void plg1x0_connector::device_start()
|
||||
{
|
||||
save_item(NAME(m_state_system_is_annoying));
|
||||
}
|
||||
|
||||
void plg1x0_connector::midi_rx(int state)
|
||||
{
|
||||
auto card = get_card_device();
|
||||
if(card)
|
||||
card->midi_rx(state);
|
||||
}
|
||||
|
||||
void plg1x0_intf(device_slot_interface &device)
|
||||
{
|
||||
device.option_add("plg100-vl", PLG100_VL);
|
||||
device.option_add("plg150-ap", PLG150_AP);
|
||||
}
|
||||
|
||||
device_plg1x0_interface::device_plg1x0_interface(const machine_config &mconfig, device_t &device) :
|
||||
device_interface(device, "plg1x0"),
|
||||
m_connector(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
device_plg1x0_interface::~device_plg1x0_interface()
|
||||
{
|
||||
}
|
||||
|
||||
void device_plg1x0_interface::interface_pre_start()
|
||||
{
|
||||
m_connector = downcast<plg1x0_connector *>(device().owner());
|
||||
}
|
@ -5,6 +5,9 @@
|
||||
// MU series of expanders. It mostly provides two midi-rate (and midi
|
||||
// protocol) serial lines (in and out) and two stereo serial sample
|
||||
// streams (in and out too).
|
||||
//
|
||||
// The PLG150 series, the successor, seems essentially compatible.
|
||||
// The main difference is (in some cases) nvram to save settings.
|
||||
|
||||
// Known existing cards:
|
||||
// PLG100-DX: DX7 as a plugin
|
||||
@ -12,20 +15,29 @@
|
||||
// PLG100-VH: Voice Harmonizer, harmony effects on the A/D inputs
|
||||
// PLG100-VL: Virtual Acoustic Synthesis, physical-modelling synthesis, a VL70-m on a plugin card
|
||||
// PLG100-XG: MU50 as a plugin
|
||||
//
|
||||
// PLG150-AN: Analog Physical Modeling
|
||||
// PLG150-AP: Acoustic Piano
|
||||
// PLG150-DR: Drums
|
||||
// PLG150-DX: DX7 as a plugin
|
||||
// PLG150-PC: Latin drums
|
||||
// PLG150-PF: Piano
|
||||
// PLG150-VL: Virtual Acoustic Synthesis
|
||||
|
||||
#ifndef MAME_BUS_PLG100_PLG100_H
|
||||
#define MAME_BUS_PLG100_PLG100_H
|
||||
|
||||
#ifndef MAME_BUS_PLG1X0_PLG1X0_H
|
||||
#define MAME_BUS_PLG1X0_PLG1X0_H
|
||||
|
||||
#pragma once
|
||||
|
||||
class device_plg100_interface;
|
||||
class device_plg1x0_interface;
|
||||
|
||||
class plg100_connector: public device_t, public device_single_card_slot_interface<device_plg100_interface>, public device_mixer_interface
|
||||
class plg1x0_connector: public device_t, public device_single_card_slot_interface<device_plg1x0_interface>, public device_mixer_interface
|
||||
{
|
||||
public:
|
||||
template <typename T>
|
||||
plg100_connector(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt)
|
||||
: plg100_connector(mconfig, tag, owner, (uint32_t)0)
|
||||
plg1x0_connector(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt)
|
||||
: plg1x0_connector(mconfig, tag, owner, (uint32_t)0)
|
||||
{
|
||||
option_reset();
|
||||
opts(*this);
|
||||
@ -33,7 +45,7 @@ public:
|
||||
set_fixed(false);
|
||||
}
|
||||
|
||||
plg100_connector(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
plg1x0_connector(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
void midi_rx(int state);
|
||||
auto midi_tx() { return m_midi_tx.bind(); }
|
||||
@ -47,24 +59,24 @@ protected:
|
||||
virtual void device_start() override;
|
||||
};
|
||||
|
||||
class device_plg100_interface: public device_interface
|
||||
class device_plg1x0_interface: public device_interface
|
||||
{
|
||||
public:
|
||||
virtual ~device_plg100_interface();
|
||||
virtual ~device_plg1x0_interface();
|
||||
|
||||
virtual void midi_rx(int state) = 0;
|
||||
|
||||
protected:
|
||||
plg100_connector *m_connector;
|
||||
plg1x0_connector *m_connector;
|
||||
|
||||
device_plg100_interface(const machine_config &mconfig, device_t &device);
|
||||
device_plg1x0_interface(const machine_config &mconfig, device_t &device);
|
||||
|
||||
virtual void interface_pre_start() override;
|
||||
};
|
||||
|
||||
DECLARE_DEVICE_TYPE(PLG100_CONNECTOR, plg100_connector)
|
||||
DECLARE_DEVICE_TYPE(PLG1X0_CONNECTOR, plg1x0_connector)
|
||||
|
||||
void plg100_intf(device_slot_interface &device);
|
||||
void plg1x0_intf(device_slot_interface &device);
|
||||
|
||||
#endif // MAME_BUS_PLG100_PLG100_H
|
||||
#endif // MAME_BUS_PLG1X0_PLG1X0_H
|
||||
|
@ -127,7 +127,7 @@
|
||||
#include "cpu/h8/h8s2655.h"
|
||||
#include "mulcd.h"
|
||||
#include "sound/swp30.h"
|
||||
#include "bus/plg100/plg100.h"
|
||||
#include "bus/plg1x0/plg1x0.h"
|
||||
|
||||
#include "debugger.h"
|
||||
#include "speaker.h"
|
||||
@ -185,8 +185,8 @@ protected:
|
||||
required_device<h8s2655_device> m_maincpu;
|
||||
required_device<swp30_device> m_swp30;
|
||||
required_device<mulcd_device> m_lcd;
|
||||
required_device<plg100_connector> m_ext1;
|
||||
optional_device<plg100_connector> m_ext2;
|
||||
required_device<plg1x0_connector> m_ext1;
|
||||
optional_device<plg1x0_connector> m_ext2;
|
||||
required_ioport m_ioport_p7;
|
||||
required_ioport m_ioport_p8;
|
||||
|
||||
@ -473,7 +473,7 @@ void mu100_state::mu100(machine_config &config)
|
||||
|
||||
MULCD(config, m_lcd);
|
||||
|
||||
PLG100_CONNECTOR(config, m_ext1, plg100_intf, "vl");
|
||||
PLG1X0_CONNECTOR(config, m_ext1, plg1x0_intf, nullptr);
|
||||
m_ext1->midi_tx().set(FUNC(mu100_state::e1_tx));
|
||||
|
||||
SPEAKER(config, "lspeaker").front_left();
|
||||
@ -501,7 +501,7 @@ void mu100r_state::mu100r(machine_config &config)
|
||||
{
|
||||
mu100(config);
|
||||
|
||||
PLG100_CONNECTOR(config, m_ext2, plg100_intf, nullptr);
|
||||
PLG1X0_CONNECTOR(config, m_ext2, plg1x0_intf, nullptr);
|
||||
m_ext2->midi_tx().set(FUNC(mu100r_state::e2_tx));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user