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.
This commit is contained in:
smf- 2016-10-17 16:03:29 +01:00
parent 8676fc0d8d
commit 36944269bd
397 changed files with 4485 additions and 4548 deletions

View File

@ -531,6 +531,20 @@ end
---------------------------------------------------
-- MEA8000 Voice Synthesizer
--@src/devices/sound/mea8000.h,SOUNDS["MEA8000"] = true
---------------------------------------------------
if (SOUNDS["MEA8000"]~=null) then
files {
MAME_DIR .. "src/devices/sound/mea8000.cpp",
MAME_DIR .. "src/devices/sound/mea8000.h",
}
end
---------------------------------------------------
-- MOS 6560VIC
--@src/devices/sound/mos6560.h,SOUNDS["MOS656X"] = true
@ -1376,3 +1390,14 @@ if (SOUNDS["PCD3311"]~=null) then
MAME_DIR .. "src/devices/sound/pcd3311.h",
}
end
---------------------------------------------------
-- Voltage Regulator
--@src/devices/sound/volt_reg.h,SOUNDS["VOLT_REG"] = true
---------------------------------------------------
if (SOUNDS["VOLT_REG"]~=null) then
files {
MAME_DIR .. "src/devices/sound/volt_reg.cpp",
MAME_DIR .. "src/devices/sound/volt_reg.h",
}
end

View File

@ -261,6 +261,8 @@ SOUNDS["ES1373"] = true
SOUNDS["L7A1045"] = true
SOUNDS["AD1848"] = true
--SOUNDS["UPD1771"] = true
SOUNDS["VOLT_REG"] = true
--SOUNDS["MEA8000"] = true
--------------------------------------------------
-- specify available video cores

View File

