summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/magicfly.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/magicfly.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/magicfly.c')
-rw-r--r--src/mame/drivers/magicfly.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mame/drivers/magicfly.c b/src/mame/drivers/magicfly.c
index 433c736b45e..7aabc8b28be 100644
--- a/src/mame/drivers/magicfly.c
+++ b/src/mame/drivers/magicfly.c
@@ -583,7 +583,7 @@ WRITE8_MEMBER(magicfly_state::mux_port_w)
*/
m_input_selector = data & 0x0f; /* Input Selector */
- dac_data_w(machine().device("dac"), data & 0x80); /* Sound DAC */
+ machine().device<dac_device>("dac")->write_unsigned8(data & 0x80); /* Sound DAC */
coin_counter_w(machine(), 0, data & 0x40); /* Coin1 */
coin_counter_w(machine(), 1, data & 0x10); /* Coin2 */
@@ -825,7 +825,7 @@ static MACHINE_CONFIG_START( magicfly, magicfly_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("dac", DAC, 0)
+ MCFG_DAC_ADD("dac")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END