summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/cbus/pc9801_26.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/cbus/pc9801_26.cpp')
-rw-r--r--src/devices/bus/cbus/pc9801_26.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/devices/bus/cbus/pc9801_26.cpp b/src/devices/bus/cbus/pc9801_26.cpp
index 729e173bec3..41141476483 100644
--- a/src/devices/bus/cbus/pc9801_26.cpp
+++ b/src/devices/bus/cbus/pc9801_26.cpp
@@ -36,16 +36,17 @@ WRITE_LINE_MEMBER(pc9801_26_device::sound_irq)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(pc9801_26_device::device_add_mconfig)
+void pc9801_26_device::device_add_mconfig(machine_config &config)
+{
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("opn", YM2203, 15.9744_MHz_XTAL / 4) // divider not verified
- MCFG_YM2203_IRQ_HANDLER(WRITELINE(*this, pc9801_26_device, sound_irq))
- MCFG_AY8910_PORT_A_READ_CB(READ8(*this, pc9801_26_device, opn_porta_r))
- //MCFG_AY8910_PORT_B_READ_CB(READ8(*this, pc9801_state, opn_portb_r))
- //MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(*this, pc9801_state, opn_porta_w))
- MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(*this, pc9801_26_device, opn_portb_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
-MACHINE_CONFIG_END
+ YM2203(config, m_opn, 15.9744_MHz_XTAL / 4); // divider not verified
+ m_opn->irq_handler().set(FUNC(pc9801_26_device::sound_irq));
+ m_opn->port_a_read_callback().set(FUNC(pc9801_26_device::opn_porta_r));
+ //m_opn->port_b_read_callback().set(FUNC(pc8801_state::opn_portb_r));
+ //m_opn->port_a_write_callback().set(FUNC(pc8801_state::opn_porta_w));
+ m_opn->port_b_write_callback().set(FUNC(pc9801_26_device::opn_portb_w));
+ m_opn->add_route(ALL_OUTPUTS, "mono", 1.00);
+}
// to load a different bios for slots:
// -cbus0 pc9801_26,bios=N