summaryrefslogtreecommitdiffstats
path: root/src/devices/bus/electron/cart/sndexp3.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/electron/cart/sndexp3.cpp')
-rw-r--r--src/devices/bus/electron/cart/sndexp3.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/devices/bus/electron/cart/sndexp3.cpp b/src/devices/bus/electron/cart/sndexp3.cpp
index 1bf32aa2fb4..afaf927e443 100644
--- a/src/devices/bus/electron/cart/sndexp3.cpp
+++ b/src/devices/bus/electron/cart/sndexp3.cpp
@@ -23,12 +23,13 @@ DEFINE_DEVICE_TYPE(ELECTRON_SNDEXP3, electron_sndexp3_device, "electron_sndexp3"
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(electron_sndexp3_device::device_add_mconfig)
+void electron_sndexp3_device::device_add_mconfig(machine_config &config)
+{
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("sn76489", SN76489, 16_MHz_XTAL / 4)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ SN76489(config, m_sn, DERIVED_CLOCK(1, 4));
+ m_sn->add_route(ALL_OUTPUTS, "mono", 1.0);
+}
//**************************************************************************
// LIVE DEVICE
@@ -61,11 +62,11 @@ void electron_sndexp3_device::device_start()
// read - cartridge data read
//-------------------------------------------------
-uint8_t electron_sndexp3_device::read(address_space &space, offs_t offset, int infc, int infd, int romqa)
+uint8_t electron_sndexp3_device::read(offs_t offset, int infc, int infd, int romqa, int oe, int oe2)
{
uint8_t data = 0xff;
- if (!infc && !infd && romqa)
+ if (oe && romqa)
{
if (offset < 0x2000)
{
@@ -84,7 +85,7 @@ uint8_t electron_sndexp3_device::read(address_space &space, offs_t offset, int i
// write - cartridge data write
//-------------------------------------------------
-void electron_sndexp3_device::write(address_space &space, offs_t offset, uint8_t data, int infc, int infd, int romqa)
+void electron_sndexp3_device::write(offs_t offset, uint8_t data, int infc, int infd, int romqa, int oe, int oe2)
{
if (infc)
{
@@ -102,8 +103,7 @@ void electron_sndexp3_device::write(address_space &space, offs_t offset, uint8_t
break;
}
}
-
- if (!infc && !infd && romqa)
+ else if (oe && romqa)
{
if (offset >= 0x2000)
{