diff options
Diffstat (limited to 'src/devices/bus/cbus/pc9801_amd98.cpp')
-rw-r--r-- | src/devices/bus/cbus/pc9801_amd98.cpp | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/src/devices/bus/cbus/pc9801_amd98.cpp b/src/devices/bus/cbus/pc9801_amd98.cpp index f6114cb2dc7..f7207aabd21 100644 --- a/src/devices/bus/cbus/pc9801_amd98.cpp +++ b/src/devices/bus/cbus/pc9801_amd98.cpp @@ -43,23 +43,24 @@ DEFINE_DEVICE_TYPE(PC9801_AMD98, pc9801_amd98_device, "pc9801_amd98", "pc9801_am // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(pc9801_amd98_device::device_add_mconfig) +void pc9801_amd98_device::device_add_mconfig(machine_config &config) +{ SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - MCFG_DEVICE_ADD("ay1", AY8910, 1'996'800) - MCFG_AY8910_PORT_A_READ_CB(IOPORT("OPN_PA1")) - MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(*this, pc9801_amd98_device,ay3_address_w)) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50) - - MCFG_DEVICE_ADD("ay2", AY8910, 1'996'800) - MCFG_AY8910_PORT_A_READ_CB(IOPORT("OPN_PA2")) - MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(*this, pc9801_amd98_device,ay3_data_latch_w)) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50) - - MCFG_DEVICE_ADD("ay3", AY8910, 1'996'800) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.25) -MACHINE_CONFIG_END + AY8910(config, m_ay1, 1'996'800); + m_ay1->port_a_read_callback().set_ioport("OPN_PA1"); + m_ay1->port_b_write_callback().set(FUNC(pc9801_amd98_device::ay3_address_w)); + m_ay1->add_route(ALL_OUTPUTS, "lspeaker", 0.50); + + AY8910(config, m_ay2, 1'996'800); + m_ay2->port_a_read_callback().set_ioport("OPN_PA2"); + m_ay2->port_b_write_callback().set(FUNC(pc9801_amd98_device::ay3_data_latch_w)); + m_ay2->add_route(ALL_OUTPUTS, "rspeaker", 0.50); + + AY8910(config, m_ay3, 1'996'800); + m_ay3->add_route(ALL_OUTPUTS, "lspeaker", 0.25); + m_ay3->add_route(ALL_OUTPUTS, "rspeaker", 0.25); +} static INPUT_PORTS_START( pc9801_amd98 ) PORT_START("OPN_PA1") |