summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/exterm.cpp
diff options
context:
space:
mode:
author smf- <smf-@users.noreply.github.com>2016-10-17 16:03:29 +0100
committer smf- <smf-@users.noreply.github.com>2016-10-17 16:04:02 +0100
commit36944269bd6fe1fb47822a2112c524b13c4b27f2 (patch)
treec1b29a760bb9a1e222a9390fbc34fe09d407ae91 /src/mame/drivers/exterm.cpp
parent8676fc0d8dd0c3ccf2925075d86338da099ce148 (diff)
DAC WIP, started documenting the DACs in use. [smf]
ataxx: Fixed missing sound channel caused by one dac not being hooked up and one dac being hooked up to two addresses. bestbest: Fixed high pitch screech caused by incorrect addressing (two dacs weren't hooked up and two were hooked up to two addresses). cchasm: Fixed static noise generation caused by feeding the same bit to both dacs. cheekyms: Slightly improved sound by implementing sound triggers as 8 x 1 bit dacs instead of 1 x 8 bit dac. galeb: Fixed sound by implementing it according to http://www.deltasoft.com.hr/retro/galebemu.htm & implemented enough of LOAD/SAVE to stop it hanging. hard drivin: (all games in driver) Improved 12 bit controls, although centre still goes out of sync. mea8000: Converted to a sound device. megaphx: Fixed noisy samples due to wrong format. microvsn: Fixed sound pitch caused by incorrect usage of write_signed8(). seicross: Changed to a 4 bit dac as samples are packed nibble. spaceg: Preliminary sound using space invaders samples. suna8: Changed to a 4 bit dac as samples are packed nibble. vcombat: Fixed static during machine gun fire due to incorrect dc offset removal. vectrex: Fixed noisy samples due to wrong format. wheelfir: Fixed sound, eeprom & analogue steering wheel and brake pedal.
Diffstat (limited to 'src/mame/drivers/exterm.cpp')
-rw-r--r--src/mame/drivers/exterm.cpp30
1 files changed, 13 insertions, 17 deletions
diff --git a/src/mame/drivers/exterm.cpp b/src/mame/drivers/exterm.cpp
index 0db0060e437..ec8dfdcc9fc 100644
--- a/src/mame/drivers/exterm.cpp
+++ b/src/mame/drivers/exterm.cpp
@@ -63,13 +63,13 @@
****************************************************************************/
#include "emu.h"
-#include "cpu/tms34010/tms34010.h"
+#include "includes/exterm.h"
#include "cpu/m6502/m6502.h"
-#include "sound/dac.h"
-#include "sound/ym2151.h"
#include "machine/nvram.h"
#include "machine/watchdog.h"
-#include "includes/exterm.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
+#include "sound/ym2151.h"
@@ -238,14 +238,6 @@ READ8_MEMBER(exterm_state::sound_slave_latch_r)
}
-WRITE8_MEMBER(exterm_state::sound_slave_dac_w)
-{
- /* DAC A is used to modulate DAC B */
- m_dac_value[offset & 1] = data;
- m_dac->write_unsigned16((m_dac_value[0] ^ 0xff) * m_dac_value[1]);
-}
-
-
READ8_MEMBER(exterm_state::sound_nmi_to_slave_r)
{
/* a read from here triggers an NMI pulse to the slave */
@@ -320,7 +312,8 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( sound_slave_map, AS_PROGRAM, 8, exterm_state )
AM_RANGE(0x0000, 0x07ff) AM_MIRROR(0x3800) AM_RAM
AM_RANGE(0x4000, 0x5fff) AM_READ(sound_slave_latch_r)
- AM_RANGE(0x8000, 0xbfff) AM_WRITE(sound_slave_dac_w)
+ AM_RANGE(0x8000, 0x8000) AM_MIRROR(0x3ffe) AM_DEVWRITE("dacvol", dac_byte_interface, write)
+ AM_RANGE(0x8001, 0x8001) AM_MIRROR(0x3ffe) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0x8000, 0xffff) AM_ROM
ADDRESS_MAP_END
@@ -447,13 +440,16 @@ static MACHINE_CONFIG_START( exterm, exterm_state )
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
+ MCFG_SOUND_ADD("dac", AD7528, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // ad7528j.e2
+ MCFG_SOUND_ADD("dacvol", AD7528, 0) // ad7528j.e2
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dacvol", 1.0, DAC_VREF_POS_INPUT)
MCFG_YM2151_ADD("ymsnd", 4000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END