summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/finalizr.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2012-08-09 00:27:11 +0000
committer Aaron Giles <aaron@aarongiles.com>2012-08-09 00:27:11 +0000
commitbe0e3a784f75a6bde2c86e72db45d818317d28ed (patch)
tree8c7dab24ab2b0b31f4801a2e9bce5af5b308cfe1 /src/mame/drivers/finalizr.c
parent57c5cd82e9d9ee2d5ff56b282ca1f74963133ce9 (diff)
Convert dac.c to a modern sound device. Update all callers.
It is quite clear nobody understands how the dac device works. unsigned_write8 (formerly dac_data_w) accepts a value from 0..255 and scales it to 0..32768. signed_write8 (formated dac_signed_data_w) accepts a value from 0..255 and scales it to -32767..32768. So signed/unsigned applies to the output. The input values are always full-range unsigned data. Same goes for 16-bit variants.
Diffstat (limited to 'src/mame/drivers/finalizr.c')
-rw-r--r--src/mame/drivers/finalizr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mame/drivers/finalizr.c b/src/mame/drivers/finalizr.c
index fb13567304f..cd11f802d69 100644
--- a/src/mame/drivers/finalizr.c
+++ b/src/mame/drivers/finalizr.c
@@ -127,7 +127,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( sound_io_map, AS_IO, 8, finalizr_state )
AM_RANGE(0x00, 0xff) AM_READ(soundlatch_byte_r)
- AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_DEVWRITE_LEGACY("dac", dac_w)
+ AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_DEVWRITE("dac", dac_device, write_unsigned8)
AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_WRITE(i8039_irqen_w)
AM_RANGE(MCS48_PORT_T0, MCS48_PORT_T0) AM_WRITE(i8039_T0_w)
AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_READ(i8039_T1_r)
@@ -304,7 +304,7 @@ static MACHINE_CONFIG_START( finalizr, finalizr_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
MCFG_SOUND_CONFIG(psg_intf)
- MCFG_SOUND_ADD("dac", DAC, 0)
+ MCFG_DAC_ADD("dac")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.65)
MACHINE_CONFIG_END