summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/sg1000_exp/fm_unit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/sg1000_exp/fm_unit.cpp')
-rw-r--r--src/devices/bus/sg1000_exp/fm_unit.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/devices/bus/sg1000_exp/fm_unit.cpp b/src/devices/bus/sg1000_exp/fm_unit.cpp
index ab759994f30..a7bdc4bcc5d 100644
--- a/src/devices/bus/sg1000_exp/fm_unit.cpp
+++ b/src/devices/bus/sg1000_exp/fm_unit.cpp
@@ -50,12 +50,13 @@ SMS version is not playing PSG sound on his Mark III with the FM unit.
DEFINE_DEVICE_TYPE(SEGA_FM_UNIT, sega_fm_unit_device, "sega_fm_unit", "SG-1000 FM Sound Unit")
-MACHINE_CONFIG_START(sega_fm_unit_device::device_add_mconfig)
- MCFG_DEVICE_ADD("ym2413", YM2413, XTAL(10'738'635)/3)
+void sega_fm_unit_device::device_add_mconfig(machine_config &config)
+{
+ YM2413(config, m_ym, XTAL(10'738'635)/3);
// if this output gain is changed, the gain set when unmute the output need
// to be changed too, probably along the gain set for SMSJ/SMSKRFM drivers.
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, ":mono", 1.00)
-MACHINE_CONFIG_END
+ m_ym->add_route(ALL_OUTPUTS, ":mono", 1.00);
+}
//**************************************************************************
@@ -122,10 +123,10 @@ WRITE8_MEMBER(sega_fm_unit_device::peripheral_w)
switch (offset)
{
case 0: // register port
- m_ym->write(space, 0, data & 0x3f);
+ m_ym->write(0, data & 0x3f);
break;
case 1: // data port
- m_ym->write(space, 1, data);
+ m_ym->write(1, data);
break;
case 2: // control port
case 3: // mirror