summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/electron/cart/sndexp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/electron/cart/sndexp.cpp')
-rw-r--r--src/devices/bus/electron/cart/sndexp.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/devices/bus/electron/cart/sndexp.cpp b/src/devices/bus/electron/cart/sndexp.cpp
index de0c7704020..4ba27cb4825 100644
--- a/src/devices/bus/electron/cart/sndexp.cpp
+++ b/src/devices/bus/electron/cart/sndexp.cpp
@@ -27,11 +27,13 @@ DEFINE_DEVICE_TYPE(ELECTRON_SNDEXP, electron_sndexp_device, "electron_sndexp", "
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(electron_sndexp_device::device_add_mconfig)
+void electron_sndexp_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);
+}
//-------------------------------------------------
// INPUT_PORTS( sndexp )
@@ -87,11 +89,11 @@ void electron_sndexp_device::device_start()
// read - cartridge data read
//-------------------------------------------------
-uint8_t electron_sndexp_device::read(address_space &space, offs_t offset, int infc, int infd, int romqa)
+uint8_t electron_sndexp_device::read(offs_t offset, int infc, int infd, int romqa, int oe, int oe2)
{
uint8_t data = 0xff;
- if (!infc && !infd)
+ if (oe)
{
if (m_jumper->read())
{
@@ -124,7 +126,7 @@ uint8_t electron_sndexp_device::read(address_space &space, offs_t offset, int in
// write - cartridge data write
//-------------------------------------------------
-void electron_sndexp_device::write(address_space &space, offs_t offset, uint8_t data, int infc, int infd, int romqa)
+void electron_sndexp_device::write(offs_t offset, uint8_t data, int infc, int infd, int romqa, int oe, int oe2)
{
if (infc)
{
@@ -142,8 +144,7 @@ void electron_sndexp_device::write(address_space &space, offs_t offset, uint8_t
break;
}
}
-
- if (!infc && !infd)
+ else if (oe)
{
if (m_jumper->read())
{