@ -261,6 +261,8 @@ SOUNDS["VRC6"] = true
SOUNDS["UPD1771"] = true
SOUNDS["GB_SOUND"] = true
SOUNDS["PCD3311"] = true
SOUNDS["VOLT_REG"] = true
SOUNDS["MEA8000"] = true
--------------------------------------------------
-- specify available video cores
@ -1245,8 +1247,6 @@ end
--------------------------------------------------
createMESSProjects(_target, _subtarget, "messshared")
files {
MAME_DIR .. "src/mame/audio/mea8000.cpp",
MAME_DIR .. "src/mame/audio/mea8000.h",
MAME_DIR .. "src/mame/machine/microdrv.cpp",
MAME_DIR .. "src/mame/machine/microdrv.h",
MAME_DIR .. "src/mame/machine/teleprinter.cpp",

View File

@ -45,6 +45,7 @@ SOUNDS["MSM5205"] = true
--SOUNDS["YM3812"] = true
--SOUNDS["CEM3394"] = true
--SOUNDS["VOTRAX"] = true
SOUNDS["VOLT_REG"] = true
--------------------------------------------------
-- specify available video cores

View File

@ -43,6 +43,7 @@ SOUNDS["HC55516"] = true
SOUNDS["YM3812"] = true
SOUNDS["CEM3394"] = true
SOUNDS["VOTRAX"] = true
SOUNDS["VOLT_REG"] = true
--------------------------------------------------
-- specify available video cores

View File

@ -8,9 +8,9 @@
*********************************************************************/
#include "a2dx1.h"
#include "includes/apple2.h"
#include "sound/dac.h"
#include "a2dx1.h"
#include "sound/volt_reg.h"
/***************************************************************************
PARAMETERS
@ -22,12 +22,13 @@
const device_type A2BUS_DX1 = &device_creator<a2bus_dx1_device>;
#define DAC_TAG "dac"
MACHINE_CONFIG_FRAGMENT( a2dx1 )
MCFG_SPEAKER_STANDARD_MONO("dx1spkr")
MCFG_SOUND_ADD(DAC_TAG, DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "dx1spkr", 1.00)
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC
MCFG_SOUND_ADD("dacvol", DAC_8BIT_R2R, 0) // unknown DAC
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)
MACHINE_CONFIG_END
/***************************************************************************
@ -51,14 +52,16 @@ machine_config_constructor a2bus_dx1_device::device_mconfig_additions() const
a2bus_dx1_device::a2bus_dx1_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_a2bus_card_interface(mconfig, *this),
m_dac(*this, DAC_TAG), m_volume(0), m_lastdac(0)
m_dac(*this, "dac"),
m_dacvol(*this, "dacvol")
{
}
a2bus_dx1_device::a2bus_dx1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, A2BUS_DX1, "Decillonix DX-1", tag, owner, clock, "a2dx1", __FILE__),
device_a2bus_card_interface(mconfig, *this),
m_dac(*this, DAC_TAG), m_volume(0), m_lastdac(0)
m_dac(*this, "dac"),
m_dacvol(*this, "dacvol")
{
}
@ -70,14 +73,6 @@ void a2bus_dx1_device::device_start()
{
// set_a2bus_device makes m_slot valid
set_a2bus_device();
save_item(NAME(m_volume));
save_item(NAME(m_lastdac));
}
void a2bus_dx1_device::device_reset()
{
m_volume = m_lastdac = 0;
}
UINT8 a2bus_dx1_device::read_c0nx(address_space &space, UINT8 offset)
@ -101,14 +96,12 @@ void a2bus_dx1_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data
{
switch (offset)
{
case 5: // volume
m_volume = data;
m_dac->write_unsigned16(data*m_lastdac);
case 5:
m_dacvol->write(data);
break;
case 6:
m_lastdac = data;
m_dac->write_unsigned16(data*m_volume);
m_dac->write(data);
break;
}
}

View File

@ -31,19 +31,16 @@ public:
// optional information overrides
virtual machine_config_constructor device_mconfig_additions() const override;
required_device<dac_device> m_dac;
required_device<dac_byte_interface> m_dac;
required_device<dac_byte_interface> m_dacvol;
protected:
virtual void device_start() override;
virtual void device_reset() override;
// overrides of standard a2bus slot functions
virtual UINT8 read_c0nx(address_space &space, UINT8 offset) override;
virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data) override;
virtual bool take_c800() override;
private:
UINT8 m_volume, m_lastdac;
};
// device type definition

View File

@ -8,9 +8,9 @@
*********************************************************************/
#include "a2sam.h"
#include "includes/apple2.h"
#include "sound/dac.h"
#include "a2sam.h"
#include "sound/volt_reg.h"
/***************************************************************************
PARAMETERS
@ -22,12 +22,11 @@
const device_type A2BUS_SAM = &device_creator<a2bus_sam_device>;
#define DAC_TAG "dac"
MACHINE_CONFIG_FRAGMENT( a2sam )
MCFG_SPEAKER_STANDARD_MONO("samspkr")
MCFG_SOUND_ADD(DAC_TAG, DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "samspkr", 1.00)
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
/***************************************************************************
@ -48,17 +47,10 @@ machine_config_constructor a2bus_sam_device::device_mconfig_additions() const
// LIVE DEVICE
//**************************************************************************
a2bus_sam_device::a2bus_sam_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_a2bus_card_interface(mconfig, *this),
m_dac(*this, DAC_TAG)
{
}
a2bus_sam_device::a2bus_sam_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, A2BUS_SAM, "Don't Ask Software SAM", tag, owner, clock, "a2sam", __FILE__),
device_a2bus_card_interface(mconfig, *this),
m_dac(*this, DAC_TAG)
m_dac(*this, "dac")
{
}
@ -78,7 +70,7 @@ void a2bus_sam_device::device_reset()
void a2bus_sam_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data)
{
m_dac->write_unsigned8(data);
m_dac->write(data);
}
bool a2bus_sam_device::take_c800()

View File

@ -25,13 +25,12 @@ class a2bus_sam_device:
{
public:
// construction/destruction
a2bus_sam_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
a2bus_sam_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// optional information overrides
virtual machine_config_constructor device_mconfig_additions() const override;
required_device<dac_device> m_dac;
required_device<dac_byte_interface> m_dac;
protected:
virtual void device_start() override;

View File

@ -7,8 +7,8 @@
***************************************************************************/
#include "emu.h"
#include "sound/dac.h"
#include "covox.h"
#include "sound/volt_reg.h"
//**************************************************************************
// COVOX DEVICE
@ -19,10 +19,10 @@ const device_type CENTRONICS_COVOX = &device_creator<centronics_covox_device>;
static MACHINE_CONFIG_FRAGMENT( covox )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("dac", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@ -59,7 +59,7 @@ void centronics_covox_device::device_start()
void centronics_covox_device::update_dac()
{
if (started())
m_dac->write_unsigned8(m_data);
m_dac->write(m_data);
}
//**************************************************************************
@ -72,12 +72,11 @@ const device_type CENTRONICS_COVOX_STEREO = &device_creator<centronics_covox_ste
static MACHINE_CONFIG_FRAGMENT( covox_stereo )
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
MCFG_SOUND_ADD("dac_left", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
MCFG_SOUND_ADD("dac_right", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
MCFG_SOUND_ADD("ldac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) // unknown DAC
MCFG_SOUND_ADD("rdac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@ -91,9 +90,11 @@ MACHINE_CONFIG_END
centronics_covox_stereo_device::centronics_covox_stereo_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, CENTRONICS_COVOX_STEREO, "Covox (Stereo-in-1)", tag, owner, clock, "covox_stereo", __FILE__),
device_centronics_peripheral_interface( mconfig, *this ),
m_dac_left(*this, "dac_left"),
m_dac_right(*this, "dac_right"), m_strobe(0),
m_data(0), m_autofd(0)
m_ldac(*this, "ldac"),
m_rdac(*this, "rdac"),
m_strobe(0),
m_data(0),
m_autofd(0)
{
}
@ -119,9 +120,9 @@ void centronics_covox_stereo_device::update_dac()
if (started())
{
if (m_strobe)
m_dac_left->write_unsigned8(m_data);
m_ldac->write(m_data);
if (m_autofd)
m_dac_right->write_unsigned8(m_data);
m_rdac->write(m_data);
}
}

View File

@ -40,7 +40,7 @@ protected:
virtual DECLARE_WRITE_LINE_MEMBER( input_data7 ) override { if (state) m_data |= 0x80; else m_data &= ~0x80; update_dac(); }
private:
required_device<dac_device> m_dac;
required_device<dac_byte_interface> m_dac;
void update_dac();
@ -78,8 +78,8 @@ protected:
virtual DECLARE_WRITE_LINE_MEMBER( input_autofd ) override { m_autofd = state; update_dac(); }
private:
required_device<dac_device> m_dac_left;
required_device<dac_device> m_dac_right;
required_device<dac_byte_interface> m_ldac;
required_device<dac_byte_interface> m_rdac;
void update_dac();

View File

@ -7,8 +7,8 @@
*/
#include "emu.h"
#include "sound/dac.h"
#include "digiblst.h"
#include "sound/volt_reg.h"
//**************************************************************************
// COVOX DEVICE
@ -19,10 +19,10 @@ const device_type CENTRONICS_DIGIBLASTER = &device_creator<centronics_digiblaste
static MACHINE_CONFIG_FRAGMENT( digiblst )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("dac", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@ -59,5 +59,5 @@ void centronics_digiblaster_device::device_start()
void centronics_digiblaster_device::update_dac()
{
if (started())
m_dac->write_unsigned8(m_data);
m_dac->write(m_data);
}

View File

@ -46,7 +46,7 @@ protected:
virtual DECLARE_WRITE_LINE_MEMBER( input_strobe ) override { if (state) m_data &= ~0x80; else m_data |= 0x80; update_dac(); }
private:
required_device<dac_device> m_dac;
required_device<dac_byte_interface> m_dac;
void update_dac();

View File

@ -26,6 +26,8 @@
*/
#include "epson_lx810l.h"
#include "sound/volt_reg.h"
//extern const char layout_lx800[]; /* use layout from lx800 */
//#define LX810LDEBUG
@ -130,7 +132,7 @@ static MACHINE_CONFIG_FRAGMENT( epson_lx810l )
MCFG_UPD7810_AN6(READ8(epson_lx810l_t, an6_r))
MCFG_UPD7810_AN7(READ8(epson_lx810l_t, an7_r))
MCFG_UPD7810_CO0(WRITELINE(epson_lx810l_t, co0_w))
MCFG_UPD7810_CO1(WRITELINE(epson_lx810l_t, co1_w))
MCFG_UPD7810_CO1(DEVWRITELINE("dac", dac_bit_interface, write))
// MCFG_DEFAULT_LAYOUT(layout_lx800)
@ -143,9 +145,10 @@ static MACHINE_CONFIG_FRAGMENT( epson_lx810l )
MCFG_SCREEN_UPDATE_DRIVER(epson_lx810l_t, screen_update_lx810l)
/* audio hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_DAC_ADD("dac")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
/* gate array */
MCFG_DEVICE_ADD("e05a30", E05A30, 0)
@ -292,7 +295,6 @@ epson_lx810l_t::epson_lx810l_t(const machine_config &mconfig, const char *tag, d
m_pf_stepper(*this, "pf_stepper"),
m_cr_stepper(*this, "cr_stepper"),
m_eeprom(*this, "eeprom"),
m_dac(*this, "dac"),
m_e05a30(*this, "e05a30"),
m_screen(*this, "screen"),
m_93c06_clk(0),
@ -313,7 +315,6 @@ epson_lx810l_t::epson_lx810l_t(const machine_config &mconfig, device_type type,
m_pf_stepper(*this, "pf_stepper"),
m_cr_stepper(*this, "cr_stepper"),
m_eeprom(*this, "eeprom"),
m_dac(*this, "dac"),
m_e05a30(*this, "e05a30"),
m_screen(*this, "screen"),
m_93c06_clk(0),
@ -352,7 +353,6 @@ void epson_lx810l_t::device_start()
void epson_lx810l_t::device_reset()
{
m_dac->write_unsigned8(0);
}
@ -602,11 +602,6 @@ WRITE_LINE_MEMBER( epson_lx810l_t::co0_w )
}
}
WRITE_LINE_MEMBER( epson_lx810l_t::co1_w )
{
m_dac->write_unsigned8(0 - !state);
}
/***************************************************************************
ADC

View File

@ -60,7 +60,6 @@ public:
/* Extended Timer Output */
DECLARE_WRITE_LINE_MEMBER(co0_w);
DECLARE_WRITE_LINE_MEMBER(co1_w);
/* ADC */
DECLARE_READ8_MEMBER(an0_r);
@ -117,7 +116,6 @@ private:
required_device<stepper_device> m_pf_stepper;
required_device<stepper_device> m_cr_stepper;
required_device<eeprom_serial_93cxx_device> m_eeprom;
required_device<dac_device> m_dac;
required_device<e05a30_device> m_e05a30;
required_device<screen_device> m_screen;

View File

@ -14,14 +14,15 @@
#include "emu.h"
#include "coco_orch90.h"
#include "sound/dac.h"
#include "sound/volt_reg.h"
static MACHINE_CONFIG_FRAGMENT(coco_orch90)
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
MCFG_SOUND_ADD("dac_left", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
MCFG_SOUND_ADD("dac_right", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
MCFG_SOUND_ADD("ldac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) // ls374.ic5 + r7 (8x20k) + r9 (8x10k)
MCFG_SOUND_ADD("rdac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // ls374.ic4 + r6 (8x20k) + r8 (8x10k)
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
//**************************************************************************
@ -40,8 +41,10 @@ const device_type COCO_ORCH90 = &device_creator<coco_orch90_device>;
coco_orch90_device::coco_orch90_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, COCO_ORCH90, "CoCo Orch-90 PAK", tag, owner, clock, "coco_orch90", __FILE__),
device_cococart_interface( mconfig, *this ), m_left_dac(nullptr), m_right_dac(nullptr)
{
device_cococart_interface(mconfig, *this ),
m_ldac(*this, "ldac"),
m_rdac(*this, "rdac")
{
}
//-------------------------------------------------
@ -50,8 +53,6 @@ coco_orch90_device::coco_orch90_device(const machine_config &mconfig, const char
void coco_orch90_device::device_start()
{
m_left_dac = subdevice<dac_device>("dac_left");
m_right_dac = subdevice<dac_device>("dac_right");
}
//-------------------------------------------------
@ -73,13 +74,11 @@ WRITE8_MEMBER(coco_orch90_device::write)
switch(offset)
{
case 0x3A:
/* left channel write */
m_left_dac->write_unsigned8(data);
m_ldac->write(data);
break;
case 0x3B:
/* right channel write */
m_right_dac->write_unsigned8(data);
m_rdac->write(data);
break;
}
}

View File

@ -31,8 +31,8 @@ protected:
virtual DECLARE_WRITE8_MEMBER(write) override;
private:
// internal state
dac_device *m_left_dac;
dac_device *m_right_dac;
required_device<dac_byte_interface> m_ldac;
required_device<dac_byte_interface> m_rdac;
};

View File

@ -7,8 +7,9 @@
*/
#include "emu.h"
#include "amdrum.h"
#include "includes/amstrad.h"
#include "amdrum.h"
#include "sound/volt_reg.h"
//**************************************************************************
@ -19,9 +20,10 @@ const device_type CPC_AMDRUM = &device_creator<cpc_amdrum_device>;
static MACHINE_CONFIG_FRAGMENT( cpc_amdrum )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_DAC_ADD("dac")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
// no pass-through
MACHINE_CONFIG_END
@ -66,5 +68,5 @@ void cpc_amdrum_device::device_reset()
WRITE8_MEMBER(cpc_amdrum_device::dac_w)
{
m_dac->write_unsigned8(data);
m_dac->write(data);
}

View File

@ -38,7 +38,7 @@ protected:
private:
cpc_expansion_slot_device *m_slot;
required_device<dac_device> m_dac;
required_device<dac_byte_interface> m_dac;
};
// device type definition

View File

@ -8,8 +8,9 @@
*/
#include "emu.h"
#include "magicsound.h"
#include "includes/amstrad.h"
#include "magicsound.h"
#include "sound/volt_reg.h"
//**************************************************************************
@ -55,9 +56,10 @@ static MACHINE_CONFIG_FRAGMENT( al_magicsound )
MCFG_PIT8253_OUT1_HANDLER(WRITELINE(al_magicsound_device,da0_w))
MCFG_PIT8253_CLK2(XTAL_4MHz)
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_DAC_ADD("dac1")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
// no pass-through(?)
MACHINE_CONFIG_END
@ -73,7 +75,7 @@ machine_config_constructor al_magicsound_device::device_mconfig_additions() cons
al_magicsound_device::al_magicsound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, AL_MAGICSOUND, "Magic Sound Board", tag, owner, clock, "al_magicsound", __FILE__),
device_cpc_expansion_card_interface(mconfig, *this), m_slot(nullptr),
m_dac1(*this,"dac1"),
m_dac(*this,"dac"),
m_dmac(*this,"dmac"),
m_timer1(*this,"timer1"),
m_timer2(*this,"timer2"), m_current_channel(0), m_ramptr(nullptr), m_current_output(0)
@ -148,7 +150,7 @@ WRITE8_MEMBER(al_magicsound_device::mapper_w)
WRITE_LINE_MEMBER(al_magicsound_device::da0_w)
{
m_dac1->write_unsigned8(m_output[m_current_output++]);
m_dac->write(m_output[m_current_output++]);
if(m_current_output > 3)
m_current_output = 0;
}

View File

@ -68,7 +68,7 @@ protected:
private:
cpc_expansion_slot_device *m_slot;
required_device<dac_device> m_dac1;
required_device<dac_byte_interface> m_dac;
required_device<am9517a_device> m_dmac;
required_device<pit8254_device> m_timer1;
required_device<pit8254_device> m_timer2;

View File

@ -1,6 +1,7 @@
// license:BSD-3-Clause
// copyright-holders:Carl
#include "dectalk.h"
#include "sound/volt_reg.h"
const device_type ISA8_DECTALK = &device_creator<dectalk_isa_device>;
@ -61,7 +62,7 @@ WRITE8_MEMBER(dectalk_isa_device::dma_w)
WRITE16_MEMBER(dectalk_isa_device::dac_w)
{
m_dac->write(data & 0xfff0);
m_dac->write(data >> 4);
}
WRITE16_MEMBER(dectalk_isa_device::output_ctl_w)
@ -147,8 +148,9 @@ static MACHINE_CONFIG_FRAGMENT( dectalk_isa )
MCFG_CPU_PROGRAM_MAP(dectalk_dsp_map)
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("dac", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.00)
MCFG_SOUND_ADD("dac", DAC_12BIT_R2R, 0) MCFG_SOUND_ROUTE(0, "speaker", 1.0) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
ROM_START( dectalk_isa )

View File

@ -47,7 +47,7 @@ private:
UINT8 m_dma, m_vol, m_bio;
required_device<i80186_cpu_device> m_cpu;
required_device<dac_device> m_dac;
required_device<dac_12bit_r2r_device> m_dac;
required_device<cpu_device> m_dsp;
};

View File

@ -12,6 +12,7 @@
**********************************************************************/
#include "p1_sound.h"
#include "sound/volt_reg.h"
//**************************************************************************
// DEVICE DEFINITIONS
@ -59,11 +60,12 @@ static MACHINE_CONFIG_FRAGMENT( p1_sound )
MCFG_PIT8253_CLK2(XTAL_12_5MHz/10)
// MCFG_PIT8253_OUT2_HANDLER(XXX)
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_DAC_ADD("dac")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "filter", 1.0)
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_FILTER_RC_ADD("filter", 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "filter", 0.5) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@ -143,7 +145,7 @@ WRITE8_MEMBER( p1_sound_device::dac_w )
WRITE_LINE_MEMBER( p1_sound_device::sampler_sync )
{
if (state) {
m_dac->write_unsigned8(m_dac_data[m_dac_ptr++]);
m_dac->write(m_dac_data[m_dac_ptr++]);
m_dac_ptr &= 7;
if ((m_dac_ptr % 8) == 0) {
m_isa->irq7_w(state);

View File

@ -57,7 +57,7 @@ private:
UINT8 m_dac_data[16];
int m_dac_ptr;
required_device<dac_device> m_dac;
required_device<dac_byte_interface> m_dac;
optional_device<filter_rc_device> m_filter;
required_device<i8251_device> m_midi;
required_device<pit8253_device> m_d14;

View File

@ -55,8 +55,8 @@ READ8_MEMBER( sb16_lle_device::adc_data_r )
WRITE8_MEMBER( sb16_lle_device::dac_data_w )
{
m_dacl->write_unsigned8(data);
m_dacr->write_unsigned8(data);
m_ldac->write(data << 8);
m_rdac->write(data << 8);
}
READ8_MEMBER( sb16_lle_device::p1_r )
@ -412,10 +412,8 @@ static MACHINE_CONFIG_FRAGMENT( sb16 )
MCFG_SOUND_ROUTE(2, "lspeaker", 1.00)
MCFG_SOUND_ROUTE(3, "rspeaker", 1.00)
MCFG_SOUND_ADD("dacl", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.00)
MCFG_SOUND_ADD("dacr", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.00)
MCFG_SOUND_ADD("ldac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) // unknown DAC
MCFG_SOUND_ADD("rdac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // unknown DAC
MCFG_PC_JOY_ADD("pc_joy")
MACHINE_CONFIG_END
@ -681,8 +679,8 @@ WRITE8_MEMBER( sb16_lle_device::mpu401_w )
sb16_lle_device::sb16_lle_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, ISA16_SB16, "SoundBlaster 16 Audio Adapter LLE", tag, owner, clock, "sb16", __FILE__),
device_isa16_card_interface(mconfig, *this),
m_dacl(*this, "dacl"),
m_dacr(*this, "dacr"),
m_ldac(*this, "ldac"),
m_rdac(*this, "rdac"),
m_joy(*this, "pc_joy"),
m_cpu(*this, "sb16_cpu"), m_data_in(false), m_in_byte(0), m_data_out(false), m_out_byte(0), m_freq(0), m_mode(0), m_dac_fifo_ctrl(0), m_adc_fifo_ctrl(0), m_ctrl8(0), m_ctrl16(0), m_mpu_byte(0),
m_dma8_len(0), m_dma16_len(0), m_dma8_cnt(0), m_dma16_cnt(0), m_adc_fifo_head(0), m_adc_fifo_tail(0), m_dac_fifo_head(0), m_dac_fifo_tail(0), m_adc_r(false), m_dac_r(false), m_adc_h(false),
@ -754,21 +752,21 @@ void sb16_lle_device::device_timer(emu_timer &timer, device_timer_id tid, int pa
switch(m_mode & 0xa0) // dac 16
{
case 0x00: // unsigned stereo
dacl = (m_dac_fifo[m_dac_fifo_tail].h[0] - 0x8000);
dacr = (m_dac_fifo[m_dac_fifo_tail].h[1] - 0x8000);
break;
case 0x20: // signed stereo
dacl = m_dac_fifo[m_dac_fifo_tail].h[0];
dacr = m_dac_fifo[m_dac_fifo_tail].h[1];
break;
case 0x80: // unsigned mono
dacl = (m_dac_fifo[m_dac_fifo_tail].h[0] - 0x8000);
dacr = (m_dac_fifo[m_dac_fifo_tail].h[0] - 0x8000);
case 0x20: // signed stereo
dacl = (m_dac_fifo[m_dac_fifo_tail].h[0] ^ 0x8000);
dacr = (m_dac_fifo[m_dac_fifo_tail].h[1] ^ 0x8000);
break;
case 0xa0: // signed mono
case 0x80: // unsigned mono
dacl = m_dac_fifo[m_dac_fifo_tail].h[0];
dacr = m_dac_fifo[m_dac_fifo_tail].h[0];
break;
case 0xa0: // signed mono
dacl = (m_dac_fifo[m_dac_fifo_tail].h[0] ^ 0x8000);
dacr = (m_dac_fifo[m_dac_fifo_tail].h[0] ^ 0x8000);
break;
}
switch(m_mode & 0x50) // adc 8; placeholder
{
@ -795,21 +793,21 @@ void sb16_lle_device::device_timer(emu_timer &timer, device_timer_id tid, int pa
switch(m_mode & 0x50) // dac 8
{
case 0x00: // unsigned stereo
dacl = (m_dac_fifo[m_dac_fifo_tail].b[0] - 0x80) << 8;
dacr = (m_dac_fifo[m_dac_fifo_tail].b[2] - 0x80) << 8;
break;
case 0x10: // signed stereo
dacl = m_dac_fifo[m_dac_fifo_tail].b[0] << 8;
dacr = m_dac_fifo[m_dac_fifo_tail].b[2] << 8;
break;
case 0x40: // unsigned mono
dacl = (m_dac_fifo[m_dac_fifo_tail].b[0] - 0x80) << 8;
dacr = (m_dac_fifo[m_dac_fifo_tail].b[0] - 0x80) << 8;
case 0x10: // signed stereo
dacl = (m_dac_fifo[m_dac_fifo_tail].b[0] ^ 0x80) << 8;
dacr = (m_dac_fifo[m_dac_fifo_tail].b[2] ^ 0x80) << 8;
break;
case 0x50: // signed mono
case 0x40: // unsigned mono
dacl = m_dac_fifo[m_dac_fifo_tail].b[0] << 8;
dacr = m_dac_fifo[m_dac_fifo_tail].b[0] << 8;
break;
case 0x50: // signed mono
dacl = (m_dac_fifo[m_dac_fifo_tail].b[0] ^ 0x80) << 8;
dacr = (m_dac_fifo[m_dac_fifo_tail].b[0] ^ 0x80) << 8;
break;
}
switch(m_mode & 0xa0) // adc 16; placeholder
{
@ -831,8 +829,8 @@ void sb16_lle_device::device_timer(emu_timer &timer, device_timer_id tid, int pa
break;
}
}
m_dacr->write(dacr);
m_dacl->write(dacl);
m_rdac->write(dacr);
m_ldac->write(dacl);
if(!(m_ctrl8 & 2))
m_isa->drq1_w(1);

View File

@ -28,8 +28,8 @@ public:
virtual const tiny_rom_entry *device_rom_region() const override;
virtual machine_config_constructor device_mconfig_additions() const override;
required_device<dac_device> m_dacl;
required_device<dac_device> m_dacr;
required_device<dac_word_interface> m_ldac;
required_device<dac_word_interface> m_rdac;
required_device<pc_joy_device> m_joy;
required_device<cpu_device> m_cpu;

View File

@ -12,10 +12,10 @@
***************************************************************************/
#include "sblaster.h"
#include "machine/pic8259.h"
#include "sound/speaker.h"
#include "sound/262intf.h"
#include "sound/dac.h"
#include "machine/pic8259.h"
#include "sound/volt_reg.h"
/*
adlib (YM3812/OPL2 chip), part of many many soundcards (soundblaster)
@ -73,10 +73,11 @@ static MACHINE_CONFIG_FRAGMENT( sblaster1_0_config )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50)
MCFG_SOUND_ADD("sbdacl", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.00)
MCFG_SOUND_ADD("sbdacr", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.00)
MCFG_SOUND_ADD("ldac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) // unknown DAC
MCFG_SOUND_ADD("rdac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_PC_JOY_ADD("pc_joy")
MCFG_MIDI_PORT_ADD("mdin", midiin_slot, "midiin")
@ -92,10 +93,11 @@ static MACHINE_CONFIG_FRAGMENT( sblaster1_5_config )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.00)
/* no CM/S support (empty sockets) */
MCFG_SOUND_ADD("sbdacl", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.00)
MCFG_SOUND_ADD("sbdacr", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.00)
MCFG_SOUND_ADD("ldac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) // unknown DAC
MCFG_SOUND_ADD("rdac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_PC_JOY_ADD("pc_joy")
MCFG_MIDI_PORT_ADD("mdin", midiin_slot, "midiin")
@ -111,10 +113,12 @@ static MACHINE_CONFIG_FRAGMENT( sblaster_16_config )
MCFG_SOUND_ROUTE(1, "rspeaker", 1.00)
MCFG_SOUND_ROUTE(2, "lspeaker", 1.00)
MCFG_SOUND_ROUTE(3, "rspeaker", 1.00)
MCFG_SOUND_ADD("sbdacl", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.00)
MCFG_SOUND_ADD("sbdacr", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.00)
MCFG_SOUND_ADD("ldac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) // unknown DAC
MCFG_SOUND_ADD("rdac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_PC_JOY_ADD("pc_joy")
MCFG_MIDI_PORT_ADD("mdin", midiin_slot, "midiin")
@ -755,8 +759,8 @@ void sb_device::adpcm_decode(UINT8 sample, int size)
else if(dec_sample < 0)
dec_sample = 0;
m_dsp.adpcm_ref = dec_sample;
m_dacl->write_unsigned8(m_dsp.adpcm_ref);
m_dacr->write_unsigned8(m_dsp.adpcm_ref);
m_ldac->write(m_dsp.adpcm_ref << 8);
m_rdac->write(m_dsp.adpcm_ref << 8);
}
READ8_MEMBER( sb16_device::mpu401_r )
@ -835,8 +839,8 @@ void sb16_device::mixer_set()
ymf262_device *ymf = subdevice<ymf262_device>("ymf262");
float lmain = m_mixer.main_vol[0]/248.0;
float rmain = m_mixer.main_vol[1]/248.0;
m_dacl->set_output_gain(ALL_OUTPUTS, lmain*(m_mixer.dac_vol[0]/248.0f));
m_dacr->set_output_gain(ALL_OUTPUTS, rmain*(m_mixer.dac_vol[1]/248.0f));
m_ldac->set_output_gain(ALL_OUTPUTS, lmain*(m_mixer.dac_vol[0]/248.0f));
m_rdac->set_output_gain(ALL_OUTPUTS, rmain*(m_mixer.dac_vol[1]/248.0f));
ymf->set_output_gain(0, lmain*(m_mixer.fm_vol[0]/248.0f));
ymf->set_output_gain(1, rmain*(m_mixer.fm_vol[1]/248.0f));
ymf->set_output_gain(2, lmain*(m_mixer.fm_vol[0]/248.0f));
@ -1216,8 +1220,8 @@ machine_config_constructor isa16_sblaster16_device::device_mconfig_additions() c
sb_device::sb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, UINT32 clock, const char *name, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_serial_interface(mconfig, *this),
m_dacl(*this, "sbdacl"),
m_dacr(*this, "sbdacr"),
m_ldac(*this, "ldac"),
m_rdac(*this, "rdac"),
m_joy(*this, "pc_joy"),
m_mdout(*this, "mdout"),
m_config(*this, "CONFIG"), m_dack_out(0), m_onebyte_midi(false), m_uart_midi(false), m_uart_irq(false), m_mpu_midi(false), m_rx_waiting(0), m_tx_waiting(0), m_xmit_read(0), m_xmit_write(0), m_recv_read(0), m_recv_write(0), m_tx_busy(false), m_timer(nullptr)
@ -1540,40 +1544,40 @@ void sb_device::device_timer(emu_timer &timer, device_timer_id tid, int param, v
UINT16 lsample, rsample;
switch (m_dsp.flags) {
case 0: // 8-bit unsigned mono
m_dacl->write_unsigned8(m_dsp.data[m_dsp.d_rptr]);
m_dacr->write_unsigned8(m_dsp.data[m_dsp.d_rptr]);
m_ldac->write(m_dsp.data[m_dsp.d_rptr] << 8);
m_rdac->write(m_dsp.data[m_dsp.d_rptr] << 8);
m_dsp.data[m_dsp.d_rptr++] = 0x80;
break;
case SIGNED: // 8-bit signed mono
m_dacl->write_unsigned8(m_dsp.data[m_dsp.d_rptr] + 128);
m_dacr->write_unsigned8(m_dsp.data[m_dsp.d_rptr] + 128);
m_ldac->write((m_dsp.data[m_dsp.d_rptr] ^ 0x80) << 8);
m_rdac->write((m_dsp.data[m_dsp.d_rptr] ^ 0x80) << 8);
m_dsp.data[m_dsp.d_rptr++] = 0x00;
break;
case STEREO: // 8-bit unsigned stereo
m_dacl->write_unsigned8(m_dsp.data[m_dsp.d_rptr]);
m_ldac->write(m_dsp.data[m_dsp.d_rptr] << 8);
m_dsp.data[m_dsp.d_rptr++] = 0x80;
m_dacr->write_unsigned8(m_dsp.data[m_dsp.d_rptr]);
m_rdac->write(m_dsp.data[m_dsp.d_rptr] << 8);
m_dsp.data[m_dsp.d_rptr++] = 0x80;
break;
case SIGNED | STEREO: // 8-bit signed stereo
m_dacl->write_unsigned8(m_dsp.data[m_dsp.d_rptr] + 128);
m_ldac->write((m_dsp.data[m_dsp.d_rptr] ^ 0x80) << 8);
m_dsp.data[m_dsp.d_rptr++] = 0x00;
m_dacr->write_unsigned8(m_dsp.data[m_dsp.d_rptr] + 128);
m_rdac->write((m_dsp.data[m_dsp.d_rptr] ^ 0x80) << 8);
m_dsp.data[m_dsp.d_rptr++] = 0x00;
break;
case SIXTEENBIT: // 16-bit unsigned mono
lsample = m_dsp.data[m_dsp.d_rptr] | (m_dsp.data[m_dsp.d_rptr+1] << 8);
m_dsp.data[m_dsp.d_rptr++] = 0x00;
m_dsp.data[m_dsp.d_rptr++] = 0x80;
m_dacl->write_unsigned16(lsample);
m_dacr->write_unsigned16(lsample);
m_ldac->write(lsample);
m_rdac->write(lsample);
break;
case SIXTEENBIT | SIGNED: // 16-bit signed mono
lsample = m_dsp.data[m_dsp.d_rptr] | (m_dsp.data[m_dsp.d_rptr+1] << 8);
lsample = m_dsp.data[m_dsp.d_rptr] | ((m_dsp.data[m_dsp.d_rptr+1] ^ 0x80) << 8);
m_dsp.data[m_dsp.d_rptr++] = 0x00;
m_dsp.data[m_dsp.d_rptr++] = 0x00;
m_dacl->write_unsigned16(lsample + 32768);
m_dacr->write_unsigned16(lsample + 32768);
m_ldac->write(lsample);
m_rdac->write(lsample);
break;
case SIXTEENBIT | STEREO: // 16-bit unsigned stereo
lsample = m_dsp.data[m_dsp.d_rptr] | (m_dsp.data[m_dsp.d_rptr+1] << 8);
@ -1583,27 +1587,27 @@ void sb_device::device_timer(emu_timer &timer, device_timer_id tid, int param, v
rsample = m_dsp.data[m_dsp.d_rptr] | (m_dsp.data[m_dsp.d_rptr+1] << 8);
m_dsp.data[m_dsp.d_rptr++] = 0x00;
m_dsp.data[m_dsp.d_rptr++] = 0x80;
m_dacl->write_unsigned16(lsample);
m_dacr->write_unsigned16(rsample);
m_ldac->write(lsample);
m_rdac->write(rsample);
break;
case SIXTEENBIT | SIGNED | STEREO: // 16-bit signed stereo
lsample = m_dsp.data[m_dsp.d_rptr] | (m_dsp.data[m_dsp.d_rptr+1] << 8);
lsample = m_dsp.data[m_dsp.d_rptr] | ((m_dsp.data[m_dsp.d_rptr+1] ^ 0x80) << 8);
m_dsp.data[m_dsp.d_rptr++] = 0x00;
m_dsp.data[m_dsp.d_rptr++] = 0x00;
m_dsp.d_rptr %= 128;
rsample = m_dsp.data[m_dsp.d_rptr] | (m_dsp.data[m_dsp.d_rptr+1] << 8);
rsample = m_dsp.data[m_dsp.d_rptr] | ((m_dsp.data[m_dsp.d_rptr+1] ^ 0x80) << 8);
m_dsp.data[m_dsp.d_rptr++] = 0x00;
m_dsp.data[m_dsp.d_rptr++] = 0x00;
m_dacl->write_unsigned16(lsample + 32768);
m_dacr->write_unsigned16(rsample + 32768);
m_ldac->write(lsample);
m_rdac->write(rsample);
break;
case ADPCM2:
if(m_dsp.adpcm_new_ref)
{
m_dsp.adpcm_ref = m_dsp.data[m_dsp.d_rptr++];
m_dsp.adpcm_new_ref = false;
m_dacl->write_unsigned8(m_dsp.adpcm_ref);
m_dacr->write_unsigned8(m_dsp.adpcm_ref);
m_ldac->write(m_dsp.adpcm_ref << 8);
m_rdac->write(m_dsp.adpcm_ref << 8);
break;
}
lsample = m_dsp.data[m_dsp.d_rptr];
@ -1630,8 +1634,8 @@ void sb_device::device_timer(emu_timer &timer, device_timer_id tid, int param, v
{
m_dsp.adpcm_ref = m_dsp.data[m_dsp.d_rptr++];
m_dsp.adpcm_new_ref = false;
m_dacl->write_unsigned8(m_dsp.adpcm_ref);
m_dacr->write_unsigned8(m_dsp.adpcm_ref);
m_ldac->write(m_dsp.adpcm_ref << 8);
m_rdac->write(m_dsp.adpcm_ref << 8);
break;
}
lsample = m_dsp.data[m_dsp.d_rptr];
@ -1655,8 +1659,8 @@ void sb_device::device_timer(emu_timer &timer, device_timer_id tid, int param, v
{
m_dsp.adpcm_ref = m_dsp.data[m_dsp.d_rptr++];
m_dsp.adpcm_new_ref = false;
m_dacl->write_unsigned8(m_dsp.adpcm_ref);
m_dacr->write_unsigned8(m_dsp.adpcm_ref);
m_ldac->write(m_dsp.adpcm_ref << 8);
m_rdac->write(m_dsp.adpcm_ref << 8);
break;
}
lsample = m_dsp.data[m_dsp.d_rptr];

View File

@ -99,8 +99,8 @@ public:
// construction/destruction
sb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, UINT32 clock, const char *name, const char *shortname, const char *source);
required_device<dac_device> m_dacl;
required_device<dac_device> m_dacr;
required_device<dac_16bit_r2r_device> m_ldac;
required_device<dac_16bit_r2r_device> m_rdac;
required_device<pc_joy_device> m_joy;
required_device<midi_port_device> m_mdout;
required_ioport m_config;

View File

@ -5,6 +5,8 @@
// TODO: UART is connected to MIDI port
#include "stereo_fx.h"
#include "sound/dac.h"
#include "sound/volt_reg.h"
const device_type ISA8_STEREO_FX = &device_creator<stereo_fx_device>;
@ -89,13 +91,13 @@ ROM_END
static ADDRESS_MAP_START(stereo_fx_io, AS_IO, 8, stereo_fx_device)
AM_RANGE(0xFF00, 0xFF00) AM_WRITE(port00_w)
AM_RANGE(0xFF10, 0xFF10) AM_DEVWRITE("dacr", dac_device, write_unsigned8)
AM_RANGE(0xFF10, 0xFF10) AM_DEVWRITE("rdac", dac_byte_interface, write)
AM_RANGE(0xFF20, 0xFF20) AM_WRITE(port20_w)
//AM_RANGE(0xFF30, 0xFF30) AM_WRITE() // used only on reset and undocumented cmd 0xc4
AM_RANGE(0xFF40, 0xFF40) AM_READWRITE(dev_dsp_data_r, dev_dsp_data_w)
AM_RANGE(0xFF50, 0xFF50) AM_WRITE(raise_drq_w)
AM_RANGE(0xFF60, 0xFF60) AM_WRITE(dev_host_irq_w)
AM_RANGE(MCS51_PORT_P1, MCS51_PORT_P1) AM_READ(p1_r) AM_DEVWRITE("dacl", dac_device, write_unsigned8)
AM_RANGE(MCS51_PORT_P1, MCS51_PORT_P1) AM_READ(p1_r) AM_DEVWRITE("ldac", dac_byte_interface, write)
AM_RANGE(MCS51_PORT_P3, MCS51_PORT_P3) AM_READWRITE(p3_r, p3_w)
ADDRESS_MAP_END
@ -114,10 +116,11 @@ static MACHINE_CONFIG_FRAGMENT( stereo_fx )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.00)
/* no CM/S support (empty sockets) */
MCFG_SOUND_ADD("dacl", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.00)
MCFG_SOUND_ADD("dacr", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.00)
MCFG_SOUND_ADD("ldac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) // unknown DAC
MCFG_SOUND_ADD("rdac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_PC_JOY_ADD("pc_joy")
MACHINE_CONFIG_END
@ -189,8 +192,6 @@ READ8_MEMBER( stereo_fx_device::invalid_r )
stereo_fx_device::stereo_fx_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, ISA8_STEREO_FX, "ATI Stereo F/X Audio Adapter", tag, owner, clock, "stereo_fx", __FILE__),
device_isa8_card_interface(mconfig, *this),
m_dacl(*this, "dacl"),
m_dacr(*this, "dacr"),
m_joy(*this, "pc_joy"),
m_cpu(*this, "stereo_fx_cpu"), m_data_in(false), m_in_byte(0), m_data_out(false), m_out_byte(0), m_port20(0), m_port00(0), m_timer(nullptr), m_t0(0)
{

View File

@ -5,7 +5,6 @@
#include "emu.h"
#include "isa.h"
#include "sound/dac.h"
#include "bus/pc_joy/pc_joy.h"
#include "cpu/mcs51/mcs51.h"
#include "sound/3812intf.h"
@ -27,8 +26,6 @@ public:
virtual const tiny_rom_entry *device_rom_region() const override;
virtual machine_config_constructor device_mconfig_additions() const override;
required_device<dac_device> m_dacl;
required_device<dac_device> m_dacr;
required_device<pc_joy_device> m_joy;
required_device<cpu_device> m_cpu;

View File

@ -18,7 +18,6 @@
#include "imagedev/harddriv.h"
#include "pci.h"
#include "sound/dac.h"
#include "sound/speaker.h"
#include "machine/ram.h"
#include "machine/nvram.h"

View File

@ -2,6 +2,7 @@
// copyright-holders:Wilbert Pol
#include "emu.h"
#include "konami.h"
#include "sound/volt_reg.h"
const device_type MSX_CART_KONAMI = &device_creator<msx_cart_konami>;
const device_type MSX_CART_KONAMI_SCC = &device_creator<msx_cart_konami_scc>;
@ -476,9 +477,10 @@ msx_cart_synthesizer::msx_cart_synthesizer(const machine_config &mconfig, const
static MACHINE_CONFIG_FRAGMENT( synthesizer )
// This is actually incorrect. The sound output is passed back into the MSX machine where it is mixed internally and output through the system 'speaker'.
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("dac", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@ -518,7 +520,7 @@ WRITE8_MEMBER(msx_cart_synthesizer::write_cart)
{
if ((offset & 0xc010) == 0x4000)
{
m_dac->write_unsigned8(data);
m_dac->write(data);
}
}

View File

@ -112,7 +112,7 @@ public:
private:
UINT8 *m_bank_base;
required_device<dac_device> m_dac;
required_device<dac_byte_interface> m_dac;
};

View File

@ -2,6 +2,7 @@
// copyright-holders:Wilbert Pol
#include "emu.h"
#include "majutsushi.h"
#include "sound/volt_reg.h"
const device_type MSX_CART_MAJUTSUSHI = &device_creator<msx_cart_majutsushi>;
@ -24,9 +25,10 @@ msx_cart_majutsushi::msx_cart_majutsushi(const machine_config &mconfig, const ch
static MACHINE_CONFIG_FRAGMENT( majutsushi )
// This is actually incorrect. The sound output is passed back into the MSX machine where it is mixed internally and output through the system 'speaker'.
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("dac", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.05) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@ -90,7 +92,7 @@ WRITE8_MEMBER(msx_cart_majutsushi::write_cart)
case 0x4000:
if (offset & 0x1000)
{
m_dac->write_unsigned8(data);
m_dac->write(data);
}
break;

View File

@ -29,7 +29,7 @@ public:
void restore_banks();
private:
required_device<dac_device> m_dac;
required_device<dac_byte_interface> m_dac;
UINT8 m_selected_bank[4];
UINT8 *m_bank_base[8];

View File

@ -47,6 +47,7 @@ Connections
*/
#include "2joysnd.h"
#include "sound/volt_reg.h"
//**************************************************************************
@ -55,12 +56,11 @@ Connections
const device_type PET_USERPORT_JOYSTICK_AND_SOUND_DEVICE = &device_creator<pet_userport_joystick_and_sound_device>;
#define DAC_TAG "dac"
MACHINE_CONFIG_FRAGMENT( 2joysnd )
MCFG_SPEAKER_STANDARD_MONO("cb2spkr")
MCFG_SOUND_ADD(DAC_TAG, DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "cb2spkr", 1.00)
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99)
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
//-------------------------------------------------
@ -113,7 +113,7 @@ machine_config_constructor pet_userport_joystick_and_sound_device::device_mconfi
pet_userport_joystick_and_sound_device::pet_userport_joystick_and_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, PET_USERPORT_JOYSTICK_AND_SOUND_DEVICE, "Dual Joysticks and Sound", tag, owner, clock, "2joysnd", __FILE__),
device_pet_user_port_interface(mconfig, *this),
m_dac(*this, DAC_TAG),
m_dac(*this, "dac"),
m_up1(1),
m_down1(1),
m_fire1(1),
@ -158,5 +158,5 @@ void pet_userport_joystick_and_sound_device::update_port2()
DECLARE_WRITE_LINE_MEMBER( pet_userport_joystick_and_sound_device::input_m )
{
m_dac->write_unsigned8(state ? 0xff : 0x00);
m_dac->write(state);
}

View File

@ -37,7 +37,7 @@ public:
virtual DECLARE_WRITE_LINE_MEMBER( input_m ) override;
required_device<dac_device> m_dac;
required_device<dac_bit_interface> m_dac;
// device_pet_user_port_interface overrides
WRITE_LINE_MEMBER( write_up1 ) { m_up1 = state; update_port1(); }

View File

@ -9,6 +9,7 @@
**********************************************************************/
#include "cb2snd.h"
#include "sound/volt_reg.h"
//**************************************************************************
// DEVICE DEFINITIONS
@ -16,12 +17,11 @@
const device_type PET_USERPORT_CB2_SOUND_DEVICE = &device_creator<pet_userport_cb2_sound_device>;
#define DAC_TAG "dac"
MACHINE_CONFIG_FRAGMENT( cb2snd )
MCFG_SPEAKER_STANDARD_MONO("cb2spkr")
MCFG_SOUND_ADD(DAC_TAG, DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "cb2spkr", 1.00)
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99)
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
//-------------------------------------------------
@ -45,7 +45,7 @@ machine_config_constructor pet_userport_cb2_sound_device::device_mconfig_additio
pet_userport_cb2_sound_device::pet_userport_cb2_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, PET_USERPORT_CB2_SOUND_DEVICE, "PET Userport 'CB2 Sound' Device", tag, owner, clock, "petucb2", __FILE__),
device_pet_user_port_interface(mconfig, *this),
m_dac(*this, DAC_TAG)
m_dac(*this, "dac")
{
}
@ -60,5 +60,5 @@ void pet_userport_cb2_sound_device::device_start()
DECLARE_WRITE_LINE_MEMBER( pet_userport_cb2_sound_device::input_m )
{
m_dac->write_unsigned8(state ? 0xff : 0x00);
m_dac->write(state);
}

View File

@ -30,7 +30,7 @@ public:
virtual DECLARE_WRITE_LINE_MEMBER( input_m ) override;
required_device<dac_device> m_dac;
required_device<dac_bit_interface> m_dac;
protected:
// device-level overrides

View File

@ -62,11 +62,9 @@ const tiny_rom_entry *plus4_sid_cartridge_device::device_rom_region() const
//-------------------------------------------------
static MACHINE_CONFIG_FRAGMENT( plus4_sid )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD(MOS8580_TAG, MOS8580, XTAL_17_73447MHz/20)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MCFG_SOUND_ADD("dac", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, nullptr)
MACHINE_CONFIG_END

View File

@ -14,7 +14,6 @@
#include "emu.h"
#include "exp.h"
#include "bus/vcs_ctrl/ctrl.h"
#include "sound/dac.h"
#include "sound/mos6581.h"

View File

@ -178,7 +178,7 @@ inline void mc6846_device::update_cto()
m_old_cto = cto;
}
if ( !m_out_cto_cb.isnull() )
m_out_cto_cb( (offs_t) 0, cto );
m_out_cto_cb( cto );
}
@ -396,7 +396,7 @@ WRITE8_MEMBER(mc6846_device::write)
{
m_cp2_cpu = (data >> 3) & 1;
if ( !m_out_cp2_cb.isnull() )
m_out_cp2_cb( (offs_t) 0, m_cp2_cpu );
m_out_cp2_cb( m_cp2_cpu );
}
else
logerror( "%s mc6846 acknowledge not implemented\n", machine().describe_context() );

View File

@ -96,14 +96,14 @@ private:
/* CPU write to the outside through chip */
devcb_write8 m_out_port_cb; /* 8-bit output */
devcb_write8 m_out_cp1_cb; /* 1-bit output */
devcb_write8 m_out_cp2_cb; /* 1-bit output */
devcb_write_line m_out_cp1_cb; /* 1-bit output */
devcb_write_line m_out_cp2_cb; /* 1-bit output */
/* CPU read from the outside through chip */
devcb_read8 m_in_port_cb; /* 8-bit input */
/* asynchronous timer output to outside world */
devcb_write8 m_out_cto_cb; /* 1-bit output */
devcb_write_line m_out_cto_cb; /* 1-bit output */
/* timer interrupt */
devcb_write_line m_irq_cb;

View File

@ -12,7 +12,6 @@
#include "cpu/arm7/arm7.h"
#include "cpu/arm7/arm7core.h"
#include "machine/s3c2400.h"
#include "sound/dac.h"
#define VERBOSE_LEVEL ( 0 )

View File

@ -12,7 +12,6 @@
#include "cpu/arm7/arm7.h"
#include "cpu/arm7/arm7core.h"
#include "machine/s3c2410.h"
#include "sound/dac.h"
#define VERBOSE_LEVEL ( 0 )

View File

@ -12,7 +12,6 @@
#include "cpu/arm7/arm7.h"
#include "cpu/arm7/arm7core.h"
#include "machine/s3c2440.h"
#include "sound/dac.h"
#define VERBOSE_LEVEL ( 0 )

View File

@ -12,7 +12,6 @@
#include "cpu/arm7/arm7.h"
#include "cpu/arm7/arm7core.h"
#include "machine/s3c44b0.h"
#include "sound/dac.h"
#include "coreutil.h"
#define VERBOSE_LEVEL ( 0 )

View File

@ -4,6 +4,7 @@
// Analog Devices AD1848, main codec in Windows Sound System adapters
#include "sound/ad1848.h"
#include "sound/volt_reg.h"
const device_type AD1848 = device_creator<ad1848_device>;
@ -11,17 +12,18 @@ ad1848_device::ad1848_device(const machine_config &mconfig, const char *tag, dev
device_t(mconfig, AD1848, "Analog Devices AD1848", tag, owner, clock, "ad1848", __FILE__),
m_irq_cb(*this),
m_drq_cb(*this),
m_dacl(*this, "dacl"),
m_dacr(*this, "dacr")
m_ldac(*this, "ldac"),
m_rdac(*this, "rdac")
{
}
static MACHINE_CONFIG_FRAGMENT( ad1848_config )
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
MCFG_SOUND_ADD("dacl", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.00)
MCFG_SOUND_ADD("dacr", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.00)
MCFG_SOUND_ADD("ldac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) // unknown DAC
MCFG_SOUND_ADD("rdac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
machine_config_constructor ad1848_device::device_mconfig_additions() const
@ -149,12 +151,12 @@ void ad1848_device::device_timer(emu_timer &timer, device_timer_id id, int param
switch(m_regs.dform >> 4)
{
case 0: // 8bit mono
m_dacl->write_unsigned8(m_samples & 0xff);
m_dacr->write_unsigned8(m_samples & 0xff);
m_ldac->write(m_samples << 8);
m_rdac->write(m_samples << 8);
break;
case 1: // 8bit stereo
m_dacl->write_unsigned8(m_samples & 0xff);
m_dacr->write_unsigned8((m_samples >> 8) & 0xff);
m_ldac->write(m_samples << 8);
m_rdac->write(m_samples & 0xff00);
break;
case 2: // ulaw mono
case 3: // ulaw stereo
@ -162,12 +164,12 @@ void ad1848_device::device_timer(emu_timer &timer, device_timer_id id, int param
case 7: // alaw stereo
break;
case 4: // 16bit mono
m_dacl->write(m_samples & 0xffff);
m_dacr->write(m_samples & 0xffff);
m_ldac->write(m_samples ^ 0x8000);
m_rdac->write(m_samples ^ 0x8000);
break;
case 5: // 16bit stereo
m_dacl->write(m_samples & 0xffff);
m_dacr->write(m_samples >> 16);
m_ldac->write(m_samples ^ 0x8000);
m_rdac->write((m_samples >> 16) ^ 0x8000);
break;
}
if(!m_count)

View File

@ -57,8 +57,8 @@ private:
bool m_play, m_mce, m_trd;
devcb_write_line m_irq_cb;
devcb_write_line m_drq_cb;
required_device<dac_device> m_dacl;
required_device<dac_device> m_dacr;
required_device<dac_word_interface> m_ldac;
required_device<dac_word_interface> m_rdac;
emu_timer *m_timer;
};

View File

@ -1,92 +1,18 @@
// license:BSD-3-Clause
// copyright-holders:Aaron Giles
// copyright-holders:smf
/***************************************************************************
dac.c
dac.cpp
DAC device emulator.
Four quadrant multiplying DAC.
Binary Weighted Resistor Network, R-2R Ladder & PWM
Binary, Ones Complement, Twos Complement or Sign Magnitude coding
***************************************************************************/
#include "emu.h"
#define DAC_GENERATOR_EPILOG(_dac_type, _dac_class) \
const device_type _dac_type = &device_creator<_dac_class>;
#include "dac.h"
// device type definition
const device_type DAC = &device_creator<dac_device>;
//**************************************************************************
// LIVE DEVICE
//**************************************************************************
//-------------------------------------------------
// dac_device - constructor
//-------------------------------------------------
dac_device::dac_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, DAC, "DAC", tag, owner, clock, "dac", __FILE__),
device_sound_interface(mconfig, *this),
m_stream(nullptr),
m_output(0)
{
}
//-------------------------------------------------
// write_unsigned8 - write an 8-bit value,
// keeping the scaled result unsigned
//-------------------------------------------------
WRITE8_MEMBER( dac_device::write_unsigned8 )
{
write_unsigned8(data);
}
//-------------------------------------------------
// write_signed8 - write an 8-bit value,
// keeping the scaled result signed
//-------------------------------------------------
WRITE8_MEMBER( dac_device::write_signed8 )
{
write_signed8(data);
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
void dac_device::device_start()
{
// create the stream
m_stream = stream_alloc(0, 1, DEFAULT_SAMPLE_RATE);
// register for save states
save_item(NAME(m_output));
}
//-------------------------------------------------
// device_reset - device-specific reset
//-------------------------------------------------
void dac_device::device_reset()
{
m_output = 0;
}
//-------------------------------------------------
// sound_stream_update - handle update requests
// for our sound stream
//-------------------------------------------------
void dac_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
{
// just fill with current value
for (int samp = 0; samp < samples; samp++)
outputs[0][samp] = m_output;
}

View File

@ -1,70 +1,319 @@
// license:BSD-3-Clause
// copyright-holders:Aaron Giles
// copyright-holders:smf
/***************************************************************************
dac.h
DAC device emulator.
Four quadrant multiplying DAC.
Binary Weighted Resistor Network, R-2R Ladder & PWM
Binary, Ones Complement, Twos Complement or Sign Magnitude coding
***************************************************************************/
#ifndef __DAC_H__
#define __DAC_H__
#include "emu.h"
//**************************************************************************
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
#define DAC_VREF_POS_INPUT (0)
#define DAC_VREF_NEG_INPUT (1)
#define MCFG_DAC_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, DAC, 0)
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
// ======================> dac_device
class dac_device : public device_t,
public device_sound_interface
class dac_bit_interface
{
// default to 4x oversampling
static const UINT32 DEFAULT_SAMPLE_RATE = 48000 * 4;
public:
// construction/destruction
dac_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
virtual DECLARE_WRITE_LINE_MEMBER(write) = 0;
virtual DECLARE_WRITE8_MEMBER(write) = 0;
};
// public interface
INT16 output() const { return m_output; }
void write(INT16 data) { m_stream->update(); m_output = data; }
void write_unsigned8(UINT8 data) { write(data * 32767 / 255); } // 0..255, mapped to 0..32767
void write_signed8(UINT8 data) { write((data - 0x80) * 32767 / 128); } // 0..255, mapped to -32767..32767
void write_unsigned16(UINT16 data) { write(data / 2); } // 0..65535, mapped to 0..32767
void write_signed16(UINT16 data) { write(data - 0x8000); } // 0..65535, mapped to -32768..32767
class dac_byte_interface
{
public:
virtual void write(unsigned char data) = 0;
virtual DECLARE_WRITE8_MEMBER(write) = 0;
};
// wrappers
DECLARE_WRITE8_MEMBER( write_unsigned8 );
DECLARE_WRITE8_MEMBER( write_signed8 );
class dac_word_interface
{
public:
virtual void write(unsigned short data) = 0;
virtual DECLARE_WRITE16_MEMBER(write) = 0;
};
template <int bits>
stream_sample_t dac_multiply(const double vref, const stream_sample_t code)
{
if (bits > 1)
return (vref * code) / (1 << (bits));
return vref * code;
}
template <int bits>
class dac_code
{
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
dac_code(double gain) :
m_stream(nullptr),
m_code(0),
m_gain(gain)
{
}
// device_sound_interface overrides
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override;
sound_stream * m_stream;
stream_sample_t m_code;
const double m_gain;
// internal state
sound_stream * m_stream;
INT16 m_output;
inline void setCode(stream_sample_t code)
{
code &= ~(~0U << bits);
if (m_code != code)
{
m_stream->update();
m_code = code;
}
}
virtual void sound_stream_update_tag(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) = 0;
};
template <int bits>
class dac_code_binary :
protected dac_code<bits>
{
protected:
dac_code_binary(double gain) :
dac_code<bits>(gain)
{
}
virtual void sound_stream_update_tag(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override
{
for (int samp = 0; samp < samples; samp++)
{
double vref_pos = inputs[DAC_VREF_POS_INPUT][samp] * this->m_gain;
double vref_neg = inputs[DAC_VREF_NEG_INPUT][samp] * this->m_gain;
stream_sample_t vout = vref_neg + dac_multiply<bits>(vref_pos - vref_neg, this->m_code);
outputs[0][samp] = vout;
}
}
};
template <int bits>
class dac_code_ones_complement :
protected dac_code<bits>
{
protected:
dac_code_ones_complement(double gain) : dac_code<bits>(gain) {}
virtual void sound_stream_update_tag(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override
{
if (this->m_code & (1 << (bits - 1)))
{
for (int samp = 0; samp < samples; samp++)
{
double vref_neg = inputs[DAC_VREF_NEG_INPUT][samp] * this->m_gain;
stream_sample_t vout = dac_multiply<bits - 1>(vref_neg, this->m_code ^ ~(~0U << bits));
outputs[0][samp] = vout;
}
}
else
{
for (int samp = 0; samp < samples; samp++)
{
double vref_pos = inputs[DAC_VREF_POS_INPUT][samp] * this->m_gain;
stream_sample_t vout = dac_multiply<bits - 1>(vref_pos, this->m_code);
outputs[0][samp] = vout;
}
}
}
};
template <int bits>
class dac_code_twos_complement :
protected dac_code<bits>
{
protected:
dac_code_twos_complement(double gain) :
dac_code<bits>(gain)
{
}
virtual void sound_stream_update_tag(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override
{
for (int samp = 0; samp < samples; samp++)
{
double vref_pos = inputs[DAC_VREF_POS_INPUT][samp] * this->m_gain;
double vref_neg = inputs[DAC_VREF_NEG_INPUT][samp] * this->m_gain;
stream_sample_t vout = vref_neg + dac_multiply<bits>(vref_pos - vref_neg, this->m_code ^ (1 << (bits - 1)));
outputs[0][samp] = vout;
}
}
};
template <int bits>
class dac_code_sign_magntitude :
protected dac_code<bits>
{
protected:
dac_code_sign_magntitude(double gain) :
dac_code<bits>(gain)
{
}
virtual void sound_stream_update_tag(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override
{
if (this->m_code & (1 << (bits - 1)))
{
for (int samp = 0; samp < samples; samp++)
{
double vref_neg = inputs[DAC_VREF_NEG_INPUT][samp] * this->m_gain;
stream_sample_t vout = dac_multiply<bits - 1>(vref_neg, this->m_code ^ (1 << (bits - 1)));
outputs[0][samp] = vout;
}
}
else
{
for (int samp = 0; samp < samples; samp++)
{
double vref_pos = inputs[DAC_VREF_POS_INPUT][samp] * this->m_gain;
stream_sample_t vout = dac_multiply<bits - 1>(vref_pos, this->m_code);
outputs[0][samp] = vout;
}
}
}
};
// device type definition
extern const device_type DAC;
template <typename _dac_code>
class dac_device : public device_t,
public device_sound_interface,
protected _dac_code
{
protected:
dac_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source, double gain)
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_sound_interface(mconfig, *this),
_dac_code(gain)
{
}
virtual void device_start() override
{
this->m_stream = stream_alloc(2, 1, 48000 * 4);
save_item(NAME(this->m_code));
}
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override
{
_dac_code::sound_stream_update_tag(stream, inputs, outputs, samples);
}
};
template <typename dac_interface, typename _dac_code> class dac_generator;
template <typename _dac_code>
class dac_generator<dac_bit_interface, _dac_code> :
public dac_bit_interface,
public dac_device<_dac_code>
{
public:
dac_generator(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source, double gain) :
dac_device<_dac_code>(mconfig, type, name, tag, owner, clock, shortname, source, gain)
{
}
virtual WRITE_LINE_MEMBER(write) override { this->setCode(state); }
virtual WRITE8_MEMBER(write) override { this->setCode(data); }
};
template <typename _dac_code>
class dac_generator<dac_byte_interface, _dac_code> :
public dac_byte_interface,
public dac_device<_dac_code>
{
public:
dac_generator(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source, double gain) :
dac_device<_dac_code>(mconfig, type, name, tag, owner, clock, shortname, source, gain)
{
}
virtual void write(unsigned char data) override { this->setCode(data); }
virtual DECLARE_WRITE8_MEMBER(write) override { this->setCode(data); }
};
template <typename _dac_code>
class dac_generator<dac_word_interface, _dac_code> :
public dac_word_interface,
public dac_device<_dac_code>
{
public:
dac_generator(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source, double gain) :
dac_device<_dac_code>(mconfig, type, name, tag, owner, clock, shortname, source, gain)
{
}
virtual void write(unsigned short data) override { this->setCode(data); }
virtual DECLARE_WRITE16_MEMBER(write) override { this->setCode(data); }
};
const double dac_gain_r2r = 1.0;
const double dac_gain_binary_weighted = 2.0;
#ifndef DAC_GENERATOR_EPILOG
#define DAC_GENERATOR_EPILOG(_dac_type, _dac_class) //
#endif
#define DAC_GENERATOR(_dac_type, _dac_class, _dac_interface, _dac_coding, _dac_gain, _dac_description, _dac_shortname) \
extern const device_type _dac_type; \
class _dac_class : public dac_generator<_dac_interface, _dac_coding> \
{\
public: \
_dac_class(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : \
dac_generator(mconfig, _dac_type, _dac_description, tag, owner, clock, _dac_shortname, __FILE__, _dac_gain) {} \
}; \
DAC_GENERATOR_EPILOG(_dac_type, _dac_class)
// DAC chips
DAC_GENERATOR(AD7521, ad7521_device, dac_word_interface, dac_code_binary<12>, dac_gain_r2r, "AD7521", "ad7521")
DAC_GENERATOR(AD7524, ad7524_device, dac_byte_interface, dac_code_binary<8>, dac_gain_r2r, "AD7524", "ad7524")
DAC_GENERATOR(AD7528, ad7528_device, dac_byte_interface, dac_code_binary<8>, dac_gain_r2r, "AD7528", "ad7528") /// 2 x vin + 2 x vout
DAC_GENERATOR(AD7533, ad7533_device, dac_word_interface, dac_code_binary<10>, dac_gain_r2r, "AD7533", "ad7533")
DAC_GENERATOR(AD7541, ad7541_device, dac_word_interface, dac_code_binary<12>, dac_gain_r2r, "AD7541", "ad7541")
DAC_GENERATOR(AM6012, am6012_device, dac_word_interface, dac_code_binary<12>, dac_gain_r2r, "AM6012", "am6012")
DAC_GENERATOR(DAC0800, dac0800_device, dac_byte_interface, dac_code_binary<8>, dac_gain_r2r, "DAC0800", "dac0800")
DAC_GENERATOR(DAC1200, dac1200_device, dac_word_interface, dac_code_binary<12>, dac_gain_r2r, "DAC1200", "dac1200")
DAC_GENERATOR(MC1408, mc1408_device, dac_byte_interface, dac_code_binary<8>, dac_gain_r2r, "MC1408", "mc1408")
DAC_GENERATOR(MC3408, mc3408_device, dac_byte_interface, dac_code_binary<8>, dac_gain_r2r, "MC3408", "mc3408")
DAC_GENERATOR(MC3410, mc3410_device, dac_word_interface, dac_code_binary<10>, dac_gain_r2r, "MC3410", "mc3410")
DAC_GENERATOR(PCM54HP, pcm54hp_device, dac_word_interface, dac_code_binary<16>, dac_gain_r2r, "PCM54HP", "pcm54hp")
DAC_GENERATOR(UDA1341TS, uda1341ts_device, dac_word_interface, dac_code_twos_complement<16>, dac_gain_r2r, "UDA1341TS", "uda1341ts") // I2C stereo audio codec
DAC_GENERATOR(ZN425E, zn425e_device, dac_byte_interface, dac_code_binary<8>, dac_gain_r2r, "ZN425E", "zn425e")
// DAC circuits/unidentified chips
DAC_GENERATOR(DAC_1BIT, dac_1bit_device, dac_bit_interface, dac_code_binary<1>, 1.0, "1-Bit DAC", "dac")
DAC_GENERATOR(DAC_2BIT_BINARY_WEIGHTED, dac_2bit_binary_weighted_device, dac_byte_interface, dac_code_binary<2>, dac_gain_binary_weighted, "2-Bit Binary Weighted DAC", "dac_2bit_bw")
DAC_GENERATOR(DAC_2BIT_BINARY_WEIGHTED_ONES_COMPLEMENT, dac_2bit_binary_weighted_ones_complement_device, dac_byte_interface, dac_code_ones_complement<2>, dac_gain_binary_weighted, "2-Bit Binary Weighted Ones Complement DAC", "dac_2bit_bw_oc")
DAC_GENERATOR(DAC_2BIT_R2R, dac_2bit_r2r_device, dac_byte_interface, dac_code_binary<2>, dac_gain_r2r, "2-Bit R-2R DAC", "dac_2bit_r2r")
DAC_GENERATOR(DAC_3BIT_BINARY_WEIGHTED, dac_3bit_binary_weighted_device, dac_byte_interface, dac_code_binary<3>, dac_gain_binary_weighted, "3-Bit Binary Weighted DAC", "dac_3bit_bw")
DAC_GENERATOR(DAC_4BIT_BINARY_WEIGHTED, dac_4bit_binary_weighted_device, dac_byte_interface, dac_code_binary<4>, dac_gain_binary_weighted, "4-Bit Binary Weighted DAC", "dac_4bit_bw")
DAC_GENERATOR(DAC_4BIT_BINARY_WEIGHTED_SIGN_MAGNITUDE, dac_4bit_binary_weighted_sign_magnitude_device, dac_byte_interface, dac_code_sign_magntitude<4>, dac_gain_binary_weighted, "4-Bit Binary Weighted Sign Magnitude DAC", "dac_4bit_bw_sm")
DAC_GENERATOR(DAC_4BIT_R2R, dac_4bit_r2r_device, dac_byte_interface, dac_code_binary<4>, dac_gain_r2r, "4-Bit R-2R DAC", "dac_4bit_r2r")
DAC_GENERATOR(DAC_6BIT_BINARY_WEIGHTED, dac_6bit_binary_weighted_device, dac_byte_interface, dac_code_binary<6>, dac_gain_binary_weighted, "6-Bit Binary Weighted DAC", "dac_6bit_bw")
DAC_GENERATOR(DAC_6BIT_R2R, dac_6bit_r2r_device, dac_byte_interface, dac_code_binary<6>, dac_gain_r2r, "6-Bit R-2R DAC", "dac_6bit_r2r")
DAC_GENERATOR(DAC_8BIT_BINARY_WEIGHTED, dac_binary_weighted_8bit_device, dac_byte_interface, dac_code_binary<8>, dac_gain_binary_weighted, "8-Bit Binary Weighted DAC", "dac_8bit_bw")
DAC_GENERATOR(DAC_8BIT_PWM, dac_8bit_pwm_device, dac_byte_interface, dac_code_binary<8>, dac_gain_r2r, "8-Bit PWM DAC", "dac_8bit_pwm")
DAC_GENERATOR(DAC_8BIT_R2R, dac_8bit_r2r_device, dac_byte_interface, dac_code_binary<8>, dac_gain_r2r, "8-Bit R-2R DAC", "dac_8bit_r2r")
DAC_GENERATOR(DAC_8BIT_R2R_TWOS_COMPLEMENT, dac_8bit_r2r_twos_complement_device, dac_byte_interface, dac_code_twos_complement<8>, dac_gain_r2r, "8-Bit R-2R Twos Complement DAC", "dac_8bit_r2r_tc")
DAC_GENERATOR(DAC_10BIT_R2R, dac_10bit_r2r_device, dac_word_interface, dac_code_binary<10>, dac_gain_r2r, "10-Bit R-2R DAC", "dac_10bit_r2r")
DAC_GENERATOR(DAC_12BIT_R2R, dac_12bit_r2r_device, dac_word_interface, dac_code_binary<12>, dac_gain_r2r, "12-Bit R-2R DAC", "dac_12bit_r2r")
DAC_GENERATOR(DAC_12BIT_R2R_TWOS_COMPLEMENT, dac_12bit_r2r_twos_complement_device, dac_word_interface, dac_code_twos_complement<12>, dac_gain_r2r, "12-Bit R-2R Twos Complement DAC", "dac_12bit_r2r_tc")
DAC_GENERATOR(DAC_16BIT_R2R, dac_16bit_r2r_device, dac_word_interface, dac_code_binary<16>, dac_gain_r2r, "16-Bit R-2R DAC", "dac_16bit_r2r")
DAC_GENERATOR(DAC_16BIT_R2R_TWOS_COMPLEMENT, dac_16bit_r2r_twos_complement_device, dac_word_interface, dac_code_twos_complement<16>, dac_gain_r2r, "16-Bit R-2R Twos Complement DAC", "dac_16bit_r2r_tc")
#undef DAC_GENERATOR
#undef DAC_GENERATOR_EPILOG
#endif /* __DAC_H__ */

View File

@ -45,7 +45,7 @@
#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
/* digital filters work at 8 kHz */
#define F0 8096
#define F0 (clock() / 480)
/* filtered output is supersampled x 8 */
#define SUPERSAMPLING 8
@ -115,9 +115,11 @@ const device_type MEA8000 = &device_creator<mea8000_device>;
mea8000_device::mea8000_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, MEA8000, "Philips / Signetics MEA 8000 speech synthesizer", tag, owner, clock, "mea8000", __FILE__)
, m_write_req(*this)
, m_dac(*this, finder_base::DUMMY_TAG)
: device_t(mconfig, MEA8000, "Philips / Signetics MEA 8000 speech synthesizer", tag, owner, clock, "mea8000", __FILE__),
device_sound_interface(mconfig, *this),
m_write_req(*this),
m_stream(nullptr),
m_output(0)
{
}
@ -132,6 +134,9 @@ void mea8000_device::device_start()
init_tables();
m_stream = stream_alloc(0, 1, clock() / 60);
save_item(NAME(m_output));
m_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(mea8000_device::timer_expire),this));
save_item(NAME(m_state));
@ -161,26 +166,6 @@ void mea8000_device::device_start()
save_item(NAME(m_noise));
}
//-------------------------------------------------
// device_reset - device-specific reset
//-------------------------------------------------
void mea8000_device::device_reset()
{
LOG(("mea8000_reset\n"));
m_timer->reset();
m_phi = 0;
m_cont = 0;
m_roe = 0;
m_state = MEA8000_STOPPED;
update_req();
for (auto & elem : m_f)
{
elem.last_output = 0;
elem.output = 0;
}
}
/***************************** REQ **********************************/
@ -431,11 +416,20 @@ void mea8000_device::stop_frame()
/* enter stop mode */
m_timer->reset();
m_state = MEA8000_STOPPED;
m_dac->write_signed16(0x8000);
m_stream->update();
m_output = 0;
}
void mea8000_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
{
for (int samp = 0; samp < samples; samp++)
{
outputs[0][samp] = m_output;
}
}
/* next sample in frame, sampling at 64 kHz */
TIMER_CALLBACK_MEMBER( mea8000_device::timer_expire )
{
@ -446,13 +440,15 @@ TIMER_CALLBACK_MEMBER( mea8000_device::timer_expire )
/* sample is really computed only every 8-th time */
m_lastsample = m_sample;
m_sample = compute_sample();
m_dac->write_signed16(0x8000 + m_lastsample);
m_stream->update();
m_output = m_lastsample;
}
else
{
/* other samples are simply interpolated */
int sample = m_lastsample + ((pos * (m_sample-m_lastsample)) / SUPERSAMPLING);
m_dac->write_signed16(0x8000 + sample);
m_stream->update();
m_output = sample;
}
m_framepos++;

View File

@ -11,8 +11,6 @@
#ifndef __MEA8000_H__
#define __MEA8000_H__
#include "sound/dac.h"
#define MCFG_MEA8000_DAC(_tag) \
mea8000_device::static_set_dac_tag(*device, "^" _tag);
@ -54,13 +52,13 @@ struct filter_t
#endif
};
class mea8000_device : public device_t
class mea8000_device : public device_t,
public device_sound_interface
{
public:
mea8000_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
~mea8000_device() {}
static void static_set_dac_tag(device_t &device, const char *tag) { downcast<mea8000_device &>(device).m_dac.set_tag(tag); }
template<class _Object> static devcb_base &set_req_wr_callback(device_t &device, _Object object) { return downcast<mea8000_device &>(device).m_write_req.set_callback(object); }
DECLARE_READ8_MEMBER(read);
@ -69,7 +67,7 @@ public:
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override;
private:
// internal state
@ -100,8 +98,6 @@ private:
devcb_write8 m_write_req;
required_device<dac_device> m_dac;
/* state */
mea8000_state m_state; /* current state */
@ -126,6 +122,8 @@ private:
UINT8 m_noise;
emu_timer *m_timer;
sound_stream * m_stream;
stream_sample_t m_output;
int m_cos_table[TABLE_LEN]; /* fm => cos coefficient */
int m_exp_table[TABLE_LEN]; /* bw => exp coefficient */

View File

@ -0,0 +1,33 @@
// license:BSD-3-Clause
// copyright-holders:smf
/***************************************************************************
volt_reg.c
Direct current.
***************************************************************************/
#include "volt_reg.h"
const device_type VOLTAGE_REGULATOR = &device_creator<voltage_regulator_device>;
voltage_regulator_device::voltage_regulator_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, VOLTAGE_REGULATOR, "Voltage Regulator", tag, owner, clock, "volt_reg", __FILE__),
device_sound_interface(mconfig, *this),
m_output(0)
{
}
void voltage_regulator_device::device_start()
{
m_stream = stream_alloc(0, 1, 500);
}
void voltage_regulator_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
{
for (int samp = 0; samp < samples; samp++)
{
outputs[0][samp] = m_output;
}
}

View File

@ -0,0 +1,44 @@
// license:BSD-3-Clause
// copyright-holders:smf
/***************************************************************************
volt_reg.h
Voltage Regulator
***************************************************************************/
#ifndef __VOLTAGE_REGULATOR_H__
#define __VOLTAGE_REGULATOR_H__
#include "emu.h"
#define MCFG_VOLTAGE_REGULATOR_OUTPUT(_output) \
voltage_regulator_device::set_output(*device, _output);
class voltage_regulator_device : public device_t,
public device_sound_interface
{
public:
static void set_output(device_t &device, double analogue_dc) { downcast<voltage_regulator_device &>(device).m_output = (analogue_dc * 32768) / 5.0f; }
voltage_regulator_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
~voltage_regulator_device() { }
virtual bool issound() override { return false; }
protected:
// device-level overrides
virtual void device_start() override;
// sound stream update overrides
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override;
private:
sound_stream* m_stream;
stream_sample_t m_output;
};
extern const device_type VOLTAGE_REGULATOR;
#endif

View File

@ -81,6 +81,8 @@ public:
device_sound_interface(const machine_config &mconfig, device_t &device);
virtual ~device_sound_interface();
virtual bool issound() { return true; } /// HACK: allow devices to hide from the ui
// configuration access
const std::vector<std::unique_ptr<sound_route>> &routes() const { return m_route_list; }

View File

@ -692,7 +692,7 @@ void info_xml_creator::output_chips(device_t &device, const char *root_tag)
// iterate over sound devices
for (device_sound_interface &sound : sound_interface_iterator(device))
{
if (strcmp(sound.device().tag(), device.tag()))
if (strcmp(sound.device().tag(), device.tag()) != 0 && sound.issound())
{
std::string newtag(sound.device().tag()), oldtag(":");
newtag = newtag.substr(newtag.find(oldtag.append(root_tag)) + oldtag.length());

View File

@ -112,7 +112,7 @@ void menu_device_config::populate()
std::unordered_set<std::string> soundtags;
for (device_sound_interface &sound : snditer)
{
if (!soundtags.insert(sound.device().tag()).second)
if (!sound.issound() || !soundtags.insert(sound.device().tag()).second)
continue;
// count how many identical sound chips we have

View File

@ -243,7 +243,7 @@ std::string machine_info::game_info_string()
bool found_sound = false;
for (device_sound_interface &sound : snditer)
{
if (!soundtags.insert(sound.device().tag()).second)
if (!sound.issound() || !soundtags.insert(sound.device().tag()).second)
continue;
// append the Sound: string

View File

@ -13,6 +13,7 @@
#include "emu.h"
#include "includes/alesis.h"
#include "sound/volt_reg.h"
#define LOG 1
@ -24,10 +25,11 @@ const device_type ALESIS_DM3AG = &device_creator<alesis_dm3ag_device>;
***************************************************************************/
static MACHINE_CONFIG_FRAGMENT( alesis_dm3ag )
MCFG_SPEAKER_STANDARD_STEREO("out1_left", "out1_right")
MCFG_SOUND_ADD("dac", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "out1_left", 1.0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "out1_right", 1.0)
MCFG_SPEAKER_STANDARD_STEREO("lspeaker1", "rspeaker1")
MCFG_SPEAKER_STANDARD_STEREO("lspeaker2", "rspeaker2")
MCFG_SOUND_ADD("dac", PCM54HP, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker1", 1.0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker1", 1.0) // PCM54HP DAC + R63/R73-75 + Sample and hold
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
//-------------------------------------------------
@ -114,7 +116,7 @@ void alesis_dm3ag_device::device_timer(emu_timer &timer, device_timer_id id, int
sample = m_samples[m_cur_sample++];
}
m_dac->write_signed16((sample << m_shift) + 0x8000);
m_dac->write(sample << m_shift);
}
}

View File

@ -11,7 +11,6 @@
#include "machine/z80ctc.h"
#include "includes/cchasm.h"
#include "sound/ay8910.h"
#include "sound/dac.h"
WRITE8_MEMBER(cchasm_state::reset_coin_flag_w)
@ -102,9 +101,8 @@ WRITE_LINE_MEMBER(cchasm_state::ctc_timer_1_w)
{
if (state) /* rising edge */
{
m_output[0] ^= 0x7f;
m_channel_active[0] = 1;
m_dac1->write_unsigned8(m_output[0]);
m_output[0] = !m_output[0];
m_dac1->write(m_output[0]);
}
}
@ -112,9 +110,8 @@ WRITE_LINE_MEMBER(cchasm_state::ctc_timer_2_w)
{
if (state) /* rising edge */
{
m_output[1] ^= 0x7f;
m_channel_active[1] = 1;
m_dac2->write_unsigned8(m_output[0]);
m_output[1] = !m_output[1];
m_dac2->write(m_output[1]);
}
}
@ -127,6 +124,5 @@ void cchasm_state::sound_start()
save_item(NAME(m_sound_flags));
save_item(NAME(m_coin_flag));
save_item(NAME(m_channel_active));
save_item(NAME(m_output));
}

View File

@ -22,12 +22,12 @@ SAMPLES_START_CB_MEMBER( cclimber_audio_device::sh_start )
MACHINE_CONFIG_FRAGMENT( cclimber_audio )
MCFG_SOUND_ADD("aysnd", AY8910, SND_CLOCK/2)
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(cclimber_audio_device, sample_select_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, ":mono", 0.50)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, ":speaker", 0.5)
MCFG_SOUND_ADD("samples", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(1)
MCFG_SAMPLES_START_CB(cclimber_audio_device, sh_start)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, ":mono", 0.5)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, ":speaker", 0.5)
MACHINE_CONFIG_END
//**************************************************************************

View File

@ -136,8 +136,15 @@ WRITE16_MEMBER(cyberbal_state::sound_68k_w)
WRITE16_MEMBER(cyberbal_state::sound_68k_dac_w)
{
dac_device *dac = (offset & 8) ? m_dac2 : m_dac1;
dac->write_unsigned16((((data >> 3) & 0x800) | ((data >> 2) & 0x7ff)) << 4);
//int clip = BIT(data, 15);
//int off0b = BIT(data, 13) | BIT(data, 14);
//int off4b = BIT(data, 13) & BIT(data, 14);
uint16 sample = ((data >> 3) & 0x800) | ((data >> 2) & 0x7ff);
if (offset & 8)
m_ldac->write(sample);
else
m_rdac->write(sample);
if (m_fast_68k_int)
{

View File

@ -509,20 +509,20 @@ void galaxian_sound_device::sound_stream_update(sound_stream &stream, stream_sam
MACHINE_CONFIG_FRAGMENT( galaxian_audio )
MCFG_SOUND_ADD("cust", GALAXIAN, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.4)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4)
MCFG_SOUND_ADD(GAL_AUDIO, DISCRETE, 0)
MCFG_DISCRETE_INTF(galaxian)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
MACHINE_CONFIG_FRAGMENT( mooncrst_audio )
MCFG_SOUND_ADD("cust", GALAXIAN, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.4)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4)
MCFG_SOUND_ADD(GAL_AUDIO, DISCRETE, 0)
MCFG_DISCRETE_INTF(mooncrst)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END

View File

@ -11,6 +11,8 @@
***************************************************************************/
#include "audio/gottlieb.h"
#include "sound/dac.h"
#include "sound/volt_reg.h"
#define SOUND1_CLOCK XTAL_3_579545MHz
@ -234,14 +236,14 @@ MACHINE_CONFIG_FRAGMENT( reactor_samples )
MCFG_SOUND_ADD("samples", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(1)
MCFG_SAMPLES_NAMES(reactor_sample_names)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
MACHINE_CONFIG_FRAGMENT( qbert_samples )
MCFG_SOUND_ADD("samples", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(1)
MCFG_SAMPLES_NAMES(qbert_sample_names)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
#endif
@ -260,7 +262,6 @@ gottlieb_sound_r0_device::gottlieb_sound_r0_device(const machine_config &mconfig
, device_mixer_interface(mconfig, *this)
, m_audiocpu(*this, "audiocpu")
, m_r6530(*this, "r6530")
, m_dac(*this, "dac")
, m_sndcmd(0)
{
}
@ -313,12 +314,13 @@ MACHINE_CONFIG_FRAGMENT( gottlieb_sound_r0 )
// I/O configuration
MCFG_DEVICE_ADD("r6530", MOS6530, SOUND1_CLOCK/4) // unknown - same as cpu
MCFG_MOS6530_OUT_PA_CB(DEVWRITE8("dac", dac_device, write_unsigned8))
MCFG_MOS6530_OUT_PA_CB(DEVWRITE8("dac", dac_byte_interface, write))
MCFG_MOS6530_IN_PB_CB(READ8(gottlieb_sound_r0_device, r6530b_r))
// sound devices
MCFG_DAC_ADD("dac")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.50)
MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.25) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@ -385,7 +387,6 @@ gottlieb_sound_r1_device::gottlieb_sound_r1_device(const machine_config &mconfig
device_mixer_interface(mconfig, *this),
m_audiocpu(*this, "audiocpu"),
m_riot(*this, "riot"),
m_dac(*this, "dac"),
m_votrax(*this, "votrax"),
//m_populate_votrax(false),
m_last_speech_clock(0)
@ -403,7 +404,6 @@ gottlieb_sound_r1_device::gottlieb_sound_r1_device(const machine_config &mconfig
device_mixer_interface(mconfig, *this),
m_audiocpu(*this, "audiocpu"),
m_riot(*this, "riot"),
m_dac(*this, "dac"),
m_votrax(*this, "votrax"),
//m_populate_votrax(populate_votrax),
m_last_speech_clock(0)
@ -522,7 +522,7 @@ static ADDRESS_MAP_START( gottlieb_sound_r1_map, AS_PROGRAM, 8, gottlieb_sound_r
ADDRESS_MAP_GLOBAL_MASK(0x7fff)
AM_RANGE(0x0000, 0x007f) AM_MIRROR(0x0d80) AM_RAM
AM_RANGE(0x0200, 0x021f) AM_MIRROR(0x0de0) AM_DEVREADWRITE("riot", riot6532_device, read, write)
AM_RANGE(0x1000, 0x1000) AM_MIRROR(0x0fff) AM_DEVWRITE("dac", dac_device, write_unsigned8)
AM_RANGE(0x1000, 0x1000) AM_MIRROR(0x0fff) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0x2000, 0x2000) AM_MIRROR(0x0fff) AM_WRITE(votrax_data_w)
AM_RANGE(0x3000, 0x3000) AM_MIRROR(0x0fff) AM_WRITE(speech_clock_dac_w)
AM_RANGE(0x6000, 0x7fff) AM_ROM
@ -545,8 +545,9 @@ MACHINE_CONFIG_FRAGMENT( gottlieb_sound_r1 )
MCFG_RIOT6532_IRQ_CB(WRITELINE(gottlieb_sound_r1_device, snd_interrupt))
// sound devices
MCFG_DAC_ADD("dac")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.50)
MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.25) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
MACHINE_CONFIG_FRAGMENT( gottlieb_sound_r1_with_votrax )
@ -555,7 +556,7 @@ MACHINE_CONFIG_FRAGMENT( gottlieb_sound_r1_with_votrax )
// add the VOTRAX
MCFG_DEVICE_ADD("votrax", VOTRAX_SC01, 720000)
MCFG_VOTRAX_SC01_REQUEST_CB(DEVWRITELINE(DEVICE_SELF, gottlieb_sound_r1_device, votrax_request))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.50)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.5)
MACHINE_CONFIG_END
@ -667,7 +668,6 @@ gottlieb_sound_r2_device::gottlieb_sound_r2_device(const machine_config &mconfig
device_mixer_interface(mconfig, *this),
m_audiocpu(*this, "audiocpu"),
m_speechcpu(*this, "speechcpu"),
m_dac(*this, "dac"),
m_ay1(*this, "ay1"),
m_ay2(*this, "ay2"),
m_sp0250(*this, "spsnd"),
@ -802,20 +802,6 @@ CUSTOM_INPUT_MEMBER( gottlieb_sound_r2_device::speech_drq_custom_r )
}
//-------------------------------------------------
// dac_w - write to one of the two DACs on the
// board
//-------------------------------------------------
WRITE8_MEMBER( gottlieb_sound_r2_device::dac_w )
{
// dual DAC; the first DAC serves as the reference voltage for the
// second, effectively scaling the output
m_dac_data[offset] = data;
m_dac->write_unsigned16(m_dac_data[0] * m_dac_data[1]);
}
//-------------------------------------------------
// speech_control_w - primary audio control
// register on the speech board
@ -900,7 +886,8 @@ WRITE8_MEMBER( gottlieb_sound_r2_device::sp0250_latch_w )
static ADDRESS_MAP_START( gottlieb_sound_r2_map, AS_PROGRAM, 8, gottlieb_sound_r2_device )
AM_RANGE(0x0000, 0x03ff) AM_MIRROR(0x3c00) AM_RAM
AM_RANGE(0x4000, 0x4001) AM_MIRROR(0x3ffe) AM_WRITE(dac_w)
AM_RANGE(0x4000, 0x4000) AM_MIRROR(0x3ffe) AM_DEVWRITE("dacvol", dac_byte_interface, write)
AM_RANGE(0x4001, 0x4001) AM_MIRROR(0x3ffe) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0x8000, 0x8000) AM_MIRROR(0x3fff) AM_READ(audio_data_r)
AM_RANGE(0xc000, 0xdfff) AM_MIRROR(0x2000) AM_ROM
ADDRESS_MAP_END
@ -936,8 +923,11 @@ MACHINE_CONFIG_FRAGMENT( gottlieb_sound_r2 )
MCFG_CPU_PROGRAM_MAP(gottlieb_speech_r2_map)
// sound hardware
MCFG_DAC_ADD("dac")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.15)
MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.075) // unknown DAC
MCFG_SOUND_ADD("dacvol", DAC_8BIT_R2R, 0) // unknown DAC
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_SOUND_ADD("ay1", AY8913, SOUND2_CLOCK/2)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.15)
@ -1002,9 +992,6 @@ void gottlieb_sound_r2_device::device_start()
m_nmi_rate = 0;
nmi_timer_adjust();
// reset the DACs
m_dac_data[0] = m_dac_data[1] = 0xff;
// disable the non-speech CPU for cobram3
if (m_cobram3_mod)
m_audiocpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
@ -1050,3 +1037,4 @@ void gottlieb_sound_r2_device::device_timer(emu_timer &timer, device_timer_id id
break;
}
}

View File

@ -10,7 +10,6 @@
#include "cpu/m6502/m6502.h"
#include "machine/mos6530.h"
#include "machine/6532riot.h"
#include "sound/dac.h"
#include "sound/ay8910.h"
#include "sound/sp0250.h"
#include "sound/votrax.h"
@ -36,18 +35,7 @@ extern const device_type GOTTLIEB_SOUND_REV2;
// DEVICE CONFIGURATION MACROS
//**************************************************************************
#define MCFG_GOTTLIEB_SOUND_R0_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, GOTTLIEB_SOUND_REV0, 0)
#define MCFG_GOTTLIEB_SOUND_R1_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, GOTTLIEB_SOUND_REV1, 0)
#define MCFG_GOTTLIEB_SOUND_R1_ADD_VOTRAX(_tag) \
MCFG_DEVICE_ADD(_tag, GOTTLIEB_SOUND_REV1_WITH_VOTRAX, 0)
#define MCFG_GOTTLIEB_SOUND_R2_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, GOTTLIEB_SOUND_REV2, 0)
#define MCFG_GOTTLIEB_SOUND_R2_ADD_COBRAM3(_tag) \
MCFG_DEVICE_ADD(_tag, GOTTLIEB_SOUND_REV2, 0) \
#define MCFG_GOTTLIEB_ENABLE_COBRAM3_MODS() \
gottlieb_sound_r2_device::static_enable_cobram3_mods(*device);
@ -81,7 +69,6 @@ private:
// devices
required_device<m6502_device> m_audiocpu;
required_device<mos6530_device> m_r6530;
required_device<dac_device> m_dac;
UINT8 m_sndcmd;
};
@ -116,7 +103,6 @@ private:
// devices
required_device<m6502_device> m_audiocpu;
required_device<riot6532_device> m_riot;
required_device<dac_device> m_dac;
optional_device<votrax_sc01_device> m_votrax;
// internal state
@ -172,7 +158,6 @@ public:
DECLARE_WRITE8_MEMBER( signal_audio_nmi_w );
DECLARE_WRITE8_MEMBER( nmi_rate_w );
CUSTOM_INPUT_MEMBER( speech_drq_custom_r );
DECLARE_WRITE8_MEMBER( dac_w );
DECLARE_WRITE8_MEMBER( speech_control_w );
DECLARE_WRITE8_MEMBER( sp0250_latch_w );
DECLARE_WRITE8_MEMBER( psg_latch_w );
@ -200,7 +185,6 @@ private:
// devices
required_device<m6502_device> m_audiocpu;
required_device<m6502_device> m_speechcpu;
required_device<dac_device> m_dac;
required_device<ay8913_device> m_ay1;
required_device<ay8913_device> m_ay2;
optional_device<sp0250_device> m_sp0250;
@ -214,7 +198,6 @@ private:
UINT8 m_speechcpu_latch;
UINT8 m_speech_control;
UINT8 m_last_command;
UINT8 m_dac_data[2];
UINT8 m_psg_latch;
UINT8 m_psg_data_latch;
UINT8 m_sp0250_latch;

View File

@ -7,10 +7,10 @@
****************************************************************************/
#include "emu.h"
#include "cpu/tms32010/tms32010.h"
#include "sound/dac.h"
#include "machine/atarigen.h"
#include "includes/harddriv.h"
#include "cpu/tms32010/tms32010.h"
#include "machine/atarigen.h"
#include "sound/volt_reg.h"
#define BIO_FREQUENCY (1000000 / 50)
@ -38,7 +38,6 @@ harddriv_sound_board_device::harddriv_sound_board_device(const machine_config &m
m_mainflag(0),
m_sounddata(0),
m_maindata(0),
m_dacmute(0),
m_cramen(0),
m_irq68k(0),
m_sound_rom_offs(0),
@ -325,9 +324,8 @@ READ_LINE_MEMBER(harddriv_sound_board_device::hdsnddsp_get_bio)
WRITE16_MEMBER(harddriv_sound_board_device::hdsnddsp_dac_w)
{
/* DAC L */
if (!m_dacmute)
m_dac->write_signed16(data ^ 0x8000);
/* /DACL */
m_dac->write((data >> 4) ^ 0x800); // schematics show d0-3 are ignored & the msb is inverted
}
@ -341,7 +339,6 @@ WRITE16_MEMBER(harddriv_sound_board_device::hdsnddsp_comport_w)
WRITE16_MEMBER(harddriv_sound_board_device::hdsnddsp_mute_w)
{
/* mute DAC audio, D0=1 */
/* m_dacmute = data & 1; -- NOT STUFFED */
logerror("%06X:mute DAC=%d\n", space.device().safe_pcbase(), data);
}
@ -413,7 +410,7 @@ ADDRESS_MAP_END
/* $000 - 08F TMS32010 Internal Data RAM in Data Address Space */
static ADDRESS_MAP_START( driversnd_dsp_io_map, AS_IO, 16, harddriv_sound_board_device )
AM_RANGE(0, 0) AM_READWRITE(hdsnddsp_rom_r, hdsnddsp_dac_w)
AM_RANGE(0, 0) AM_READ(hdsnddsp_rom_r) AM_WRITE(hdsnddsp_dac_w)
AM_RANGE(1, 1) AM_READ(hdsnddsp_comram_r)
AM_RANGE(2, 2) AM_READ(hdsnddsp_compare_r)
AM_RANGE(1, 2) AM_WRITENOP
@ -437,10 +434,11 @@ static MACHINE_CONFIG_FRAGMENT( harddriv_snd )
MCFG_TMS32010_BIO_IN_CB(READLINE(harddriv_sound_board_device, hdsnddsp_get_bio))
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_DAC_ADD("dac")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_SOUND_ADD("dac", AM6012, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // ls374d.75e + ls374d.90e + am6012
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
//-------------------------------------------------

View File

@ -114,7 +114,7 @@ MACHINE_CONFIG_FRAGMENT( hyprolyb_adpcm )
MCFG_SOUND_ADD("msm", MSM5205, 384000)
MCFG_MSM5205_VCLK_CB(DEVWRITELINE("hyprolyb_adpcm", hyprolyb_adpcm_device, vck_callback)) /* VCK function */
MCFG_MSM5205_PRESCALER_SELECTOR(MSM5205_S96_4B) /* 4 kHz */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
MACHINE_CONFIG_END

View File

@ -334,12 +334,12 @@ WRITE32_MEMBER( jaguar_state::serial_w )
{
/* right DAC */
case 2:
m_dac2->write_signed16((data & 0xffff) ^ 0x8000);
m_rdac->write(data & 0xffff);
break;
/* left DAC */
case 3:
m_dac1->write_signed16((data & 0xffff) ^ 0x8000);
m_ldac->write(data & 0xffff);
break;
/* frequency register */

View File

@ -10,7 +10,7 @@
-------------------------------------------------------------------
1st generation sound hardware was controlled by the master Z80.
It drove an AY-8910/AY-8912 pair for music. It also had two DACs
It drove either an AY-8910/AY-8912 for music. It also had two DACs
that were driven by the video refresh. At the end of each scanline
there are 8-bit DAC samples that can be enabled via the output
ports on the AY-8910. The DACs run at a fixed frequency of 15.3kHz,
@ -80,8 +80,9 @@
***************************************************************************/
#include "emu.h"
#include "cpu/z80/z80.h"
#include "includes/leland.h"
#include "cpu/z80/z80.h"
#include "sound/volt_reg.h"
#define LOG_COMM 0
#define LOG_EXTERN 0
@ -112,11 +113,6 @@ WRITE_LINE_MEMBER(leland_80186_sound_device::pit1_2_w)
set_clock_line(5, state);
}
WRITE_LINE_MEMBER(leland_80186_sound_device::pit2_0_w)
{
set_clock_line(5, state);
}
WRITE_LINE_MEMBER(leland_80186_sound_device::i80186_tmr0_w)
{
set_clock_line(6, state);
@ -128,7 +124,7 @@ WRITE_LINE_MEMBER(leland_80186_sound_device::i80186_tmr1_w)
{
if (m_ext_active && (m_ext_start < m_ext_stop))
{
m_dac4->write_signed8(m_ext_base[m_ext_start]);
m_dac4->write(m_ext_base[m_ext_start]);
m_ext_start++;
}
}
@ -137,20 +133,27 @@ WRITE_LINE_MEMBER(leland_80186_sound_device::i80186_tmr1_w)
static MACHINE_CONFIG_FRAGMENT( leland_80186_sound )
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("dac1", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
MCFG_SOUND_ADD("dac2", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
MCFG_SOUND_ADD("dac3", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
MCFG_SOUND_ADD("dac4", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
MCFG_SOUND_ADD("dac5", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
MCFG_SOUND_ADD("dac6", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
MCFG_SOUND_ADD("dac7", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.00)
MCFG_SOUND_ADD("dac1", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // 74hc374.u31 + ad7524.u46
MCFG_SOUND_ADD("dac2", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // 74hc374.u32 + ad7524.u47
MCFG_SOUND_ADD("dac3", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // 74hc374.u33 + ad7524.u48
MCFG_SOUND_ADD("dac4", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // 74hc374.u34 + ad7524.u49
MCFG_SOUND_ADD("dac5", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // 74hc374.u35 + ad7524.u50
MCFG_SOUND_ADD("dac6", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // 74hc374.u36 + ad7524.u51
MCFG_SOUND_ADD("dac9", AD7533, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // ad7533.u64
MCFG_SOUND_ADD("dac1vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) // 74hc374.u17 + r2-r9 (24k,12k,6.2k,3k,1.5k,750,360,160)
MCFG_SOUND_ADD("dac2vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) // 74hc374.u18 + r12-r19 (24k,12k,6.2k,3k,1.5k,750,360,160)
MCFG_SOUND_ADD("dac3vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac3", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac3", -1.0, DAC_VREF_NEG_INPUT) // 74hc374.u19 + r22-r29 (24k,12k,6.2k,3k,1.5k,750,360,160)
MCFG_SOUND_ADD("dac4vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac4", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac4", -1.0, DAC_VREF_NEG_INPUT) // 74hc374.u20 + r32-r39 (24k,12k,6.2k,3k,1.5k,750,360,160)
MCFG_SOUND_ADD("dac5vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac5", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac5", -1.0, DAC_VREF_NEG_INPUT) // 74hc374.u21 + r42-r49 (24k,12k,6.2k,3k,1.5k,750,360,160)
MCFG_SOUND_ADD("dac6vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac6", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac6", -1.0, DAC_VREF_NEG_INPUT) // 74hc374.u22 + r52-r59 (24k,12k,6.2k,3k,1.5k,750,360,160)
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac1vol", 1.0, DAC_VREF_POS_INPUT)
MCFG_SOUND_ROUTE_EX(0, "dac2vol", 1.0, DAC_VREF_POS_INPUT)
MCFG_SOUND_ROUTE_EX(0, "dac3vol", 1.0, DAC_VREF_POS_INPUT)
MCFG_SOUND_ROUTE_EX(0, "dac4vol", 1.0, DAC_VREF_POS_INPUT)
MCFG_SOUND_ROUTE_EX(0, "dac5vol", 1.0, DAC_VREF_POS_INPUT)
MCFG_SOUND_ROUTE_EX(0, "dac6vol", 1.0, DAC_VREF_POS_INPUT)
MCFG_SOUND_ROUTE_EX(0, "dac9", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac9", -1.0, DAC_VREF_NEG_INPUT)
MCFG_DEVICE_ADD("pit0", PIT8254, 0)
MCFG_PIT8253_CLK0(4000000)
@ -171,22 +174,31 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_FRAGMENT( redline_80186_sound )
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("dac1", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
MCFG_SOUND_ADD("dac2", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
MCFG_SOUND_ADD("dac3", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
MCFG_SOUND_ADD("dac4", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
MCFG_SOUND_ADD("dac5", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
MCFG_SOUND_ADD("dac6", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
MCFG_SOUND_ADD("dac7", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
MCFG_SOUND_ADD("dac8", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
MCFG_SOUND_ADD("dac1", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
MCFG_SOUND_ADD("dac2", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
MCFG_SOUND_ADD("dac3", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
MCFG_SOUND_ADD("dac4", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
MCFG_SOUND_ADD("dac5", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
MCFG_SOUND_ADD("dac6", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
MCFG_SOUND_ADD("dac7", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
MCFG_SOUND_ADD("dac8", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
MCFG_SOUND_ADD("dac1vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
MCFG_SOUND_ADD("dac2vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
MCFG_SOUND_ADD("dac3vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac3", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac3", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
MCFG_SOUND_ADD("dac4vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac4", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac4", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
MCFG_SOUND_ADD("dac5vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac5", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac5", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
MCFG_SOUND_ADD("dac6vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac6", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac6", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
MCFG_SOUND_ADD("dac7vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac7", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac7", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
MCFG_SOUND_ADD("dac8vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac8", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac8", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac1vol", 1.0, DAC_VREF_POS_INPUT)
MCFG_SOUND_ROUTE_EX(0, "dac2vol", 1.0, DAC_VREF_POS_INPUT)
MCFG_SOUND_ROUTE_EX(0, "dac3vol", 1.0, DAC_VREF_POS_INPUT)
MCFG_SOUND_ROUTE_EX(0, "dac4vol", 1.0, DAC_VREF_POS_INPUT)
MCFG_SOUND_ROUTE_EX(0, "dac5vol", 1.0, DAC_VREF_POS_INPUT)
MCFG_SOUND_ROUTE_EX(0, "dac6vol", 1.0, DAC_VREF_POS_INPUT)
MCFG_SOUND_ROUTE_EX(0, "dac7vol", 1.0, DAC_VREF_POS_INPUT)
MCFG_SOUND_ROUTE_EX(0, "dac8vol", 1.0, DAC_VREF_POS_INPUT)
MCFG_DEVICE_ADD("pit0", PIT8254, 0)
MCFG_PIT8253_CLK0(7000000)
@ -212,16 +224,21 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_FRAGMENT( ataxx_80186_sound )
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("dac1", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
MCFG_SOUND_ADD("dac2", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
MCFG_SOUND_ADD("dac3", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
MCFG_SOUND_ADD("dac4", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
MCFG_SOUND_ADD("dac7", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.00)
MCFG_SOUND_ADD("dac1", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
MCFG_SOUND_ADD("dac2", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
MCFG_SOUND_ADD("dac3", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
MCFG_SOUND_ADD("dac4", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
MCFG_SOUND_ADD("dac9", AD7533, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // unknown DAC
MCFG_SOUND_ADD("dac1vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
MCFG_SOUND_ADD("dac2vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
MCFG_SOUND_ADD("dac3vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac3", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac3", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
MCFG_SOUND_ADD("dac4vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac4", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac4", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac1vol", 1.0, DAC_VREF_POS_INPUT)
MCFG_SOUND_ROUTE_EX(0, "dac2vol", 1.0, DAC_VREF_POS_INPUT)
MCFG_SOUND_ROUTE_EX(0, "dac3vol", 1.0, DAC_VREF_POS_INPUT)
MCFG_SOUND_ROUTE_EX(0, "dac4vol", 1.0, DAC_VREF_POS_INPUT)
MCFG_SOUND_ROUTE_EX(0, "dac9", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac9", -1.0, DAC_VREF_NEG_INPUT)
MCFG_DEVICE_ADD("pit0", PIT8254, 0)
MCFG_PIT8253_CLK0(4000000)
@ -234,16 +251,21 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_FRAGMENT( wsf_80186_sound )
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("dac1", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
MCFG_SOUND_ADD("dac2", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
MCFG_SOUND_ADD("dac3", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
MCFG_SOUND_ADD("dac4", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
MCFG_SOUND_ADD("dac7", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.00)
MCFG_SOUND_ADD("dac1", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
MCFG_SOUND_ADD("dac2", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
MCFG_SOUND_ADD("dac3", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
MCFG_SOUND_ADD("dac4", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
MCFG_SOUND_ADD("dac9", AD7533, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // unknown DAC
MCFG_SOUND_ADD("dac1vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
MCFG_SOUND_ADD("dac2vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
MCFG_SOUND_ADD("dac3vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac3", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac3", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
MCFG_SOUND_ADD("dac4vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac4", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac4", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac1vol", 1.0, DAC_VREF_POS_INPUT)
MCFG_SOUND_ROUTE_EX(0, "dac2vol", 1.0, DAC_VREF_POS_INPUT)
MCFG_SOUND_ROUTE_EX(0, "dac3vol", 1.0, DAC_VREF_POS_INPUT)
MCFG_SOUND_ROUTE_EX(0, "dac4vol", 1.0, DAC_VREF_POS_INPUT)
MCFG_SOUND_ROUTE_EX(0, "dac9", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac9", -1.0, DAC_VREF_NEG_INPUT)
/* sound hardware */
MCFG_YM2151_ADD("ymsnd", 4000000)
@ -339,6 +361,15 @@ leland_80186_sound_device::leland_80186_sound_device(const machine_config &mconf
m_dac6(*this, "dac6"),
m_dac7(*this, "dac7"),
m_dac8(*this, "dac8"),
m_dac9(*this, "dac9"),
m_dac1vol(*this, "dac1vol"),
m_dac2vol(*this, "dac2vol"),
m_dac3vol(*this, "dac3vol"),
m_dac4vol(*this, "dac4vol"),
m_dac5vol(*this, "dac5vol"),
m_dac6vol(*this, "dac6vol"),
m_dac7vol(*this, "dac7vol"),
m_dac8vol(*this, "dac8vol"),
m_pit0(*this, "pit0"),
m_pit1(*this, "pit1"),
m_pit2(*this, "pit2"),
@ -357,6 +388,15 @@ leland_80186_sound_device::leland_80186_sound_device(const machine_config &mconf
m_dac6(*this, "dac6"),
m_dac7(*this, "dac7"),
m_dac8(*this, "dac8"),
m_dac9(*this, "dac9"),
m_dac1vol(*this, "dac1vol"),
m_dac2vol(*this, "dac2vol"),
m_dac3vol(*this, "dac3vol"),
m_dac4vol(*this, "dac4vol"),
m_dac5vol(*this, "dac5vol"),
m_dac6vol(*this, "dac6vol"),
m_dac7vol(*this, "dac7vol"),
m_dac8vol(*this, "dac8vol"),
m_pit0(*this, "pit0"),
m_pit1(*this, "pit1"),
m_pit2(*this, "pit2"),
@ -489,13 +529,6 @@ WRITE8_MEMBER( leland_80186_sound_device::leland_80186_command_hi_w )
}
READ16_MEMBER( leland_80186_sound_device::main_to_sound_comm_r )
{
if (LOG_COMM) logerror("%05X:Read sound command latch = %02X\n", m_audiocpu->device_t::safe_pc(), m_sound_command);
return m_sound_command;
}
/*************************************
@ -542,13 +575,6 @@ READ8_MEMBER( leland_80186_sound_device::leland_80186_response_r )
}
WRITE16_MEMBER( leland_80186_sound_device::sound_to_main_comm_w )
{
if (LOG_COMM) logerror("%05X:Write sound response latch = %02X\n", m_audiocpu->device_t::safe_pc(), data);
m_sound_response = data;
}
/*************************************
*
@ -558,71 +584,73 @@ WRITE16_MEMBER( leland_80186_sound_device::sound_to_main_comm_w )
WRITE16_MEMBER( leland_80186_sound_device::dac_w )
{
int which = offset & 7;
int dac = offset & 7;
/* handle value changes */
if (ACCESSING_BITS_0_7)
{
switch(which)
switch (dac)
{
case 0:
m_dac1->write_signed8(data & 0xff);
break;
case 1:
m_dac2->write_signed8(data & 0xff);
break;
case 2:
m_dac3->write_signed8(data & 0xff);
break;
case 3:
m_dac4->write_signed8(data & 0xff);
break;
case 4:
m_dac5->write_signed8(data & 0xff);
break;
case 5:
m_dac6->write_signed8(data & 0xff);
break;
case 6:
m_dac7->write_signed8(data & 0xff);
break;
case 7:
m_dac8->write_signed8(data & 0xff);
break;
case 0:
m_dac1->write(data & 0xff);
break;
case 1:
m_dac2->write(data & 0xff);
break;
case 2:
m_dac3->write(data & 0xff);
break;
case 3:
m_dac4->write(data & 0xff);
break;
case 4:
m_dac5->write(data & 0xff);
break;
case 5:
m_dac6->write(data & 0xff);
break;
case 6:
m_dac7->write(data & 0xff);
break;
case 7:
m_dac8->write(data & 0xff);
break;
}
m_clock_active &= ~(1<<which);
set_clock_line(dac, 0);
}
/* handle volume changes */
if (ACCESSING_BITS_8_15)
switch(which)
{
switch(dac)
{
case 0:
m_dac1->set_output_gain(ALL_OUTPUTS, (data >> 8)/255.0f);
break;
case 1:
m_dac2->set_output_gain(ALL_OUTPUTS, (data >> 8)/255.0f);
break;
case 2:
m_dac3->set_output_gain(ALL_OUTPUTS, (data >> 8)/255.0f);
break;
case 3:
m_dac4->set_output_gain(ALL_OUTPUTS, (data >> 8)/255.0f);
break;
case 4:
m_dac5->set_output_gain(ALL_OUTPUTS, (data >> 8)/255.0f);
break;
case 5:
m_dac6->set_output_gain(ALL_OUTPUTS, (data >> 8)/255.0f);
break;
case 6:
m_dac7->set_output_gain(ALL_OUTPUTS, (data >> 8)/255.0f);
break;
case 7:
m_dac8->set_output_gain(ALL_OUTPUTS, (data >> 8)/255.0f);
break;
case 0:
m_dac1vol->write(data >> 8);
break;
case 1:
m_dac2vol->write(data >> 8);
break;
case 2:
m_dac3vol->write(data >> 8);
break;
case 3:
m_dac4vol->write(data >> 8);
break;
case 4:
m_dac5vol->write(data >> 8);
break;
case 5:
m_dac6vol->write(data >> 8);
break;
case 6:
m_dac7vol->write(data >> 8);
break;
case 7:
m_dac8vol->write(data >> 8);
break;
}
}
}
@ -633,67 +661,62 @@ WRITE16_MEMBER( redline_80186_sound_device::redline_dac_w )
WRITE16_MEMBER( leland_80186_sound_device::ataxx_dac_control )
{
/* handle common offsets */
switch (offset)
if (ACCESSING_BITS_0_7)
{
/* handle common offsets */
switch (offset)
{
case 0x00:
case 0x01:
case 0x02:
if (ACCESSING_BITS_0_7)
dac_w(space, offset, data, 0x00ff);
dac_w(space, offset, data, 0x00ff);
return;
case 0x03:
if(ACCESSING_BITS_0_7)
{
m_dac1->set_output_gain(ALL_OUTPUTS, (((data & 7) * 0x49) >> 1) / 255.0f);
m_dac2->set_output_gain(ALL_OUTPUTS, ((((data >> 3) & 7) * 0x49) >> 1) / 255.0f);
m_dac3->set_output_gain(ALL_OUTPUTS, (((data >> 6) & 3) * 0x55) / 255.0f);
}
m_dac1vol->write((data & 7) << 5);
m_dac2vol->write(((data >> 3) & 7) << 5);
m_dac3vol->write(((data >> 6) & 3) << 6);
return;
case 0x21:
if (ACCESSING_BITS_0_7)
dac_w(space, 1, data, mem_mask);
return;
default:
break;
}
}
/* if we have a YM2151 (and an external DAC), handle those offsets */
if (m_type == TYPE_WSF)
switch (m_type)
{
case TYPE_WSF:
switch (offset)
{
case 0x04:
m_ext_active = 1;
if (LOG_EXTERN) logerror("External DAC active\n");
return;
case 0x05:
m_ext_active = 0;
if (LOG_EXTERN) logerror("External DAC inactive\n");
return;
case 0x06:
m_ext_start >>= 4;
COMBINE_DATA(&m_ext_start);
m_ext_start <<= 4;
if (LOG_EXTERN) logerror("External DAC start = %05X\n", m_ext_start);
return;
case 0x07:
m_ext_stop >>= 4;
COMBINE_DATA(&m_ext_stop);
m_ext_stop <<= 4;
if (LOG_EXTERN) logerror("External DAC stop = %05X\n", m_ext_stop);
return;
default:
break;
case 0x04:
m_ext_active = 1;
if (LOG_EXTERN) logerror("External DAC active\n");
return;
case 0x05:
m_ext_active = 0;
if (LOG_EXTERN) logerror("External DAC inactive\n");
return;
case 0x06:
m_ext_start >>= 4;
COMBINE_DATA(&m_ext_start);
m_ext_start <<= 4;
if (LOG_EXTERN) logerror("External DAC start = %05X\n", m_ext_start);
return;
case 0x07:
m_ext_stop >>= 4;
COMBINE_DATA(&m_ext_stop);
m_ext_stop <<= 4;
if (LOG_EXTERN) logerror("External DAC stop = %05X\n", m_ext_stop);
return;
}
break;
default:
switch (offset)
{
case 0x21:
dac_w(space, 3, data, mem_mask);
return;
}
break;
}
logerror("%05X:Unexpected peripheral write %d/%02X = %02X\n", m_audiocpu->device_t::safe_pc(), 5, offset, data);
}
@ -717,7 +740,7 @@ READ16_MEMBER( leland_80186_sound_device::peripheral_r )
//if ((++m_clock_tick & 7) == 0)
// return 0;
/* if we've filled up all the active channels, we can give this CPU a reset */
/* if we've filled up all the active channels, we can give this CPU a rest */
/* until the next interrupt */
if (m_type != TYPE_REDLINE)
return ((m_clock_active >> 1) & 0x3e);
@ -725,17 +748,18 @@ READ16_MEMBER( leland_80186_sound_device::peripheral_r )
return ((m_clock_active << 1) & 0x7e);
case 1:
return main_to_sound_comm_r(space, offset, mem_mask);
if (LOG_COMM) logerror("%05X:Read sound command latch = %02X\n", m_audiocpu->device_t::safe_pc(), m_sound_command);
return m_sound_command;
case 2:
if (mem_mask != 0xff00)
if (ACCESSING_BITS_0_7)
return m_pit0->read(space, offset & 3);
break;
case 3:
if (m_type <= TYPE_REDLINE)
{
if (mem_mask != 0xff00)
if (ACCESSING_BITS_0_7)
return m_pit1->read(space, offset & 3);
}
else if (m_type == TYPE_WSF)
@ -745,7 +769,7 @@ READ16_MEMBER( leland_80186_sound_device::peripheral_r )
case 4:
if (m_type == TYPE_REDLINE)
{
if (mem_mask != 0xff00)
if (ACCESSING_BITS_0_7)
return m_pit2->read(space, offset & 3);
}
else
@ -768,18 +792,19 @@ WRITE16_MEMBER( leland_80186_sound_device::peripheral_w )
switch (select)
{
case 1:
sound_to_main_comm_w(space, offset, data, mem_mask);
if (LOG_COMM) logerror("%05X:Write sound response latch = %02X\n", m_audiocpu->device_t::safe_pc(), data);
m_sound_response = data;
break;
case 2:
if (mem_mask != 0xff00)
if (ACCESSING_BITS_0_7)
m_pit0->write(space, offset & 3, data);
break;
case 3:
if (m_type <= TYPE_REDLINE)
{
if (mem_mask != 0xff00)
if (ACCESSING_BITS_0_7)
m_pit1->write(space, offset & 3, data);
}
else if(m_type == TYPE_WSF)
@ -789,13 +814,13 @@ WRITE16_MEMBER( leland_80186_sound_device::peripheral_w )
case 4:
if (m_type == TYPE_REDLINE)
{
if (mem_mask != 0xff00)
if (ACCESSING_BITS_0_7)
m_pit2->write(space, offset & 3, data);
}
else if (mem_mask == 0xffff)
{
m_dac7->write_signed16(data << 6);
m_clock_active &= ~(1<<6);
m_dac9->write(data);
set_clock_line(6, 0);
}
break;

View File

@ -55,6 +55,7 @@ m72_audio_device::m72_audio_device(const machine_config &mconfig, const char *ta
, m_sample_addr(0)
, m_samples(*this, "^samples")
, m_samples_size(0)
, m_dac(*this, "^dac")
, m_soundlatch(*this, "^soundlatch")
{
}
@ -77,7 +78,6 @@ void m72_audio_device::device_start()
{
m_samples_size = m_samples.bytes();
m_space = &machine().device("soundcpu")->memory().space(AS_IO);
m_dac = machine().device<dac_device>("dac");
save_item(NAME(m_irqvector));
save_item(NAME(m_sample_addr));
@ -216,7 +216,7 @@ READ8_MEMBER( m72_audio_device::sample_r )
WRITE8_MEMBER( m72_audio_device::sample_w )
{
m_dac->write_signed8(data);
m_dac->write(data);
m_sample_addr = (m_sample_addr + 1) & (m_samples_size - 1);
}

View File

@ -55,7 +55,7 @@ private:
optional_region_ptr<UINT8> m_samples;
UINT32 m_samples_size;
address_space *m_space;
dac_device *m_dac;
optional_device<dac_byte_interface> m_dac;
required_device<generic_latch_8_device> m_soundlatch;
TIMER_CALLBACK_MEMBER( setvector_callback );

View File

@ -12,7 +12,6 @@
#include "cpu/s2650/s2650.h"
#include "includes/meadows.h"
#include "sound/samples.h"
#include "sound/dac.h"
@ -33,8 +32,6 @@ static const INT16 waveform[2] = { -120*256, 120*256 };
SAMPLES_START_CB_MEMBER(meadows_state::meadows_sh_start)
{
m_0c00 = m_0c01 = m_0c02 = m_0c03 = 0;
m_dac_data = 0;
m_dac_enable = 0;
m_channel = 0;
m_freq1 = m_freq2 = 1000;
m_latched_0c01 = m_latched_0c02 = m_latched_0c03 = 0;
@ -88,29 +85,12 @@ void meadows_state::meadows_sh_update()
m_samples->set_volume(1,amp/255.0);
}
if (m_latched_0c03 != m_0c03)
if (((m_latched_0c03 ^ m_0c03) & ENABLE_DAC) != 0)
{
m_dac_enable = m_0c03 & ENABLE_DAC;
if (m_dac_enable)
m_dac->write_unsigned8(m_dac_data);
else
m_dac->write_unsigned8(0);
m_dac->set_output_gain(ALL_OUTPUTS, (m_0c03 & ENABLE_DAC) != 0 ? 1.0 : 0.0);
}
m_latched_0c01 = m_0c01;
m_latched_0c02 = m_0c02;
m_latched_0c03 = m_0c03;
}
/************************************/
/* Write DAC value */
/************************************/
void meadows_state::meadows_sh_dac_w(int data)
{
m_dac_data = data;
if (m_dac_enable)
m_dac->write_unsigned8(m_dac_data);
else
m_dac->write_unsigned8(0);
}

View File

@ -9,9 +9,10 @@
***************************************************************************/
#include "emu.h"
#include "audio/williams.h"
#include "includes/mcr.h"
#include "audio/midway.h"
#include "audio/williams.h"
#include "sound/volt_reg.h"
@ -539,8 +540,8 @@ WRITE_LINE_MEMBER(midway_chip_squeak_deluxe_device::reset_write)
WRITE8_MEMBER(midway_chip_squeak_deluxe_device::porta_w)
{
m_dacval = (m_dacval & ~0x3fc) | (data << 2);
m_dac->write_signed16(m_dacval << 6);
m_dacval = (data << 2) | (m_dacval & 3);
m_dac->write(m_dacval);
}
@ -550,8 +551,8 @@ WRITE8_MEMBER(midway_chip_squeak_deluxe_device::porta_w)
WRITE8_MEMBER(midway_chip_squeak_deluxe_device::portb_w)
{
m_dacval = (m_dacval & ~0x003) | (data >> 6);
m_dac->write_signed16(m_dacval << 6);
m_dacval = (m_dacval & ~3) | (data >> 6);
m_dac->write(m_dacval);
UINT8 z_mask = m_pia->port_b_z_mask();
if (~z_mask & 0x10) m_status = (m_status & ~1) | ((data >> 4) & 1);
@ -628,8 +629,9 @@ static MACHINE_CONFIG_FRAGMENT(midway_chip_squeak_deluxe)
MCFG_PIA_IRQA_HANDLER(WRITELINE(midway_chip_squeak_deluxe_device, irq_w))
MCFG_PIA_IRQB_HANDLER(WRITELINE(midway_chip_squeak_deluxe_device, irq_w))
MCFG_DAC_ADD("dac")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 1.0)
MCFG_SOUND_ADD("dac", DAC_10BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 1.0) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@ -738,8 +740,8 @@ WRITE_LINE_MEMBER(midway_sounds_good_device::reset_write)
WRITE8_MEMBER(midway_sounds_good_device::porta_w)
{
m_dacval = (m_dacval & ~0x3fc) | (data << 2);
m_dac->write_signed16(m_dacval << 6);
m_dacval = (data << 2) | (m_dacval & 3);
m_dac->write(m_dacval);
}
@ -751,8 +753,8 @@ WRITE8_MEMBER(midway_sounds_good_device::portb_w)
{
UINT8 z_mask = m_pia->port_b_z_mask();
m_dacval = (m_dacval & ~0x003) | (data >> 6);
m_dac->write_signed16(m_dacval << 6);
m_dacval = (m_dacval & ~3) | (data >> 6);
m_dac->write(m_dacval);
if (~z_mask & 0x10) m_status = (m_status & ~1) | ((data >> 4) & 1);
if (~z_mask & 0x20) m_status = (m_status & ~2) | ((data >> 4) & 2);
@ -798,8 +800,9 @@ static MACHINE_CONFIG_FRAGMENT(midway_sounds_good)
MCFG_PIA_IRQA_HANDLER(WRITELINE(midway_sounds_good_device, irq_w))
MCFG_PIA_IRQB_HANDLER(WRITELINE(midway_sounds_good_device, irq_w))
MCFG_DAC_ADD("dac")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 1.0)
MCFG_SOUND_ADD("dac", AD7533, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 1.0) /// ad7533jn.u10
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@ -907,8 +910,8 @@ WRITE_LINE_MEMBER(midway_turbo_chip_squeak_device::reset_write)
WRITE8_MEMBER(midway_turbo_chip_squeak_device::porta_w)
{
m_dacval = (m_dacval & ~0x3fc) | (data << 2);
m_dac->write_signed16(m_dacval << 6);
m_dacval = (data << 2) | (m_dacval & 3);
m_dac->write(m_dacval);
}
@ -918,8 +921,8 @@ WRITE8_MEMBER(midway_turbo_chip_squeak_device::porta_w)
WRITE8_MEMBER(midway_turbo_chip_squeak_device::portb_w)
{
m_dacval = (m_dacval & ~0x003) | (data >> 6);
m_dac->write_signed16(m_dacval << 6);
m_dacval = (m_dacval & ~3) | (data >> 6);
m_dac->write(m_dacval);
m_status = (data >> 4) & 3;
}
@ -962,8 +965,9 @@ static MACHINE_CONFIG_FRAGMENT(midway_turbo_chip_squeak)
MCFG_PIA_IRQA_HANDLER(WRITELINE(midway_turbo_chip_squeak_device, irq_w))
MCFG_PIA_IRQB_HANDLER(WRITELINE(midway_turbo_chip_squeak_device, irq_w))
MCFG_DAC_ADD("dac")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 1.0)
MCFG_SOUND_ADD("dac", DAC_10BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 1.0) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END

View File

@ -35,22 +35,6 @@ extern const device_type MIDWAY_SQUAWK_N_TALK;
//**************************************************************************
// DEVICE CONFIGURATION MACROS
//**************************************************************************
#define MCFG_MIDWAY_SSIO_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, MIDWAY_SSIO, 0)
#define MCFG_MIDWAY_CHIP_SQUEAK_DELUXE_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, MIDWAY_CHIP_SQUEAK_DELUXE, 0)
#define MCFG_MIDWAY_SOUNDS_GOOD_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, MIDWAY_SOUNDS_GOOD, 0)
#define MCFG_MIDWAY_TURBO_CHIP_SQUEAK_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, MIDWAY_TURBO_CHIP_SQUEAK, 0)
#define MCFG_MIDWAY_SQUAWK_N_TALK_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, MIDWAY_SQUAWK_N_TALK, 0)
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@ -156,7 +140,7 @@ private:
// devices
required_device<m68000_device> m_cpu;
required_device<pia6821_device> m_pia;
required_device<dac_device> m_dac;
required_device<dac_word_interface> m_dac;
// internal state
UINT8 m_status;
@ -194,7 +178,7 @@ private:
// devices
required_device<m68000_device> m_cpu;
required_device<pia6821_device> m_pia;
required_device<dac_device> m_dac;
required_device<dac_word_interface> m_dac;
// internal state
UINT8 m_status;
@ -232,7 +216,7 @@ private:
// devices
required_device<m6809e_device> m_cpu;
required_device<pia6821_device> m_pia;
required_device<dac_device> m_dac;
required_device<dac_word_interface> m_dac;
// internal state
UINT8 m_status;

View File

@ -8,6 +8,7 @@
#include "emu.h"
#include "includes/n8080.h"
#include "sound/volt_reg.h"
static const double ATTACK_RATE = 10e-6 * 500;
static const double DECAY_RATE = 10e-6 * 16000;
@ -324,13 +325,7 @@ READ8_MEMBER(n8080_state::helifire_8035_p2_r)
WRITE8_MEMBER(n8080_state::n8080_dac_w)
{
m_dac->write_unsigned8(data & 0x80);
}
WRITE8_MEMBER(n8080_state::helifire_dac_w)
{
m_dac->write_unsigned8(data * m_helifire_dac_volume);
m_n8080_dac->write(BIT(data, 7));
}
@ -379,6 +374,8 @@ TIMER_DEVICE_CALLBACK_MEMBER(n8080_state::helifire_dac_volume_timer)
{
m_helifire_dac_volume = exp(t / DECAY_RATE);
}
m_helifire_dac->set_output_gain(ALL_OUTPUTS, m_helifire_dac_volume);
}
@ -487,7 +484,7 @@ static ADDRESS_MAP_START( helifire_sound_io_map, AS_IO, 8, n8080_state )
AM_RANGE(0x00, 0x7f) AM_READ(helifire_8035_external_ram_r)
AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_WRITE(helifire_dac_w)
AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_DEVWRITE("helifire_dac", dac_byte_interface, write)
AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_WRITE(helifire_sound_ctrl_w)
ADDRESS_MAP_END
@ -505,10 +502,11 @@ MACHINE_CONFIG_FRAGMENT( spacefev_sound )
MCFG_TIMER_DRIVER_ADD_PERIODIC("vco_timer", n8080_state, spacefev_vco_voltage_timer, attotime::from_hz(1000))
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_DAC_ADD("dac")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MCFG_SOUND_ADD("n8080_dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.15)
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "n8080_dac", 1.0, DAC_VREF_POS_INPUT)
MCFG_SOUND_ADD("snsnd", SN76477, 0)
MCFG_SN76477_NOISE_PARAMS(RES_K(36), RES_K(150), CAP_N(1)) // noise + filter
@ -524,7 +522,7 @@ MACHINE_CONFIG_FRAGMENT( spacefev_sound )
MCFG_SN76477_MIXER_PARAMS(0, 0, 0) // mixer A, B, C
MCFG_SN76477_ENVELOPE_PARAMS(1, 0) // envelope 1, 2
MCFG_SN76477_ENABLE(1) // enable
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.35)
MACHINE_CONFIG_END
@ -539,10 +537,11 @@ MACHINE_CONFIG_FRAGMENT( sheriff_sound )
MCFG_CPU_IO_MAP(n8080_sound_io_map)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_DAC_ADD("dac")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MCFG_SOUND_ADD("n8080_dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.15)
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "n8080_dac", 1.0, DAC_VREF_POS_INPUT)
MCFG_SOUND_ADD("snsnd", SN76477, 0)
MCFG_SN76477_NOISE_PARAMS(RES_K(36), RES_K(100), CAP_N(1)) // noise + filter
@ -558,7 +557,7 @@ MACHINE_CONFIG_FRAGMENT( sheriff_sound )
MCFG_SN76477_MIXER_PARAMS(0, 0, 0) // mixer A, B, C
MCFG_SN76477_ENVELOPE_PARAMS(1, 0) // envelope 1, 2
MCFG_SN76477_ENABLE(1) // enable
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.35)
MACHINE_CONFIG_END
@ -572,11 +571,11 @@ MACHINE_CONFIG_FRAGMENT( helifire_sound )
MCFG_CPU_PROGRAM_MAP(n8080_sound_cpu_map)
MCFG_CPU_IO_MAP(helifire_sound_io_map)
MCFG_TIMER_DRIVER_ADD_PERIODIC("helifire_dac", n8080_state, helifire_dac_volume_timer, attotime::from_hz(1000))
MCFG_TIMER_DRIVER_ADD_PERIODIC("helifire_dac_volume_timer", n8080_state, helifire_dac_volume_timer, attotime::from_hz(1000))
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_DAC_ADD("dac")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("helifire_dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.15) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "helifire_dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "helifire_dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END

View File

@ -8,18 +8,20 @@
*/
#include "s11c_bg.h"
#include "sound/dac.h"
#include "sound/volt_reg.h"
const device_type S11C_BG = &device_creator<s11c_bg_device>;
s11c_bg_device::s11c_bg_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig,S11C_BG,"Williams System 11C Background Music",tag,owner,clock, "s11c_bg", __FILE__),
m_cpu(*this,"bgcpu"),
m_ym2151(*this,"ym2151"),
m_hc55516(*this,"hc55516_bg"),
m_dac1(*this,"dac1"),
m_pia40(*this,"pia40"),
m_cpubank(*this,"bgbank")
device_mixer_interface(mconfig, *this),
m_cpu(*this,"bgcpu"),
m_ym2151(*this,"ym2151"),
m_hc55516(*this,"hc55516_bg"),
m_pia40(*this,"pia40"),
m_cpubank(*this,"bgbank")
{
}
@ -33,11 +35,6 @@ static ADDRESS_MAP_START( s11c_bg_map, AS_PROGRAM, 8, s11c_bg_device )
AM_RANGE(0x8000, 0xffff) AM_ROMBANK("bgbank")
ADDRESS_MAP_END
WRITE8_MEMBER( s11c_bg_device::pia40_pa_w )
{
m_dac1->write_unsigned8(data);
}
WRITE_LINE_MEMBER( s11c_bg_device::pia40_cb2_w)
{
// m_pia34->cb1_w(state); // To Widget MCB1 through CPU Data interface
@ -69,19 +66,19 @@ MACHINE_CONFIG_FRAGMENT( s11c_bg )
MCFG_CPU_PROGRAM_MAP(s11c_bg_map)
MCFG_QUANTUM_TIME(attotime::from_hz(50))
MCFG_SPEAKER_STANDARD_MONO("bg")
MCFG_YM2151_ADD("ym2151", 3580000)
MCFG_YM2151_IRQ_HANDLER(WRITELINE(s11c_bg_device, ym2151_irq_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "bg", 0.25)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.25)
MCFG_DAC_ADD("dac1")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "bg", 0.50)
MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.25) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
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_SOUND_ADD("hc55516_bg", HC55516, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "bg", 0.50)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.5)
MCFG_DEVICE_ADD("pia40", PIA6821, 0)
MCFG_PIA_WRITEPA_HANDLER(WRITE8(s11c_bg_device, pia40_pa_w))
MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("dac", dac_byte_interface, write))
MCFG_PIA_WRITEPB_HANDLER(WRITE8(s11c_bg_device, pia40_pb_w))
MCFG_PIA_CA2_HANDLER(WRITELINE(s11c_bg_device, pia40_ca2_w))
MCFG_PIA_CB2_HANDLER(WRITELINE(s11c_bg_device, pia40_cb2_w))
@ -110,7 +107,7 @@ void s11c_bg_device::device_reset()
m_cpu->set_input_line(INPUT_LINE_RESET,PULSE_LINE);
}
void s11c_bg_device::static_set_gfxregion(device_t &device, const char *tag)
void s11c_bg_device::static_set_romregion(device_t &device, const char *tag)
{
s11c_bg_device &cpuboard = downcast<s11c_bg_device &>(device);
cpuboard.m_regiontag = tag;

View File

@ -12,16 +12,16 @@
#include "emu.h"
#include "cpu/m6809/m6809.h"
#include "sound/ym2151.h"
#include "sound/dac.h"
#include "sound/hc55516.h"
#include "machine/6821pia.h"
#define MCFG_WMS_S11C_BG_ADD(_tag, _region) \
MCFG_DEVICE_ADD(_tag, S11C_BG, 0) \
s11c_bg_device::static_set_gfxregion(*device, _region);
#define MCFG_S11C_BG_ROM_REGION(_region) \
s11c_bg_device::static_set_romregion(*device, _region);
class s11c_bg_device : public device_t
class s11c_bg_device : public device_t,
public device_mixer_interface
{
public:
// construction/destruction
@ -30,12 +30,10 @@ public:
required_device<cpu_device> m_cpu;
required_device<ym2151_device> m_ym2151;
required_device<hc55516_device> m_hc55516;
required_device<dac_device> m_dac1;
required_device<pia6821_device> m_pia40;
required_memory_bank m_cpubank;
memory_region* m_rom;
DECLARE_WRITE8_MEMBER(pia40_pa_w);
DECLARE_WRITE8_MEMBER(pia40_pb_w);
DECLARE_WRITE_LINE_MEMBER(pia40_ca2_w);
DECLARE_WRITE_LINE_MEMBER(pia40_cb2_w);
@ -46,7 +44,7 @@ public:
void ctrl_w(UINT8 data);
void data_w(UINT8 data);
static void static_set_gfxregion(device_t &device, const char *tag);
static void static_set_romregion(device_t &device, const char *tag);
protected:
// overrides
@ -56,7 +54,6 @@ protected:
private:
const char* m_regiontag;
};
extern const device_type S11C_BG;

View File

@ -17,6 +17,7 @@
#include "sound/samples.h"
#include "sound/tms36xx.h"
#include "sound/dac.h"
#include "sound/volt_reg.h"
/*************************************
@ -245,7 +246,7 @@ MACHINE_CONFIG_FRAGMENT( astrob_sound_board )
MCFG_SOUND_ADD("samples", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(11)
MCFG_SAMPLES_NAMES(astrob_sample_names)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MACHINE_CONFIG_END
@ -437,10 +438,10 @@ MACHINE_CONFIG_FRAGMENT( 005_sound_board )
MCFG_SOUND_ADD("samples", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(7)
MCFG_SAMPLES_NAMES(sega005_sample_names)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MCFG_SOUND_ADD("005", SEGA005, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MACHINE_CONFIG_END
@ -595,7 +596,7 @@ MACHINE_CONFIG_FRAGMENT( spaceod_sound_board )
MCFG_SOUND_ADD("samples", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(11)
MCFG_SAMPLES_NAMES(spaceod_sample_names)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MACHINE_CONFIG_END
@ -690,7 +691,7 @@ static ADDRESS_MAP_START( monsterb_7751_portmap, AS_IO, 8, segag80r_state )
AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_READ(n7751_t1_r)
AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_READ(n7751_command_r)
AM_RANGE(MCS48_PORT_BUS, MCS48_PORT_BUS) AM_READ(n7751_rom_r)
AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_DEVWRITE("dac", dac_device, write_unsigned8)
AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_WRITE(n7751_p2_w)
AM_RANGE(MCS48_PORT_PROG, MCS48_PORT_PROG) AM_DEVWRITE("audio_8243", i8243_device, i8243_prog_w)
ADDRESS_MAP_END
@ -721,15 +722,16 @@ MACHINE_CONFIG_FRAGMENT( monsterb_sound_board )
MCFG_SOUND_ADD("samples", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(2)
MCFG_SAMPLES_NAMES(monsterb_sample_names)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MCFG_TMS36XX_ADD("music", 247)
MCFG_TMS36XX_TYPE(TMS3617)
MCFG_TMS36XX_DECAY_TIMES(0.5, 0.5, 0.5, 0.5, 0.5, 0.5)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
MCFG_DAC_ADD("dac")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END

View File

@ -228,7 +228,7 @@ MACHINE_CONFIG_FRAGMENT( sega_speech_board )
MCFG_SOUND_ADD("segaspeech", SEGASPEECH, 0)
MCFG_SOUND_ADD("speech", SP0250, SPEECH_MASTER_CLOCK)
MCFG_SP0250_DRQ_CALLBACK(DEVWRITELINE("segaspeech", speech_sound_device, drq_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END

View File

@ -188,8 +188,8 @@ extern const device_type SEGAUSBROM;
#define MCFG_SEGAUSB_ADD(_tag) \
MCFG_SOUND_ADD(_tag, SEGAUSB, 0) \
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
#define MCFG_SEGAUSBROM_ADD(_tag) \
MCFG_SOUND_ADD(_tag, SEGAUSBROM, 0) \
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)

View File

@ -23,7 +23,7 @@ WRITE_LINE_MEMBER(senjyo_state::sound_line_clock)
{
if (state != 0)
{
m_dac->write_signed16(2184 * 2 * ((m_sound_state & 8) ? m_single_volume : 0));
m_dac->write((m_sound_state & 8) ? m_single_volume : 0);
m_sound_state++;
}
}

View File

@ -7,10 +7,11 @@
****************************************************************************/
#include "emu.h"
#include "includes/spacefb.h"
#include "cpu/mcs48/mcs48.h"
#include "sound/dac.h"
#include "sound/samples.h"
#include "includes/spacefb.h"
#include "sound/volt_reg.h"
READ8_MEMBER(spacefb_state::audio_p2_r)
@ -75,13 +76,13 @@ static const char *const spacefb_sample_names[] =
MACHINE_CONFIG_FRAGMENT( spacefb_audio )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_DAC_ADD("dac")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
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_SOUND_ADD("samples", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(3)
MCFG_SAMPLES_NAMES(spacefb_sample_names)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END

View File

@ -15,6 +15,7 @@
#include "emu.h"
#include "includes/exidy.h"
#include "sound/volt_reg.h"
@ -56,8 +57,8 @@ void exidy_state::adjust_sample(UINT8 freq)
WRITE8_MEMBER( exidy_state::targ_audio_1_w )
{
/* CPU music */
if ((data & 0x01) != (m_port_1_last & 0x01))
m_dac->write_unsigned8((data & 0x01) * 0xff);
if (BIT(m_port_1_last ^ data, 0))
m_dac->write(BIT(data, 0));
/* shot */
if (FALLING_EDGE(0x02) && !m_samples->playing(0)) m_samples->start(0,1);
@ -175,29 +176,31 @@ SAMPLES_START_CB_MEMBER(exidy_state::targ_audio_start)
MACHINE_CONFIG_FRAGMENT( spectar_audio )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("samples", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(4)
MCFG_SAMPLES_NAMES(sample_names)
MCFG_SAMPLES_START_CB(exidy_state, spectar_audio_start)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MCFG_DAC_ADD("dac")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99)
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
MACHINE_CONFIG_FRAGMENT( targ_audio )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("samples", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(4)
MCFG_SAMPLES_NAMES(sample_names)
MCFG_SAMPLES_START_CB(exidy_state, targ_audio_start)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MCFG_DAC_ADD("dac")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99)
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END

View File

@ -31,13 +31,14 @@
****************************************************************************/
#include "emu.h"
#include "williams.h"
#include "machine/6821pia.h"
#include "cpu/m6809/m6809.h"
#include "williams.h"
#include "sound/ym2151.h"
#include "sound/okim6295.h"
#include "sound/hc55516.h"
#include "sound/dac.h"
#include "sound/volt_reg.h"
#define NARC_MASTER_CLOCK XTAL_8MHz
@ -211,7 +212,7 @@ static MACHINE_CONFIG_FRAGMENT( williams_cvsd_sound )
MCFG_CPU_PROGRAM_MAP(williams_cvsd_map)
MCFG_DEVICE_ADD("pia", PIA6821, 0)
MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("dac", dac_device, write_unsigned8))
MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("dac", dac_byte_interface, write))
MCFG_PIA_WRITEPB_HANDLER(WRITE8(williams_cvsd_sound_device, talkback_w))
MCFG_PIA_IRQA_HANDLER(WRITELINE(williams_cvsd_sound_device, pia_irqa))
MCFG_PIA_IRQB_HANDLER(WRITELINE(williams_cvsd_sound_device, pia_irqb))
@ -220,8 +221,9 @@ static MACHINE_CONFIG_FRAGMENT( williams_cvsd_sound )
MCFG_YM2151_IRQ_HANDLER(WRITELINE(williams_cvsd_sound_device, ym2151_irq_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.10)
MCFG_DAC_ADD("dac")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.50)
MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.25) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
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_SOUND_ADD("cvsd", HC55516, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.60)
@ -513,7 +515,7 @@ static ADDRESS_MAP_START( williams_narc_master_map, AS_PROGRAM, 8, williams_narc
AM_RANGE(0x2000, 0x2001) AM_MIRROR(0x03fe) AM_DEVREADWRITE("ym2151", ym2151_device, read, write)
AM_RANGE(0x2800, 0x2800) AM_MIRROR(0x03ff) AM_WRITE(master_talkback_w)
AM_RANGE(0x2c00, 0x2c00) AM_MIRROR(0x03ff) AM_WRITE(command2_w)
AM_RANGE(0x3000, 0x3000) AM_MIRROR(0x03ff) AM_DEVWRITE("dac1", dac_device, write_unsigned8)
AM_RANGE(0x3000, 0x3000) AM_MIRROR(0x03ff) AM_DEVWRITE("dac1", dac_byte_interface, write)
AM_RANGE(0x3400, 0x3400) AM_MIRROR(0x03ff) AM_READ(command_r)
AM_RANGE(0x3800, 0x3800) AM_MIRROR(0x03ff) AM_WRITE(master_bank_select_w)
AM_RANGE(0x3c00, 0x3c00) AM_MIRROR(0x03ff) AM_WRITE(master_sync_w)
@ -531,7 +533,7 @@ static ADDRESS_MAP_START( williams_narc_slave_map, AS_PROGRAM, 8, williams_narc_
AM_RANGE(0x2000, 0x2000) AM_MIRROR(0x03ff) AM_WRITE(cvsd_clock_set_w)
AM_RANGE(0x2400, 0x2400) AM_MIRROR(0x03ff) AM_WRITE(cvsd_digit_clock_clear_w)
AM_RANGE(0x2800, 0x2800) AM_MIRROR(0x03ff) AM_WRITE(slave_talkback_w)
AM_RANGE(0x3000, 0x3000) AM_MIRROR(0x03ff) AM_DEVWRITE("dac2", dac_device, write_unsigned8)
AM_RANGE(0x3000, 0x3000) AM_MIRROR(0x03ff) AM_DEVWRITE("dac2", dac_byte_interface, write)
AM_RANGE(0x3400, 0x3400) AM_MIRROR(0x03ff) AM_READ(command2_r)
AM_RANGE(0x3800, 0x3800) AM_MIRROR(0x03ff) AM_WRITE(slave_bank_select_w)
AM_RANGE(0x3c00, 0x3c00) AM_MIRROR(0x03ff) AM_WRITE(slave_sync_w)
@ -555,11 +557,11 @@ static MACHINE_CONFIG_FRAGMENT( williams_narc_sound )
MCFG_YM2151_IRQ_HANDLER(WRITELINE(williams_narc_sound_device, ym2151_irq_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.10)
MCFG_DAC_ADD("dac1")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.50)
MCFG_DAC_ADD("dac2")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.50)
MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.25) // unknown DAC
MCFG_SOUND_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.25) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT)
MCFG_SOUND_ADD("cvsd", HC55516, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.60)
@ -794,7 +796,7 @@ static ADDRESS_MAP_START( williams_adpcm_map, AS_PROGRAM, 8, williams_adpcm_soun
AM_RANGE(0x0000, 0x1fff) AM_RAM
AM_RANGE(0x2000, 0x2000) AM_MIRROR(0x03ff) AM_WRITE(bank_select_w)
AM_RANGE(0x2400, 0x2401) AM_MIRROR(0x03fe) AM_DEVREADWRITE("ym2151", ym2151_device, read, write)
AM_RANGE(0x2800, 0x2800) AM_MIRROR(0x03ff) AM_DEVWRITE("dac", dac_device, write_unsigned8)
AM_RANGE(0x2800, 0x2800) AM_MIRROR(0x03ff) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0x2c00, 0x2c00) AM_MIRROR(0x03ff) AM_DEVREADWRITE("oki", okim6295_device, read, write)
AM_RANGE(0x3000, 0x3000) AM_MIRROR(0x03ff) AM_READ(command_r)
AM_RANGE(0x3400, 0x3400) AM_MIRROR(0x03ff) AM_WRITE(oki6295_bank_select_w)
@ -826,12 +828,13 @@ static MACHINE_CONFIG_FRAGMENT( williams_adpcm_sound )
MCFG_YM2151_IRQ_HANDLER(WRITELINE(williams_adpcm_sound_device, ym2151_irq_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.10)
MCFG_DAC_ADD("dac")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.50)
MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.5) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
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_OKIM6295_ADD("oki", ADPCM_MASTER_CLOCK/8, OKIM6295_PIN7_HIGH) // clock frequency & pin 7 not verified
MCFG_DEVICE_ADDRESS_MAP(AS_0, williams_adpcm_oki_map)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.50)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.5)
MACHINE_CONFIG_END

View File

@ -14,7 +14,6 @@
#include "sound/ym2151.h"
#include "sound/okim6295.h"
#include "sound/hc55516.h"
#include "sound/dac.h"
@ -28,18 +27,6 @@ extern const device_type WILLIAMS_ADPCM_SOUND;
//**************************************************************************
// DEVICE CONFIGURATION MACROS
//**************************************************************************
#define MCFG_WILLIAMS_NARC_SOUND_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, WILLIAMS_NARC_SOUND, 0)
#define MCFG_WILLIAMS_CVSD_SOUND_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, WILLIAMS_CVSD_SOUND, 0)
#define MCFG_WILLIAMS_ADPCM_SOUND_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, WILLIAMS_ADPCM_SOUND, 0)
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************

View File

@ -8,21 +8,23 @@
*/
#include "wpcsnd.h"
#include "sound/dac.h"
#include "sound/volt_reg.h"
#define LOG_WPCSND (0)
const device_type WPCSND = &device_creator<wpcsnd_device>;
wpcsnd_device::wpcsnd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig,WPCSND,"Williams WPC Sound",tag,owner,clock, "wpcsnd", __FILE__)
, m_cpu(*this, "bgcpu")
, m_ym2151(*this, "ym2151")
, m_hc55516(*this, "hc55516")
, m_dac(*this, "dac")
, m_cpubank(*this, "rombank")
, m_fixedbank(*this, "fixed")
, m_rom(*this, finder_base::DUMMY_TAG)
, m_reply_cb(*this)
: device_t(mconfig,WPCSND,"Williams WPC Sound",tag,owner,clock, "wpcsnd", __FILE__),
device_mixer_interface(mconfig, *this),
m_cpu(*this, "bgcpu"),
m_ym2151(*this, "ym2151"),
m_hc55516(*this, "hc55516"),
m_cpubank(*this, "rombank"),
m_fixedbank(*this, "fixed"),
m_rom(*this, finder_base::DUMMY_TAG),
m_reply_cb(*this)
{
}
@ -30,7 +32,7 @@ static ADDRESS_MAP_START( wpcsnd_map, AS_PROGRAM, 8, wpcsnd_device )
AM_RANGE(0x0000, 0x1fff) AM_RAM
AM_RANGE(0x2000, 0x2000) AM_MIRROR(0x03ff) AM_WRITE(rombank_w)
AM_RANGE(0x2400, 0x2401) AM_MIRROR(0x03fe) AM_DEVREADWRITE("ym2151", ym2151_device, read, write)
AM_RANGE(0x2800, 0x2800) AM_MIRROR(0x03ff) AM_DEVWRITE("dac", dac_device, write_unsigned8)
AM_RANGE(0x2800, 0x2800) AM_MIRROR(0x03ff) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0x2c00, 0x2fff) AM_WRITE(bg_speech_digit_w)
AM_RANGE(0x3000, 0x33ff) AM_READ(latch_r)
AM_RANGE(0x3400, 0x37ff) AM_WRITE(bg_speech_clock_w)
@ -68,16 +70,16 @@ MACHINE_CONFIG_FRAGMENT( wpcsnd )
MCFG_CPU_PROGRAM_MAP(wpcsnd_map)
MCFG_QUANTUM_TIME(attotime::from_hz(50))
MCFG_SPEAKER_STANDARD_MONO("bg")
MCFG_YM2151_ADD("ym2151", 3580000)
MCFG_YM2151_IRQ_HANDLER(WRITELINE(wpcsnd_device, ym2151_irq_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "bg", 0.25)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.25)
MCFG_DAC_ADD("dac")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "bg", 0.50)
MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.25) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
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_SOUND_ADD("hc55516", HC55516, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "bg", 0.50)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.5)
MACHINE_CONFIG_END
machine_config_constructor wpcsnd_device::device_mconfig_additions() const
@ -105,7 +107,7 @@ void wpcsnd_device::device_reset()
m_reply_available = false;
}
void wpcsnd_device::static_set_gfxregion(device_t &device, const char *tag)
void wpcsnd_device::static_set_romregion(device_t &device, const char *tag)
{
wpcsnd_device &cpuboard = downcast<wpcsnd_device &>(device);
cpuboard.m_rom.set_tag(tag);

View File

@ -13,16 +13,17 @@
#include "cpu/m6809/m6809.h"
#include "sound/ym2151.h"
#include "sound/hc55516.h"
#include "sound/dac.h"
#define MCFG_WMS_WPC_SOUND_ADD(_tag, _region) \
MCFG_DEVICE_ADD(_tag, WPCSND, 0) \
wpcsnd_device::static_set_gfxregion(*device, _region);
#define MCFG_WPC_ROM_REGION(_region) \
wpcsnd_device::static_set_romregion(*device, _region);
#define MCFG_WPC_SOUND_REPLY_CALLBACK(_reply) \
downcast<wpcsnd_device *>(device)->set_reply_callback(DEVCB_##_reply);
class wpcsnd_device : public device_t
class wpcsnd_device : public device_t,
public device_mixer_interface
{
public:
// construction/destruction
@ -31,7 +32,6 @@ public:
required_device<cpu_device> m_cpu;
required_device<ym2151_device> m_ym2151;
required_device<hc55516_device> m_hc55516;
required_device<dac_device> m_dac;
required_memory_bank m_cpubank;
required_memory_bank m_fixedbank;
required_memory_region m_rom;
@ -49,7 +49,7 @@ public:
UINT8 ctrl_r();
UINT8 data_r();
static void static_set_gfxregion(device_t &device, const char *tag);
static void static_set_romregion(device_t &device, const char *tag);
// callbacks
template<class _reply> void set_reply_callback(_reply reply) { m_reply_cb.set_callback(reply); }
@ -67,7 +67,6 @@ private:
// callback
devcb_write_line m_reply_cb;
};
extern const device_type WPCSND;

View File

@ -2,11 +2,11 @@
// copyright-holders:Vas Crabb
#include "emu.h"
#include "audio/zaccaria.h"
#include "cpu/m6800/m6800.h"
#include "machine/clock.h"
#include "machine/rescap.h"
#include "sound/dac.h"
#include "sound/volt_reg.h"
//**************************************************************************
@ -128,7 +128,7 @@ static ADDRESS_MAP_START(zac1b11142_audio_map, AS_PROGRAM, 8, zac1b11142_audio_d
ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(0x0000, 0x007f) AM_RAM // 6802 internal RAM
AM_RANGE(0x0090, 0x0093) AM_MIRROR(0x8f6c) AM_DEVREADWRITE("pia_1i", pia6821_device, read, write)
AM_RANGE(0x1000, 0x1000) AM_MIRROR(0x83ff) AM_DEVWRITE("dac_1f", dac_device, write_unsigned8) // MC1408
AM_RANGE(0x1000, 0x1000) AM_MIRROR(0x83ff) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0x1400, 0x1400) AM_MIRROR(0xc3ff) AM_WRITE(melody_command_w)
AM_RANGE(0x1800, 0x1800) AM_MIRROR(0xc3ff) AM_READ(host_command_r)
AM_RANGE(0x2000, 0x2fff) AM_MIRROR(0x8000) AM_ROM // ROM 8 with A12 low
@ -200,8 +200,9 @@ MACHINE_CONFIG_DERIVED(zac1b11142_config, zac1b111xx_base_config)
MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("speech", tms5220_device, data_w))
MCFG_PIA_WRITEPB_HANDLER(WRITE8(zac1b11142_audio_device, pia_1i_portb_w))
MCFG_DAC_ADD("dac_1f")
MCFG_MIXER_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.80, 0)
MCFG_SOUND_ADD("dac", MC1408, 0) MCFG_MIXER_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.40, 0) // mc1408.1f
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
// There is no xtal, the clock is obtained from a RC oscillator as shown in the TMS5220 datasheet (R=100kOhm C=22pF)
// 162kHz measured on pin 3 20 minutes after power on, clock would then be 162.3*4=649.2kHz

View File

@ -25,12 +25,6 @@ extern device_type const ZACCARIA_1B11142;
// DEVICE CONFIGURATION MACROS
//**************************************************************************
#define MCFG_ZACCARIA_1B11107(_tag) \
MCFG_DEVICE_ADD(_tag, ZACCARIA_1B11107, 0)
#define MCFG_ZACCARIA_1B11142(_tag) \
MCFG_DEVICE_ADD(_tag, ZACCARIA_1B11142, 0)
#define MCFG_ZACCARIA_1B11142_SET_ACS_CALLBACK(_devcb) \
devcb = &zac1b11142_audio_device::static_set_acs_cb(*device, DEVCB_##_devcb);

View File

@ -96,7 +96,7 @@ MACHINE_CONFIG_FRAGMENT( zaxxon_samples )
MCFG_SOUND_ADD("samples", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(12)
MCFG_SAMPLES_NAMES(zaxxon_sample_names)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MACHINE_CONFIG_END
@ -196,7 +196,7 @@ MACHINE_CONFIG_FRAGMENT( congo_samples )
MCFG_SOUND_ADD("samples", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(5)
MCFG_SAMPLES_NAMES(congo_sample_names)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MACHINE_CONFIG_END

View File

@ -84,11 +84,12 @@ Graphics: CY37256P160-83AC x 2 (Ultra37000 CPLD family - 160 pin TQFP, 256 Macro
***************************************************************************/
#include "emu.h"
#include "includes/20pacgal.h"
#include "cpu/z180/z180.h"
#include "machine/eepromser.h"
#include "machine/watchdog.h"
#include "sound/dac.h"
#include "includes/20pacgal.h"
#include "sound/volt_reg.h"
/*************************************
@ -244,7 +245,7 @@ READ8_MEMBER( _25pacman_state::_25pacman_io_87_r )
AM_RANGE(0x87, 0x87) AM_READ( _25pacman_io_87_r ) // not eeprom on this
AM_RANGE(0x87, 0x87) AM_WRITENOP
// AM_RANGE(0x88, 0x88) AM_WRITE(ram_bank_select_w)
AM_RANGE(0x89, 0x89) AM_DEVWRITE("dac", dac_device, write_signed8)
AM_RANGE(0x89, 0x89) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0x8a, 0x8a) AM_WRITEONLY AM_SHARE("stars_ctrl") /* stars: bits 3-4 = active set; bit 5 = enable */
AM_RANGE(0x8b, 0x8b) AM_WRITEONLY AM_SHARE("flip")
AM_RANGE(0x8c, 0x8c) AM_WRITENOP
@ -265,7 +266,7 @@ static ADDRESS_MAP_START( 20pacgal_io_map, AS_IO, 8, _20pacgal_state )
AM_RANGE(0x85, 0x86) AM_WRITEONLY AM_SHARE("stars_seed") /* stars: rng seed (lo/hi) */
AM_RANGE(0x87, 0x87) AM_READ_PORT("EEPROMIN") AM_WRITE_PORT("EEPROMOUT")
AM_RANGE(0x88, 0x88) AM_WRITE(ram_bank_select_w)
AM_RANGE(0x89, 0x89) AM_DEVWRITE("dac", dac_device, write_signed8)
AM_RANGE(0x89, 0x89) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0x8a, 0x8a) AM_WRITEONLY AM_SHARE("stars_ctrl") /* stars: bits 3-4 = active set; bit 5 = enable */
AM_RANGE(0x8b, 0x8b) AM_WRITEONLY AM_SHARE("flip")
AM_RANGE(0x8f, 0x8f) AM_WRITE(_20pacgal_coin_counter_w)
@ -402,14 +403,15 @@ static MACHINE_CONFIG_START( 20pacgal, _20pacgal_state )
MCFG_FRAGMENT_ADD(20pacgal_video)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("namco", NAMCO_CUS30, NAMCO_AUDIO_CLOCK)
MCFG_NAMCO_AUDIO_VOICES(3)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_DAC_ADD("dac")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END

View File

@ -11,6 +11,7 @@
#include "emu.h"
#include "cpu/i4004/i4004.h"
#include "sound/dac.h"
#include "sound/volt_reg.h"
#include "4004clk.lh"
class nixieclock_state : public driver_device
@ -19,17 +20,14 @@ public:
nixieclock_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_dac(*this, "dac"),
m_input(*this, "INPUT")
{ }
required_device<i4004_cpu_device> m_maincpu;
required_device<dac_device> m_dac;
required_ioport m_input;
DECLARE_READ8_MEMBER( data_r );
DECLARE_WRITE8_MEMBER( nixie_w );
DECLARE_WRITE8_MEMBER( neon_w );
DECLARE_WRITE8_MEMBER( relays_w );
UINT16 m_nixie[16];
UINT8 m_timer;
virtual void machine_start() override;
@ -88,11 +86,6 @@ WRITE8_MEMBER(nixieclock_state::neon_w)
output_set_neon_value(3,BIT(data,0));
}
WRITE8_MEMBER(nixieclock_state::relays_w)
{
m_dac->write_unsigned8((data & 1) ? 0x80 : 0x40); //tick - tock
}
static ADDRESS_MAP_START(4004clk_rom, AS_PROGRAM, 8, nixieclock_state)
AM_RANGE(0x0000, 0x0FFF) AM_ROM
ADDRESS_MAP_END
@ -107,7 +100,7 @@ static ADDRESS_MAP_START( 4004clk_io, AS_IO, 8, nixieclock_state)
AM_RANGE(0x00, 0x0e) AM_WRITE(nixie_w)
AM_RANGE(0x00, 0x00) AM_READ(data_r)
AM_RANGE(0x0f, 0x0f) AM_WRITE(neon_w)
AM_RANGE(0x10, 0x10) AM_WRITE(relays_w)
AM_RANGE(0x10, 0x10) AM_DEVWRITE("dac", dac_bit_interface, write)
ADDRESS_MAP_END
/* Input ports */
@ -159,9 +152,10 @@ static MACHINE_CONFIG_START( 4004clk, nixieclock_state )
MCFG_DEFAULT_LAYOUT(layout_4004clk)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("dac", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MCFG_TIMER_DRIVER_ADD_PERIODIC("4004clk_timer", nixieclock_state, timer_callback, attotime::from_hz(120))
MACHINE_CONFIG_END

View File

@ -222,11 +222,12 @@ Notes - Has jumper setting for 122HZ or 61HZ)
*/
#include "emu.h"
#include "cpu/z80/z80.h"
#include "includes/40love.h"
#include "cpu/m6805/m6805.h"
#include "cpu/z80/z80.h"
#include "sound/ay8910.h"
#include "sound/dac.h"
#include "includes/40love.h"
#include "sound/volt_reg.h"
void fortyl_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
{
@ -750,7 +751,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, fortyl_state )
AM_RANGE(0xd800, 0xd800) AM_DEVREAD("soundlatch", generic_latch_8_device, read) AM_WRITE(to_main_w)
AM_RANGE(0xda00, 0xda00) AM_READNOP AM_WRITE(nmi_enable_w) /* unknown read */
AM_RANGE(0xdc00, 0xdc00) AM_WRITE(nmi_disable_w)
AM_RANGE(0xde00, 0xde00) AM_READNOP AM_DEVWRITE("dac", dac_device, write_signed8) /* signed 8-bit DAC - unknown read */
AM_RANGE(0xde00, 0xde00) AM_READNOP AM_DEVWRITE("dac", dac_byte_interface, write) /* signed 8-bit DAC - unknown read */
AM_RANGE(0xe000, 0xefff) AM_ROM /* space for diagnostics ROM */
ADDRESS_MAP_END
@ -1067,31 +1068,32 @@ static MACHINE_CONFIG_START( 40love, fortyl_state )
MCFG_PALETTE_INIT_OWNER(fortyl_state, fortyl)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("aysnd", AY8910, 2000000)
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(fortyl_state, sound_control_2_w))
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(fortyl_state, sound_control_3_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1)
MCFG_SOUND_ADD("msm", MSM5232, 8000000/4)
MCFG_MSM5232_SET_CAPACITORS(1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6) /* 1.0 uF capacitors (verified on real PCB) */
MCFG_SOUND_ROUTE(0, "mono", 1.0) // pin 28 2'-1
MCFG_SOUND_ROUTE(1, "mono", 1.0) // pin 29 4'-1
MCFG_SOUND_ROUTE(2, "mono", 1.0) // pin 30 8'-1
MCFG_SOUND_ROUTE(3, "mono", 1.0) // pin 31 16'-1
MCFG_SOUND_ROUTE(4, "mono", 1.0) // pin 36 2'-2
MCFG_SOUND_ROUTE(5, "mono", 1.0) // pin 35 4'-2
MCFG_SOUND_ROUTE(6, "mono", 1.0) // pin 34 8'-2
MCFG_SOUND_ROUTE(7, "mono", 1.0) // pin 33 16'-2
MCFG_SOUND_ROUTE(0, "speaker", 1.0) // pin 28 2'-1
MCFG_SOUND_ROUTE(1, "speaker", 1.0) // pin 29 4'-1
MCFG_SOUND_ROUTE(2, "speaker", 1.0) // pin 30 8'-1
MCFG_SOUND_ROUTE(3, "speaker", 1.0) // pin 31 16'-1
MCFG_SOUND_ROUTE(4, "speaker", 1.0) // pin 36 2'-2
MCFG_SOUND_ROUTE(5, "speaker", 1.0) // pin 35 4'-2
MCFG_SOUND_ROUTE(6, "speaker", 1.0) // pin 34 8'-2
MCFG_SOUND_ROUTE(7, "speaker", 1.0) // pin 33 16'-2
// pin 1 SOLO 8' not mapped
// pin 2 SOLO 16' not mapped
// pin 22 Noise Output not mapped
MCFG_DAC_ADD("dac")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( undoukai, fortyl_state )
@ -1126,31 +1128,32 @@ static MACHINE_CONFIG_START( undoukai, fortyl_state )
MCFG_PALETTE_INIT_OWNER(fortyl_state, fortyl)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("aysnd", AY8910, 2000000)
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(fortyl_state, sound_control_2_w))
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(fortyl_state, sound_control_3_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1)
MCFG_SOUND_ADD("msm", MSM5232, 8000000/4)
MCFG_MSM5232_SET_CAPACITORS(1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6) /* 1.0 uF capacitors (verified on real PCB) */
MCFG_SOUND_ROUTE(0, "mono", 1.0) // pin 28 2'-1
MCFG_SOUND_ROUTE(1, "mono", 1.0) // pin 29 4'-1
MCFG_SOUND_ROUTE(2, "mono", 1.0) // pin 30 8'-1
MCFG_SOUND_ROUTE(3, "mono", 1.0) // pin 31 16'-1
MCFG_SOUND_ROUTE(4, "mono", 1.0) // pin 36 2'-2
MCFG_SOUND_ROUTE(5, "mono", 1.0) // pin 35 4'-2
MCFG_SOUND_ROUTE(6, "mono", 1.0) // pin 34 8'-2
MCFG_SOUND_ROUTE(7, "mono", 1.0) // pin 33 16'-2
MCFG_SOUND_ROUTE(0, "speaker", 1.0) // pin 28 2'-1
MCFG_SOUND_ROUTE(1, "speaker", 1.0) // pin 29 4'-1
MCFG_SOUND_ROUTE(2, "speaker", 1.0) // pin 30 8'-1
MCFG_SOUND_ROUTE(3, "speaker", 1.0) // pin 31 16'-1
MCFG_SOUND_ROUTE(4, "speaker", 1.0) // pin 36 2'-2
MCFG_SOUND_ROUTE(5, "speaker", 1.0) // pin 35 4'-2
MCFG_SOUND_ROUTE(6, "speaker", 1.0) // pin 34 8'-2
MCFG_SOUND_ROUTE(7, "speaker", 1.0) // pin 33 16'-2
// pin 1 SOLO 8' not mapped
// pin 2 SOLO 16' not mapped
// pin 22 Noise Output not mapped
MCFG_DAC_ADD("dac")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
/*******************************************************************************/

View File

@ -70,13 +70,12 @@
#include "emu.h"
#include "cpu/arm/arm.h"
#include "sound/dac.h"
#include "includes/archimds.h"
#include "formats/acorn_dsk.h"
#include "machine/i2cmem.h"
//#include "machine/aakart.h"
#include "machine/ram.h"
#include "machine/wd_fdc.h"
#include "formats/acorn_dsk.h"
#include "sound/volt_reg.h"
#include "softlist.h"
class a310_state : public archimedes_state
@ -151,11 +150,6 @@ DRIVER_INIT_MEMBER(a310_state,a310)
void a310_state::machine_start()
{
archimedes_init();
// reset the DAC to centerline
//m_dac->write_signed8(0x80);
}
void a310_state::machine_reset()
@ -397,30 +391,24 @@ static MACHINE_CONFIG_START( a310, a310_state )
MCFG_SOFTWARE_LIST_ADD("flop_list", "archimedes")
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("dac0", DAC, 0)
MCFG_SOUND_ROUTE(0, "mono", 0.10)
MCFG_SOUND_ADD("dac1", DAC, 0)
MCFG_SOUND_ROUTE(0, "mono", 0.10)
MCFG_SOUND_ADD("dac2", DAC, 0)
MCFG_SOUND_ROUTE(0, "mono", 0.10)
MCFG_SOUND_ADD("dac3", DAC, 0)
MCFG_SOUND_ROUTE(0, "mono", 0.10)
MCFG_SOUND_ADD("dac4", DAC, 0)
MCFG_SOUND_ROUTE(0, "mono", 0.10)
MCFG_SOUND_ADD("dac5", DAC, 0)
MCFG_SOUND_ROUTE(0, "mono", 0.10)
MCFG_SOUND_ADD("dac6", DAC, 0)
MCFG_SOUND_ROUTE(0, "mono", 0.10)
MCFG_SOUND_ADD("dac7", DAC, 0)
MCFG_SOUND_ROUTE(0, "mono", 0.10)
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("dac0", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC
MCFG_SOUND_ADD("dac1", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC
MCFG_SOUND_ADD("dac2", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC
MCFG_SOUND_ADD("dac3", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC
MCFG_SOUND_ADD("dac4", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC
MCFG_SOUND_ADD("dac5", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC
MCFG_SOUND_ADD("dac6", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC
MCFG_SOUND_ADD("dac7", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac0", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac0", -1.0, DAC_VREF_NEG_INPUT)
MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT)
MCFG_SOUND_ROUTE_EX(0, "dac3", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac3", -1.0, DAC_VREF_NEG_INPUT)
MCFG_SOUND_ROUTE_EX(0, "dac4", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac4", -1.0, DAC_VREF_NEG_INPUT)
MCFG_SOUND_ROUTE_EX(0, "dac5", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac5", -1.0, DAC_VREF_NEG_INPUT)
MCFG_SOUND_ROUTE_EX(0, "dac6", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac6", -1.0, DAC_VREF_NEG_INPUT)
MCFG_SOUND_ROUTE_EX(0, "dac7", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac7", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
ROM_START(a310)

View File

@ -22,7 +22,7 @@
#include "includes/advision.h"
#include "cpu/mcs48/mcs48.h"
#include "cpu/cop400/cop400.h"
#include "sound/dac.h"
#include "sound/volt_reg.h"
#include "softlist.h"
/* Memory Maps */
@ -85,10 +85,10 @@ static MACHINE_CONFIG_START( advision, advision_state )
MCFG_PALETTE_INIT_OWNER(advision_state, advision)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("dac", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("dac", DAC_2BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
/* cartridge */
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "advision_cart")

View File

@ -185,15 +185,16 @@ DIP locations verified from manuals for:
***************************************************************************/
#include "emu.h"
#include "includes/alpha68k.h"
#include "cpu/m68000/m68000.h"
#include "cpu/z80/z80.h"
#include "cpu/mcs48/mcs48.h"
#include "cpu/z80/z80.h"
#include "sound/2203intf.h"
#include "sound/3812intf.h"
#include "sound/ay8910.h"
#include "sound/dac.h"
#include "sound/3812intf.h"
#include "sound/volt_reg.h"
#include "sound/ym2413.h"
#include "sound/2203intf.h"
#include "includes/alpha68k.h"
@ -737,7 +738,7 @@ static ADDRESS_MAP_START( kyros_sound_map, AS_PROGRAM, 8, alpha68k_state )
AM_RANGE(0xc000, 0xc7ff) AM_RAM
AM_RANGE(0xe000, 0xe000) AM_DEVREAD("soundlatch", generic_latch_8_device, read)
AM_RANGE(0xe002, 0xe002) AM_DEVWRITE("soundlatch", generic_latch_8_device, clear_w)
AM_RANGE(0xe004, 0xe004) AM_DEVWRITE("dac", dac_device, write_signed8)
AM_RANGE(0xe004, 0xe004) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0xe006, 0xe00e) AM_WRITENOP // soundboard I/O's, ignored
/* reference only
AM_RANGE(0xe006, 0xe006) AM_WRITENOP // NMI: diminishing saw-tooth
@ -753,7 +754,7 @@ static ADDRESS_MAP_START( sstingry_sound_map, AS_PROGRAM, 8, alpha68k_state )
AM_RANGE(0x8000, 0x87ff) AM_RAM
AM_RANGE(0xc100, 0xc100) AM_DEVREAD("soundlatch", generic_latch_8_device, read)
AM_RANGE(0xc102, 0xc102) AM_DEVWRITE("soundlatch", generic_latch_8_device, clear_w)
AM_RANGE(0xc104, 0xc104) AM_DEVWRITE("dac", dac_device, write_signed8)
AM_RANGE(0xc104, 0xc104) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0xc106, 0xc10e) AM_WRITENOP // soundboard I/O's, ignored
ADDRESS_MAP_END
@ -781,7 +782,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( sound_portmap, AS_IO, 8, alpha68k_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
AM_RANGE(0x00, 0x00) AM_DEVREADWRITE("soundlatch", generic_latch_8_device, read, clear_w)
AM_RANGE(0x08, 0x08) AM_DEVWRITE("dac", dac_device, write_signed8)
AM_RANGE(0x08, 0x08) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0x0a, 0x0b) AM_DEVWRITE("ym2", ym2413_device, write)
AM_RANGE(0x0c, 0x0d) AM_DEVWRITE("ym1", ym2203_device, write)
AM_RANGE(0x0e, 0x0e) AM_WRITE(sound_bank_w)
@ -1952,21 +1953,22 @@ static MACHINE_CONFIG_START( sstingry, alpha68k_state )
MCFG_PALETTE_INIT_OWNER(alpha68k_state,kyros)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ym1", YM2203, 3000000)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.35)
MCFG_SOUND_ADD("ym2", YM2203, 3000000)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.35)
MCFG_SOUND_ADD("ym3", YM2203, 3000000)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
MCFG_DAC_ADD("dac")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.75) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( kyros, alpha68k_state )
@ -2003,21 +2005,22 @@ static MACHINE_CONFIG_START( kyros, alpha68k_state )
MCFG_PALETTE_INIT_OWNER(alpha68k_state,kyros)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ym1", YM2203, XTAL_24MHz/12) /* Verified on bootleg PCB */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.35)
MCFG_SOUND_ADD("ym2", YM2203, XTAL_24MHz/12) /* Verified on bootleg PCB */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.35)
MCFG_SOUND_ADD("ym3", YM2203, XTAL_24MHz/12) /* Verified on bootleg PCB */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.90)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.9)
MCFG_DAC_ADD("dac")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.75) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( jongbou, alpha68k_state )
@ -2053,13 +2056,13 @@ static MACHINE_CONFIG_START( jongbou, alpha68k_state )
MCFG_PALETTE_INIT_OWNER(alpha68k_state,kyros)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("aysnd", AY8910, 2000000)
MCFG_AY8910_PORT_A_READ_CB(DEVREAD8("soundlatch", generic_latch_8_device, read))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.65)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.65)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( alpha68k_I, alpha68k_state )
@ -2092,13 +2095,13 @@ static MACHINE_CONFIG_START( alpha68k_I, alpha68k_state )
MCFG_PALETTE_INIT_OWNER(alpha68k_state,paddlem)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ymsnd", YM3812, 4000000)
MCFG_YM3812_IRQ_HANDLER(INPUTLINE("audiocpu", 0))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
INTERRUPT_GEN_MEMBER(alpha68k_state::alpha68k_sound_nmi)
@ -2139,20 +2142,21 @@ static MACHINE_CONFIG_START( alpha68k_II, alpha68k_state )
MCFG_VIDEO_START_OVERRIDE(alpha68k_state,alpha68k)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ym1", YM2203, 3000000)
MCFG_AY8910_PORT_A_READ_CB(DEVREAD8("soundlatch", generic_latch_8_device, read))
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(alpha68k_state, porta_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.65)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.65)
MCFG_SOUND_ADD("ym2", YM2413, 3579545)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_DAC_ADD("dac")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.75) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( btlfieldb, alpha68k_II )
@ -2194,20 +2198,21 @@ static MACHINE_CONFIG_START( alpha68k_II_gm, alpha68k_state )
MCFG_VIDEO_START_OVERRIDE(alpha68k_state,alpha68k)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ym1", YM2203, 3000000)
MCFG_AY8910_PORT_A_READ_CB(DEVREAD8("soundlatch", generic_latch_8_device, read))
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(alpha68k_state, porta_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.65)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.65)
MCFG_SOUND_ADD("ym2", YM2413, 3579545)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_DAC_ADD("dac")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.75) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( alpha68k_V, alpha68k_state )
@ -2242,20 +2247,21 @@ static MACHINE_CONFIG_START( alpha68k_V, alpha68k_state )
MCFG_VIDEO_START_OVERRIDE(alpha68k_state,alpha68k)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ym1", YM2203, 3000000)
MCFG_AY8910_PORT_A_READ_CB(DEVREAD8("soundlatch", generic_latch_8_device, read))
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(alpha68k_state, porta_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.65)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.65)
MCFG_SOUND_ADD("ym2", YM2413, 3579545)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_DAC_ADD("dac")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.75) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( alpha68k_V_sb, alpha68k_state )
@ -2290,20 +2296,21 @@ static MACHINE_CONFIG_START( alpha68k_V_sb, alpha68k_state )
MCFG_VIDEO_START_OVERRIDE(alpha68k_state,alpha68k)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ym1", YM2203, 3000000)
MCFG_AY8910_PORT_A_READ_CB(DEVREAD8("soundlatch", generic_latch_8_device, read))
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(alpha68k_state, porta_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.65)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.65)
MCFG_SOUND_ADD("ym2", YM2413, 3579545)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_DAC_ADD("dac")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.75) // unknown DAC
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( tnextspc, alpha68k_state )
@ -2337,13 +2344,13 @@ static MACHINE_CONFIG_START( tnextspc, alpha68k_state )
MCFG_PALETTE_INIT_OWNER(alpha68k_state,paddlem)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ymsnd", YM3812, 4000000)
MCFG_YM3812_IRQ_HANDLER(INPUTLINE("audiocpu", 0))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END

View File

@ -421,7 +421,7 @@
#include "video/mc6845.h"
#include "machine/i8255.h"
#include "sound/3812intf.h"
#include "sound/dac.h"
//#include "sound/dac.h"
#include "suprstar.lh"
@ -627,7 +627,7 @@ WRITE8_MEMBER(amaticmg_state::out_c_w)
WRITE8_MEMBER( amaticmg_state::unk80_w )
{
// m_dac->write_unsigned8(data & 0x01); /* Sound DAC */
// m_dac->write(BIT(data, 0)); /* Sound DAC */
}
@ -656,8 +656,8 @@ static ADDRESS_MAP_START( amaticmg_portmap, AS_IO, 8, amaticmg_state )
AM_RANGE(0x80, 0x80) AM_WRITE(unk80_w)
AM_RANGE(0xc0, 0xc0) AM_WRITE(rombank_w)
// AM_RANGE(0x00, 0x00) AM_DEVREADWRITE("ppi8255_2", ppi8255_device, read, write)
// AM_RANGE(0x00, 0x00) AM_DEVWRITE("dac1", dac_device, write_signed8)
// AM_RANGE(0x00, 0x00) AM_DEVWRITE("dac2", dac_device, write_signed8)
// AM_RANGE(0x00, 0x00) AM_DEVWRITE("dac1", dac_byte_interface, write)
// AM_RANGE(0x00, 0x00) AM_DEVWRITE("dac2", dac_byte_interface, write)
ADDRESS_MAP_END
@ -858,14 +858,10 @@ static MACHINE_CONFIG_START( amaticmg, amaticmg_state )
MCFG_PALETTE_INIT_OWNER(amaticmg_state, amaticmg)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ymsnd", YM3812, SND_CLOCK)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
// MCFG_DAC_ADD("dac") /* Y3014B */
// MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("ymsnd", YM3812, SND_CLOCK) /* Y3014B DAC */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
MACHINE_CONFIG_END

View File

@ -17,9 +17,10 @@
***************************************************************************/
#include "emu.h"
#include "bus/rs232/rs232.h"
#include "includes/apple3.h"
#include "includes/apple2.h"
#include "bus/rs232/rs232.h"
#include "sound/volt_reg.h"
#include "formats/ap2_dsk.h"
#include "bus/a2bus/a2cffa.h"
@ -141,11 +142,13 @@ static MACHINE_CONFIG_START( apple3, apple3_state )
MCFG_VIA6522_IRQ_HANDLER(WRITELINE(apple3_state, apple3_via_1_irq_func))
/* sound */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD(SPEAKER_TAG, SPEAKER_SOUND, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MCFG_SOUND_ADD(DAC_TAG, DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("bell", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99)
MCFG_SOUND_ADD("dac", DAC_6BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.125) // 6522.b5(pb0-pb5) + 320k,160k,80k,40k,20k,10k
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
MCFG_SOUND_ROUTE_EX(0, "bell", 1.0, DAC_VREF_POS_INPUT)
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_TIMER_DRIVER_ADD_PERIODIC("c040", apple3_state, apple3_c040_tick, attotime::from_hz(2000))
/* internal ram */

Some files were not shown because too many files have changed in this diff Show More