mirror of
https://github.com/holub/mame
synced 2025-05-12 09:08:53 +03:00
dac_device tag lookup cleanup (nw)
This commit is contained in:
parent
2938d4c348
commit
1d40fe6824
@ -102,7 +102,7 @@ WRITE_LINE_MEMBER(cchasm_state::ctc_timer_1_w)
|
||||
{
|
||||
m_output[0] ^= 0x7f;
|
||||
m_channel_active[0] = 1;
|
||||
machine().device<dac_device>("dac1")->write_unsigned8(m_output[0]);
|
||||
m_dac1->write_unsigned8(m_output[0]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -112,7 +112,7 @@ WRITE_LINE_MEMBER(cchasm_state::ctc_timer_2_w)
|
||||
{
|
||||
m_output[1] ^= 0x7f;
|
||||
m_channel_active[1] = 1;
|
||||
machine().device<dac_device>("dac2")->write_unsigned8(m_output[0]);
|
||||
m_dac2->write_unsigned8(m_output[0]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -294,7 +294,7 @@ WRITE16_MEMBER(harddriv_state::hdsnddsp_dac_w)
|
||||
{
|
||||
/* DAC L */
|
||||
if (!m_dacmute)
|
||||
downcast<dac_device *>(machine().device("dac"))->write_signed16(data ^ 0x8000);
|
||||
m_dac->write_signed16(data ^ 0x8000);
|
||||
}
|
||||
|
||||
|
||||
|
@ -396,13 +396,13 @@ READ8_MEMBER(n8080_state::helifire_8035_p2_r)
|
||||
|
||||
WRITE8_MEMBER(n8080_state::n8080_dac_w)
|
||||
{
|
||||
machine().device<dac_device>("dac")->write_unsigned8(data & 0x80);
|
||||
m_dac->write_unsigned8(data & 0x80);
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(n8080_state::helifire_dac_w)
|
||||
{
|
||||
machine().device<dac_device>("dac")->write_unsigned8(data * m_helifire_dac_volume);
|
||||
m_dac->write_unsigned8(data * m_helifire_dac_volume);
|
||||
}
|
||||
|
||||
|
||||
|
@ -621,7 +621,7 @@ WRITE8_MEMBER(amaticmg_state::out_c_w)
|
||||
|
||||
WRITE8_MEMBER( amaticmg_state::unk80_w )
|
||||
{
|
||||
// machine().device<dac_device>("dac")->write_unsigned8(data & 0x01); /* Sound DAC */
|
||||
// m_dac->write_unsigned8(data & 0x01); /* Sound DAC */
|
||||
}
|
||||
|
||||
|
||||
|
@ -376,7 +376,7 @@ void aristmk5_state::machine_start()
|
||||
archimedes_init();
|
||||
|
||||
// reset the DAC to centerline
|
||||
//machine().device<dac_device>("dac")->write_signed8(0x80);
|
||||
//m_dac->write_signed8(0x80);
|
||||
|
||||
m_mk5_2KHz_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(aristmk5_state::mk5_2KHz_callback),this));
|
||||
m_mk5_VSYNC_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(aristmk5_state::mk5_VSYNC_callback),this));
|
||||
|
@ -131,7 +131,9 @@ class calchase_state : public driver_device
|
||||
public:
|
||||
calchase_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu")
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_dac_l(*this, "dac_l"),
|
||||
m_dac_r(*this, "dac_r")
|
||||
{ }
|
||||
|
||||
UINT32 *m_bios_ram;
|
||||
@ -183,6 +185,8 @@ public:
|
||||
virtual void machine_reset();
|
||||
IRQ_CALLBACK_MEMBER(irq_callback);
|
||||
void intel82439tx_init();
|
||||
required_device<dac_device> m_dac_l;
|
||||
required_device<dac_device> m_dac_r;
|
||||
};
|
||||
|
||||
|
||||
@ -531,14 +535,12 @@ READ16_MEMBER(calchase_state::calchase_iocard5_r)
|
||||
|
||||
WRITE16_MEMBER(calchase_state::calchase_dac_l_w)
|
||||
{
|
||||
dac_device *device = machine().device<dac_device>("dac_l");
|
||||
device->write_unsigned16((data & 0xfff) << 4);
|
||||
m_dac_l->write_unsigned16((data & 0xfff) << 4);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(calchase_state::calchase_dac_r_w)
|
||||
{
|
||||
dac_device *device = machine().device<dac_device>("dac_r");
|
||||
device->write_unsigned16((data & 0xfff) << 4);
|
||||
m_dac_r->write_unsigned16((data & 0xfff) << 4);
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START( calchase_map, AS_PROGRAM, 32, calchase_state )
|
||||
|
@ -141,20 +141,17 @@ TIMER_CALLBACK_MEMBER(champbas_state::exctsccr_fm_callback)
|
||||
// Champion Baseball has only one DAC
|
||||
WRITE8_MEMBER(champbas_state::champbas_dac_w)
|
||||
{
|
||||
dac_device *device = machine().device<dac_device>("dac");
|
||||
device->write_signed8(data << 2);
|
||||
m_dac->write_signed8(data << 2);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(champbas_state::champbas_dac1_w)
|
||||
{
|
||||
dac_device *device = machine().device<dac_device>("dac1");
|
||||
device->write_signed8(data << 2);
|
||||
m_dac1->write_signed8(data << 2);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(champbas_state::champbas_dac2_w)
|
||||
{
|
||||
dac_device *device = machine().device<dac_device>("dac2");
|
||||
device->write_signed8(data << 2);
|
||||
m_dac2->write_signed8(data << 2);
|
||||
}
|
||||
|
||||
/*************************************
|
||||
|
@ -109,7 +109,6 @@ GFXDECODE_END
|
||||
|
||||
void cheekyms_state::machine_start()
|
||||
{
|
||||
m_dac = machine().device<dac_device>("dac");
|
||||
}
|
||||
|
||||
INTERRUPT_GEN_MEMBER(cheekyms_state::vblank_irq)
|
||||
|
@ -58,8 +58,6 @@ To enter service mode, keep 1&2 pressed on reset
|
||||
|
||||
void circusc_state::machine_start()
|
||||
{
|
||||
m_dac = machine().device<dac_device>("dac");
|
||||
|
||||
save_item(NAME(m_sn_latch));
|
||||
}
|
||||
|
||||
|
@ -539,8 +539,7 @@ WRITE16_MEMBER(coolpool_state::dsp_romaddr_w)
|
||||
|
||||
WRITE16_MEMBER(coolpool_state::dsp_dac_w)
|
||||
{
|
||||
dac_device *device = machine().device<dac_device>("dac");
|
||||
device->write_signed16((INT16)(data << 4) + 0x8000);
|
||||
m_dac->write_signed16((INT16)(data << 4) + 0x8000);
|
||||
}
|
||||
|
||||
|
||||
|
@ -958,7 +958,6 @@ static const samples_interface cosmicg_samples_interface =
|
||||
MACHINE_START_MEMBER(cosmic_state,cosmic)
|
||||
{
|
||||
m_samples = machine().device<samples_device>("samples");
|
||||
m_dac = machine().device<dac_device>("dac");
|
||||
|
||||
save_item(NAME(m_sound_enabled));
|
||||
save_item(NAME(m_march_select));
|
||||
@ -1539,11 +1538,10 @@ DRIVER_INIT_MEMBER(cosmic_state,devzone)
|
||||
|
||||
DRIVER_INIT_MEMBER(cosmic_state,nomnlnd)
|
||||
{
|
||||
dac_device *dac = machine().device<dac_device>("dac");
|
||||
m_maincpu->space(AS_PROGRAM).install_read_handler(0x5000, 0x5001, read8_delegate(FUNC(cosmic_state::nomnlnd_port_0_1_r),this));
|
||||
m_maincpu->space(AS_PROGRAM).nop_write(0x4800, 0x4800);
|
||||
m_maincpu->space(AS_PROGRAM).install_write_handler(0x4807, 0x4807, write8_delegate(FUNC(cosmic_state::cosmic_background_enable_w),this));
|
||||
m_maincpu->space(AS_PROGRAM).install_write_handler(0x480a, 0x480a, write8_delegate(FUNC(dac_device::write_unsigned8),dac));
|
||||
m_maincpu->space(AS_PROGRAM).install_write_handler(0x480a, 0x480a, write8_delegate(FUNC(dac_device::write_unsigned8),(dac_device*)m_dac));
|
||||
}
|
||||
|
||||
DRIVER_INIT_MEMBER(cosmic_state,panic)
|
||||
|
@ -32,7 +32,9 @@ public:
|
||||
csplayh5_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this,"maincpu"),
|
||||
m_v9958(*this,"v9958")
|
||||
m_v9958(*this,"v9958"),
|
||||
m_dac1(*this, "dac1"),
|
||||
m_dac2(*this, "dac2")
|
||||
{ }
|
||||
|
||||
UINT16 m_mux_data;
|
||||
@ -82,6 +84,8 @@ public:
|
||||
virtual void machine_reset();
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(csplayh5_irq);
|
||||
DECLARE_WRITE_LINE_MEMBER(csplayh5_vdp0_interrupt);
|
||||
required_device<dac_device> m_dac1;
|
||||
required_device<dac_device> m_dac2;
|
||||
};
|
||||
|
||||
|
||||
@ -235,10 +239,10 @@ WRITE8_MEMBER(csplayh5_state::tmpz84c011_pio_w)
|
||||
csplayh5_soundbank_w(machine(), data & 0x03);
|
||||
break;
|
||||
case 1: /* PB_0 */
|
||||
machine().device<dac_device>("dac2")->DAC_WRITE(data);
|
||||
m_dac2->DAC_WRITE(data);
|
||||
break;
|
||||
case 2: /* PC_0 */
|
||||
machine().device<dac_device>("dac1")->DAC_WRITE(data);
|
||||
m_dac1->DAC_WRITE(data);
|
||||
break;
|
||||
case 3: /* PD_0 */
|
||||
break;
|
||||
|
@ -312,7 +312,6 @@ void cvs_state::start_393hz_timer()
|
||||
|
||||
WRITE8_MEMBER(cvs_state::cvs_4_bit_dac_data_w)
|
||||
{
|
||||
dac_device *device = machine().device<dac_device>("dac2");
|
||||
UINT8 dac_value;
|
||||
static int old_data[4] = {0,0,0,0};
|
||||
|
||||
@ -330,7 +329,7 @@ WRITE8_MEMBER(cvs_state::cvs_4_bit_dac_data_w)
|
||||
(m_cvs_4_bit_dac_data[3] << 3);
|
||||
|
||||
/* scale up to a full byte and output */
|
||||
device->write_unsigned8((dac_value << 4) | dac_value);
|
||||
m_dac2->write_unsigned8((dac_value << 4) | dac_value);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(cvs_state::cvs_unknown_w)
|
||||
@ -983,7 +982,6 @@ MACHINE_START_MEMBER(cvs_state,cvs)
|
||||
|
||||
/* set devices */
|
||||
m_speech = machine().device("speech");
|
||||
m_dac3 = machine().device<dac_device>("dac3");
|
||||
m_tms = machine().device("tms");
|
||||
m_s2636_0 = machine().device("s2636_0");
|
||||
m_s2636_1 = machine().device("s2636_1");
|
||||
|
@ -1185,8 +1185,6 @@ MACHINE_CONFIG_END
|
||||
MACHINE_START_MEMBER(equites_state,equites)
|
||||
{
|
||||
m_msm = machine().device<msm5232_device>("msm");
|
||||
m_dac_1 = machine().device<dac_device>("dac1");
|
||||
m_dac_2 = machine().device<dac_device>("dac2");
|
||||
|
||||
save_item(NAME(m_fg_char_bank));
|
||||
save_item(NAME(m_bgcolor));
|
||||
|
@ -202,7 +202,7 @@ void ertictac_state::machine_start()
|
||||
archimedes_init();
|
||||
|
||||
// reset the DAC to centerline
|
||||
//machine().device<dac_device>("dac")->write_signed8(0x80);
|
||||
//m_dac->write_signed8(0x80);
|
||||
}
|
||||
|
||||
void ertictac_state::machine_reset()
|
||||
|
@ -557,7 +557,6 @@ WRITE8_MEMBER(esripsys_state::control_w)
|
||||
/* 10-bit MC3410CL DAC */
|
||||
WRITE8_MEMBER(esripsys_state::esripsys_dac_w)
|
||||
{
|
||||
dac_device *device = machine().device<dac_device>("dac");
|
||||
if (offset == 0)
|
||||
{
|
||||
m_dac_msb = data & 3;
|
||||
@ -570,7 +569,7 @@ WRITE8_MEMBER(esripsys_state::esripsys_dac_w)
|
||||
The 8-bit DAC modulates the 10-bit DAC.
|
||||
Shift down to prevent clipping.
|
||||
*/
|
||||
device->write_signed16((m_dac_vol * dac_data) >> 1);
|
||||
m_dac->write_signed16((m_dac_vol * dac_data) >> 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -238,10 +238,9 @@ READ8_MEMBER(exterm_state::sound_slave_latch_r)
|
||||
|
||||
WRITE8_MEMBER(exterm_state::sound_slave_dac_w)
|
||||
{
|
||||
dac_device *device = machine().device<dac_device>("dac");
|
||||
/* DAC A is used to modulate DAC B */
|
||||
m_dac_value[offset & 1] = data;
|
||||
device->write_unsigned16((m_dac_value[0] ^ 0xff) * m_dac_value[1]);
|
||||
m_dac->write_unsigned16((m_dac_value[0] ^ 0xff) * m_dac_value[1]);
|
||||
}
|
||||
|
||||
|
||||
|
@ -779,7 +779,7 @@ WRITE8_MEMBER(galaxian_state::sfx_sample_io_w)
|
||||
{
|
||||
/* the decoding here is very simplistic, and you can address both simultaneously */
|
||||
if (offset & 0x04) m_ppi8255_2->write(space, offset & 3, data);
|
||||
if (offset & 0x10) machine().device<dac_device>("dac")->write_signed8(data);
|
||||
if (offset & 0x10) m_dac->write_signed8(data);
|
||||
}
|
||||
|
||||
|
||||
@ -1182,8 +1182,7 @@ WRITE8_MEMBER(galaxian_state::kingball_sound2_w)
|
||||
|
||||
WRITE8_MEMBER(galaxian_state::kingball_dac_w)
|
||||
{
|
||||
dac_device *device = machine().device<dac_device>("dac");
|
||||
device->write_unsigned8(data ^ 0xff);
|
||||
m_dac->write_unsigned8(data ^ 0xff);
|
||||
}
|
||||
|
||||
|
||||
|
@ -82,7 +82,8 @@ class gei_state : public driver_device
|
||||
public:
|
||||
gei_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_dac(*this, "dac") { }
|
||||
|
||||
virtual void video_start();
|
||||
|
||||
@ -137,6 +138,7 @@ public:
|
||||
DECLARE_PALETTE_INIT(quizvid);
|
||||
INTERRUPT_GEN_MEMBER(vblank_irq);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<dac_device> m_dac;
|
||||
};
|
||||
|
||||
|
||||
@ -228,7 +230,7 @@ WRITE8_MEMBER(gei_state::sound_w)
|
||||
m_nmi_mask = data & 0x40;
|
||||
|
||||
/* bit 7 goes directly to the sound amplifier */
|
||||
machine().device<dac_device>("dac")->write_unsigned8(((data & 0x80) >> 7) * 255);
|
||||
m_dac->write_unsigned8(((data & 0x80) >> 7) * 255);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(gei_state::sound2_w)
|
||||
@ -245,7 +247,7 @@ WRITE8_MEMBER(gei_state::sound2_w)
|
||||
set_led_status(machine(), 12,data & 0x20);
|
||||
|
||||
/* bit 7 goes directly to the sound amplifier */
|
||||
machine().device<dac_device>("dac")->write(((data & 0x80) >> 7) * 255);
|
||||
m_dac->write(((data & 0x80) >> 7) * 255);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(gei_state::lamps2_w)
|
||||
|
@ -1142,7 +1142,6 @@ MACHINE_START_MEMBER(homedata_state,homedata)
|
||||
{
|
||||
m_ym = machine().device("ymsnd");
|
||||
m_sn = machine().device<sn76489a_device>("snsnd");
|
||||
m_dac = machine().device<dac_device>("dac");
|
||||
|
||||
save_item(NAME(m_visible_page));
|
||||
save_item(NAME(m_flipscreen));
|
||||
|
@ -103,7 +103,8 @@ public:
|
||||
m_colorram(*this, "colorram"),
|
||||
m_spriteram(*this, "spriteram"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_audiocpu(*this, "audiocpu") { }
|
||||
m_audiocpu(*this, "audiocpu"),
|
||||
m_dac(*this, "dac") { }
|
||||
|
||||
/* memory pointers */
|
||||
required_shared_ptr<UINT8> m_videoram;
|
||||
@ -149,6 +150,7 @@ public:
|
||||
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_audiocpu;
|
||||
required_device<dac_device> m_dac;
|
||||
};
|
||||
|
||||
|
||||
@ -386,7 +388,6 @@ WRITE8_MEMBER(looping_state::looping_soundlatch_w)
|
||||
|
||||
WRITE8_MEMBER(looping_state::looping_sound_sw)
|
||||
{
|
||||
dac_device *device = machine().device<dac_device>("dac");
|
||||
/* this can be improved by adding the missing signals for decay etc. (see schematics)
|
||||
|
||||
0001 = ASOV
|
||||
@ -399,7 +400,7 @@ WRITE8_MEMBER(looping_state::looping_sound_sw)
|
||||
*/
|
||||
|
||||
m_sound[offset + 1] = data ^ 1;
|
||||
device->write_unsigned8(((m_sound[2] << 7) + (m_sound[3] << 6)) * m_sound[7]);
|
||||
m_dac->write_unsigned8(((m_sound[2] << 7) + (m_sound[3] << 6)) * m_sound[7]);
|
||||
}
|
||||
|
||||
|
||||
|
@ -338,9 +338,8 @@ WRITE8_MEMBER(m72_state::m72_mcu_high_w)
|
||||
|
||||
WRITE8_MEMBER(m72_state::m72_snd_cpu_sample_w)
|
||||
{
|
||||
dac_device *device = machine().device<dac_device>("dac");
|
||||
//device->write_signed8(data);
|
||||
device->write_unsigned8(data);
|
||||
//m_dac->write_signed8(data);
|
||||
m_dac->write_unsigned8(data);
|
||||
}
|
||||
|
||||
READ8_MEMBER(m72_state::m72_snd_cpu_sample_r)
|
||||
|
@ -449,7 +449,8 @@ public:
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_videoram(*this, "videoram"),
|
||||
m_colorram(*this, "colorram"),
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_dac(*this, "dac") { }
|
||||
|
||||
required_shared_ptr<UINT8> m_videoram;
|
||||
required_shared_ptr<UINT8> m_colorram;
|
||||
@ -467,6 +468,7 @@ public:
|
||||
DECLARE_VIDEO_START(7mezzo);
|
||||
UINT32 screen_update_magicfly(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<dac_device> m_dac;
|
||||
};
|
||||
|
||||
|
||||
@ -646,7 +648,7 @@ WRITE8_MEMBER(magicfly_state::mux_port_w)
|
||||
*/
|
||||
m_input_selector = data & 0x0f; /* Input Selector */
|
||||
|
||||
machine().device<dac_device>("dac")->write_unsigned8(data & 0x80); /* Sound DAC */
|
||||
m_dac->write_unsigned8(data & 0x80); /* Sound DAC */
|
||||
|
||||
coin_counter_w(machine(), 0, data & 0x40); /* Coin1 */
|
||||
coin_counter_w(machine(), 1, data & 0x10); /* Coin2 */
|
||||
|
@ -2238,8 +2238,7 @@ ROM_END
|
||||
|
||||
WRITE8_MEMBER(mappy_state::grobda_DAC_w)
|
||||
{
|
||||
dac_device *device = machine().device<dac_device>("dac");
|
||||
device->write_unsigned8((data << 4) | data);
|
||||
m_dac->write_unsigned8((data << 4) | data);
|
||||
}
|
||||
|
||||
DRIVER_INIT_MEMBER(mappy_state,grobda)
|
||||
|
@ -71,7 +71,8 @@ public:
|
||||
m_videoram_0(*this, "vram0"),
|
||||
m_videoram_1(*this, "vram1"),
|
||||
m_videoram_2(*this, "vram2"),
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_dac(*this, "dac") { }
|
||||
|
||||
required_shared_ptr<UINT8> m_videoram_0;
|
||||
required_shared_ptr<UINT8> m_videoram_1;
|
||||
@ -86,6 +87,7 @@ public:
|
||||
DECLARE_WRITE8_MEMBER(meyc8080_dac_4_w);
|
||||
UINT32 screen_update_meyc8080(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<dac_device> m_dac;
|
||||
};
|
||||
|
||||
|
||||
@ -272,29 +274,25 @@ WRITE8_MEMBER(meyc8080_state::counters_w)
|
||||
|
||||
WRITE8_MEMBER(meyc8080_state::meyc8080_dac_1_w)
|
||||
{
|
||||
dac_device *device = machine().device<dac_device>("dac");
|
||||
device->write_unsigned8(0x00);
|
||||
m_dac->write_unsigned8(0x00);
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(meyc8080_state::meyc8080_dac_2_w)
|
||||
{
|
||||
dac_device *device = machine().device<dac_device>("dac");
|
||||
device->write_unsigned8(0x55);
|
||||
m_dac->write_unsigned8(0x55);
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(meyc8080_state::meyc8080_dac_3_w)
|
||||
{
|
||||
dac_device *device = machine().device<dac_device>("dac");
|
||||
device->write_unsigned8(0xaa);
|
||||
m_dac->write_unsigned8(0xaa);
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(meyc8080_state::meyc8080_dac_4_w)
|
||||
{
|
||||
dac_device *device = machine().device<dac_device>("dac");
|
||||
device->write_unsigned8(0xff);
|
||||
m_dac->write_unsigned8(0xff);
|
||||
}
|
||||
|
||||
|
||||
|
@ -40,12 +40,14 @@ public:
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this,"maincpu"),
|
||||
m_vram(*this, "vram"),
|
||||
m_heartbeat(*this, "heartbeat")
|
||||
m_heartbeat(*this, "heartbeat"),
|
||||
m_dac(*this, "dac")
|
||||
{ }
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_shared_ptr<UINT8> m_vram;
|
||||
required_device<timer_device> m_heartbeat;
|
||||
required_device<dac_device> m_dac;
|
||||
|
||||
UINT8 m_status;
|
||||
UINT8 m_common;
|
||||
@ -276,7 +278,7 @@ WRITE8_MEMBER(meyc8088_state::meyc8088_common_w)
|
||||
|
||||
WRITE_LINE_MEMBER(meyc8088_state::meyc8088_sound_out)
|
||||
{
|
||||
machine().device<dac_device>("dac")->write_signed8(state ? 0x7f : 0);
|
||||
m_dac->write_signed8(state ? 0x7f : 0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -455,8 +455,6 @@ void mjsister_state::machine_start()
|
||||
|
||||
membank("bank1")->configure_entries(0, 4, &ROM[0x10000], 0x8000);
|
||||
|
||||
m_dac = machine().device<dac_device>("dac");
|
||||
|
||||
save_item(NAME(m_dac_busy));
|
||||
save_item(NAME(m_flip_screen));
|
||||
save_item(NAME(m_video_enable));
|
||||
|
@ -193,8 +193,6 @@ GFXDECODE_END
|
||||
|
||||
void mogura_state::machine_start()
|
||||
{
|
||||
m_dac1 = machine().device<dac_device>("dac1");
|
||||
m_dac2 = machine().device<dac_device>("dac2");
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( mogura, mogura_state )
|
||||
|
@ -470,7 +470,7 @@ WRITE8_MEMBER(mpoker_state::outport7_w)
|
||||
|
||||
WRITE8_MEMBER(mpoker_state::sound_w)
|
||||
//{
|
||||
// machine().device<dac_device>("dac")->write_unsigned8(data);
|
||||
// m_dac->write_unsigned8(data);
|
||||
//}
|
||||
*/
|
||||
|
||||
|
@ -116,13 +116,15 @@ public:
|
||||
murogem_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_videoram(*this, "videoram"),
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_dac(*this, "dac") { }
|
||||
|
||||
required_shared_ptr<UINT8> m_videoram;
|
||||
DECLARE_WRITE8_MEMBER(outport_w);
|
||||
virtual void palette_init();
|
||||
UINT32 screen_update_murogem(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<dac_device> m_dac;
|
||||
};
|
||||
|
||||
|
||||
@ -135,7 +137,7 @@ WRITE8_MEMBER(murogem_state::outport_w)
|
||||
7654 3210
|
||||
---- x--- Sound DAC.
|
||||
*/
|
||||
machine().device<dac_device>("dac")->write_unsigned8(data & 0x08);
|
||||
m_dac->write_unsigned8(data & 0x08);
|
||||
}
|
||||
|
||||
|
||||
|
@ -327,10 +327,10 @@ WRITE8_MEMBER(nbmj9195_state::tmpz84c011_pio_w)
|
||||
nbmj9195_soundbank_w(space, 0, data);
|
||||
break;
|
||||
case 6: /* PB_1 */
|
||||
machine().device<dac_device>("dac2")->write_unsigned8(data);
|
||||
m_dac2->write_unsigned8(data);
|
||||
break;
|
||||
case 7: /* PC_1 */
|
||||
machine().device<dac_device>("dac1")->write_unsigned8(data);
|
||||
m_dac1->write_unsigned8(data);
|
||||
break;
|
||||
case 8: /* PD_1 */
|
||||
break;
|
||||
@ -365,10 +365,10 @@ WRITE8_MEMBER(nbmj9195_state::tmpz84c011_pio_w)
|
||||
nbmj9195_soundbank_w(space, 0, data);
|
||||
break;
|
||||
case 6: /* PB_1 */
|
||||
machine().device<dac_device>("dac1")->write_unsigned8(data);
|
||||
m_dac1->write_unsigned8(data);
|
||||
break;
|
||||
case 7: /* PC_1 */
|
||||
machine().device<dac_device>("dac2")->write_unsigned8(data);
|
||||
m_dac2->write_unsigned8(data);
|
||||
break;
|
||||
case 8: /* PD_1 */
|
||||
break;
|
||||
|
@ -112,10 +112,10 @@ WRITE8_MEMBER(niyanpai_state::tmpz84c011_pio_w)
|
||||
niyanpai_soundbank_w(data & 0x03);
|
||||
break;
|
||||
case 1: /* PB_0 */
|
||||
machine().device<dac_device>("dac1")->write_unsigned8(data);
|
||||
m_dac1->write_unsigned8(data);
|
||||
break;
|
||||
case 2: /* PC_0 */
|
||||
machine().device<dac_device>("dac2")->write_unsigned8(data);
|
||||
m_dac2->write_unsigned8(data);
|
||||
break;
|
||||
case 3: /* PD_0 */
|
||||
break;
|
||||
|
@ -143,7 +143,8 @@ public:
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_bgram(*this, "bgram"),
|
||||
m_fgram(*this, "fgram"),
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_dac(*this, "dac") { }
|
||||
|
||||
tilemap_t *m_fg_tilemap;
|
||||
tilemap_t *m_bg_tilemap;
|
||||
@ -158,6 +159,7 @@ public:
|
||||
virtual void video_start();
|
||||
UINT32 screen_update_ppmast93(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<dac_device> m_dac;
|
||||
};
|
||||
|
||||
|
||||
@ -221,7 +223,7 @@ WRITE8_MEMBER(ppmast93_state::ppmast_sound_w)
|
||||
{
|
||||
case 0:
|
||||
case 1: ym2413_w(machine().device("ymsnd"),space,offset,data); break;
|
||||
case 2: machine().device<dac_device>("dac")->write_unsigned8(data);break;
|
||||
case 2: m_dac->write_unsigned8(data);break;
|
||||
default: logerror("%x %x - %x\n",offset,data,space.device().safe_pcbase());
|
||||
}
|
||||
}
|
||||
|
@ -39,7 +39,8 @@ public:
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_main_ram(*this, "main_ram"),
|
||||
m_fo_state(*this, "fo_state"),
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_dac(*this, "dac") { }
|
||||
|
||||
tilemap_t *m_tilemap;
|
||||
required_shared_ptr<UINT8> m_main_ram;
|
||||
@ -67,6 +68,7 @@ public:
|
||||
UINT32 screen_update_quizshow(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(quizshow_clock_timer_cb);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<dac_device> m_dac;
|
||||
};
|
||||
|
||||
|
||||
@ -167,7 +169,7 @@ WRITE8_MEMBER(quizshow_state::quizshow_tape_control_w)
|
||||
WRITE8_MEMBER(quizshow_state::quizshow_audio_w)
|
||||
{
|
||||
// d1: audio out
|
||||
machine().device<dac_device>("dac")->write_signed8((data & 2) ? 0x7f : 0);
|
||||
m_dac->write_signed8((data & 2) ? 0x7f : 0);
|
||||
|
||||
// d0, d2-d7: N/C
|
||||
}
|
||||
|
@ -154,8 +154,6 @@ INTERRUPT_GEN_MEMBER(rltennis_state::rltennis_interrupt)
|
||||
void rltennis_state::machine_start()
|
||||
{
|
||||
m_screen = machine().device( "screen");
|
||||
m_dac_1 = machine().device<dac_device>("dac1");
|
||||
m_dac_2 = machine().device<dac_device>("dac2");
|
||||
m_samples_1 = memregion("samples1")->base();
|
||||
m_samples_2 = memregion("samples2")->base();
|
||||
m_gfx = memregion("gfx1")->base();
|
||||
|
@ -43,7 +43,8 @@ public:
|
||||
sbrkout_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_videoram(*this, "videoram"),
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_dac(*this, "dac") { }
|
||||
|
||||
required_shared_ptr<UINT8> m_videoram;
|
||||
emu_timer *m_scanline_timer;
|
||||
@ -72,6 +73,7 @@ public:
|
||||
TIMER_CALLBACK_MEMBER(pot_trigger_callback);
|
||||
void update_nmi_state();
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<dac_device> m_dac;
|
||||
};
|
||||
|
||||
|
||||
@ -144,7 +146,7 @@ TIMER_CALLBACK_MEMBER(sbrkout_state::scanline_callback)
|
||||
m_maincpu->set_input_line(0, ASSERT_LINE);
|
||||
|
||||
/* update the DAC state */
|
||||
machine().device<dac_device>("dac")->write_unsigned8((videoram[0x380 + 0x11] & (scanline >> 2)) ? 255 : 0);
|
||||
m_dac->write_unsigned8((videoram[0x380 + 0x11] & (scanline >> 2)) ? 255 : 0);
|
||||
|
||||
/* on the VBLANK, read the pot and schedule an interrupt time for it */
|
||||
if (scanline == machine().primary_screen->visible_area().max_y + 1)
|
||||
|
@ -598,7 +598,7 @@ void segas24_state::mahmajn_io_w(UINT8 port, UINT8 data)
|
||||
cur_input_line = (cur_input_line + 1) & 7;
|
||||
break;
|
||||
case 7: // DAC
|
||||
machine().device<dac_device>("dac")->write_signed8(data);
|
||||
m_dac->write_signed8(data);
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "Port %d : %02x\n", port, data & 0xff);
|
||||
@ -612,7 +612,7 @@ void segas24_state::hotrod_io_w(UINT8 port, UINT8 data)
|
||||
case 3: // Lamps
|
||||
break;
|
||||
case 7: // DAC
|
||||
machine().device<dac_device>("dac")->write_signed8(data);
|
||||
m_dac->write_signed8(data);
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "Port %d : %02x\n", port, data & 0xff);
|
||||
|
@ -325,23 +325,19 @@ ADDRESS_MAP_END
|
||||
|
||||
WRITE8_MEMBER(suna16_state::bssoccer_DAC1_w)
|
||||
{
|
||||
dac_device *device = machine().device<dac_device>("dac1");
|
||||
device->write_unsigned8( (data & 0xf) * 0x11 );
|
||||
m_dac1->write_unsigned8( (data & 0xf) * 0x11 );
|
||||
}
|
||||
WRITE8_MEMBER(suna16_state::bssoccer_DAC2_w)
|
||||
{
|
||||
dac_device *device = machine().device<dac_device>("dac2");
|
||||
device->write_unsigned8( (data & 0xf) * 0x11 );
|
||||
m_dac2->write_unsigned8( (data & 0xf) * 0x11 );
|
||||
}
|
||||
WRITE8_MEMBER(suna16_state::bssoccer_DAC3_w)
|
||||
{
|
||||
dac_device *device = machine().device<dac_device>("dac3");
|
||||
device->write_unsigned8( (data & 0xf) * 0x11 );
|
||||
m_dac3->write_unsigned8( (data & 0xf) * 0x11 );
|
||||
}
|
||||
WRITE8_MEMBER(suna16_state::bssoccer_DAC4_w)
|
||||
{
|
||||
dac_device *device = machine().device<dac_device>("dac4");
|
||||
device->write_unsigned8( (data & 0xf) * 0x11 );
|
||||
m_dac4->write_unsigned8( (data & 0xf) * 0x11 );
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START( bssoccer_pcm_1_io_map, AS_IO, 8, suna16_state )
|
||||
|
@ -1731,16 +1731,14 @@ static const UINT8 voltable[256] =
|
||||
|
||||
WRITE8_MEMBER(taitosj_state::dac_out_w)
|
||||
{
|
||||
dac_device *device = machine().device<dac_device>("dac");
|
||||
m_dac_out = data - 0x80;
|
||||
device->write_signed16(m_dac_out * m_dac_vol + 0x8000);
|
||||
m_dac->write_signed16(m_dac_out * m_dac_vol + 0x8000);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(taitosj_state::dac_vol_w)
|
||||
{
|
||||
dac_device *device = machine().device<dac_device>("dac");
|
||||
m_dac_vol = voltable[data];
|
||||
device->write_signed16(m_dac_out * m_dac_vol + 0x8000);
|
||||
m_dac->write_signed16(m_dac_out * m_dac_vol + 0x8000);
|
||||
}
|
||||
|
||||
|
||||
|
@ -89,8 +89,7 @@ WRITE8_MEMBER(tceptor_state::mcu_irq_disable_w)
|
||||
|
||||
WRITE8_MEMBER(tceptor_state::voice_w)
|
||||
{
|
||||
dac_device *device = machine().device<dac_device>("dac");
|
||||
device->write_signed16(data ? (data + 1) * 0x100 : 0x8000);
|
||||
m_dac->write_signed16(data ? (data + 1) * 0x100 : 0x8000);
|
||||
}
|
||||
|
||||
|
||||
|
@ -742,10 +742,9 @@ WRITE8_MEMBER(tnzs_state::kabukiz_sound_bank_w)
|
||||
|
||||
WRITE8_MEMBER(tnzs_state::kabukiz_sample_w)
|
||||
{
|
||||
dac_device *device = machine().device<dac_device>("dac");
|
||||
// to avoid the write when the sound chip is initialized
|
||||
if (data != 0xff)
|
||||
device->write_unsigned8(data);
|
||||
m_dac->write_unsigned8(data);
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, tnzs_state )
|
||||
|
@ -238,7 +238,7 @@ WRITE8_MEMBER(truco_state::portb_w)
|
||||
{
|
||||
if ((data & 0x80) | (data == 0))
|
||||
{
|
||||
machine().device<dac_device>("dac")->write_unsigned8(data & 0x80); /* Isolated the bit for Delta-Sigma DAC */
|
||||
m_dac->write_unsigned8(data & 0x80); /* Isolated the bit for Delta-Sigma DAC */
|
||||
}
|
||||
else
|
||||
logerror("Port B writes: %2x\n", data);
|
||||
|
@ -50,7 +50,6 @@ TIMER_CALLBACK_MEMBER(trucocl_state::dac_irq)
|
||||
|
||||
WRITE8_MEMBER(trucocl_state::audio_dac_w)
|
||||
{
|
||||
dac_device *device = machine().device<dac_device>("dac");
|
||||
UINT8 *rom = memregion("maincpu")->base();
|
||||
int dac_address = ( data & 0xf0 ) << 8;
|
||||
int sel = ( ( (~data) >> 1 ) & 2 ) | ( data & 1 );
|
||||
@ -73,7 +72,7 @@ WRITE8_MEMBER(trucocl_state::audio_dac_w)
|
||||
|
||||
dac_address += 0x10000;
|
||||
|
||||
device->write_unsigned8( rom[dac_address+m_cur_dac_address_index] );
|
||||
m_dac->write_unsigned8( rom[dac_address+m_cur_dac_address_index] );
|
||||
|
||||
machine().scheduler().timer_set( attotime::from_hz( 16000 ), timer_expired_delegate(FUNC(trucocl_state::dac_irq),this));
|
||||
}
|
||||
|
@ -30,7 +30,8 @@ public:
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_video_ram(*this, "video_ram"),
|
||||
m_color_ram(*this, "color_ram"),
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_dac(*this, "dac") { }
|
||||
|
||||
required_shared_ptr<UINT8> m_video_ram;
|
||||
required_shared_ptr<UINT8> m_color_ram;
|
||||
@ -42,6 +43,7 @@ public:
|
||||
UINT32 screen_update_horse(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(horse_interrupt);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<dac_device> m_dac;
|
||||
};
|
||||
|
||||
|
||||
@ -119,7 +121,7 @@ WRITE8_MEMBER(horse_state::horse_output_w)
|
||||
|
||||
WRITE_LINE_MEMBER(horse_state::horse_timer_out)
|
||||
{
|
||||
machine().device<dac_device>("dac")->write_signed8(state ? 0x7f : 0);
|
||||
m_dac->write_signed8(state ? 0x7f : 0);
|
||||
}
|
||||
|
||||
static I8155_INTERFACE(i8155_intf)
|
||||
|
@ -100,7 +100,8 @@ public:
|
||||
m_vid_1_shared_ram(*this, "vid_1_ram"),
|
||||
m_framebuffer_ctrl(*this, "fb_control"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_soundcpu(*this, "soundcpu"){ }
|
||||
m_soundcpu(*this, "soundcpu"),
|
||||
m_dac(*this, "dac") { }
|
||||
|
||||
UINT16* m_m68k_framebuffer[2];
|
||||
UINT16* m_i860_framebuffer[2][2];
|
||||
@ -132,6 +133,7 @@ public:
|
||||
UINT32 screen_update_vcombat_aux(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_soundcpu;
|
||||
required_device<dac_device> m_dac;
|
||||
};
|
||||
|
||||
static UINT32 update_screen(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int index)
|
||||
@ -339,9 +341,8 @@ WRITE16_MEMBER(vcombat_state::crtc_w)
|
||||
|
||||
WRITE16_MEMBER(vcombat_state::vcombat_dac_w)
|
||||
{
|
||||
dac_device *device = machine().device<dac_device>("dac");
|
||||
INT16 newval = ((INT16)data - 0x6000) << 2;
|
||||
device->write_signed16(newval + 0x8000);
|
||||
m_dac->write_signed16(newval + 0x8000);
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, vcombat_state )
|
||||
|
@ -302,7 +302,8 @@ public:
|
||||
videopkr_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_soundcpu(*this, "soundcpu") { }
|
||||
m_soundcpu(*this, "soundcpu"),
|
||||
m_dac(*this, "dac") { }
|
||||
|
||||
UINT8 m_data_ram[0x100];
|
||||
UINT8 m_video_ram[0x0400];
|
||||
@ -369,6 +370,7 @@ public:
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(sound_t1_callback);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_soundcpu;
|
||||
required_device<dac_device> m_dac;
|
||||
};
|
||||
|
||||
|
||||
@ -892,9 +894,8 @@ READ8_MEMBER(videopkr_state::baby_sound_p2_r)
|
||||
|
||||
WRITE8_MEMBER(videopkr_state::baby_sound_p2_w)
|
||||
{
|
||||
dac_device *device = machine().device<dac_device>("dac");
|
||||
m_sbp2 = data;
|
||||
device->write_unsigned8(data);
|
||||
m_dac->write_unsigned8(data);
|
||||
}
|
||||
|
||||
READ8_MEMBER(videopkr_state::baby_sound_p3_r)
|
||||
|
@ -190,8 +190,7 @@ WRITE8_MEMBER(zaccaria_state::sound1_command_w)
|
||||
|
||||
WRITE8_MEMBER(zaccaria_state::mc1408_data_w)
|
||||
{
|
||||
dac_device *device = machine().device<dac_device>("dac2");
|
||||
device->write_unsigned8(data);
|
||||
m_dac2->write_unsigned8(data);
|
||||
}
|
||||
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
*************************************************************************/
|
||||
|
||||
#include "machine/z80ctc.h"
|
||||
#include "sound/dac.h"
|
||||
|
||||
class cchasm_state : public driver_device
|
||||
{
|
||||
@ -13,7 +14,9 @@ public:
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_ram(*this, "ram"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_audiocpu(*this, "audiocpu") { }
|
||||
m_audiocpu(*this, "audiocpu"),
|
||||
m_dac1(*this, "dac1"),
|
||||
m_dac2(*this, "dac2") { }
|
||||
|
||||
int m_sound_flags;
|
||||
int m_coin_flag;
|
||||
@ -40,6 +43,8 @@ public:
|
||||
void cchasm_refresh ();
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_audiocpu;
|
||||
required_device<dac_device> m_dac1;
|
||||
required_device<dac_device> m_dac2;
|
||||
};
|
||||
|
||||
/*----------- defined in audio/cchasm.c -----------*/
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
|
||||
#define CPUTAG_MCU "mcu"
|
||||
|
||||
#include "sound/dac.h"
|
||||
|
||||
class champbas_state : public driver_device
|
||||
{
|
||||
@ -18,7 +18,10 @@ public:
|
||||
m_spriteram_2(*this, "spriteram_2"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_audiocpu(*this, "audiocpu"),
|
||||
m_mcu(*this, CPUTAG_MCU){ }
|
||||
m_mcu(*this, CPUTAG_MCU),
|
||||
m_dac(*this, "dac"),
|
||||
m_dac1(*this, "dac1"),
|
||||
m_dac2(*this, "dac2"){ }
|
||||
|
||||
/* memory pointers */
|
||||
required_shared_ptr<UINT8> m_bg_videoram;
|
||||
@ -70,4 +73,7 @@ public:
|
||||
TIMER_CALLBACK_MEMBER(exctsccr_fm_callback);
|
||||
void champbas_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
|
||||
void exctsccr_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
|
||||
optional_device<dac_device> m_dac;
|
||||
optional_device<dac_device> m_dac1;
|
||||
optional_device<dac_device> m_dac2;
|
||||
};
|
||||
|
@ -13,7 +13,8 @@ public:
|
||||
m_videoram(*this, "videoram"),
|
||||
m_spriteram(*this, "spriteram"),
|
||||
m_port_80(*this, "port_80"),
|
||||
m_maincpu(*this, "maincpu"){ }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_dac(*this, "dac"){ }
|
||||
|
||||
/* memory pointers */
|
||||
required_shared_ptr<UINT8> m_videoram;
|
||||
@ -26,7 +27,7 @@ public:
|
||||
|
||||
/* devices */
|
||||
required_device<cpu_device> m_maincpu;
|
||||
dac_device *m_dac;
|
||||
required_device<dac_device> m_dac;
|
||||
|
||||
UINT8 m_irq_mask;
|
||||
DECLARE_WRITE8_MEMBER(cheekyms_port_40_w);
|
||||
|
@ -21,6 +21,7 @@ public:
|
||||
m_audiocpu(*this, "audiocpu"),
|
||||
m_sn_1(*this, "sn1"),
|
||||
m_sn_2(*this, "sn2"),
|
||||
m_dac(*this, "dac"),
|
||||
m_discrete(*this, "fltdisc"),
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
|
||||
@ -42,7 +43,7 @@ public:
|
||||
required_device<cpu_device> m_audiocpu;
|
||||
required_device<sn76496_device> m_sn_1;
|
||||
required_device<sn76496_device> m_sn_2;
|
||||
dac_device *m_dac;
|
||||
required_device<dac_device> m_dac;
|
||||
required_device<discrete_device> m_discrete;
|
||||
|
||||
UINT8 m_irq_mask;
|
||||
|
@ -1,4 +1,5 @@
|
||||
#define NVRAM_UNLOCK_SEQ_LEN 10
|
||||
#include "sound/dac.h"
|
||||
|
||||
class coolpool_state : public driver_device
|
||||
{
|
||||
@ -8,7 +9,8 @@ public:
|
||||
m_tlc34076(*this, "tlc34076"),
|
||||
m_vram_base(*this, "vram_base"),
|
||||
m_nvram(*this, "nvram"),
|
||||
m_maincpu(*this, "maincpu"){ }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_dac(*this, "dac"){ }
|
||||
|
||||
optional_device<tlc34076_device> m_tlc34076;
|
||||
required_shared_ptr<UINT16> m_vram_base;
|
||||
@ -64,4 +66,5 @@ public:
|
||||
TIMER_CALLBACK_MEMBER(deferred_iop_w);
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(nvram_write_timeout);
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(amerdart_audio_int_gen);
|
||||
required_device<dac_device> m_dac;
|
||||
};
|
||||
|
@ -18,6 +18,7 @@ public:
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_videoram(*this, "videoram"),
|
||||
m_spriteram(*this, "spriteram"),
|
||||
m_dac(*this, "dac"),
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
|
||||
/* memory pointers */
|
||||
@ -41,7 +42,7 @@ public:
|
||||
|
||||
/* devices */
|
||||
samples_device *m_samples;
|
||||
dac_device *m_dac;
|
||||
required_device<dac_device> m_dac;
|
||||
DECLARE_WRITE8_MEMBER(panic_sound_output_w);
|
||||
DECLARE_WRITE8_MEMBER(panic_sound_output2_w);
|
||||
DECLARE_WRITE8_MEMBER(cosmicg_output_w);
|
||||
|
@ -27,7 +27,9 @@ public:
|
||||
m_tms5110_ctl_data(*this, "tms5110_ctl"),
|
||||
m_dac3_state(*this, "dac3_state"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_audiocpu(*this, "audiocpu") { }
|
||||
m_audiocpu(*this, "audiocpu"),
|
||||
m_dac2(*this, "dac2"),
|
||||
m_dac3(*this, "dac3") { }
|
||||
|
||||
/* memory pointers */
|
||||
required_shared_ptr<UINT8> m_video_ram;
|
||||
@ -60,7 +62,8 @@ public:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
optional_device<cpu_device> m_audiocpu;
|
||||
device_t *m_speech;
|
||||
dac_device *m_dac3;
|
||||
optional_device<dac_device> m_dac2;
|
||||
optional_device<dac_device> m_dac3;
|
||||
device_t *m_tms;
|
||||
device_t *m_s2636_0;
|
||||
device_t *m_s2636_1;
|
||||
|
@ -16,6 +16,8 @@ public:
|
||||
m_spriteram_2(*this, "spriteram_2"),
|
||||
m_mcu_ram(*this, "mcu_ram"),
|
||||
m_mcu(*this, "mcu"),
|
||||
m_dac_1(*this, "dac1"),
|
||||
m_dac_2(*this, "dac2"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_audiocpu(*this, "audiocpu") { }
|
||||
|
||||
@ -59,8 +61,8 @@ public:
|
||||
/* devices */
|
||||
optional_device<cpu_device> m_mcu;
|
||||
msm5232_device *m_msm;
|
||||
dac_device *m_dac_1;
|
||||
dac_device *m_dac_2;
|
||||
required_device<dac_device> m_dac_1;
|
||||
required_device<dac_device> m_dac_2;
|
||||
DECLARE_WRITE8_MEMBER(equites_c0f8_w);
|
||||
DECLARE_WRITE8_MEMBER(equites_cymbal_ctrl_w);
|
||||
DECLARE_WRITE8_MEMBER(equites_dac_latch_w);
|
||||
|
@ -10,6 +10,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "cpu/esrip/esrip.h"
|
||||
#include "sound/dac.h"
|
||||
|
||||
/* TODO */
|
||||
#define ESRIPSYS_PIXEL_CLOCK (XTAL_25MHz / 2)
|
||||
@ -40,7 +41,8 @@ public:
|
||||
m_gamecpu(*this, "game_cpu"),
|
||||
m_soundcpu(*this, "sound_cpu"),
|
||||
m_tms(*this, "tms5220nl"),
|
||||
m_pal_ram(*this, "pal_ram") { }
|
||||
m_pal_ram(*this, "pal_ram"),
|
||||
m_dac(*this, "dac") { }
|
||||
|
||||
required_device<cpu_device> m_framecpu;
|
||||
required_device<esrip_device> m_videocpu;
|
||||
@ -115,6 +117,7 @@ public:
|
||||
TIMER_CALLBACK_MEMBER(delayed_bank_swap);
|
||||
TIMER_CALLBACK_MEMBER(hblank_start_callback);
|
||||
TIMER_CALLBACK_MEMBER(hblank_end_callback);
|
||||
required_device<dac_device> m_dac;
|
||||
};
|
||||
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
Gottlieb Exterminator hardware
|
||||
|
||||
*************************************************************************/
|
||||
#include "sound/dac.h"
|
||||
|
||||
class exterm_state : public driver_device
|
||||
{
|
||||
@ -13,7 +14,8 @@ public:
|
||||
m_slave_videoram(*this, "slave_videoram"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_audiocpu(*this, "audiocpu"),
|
||||
m_slave(*this, "slave") { }
|
||||
m_slave(*this, "slave"),
|
||||
m_dac(*this, "dac") { }
|
||||
|
||||
UINT8 m_aimpos[2];
|
||||
UINT8 m_trackball_old[2];
|
||||
@ -43,6 +45,7 @@ public:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_audiocpu;
|
||||
required_device<cpu_device> m_slave;
|
||||
required_device<dac_device> m_dac;
|
||||
};
|
||||
|
||||
/*----------- defined in video/exterm.c -----------*/
|
||||
|
@ -5,6 +5,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "machine/i8255.h"
|
||||
#include "sound/dac.h"
|
||||
|
||||
/* we scale horizontally by 3 to render stars correctly */
|
||||
#define GALAXIAN_XSCALE 3
|
||||
@ -39,7 +40,8 @@ public:
|
||||
m_spriteram(*this, "spriteram"),
|
||||
m_videoram(*this, "videoram"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_audiocpu(*this, "audiocpu") { }
|
||||
m_audiocpu(*this, "audiocpu"),
|
||||
m_dac(*this, "dac") { }
|
||||
|
||||
optional_device<i8255_device> m_ppi8255_0;
|
||||
optional_device<i8255_device> m_ppi8255_1;
|
||||
@ -288,4 +290,5 @@ public:
|
||||
galaxian_extend_tile_info_func extend_tile_info,galaxian_extend_sprite_info_func extend_sprite_info);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
optional_device<cpu_device> m_audiocpu;
|
||||
optional_device<dac_device> m_dac;
|
||||
};
|
||||
|
@ -45,7 +45,8 @@ public:
|
||||
m_gsp_paletteram_lo(*this, "gsp_palram_lo"),
|
||||
m_gsp_paletteram_hi(*this, "gsp_palram_hi"),
|
||||
m_ds3sdsp_internal_timer(*this, "ds3sdsp_timer"),
|
||||
m_ds3xdsp_internal_timer(*this, "ds3xdsp_timer") { }
|
||||
m_ds3xdsp_internal_timer(*this, "ds3xdsp_timer"),
|
||||
m_dac(*this, "dac") { }
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<tms34010_device> m_gsp;
|
||||
@ -259,6 +260,7 @@ public:
|
||||
TIMER_CALLBACK_MEMBER(deferred_adsp_bank_switch);
|
||||
TIMER_CALLBACK_MEMBER(rddsp32_sync_cb);
|
||||
DECLARE_WRITE16_MEMBER(hdsnddsp_dac_w);
|
||||
optional_device<dac_device> m_dac;
|
||||
};
|
||||
|
||||
|
||||
|
@ -9,7 +9,8 @@ public:
|
||||
m_vreg(*this, "vreg"),
|
||||
m_videoram(*this, "videoram"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_audiocpu(*this, "audiocpu") {}
|
||||
m_audiocpu(*this, "audiocpu"),
|
||||
m_dac(*this, "dac") {}
|
||||
|
||||
/* memory pointers */
|
||||
optional_shared_ptr<UINT8> m_vreg;
|
||||
@ -40,7 +41,7 @@ public:
|
||||
/* device */
|
||||
required_device<cpu_device> m_maincpu;
|
||||
optional_device<cpu_device> m_audiocpu;
|
||||
dac_device *m_dac;
|
||||
optional_device<dac_device> m_dac;
|
||||
device_t *m_ym;
|
||||
sn76489a_device *m_sn;
|
||||
UINT8 m_prot_data;
|
||||
|
@ -3,6 +3,7 @@
|
||||
Irem M72 hardware
|
||||
|
||||
*************************************************************************/
|
||||
#include "sound/dac.h"
|
||||
|
||||
class m72_state : public driver_device
|
||||
{
|
||||
@ -17,7 +18,8 @@ public:
|
||||
m_soundram(*this, "soundram"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_soundcpu(*this, "soundcpu"),
|
||||
m_mcu(*this, "mcu") { }
|
||||
m_mcu(*this, "mcu"),
|
||||
m_dac(*this, "dac") { }
|
||||
|
||||
required_shared_ptr<UINT16> m_spriteram;
|
||||
required_shared_ptr<UINT16> m_videoram1;
|
||||
@ -138,4 +140,5 @@ public:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_soundcpu;
|
||||
optional_device<cpu_device> m_mcu;
|
||||
optional_device<dac_device> m_dac;
|
||||
};
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "sound/dac.h"
|
||||
|
||||
class mappy_state : public driver_device
|
||||
{
|
||||
public:
|
||||
@ -7,7 +9,8 @@ public:
|
||||
m_spriteram(*this, "spriteram"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_subcpu(*this, "sub"),
|
||||
m_subcpu2(*this, "sub2") { }
|
||||
m_subcpu2(*this, "sub2"),
|
||||
m_dac(*this, "dac") { }
|
||||
|
||||
required_shared_ptr<UINT8> m_videoram;
|
||||
required_shared_ptr<UINT8> m_spriteram;
|
||||
@ -69,5 +72,6 @@ public:
|
||||
void phozon_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, UINT8 *spriteram_base);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_subcpu;
|
||||
required_device<cpu_device> m_subcpu2;
|
||||
optional_device<cpu_device> m_subcpu2;
|
||||
optional_device<dac_device> m_dac;
|
||||
};
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "sound/dac.h"
|
||||
|
||||
class n8080_state : public driver_device
|
||||
{
|
||||
@ -6,7 +7,8 @@ public:
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_videoram(*this, "videoram"),
|
||||
m_colorram(*this, "colorram"),
|
||||
m_maincpu(*this, "maincpu"){ }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_dac(*this, "dac") { }
|
||||
|
||||
/* memory pointers */
|
||||
required_shared_ptr<UINT8> m_videoram;
|
||||
@ -89,6 +91,7 @@ public:
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(helifire_dac_volume_timer);
|
||||
void spacefev_start_red_cannon( );
|
||||
void helifire_next_line( );
|
||||
required_device<dac_device> m_dac;
|
||||
};
|
||||
|
||||
/*----------- defined in audio/n8080.c -----------*/
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "sound/dac.h"
|
||||
|
||||
#define VRAM_MAX 2
|
||||
|
||||
#define SCANLINE_MIN 0
|
||||
@ -9,7 +11,9 @@ class nbmj9195_state : public driver_device
|
||||
public:
|
||||
nbmj9195_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag) ,
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_dac1(*this, "dac1"),
|
||||
m_dac2(*this, "dac2") { }
|
||||
|
||||
int m_inputport;
|
||||
int m_dipswbitsel;
|
||||
@ -127,4 +131,6 @@ public:
|
||||
void nbmj9195_dipswbitsel_w(int data);
|
||||
void mscoutm_inputportsel_w(int data);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<dac_device> m_dac1;
|
||||
required_device<dac_device> m_dac2;
|
||||
};
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "sound/dac.h"
|
||||
#define VRAM_MAX 3
|
||||
|
||||
class niyanpai_state : public driver_device
|
||||
@ -5,7 +6,9 @@ class niyanpai_state : public driver_device
|
||||
public:
|
||||
niyanpai_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag) ,
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_dac1(*this, "dac1"),
|
||||
m_dac2(*this, "dac2") { }
|
||||
|
||||
int m_musobana_inputport;
|
||||
int m_musobana_outcoin_flag;
|
||||
@ -92,4 +95,6 @@ public:
|
||||
void niyanpai_gfxdraw(int vram);
|
||||
void niyanpai_soundbank_w(int data);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<dac_device> m_dac1;
|
||||
required_device<dac_device> m_dac2;
|
||||
};
|
||||
|
@ -11,7 +11,9 @@ public:
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_data760000(0), m_data740000(0), m_dac_counter(0), m_sample_rom_offset_1(0), m_sample_rom_offset_2(0),
|
||||
m_offset_shift(0){ }
|
||||
m_offset_shift(0),
|
||||
m_dac_1(*this, "dac1"),
|
||||
m_dac_2(*this, "dac2") { }
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
device_t *m_screen;
|
||||
@ -30,8 +32,8 @@ public:
|
||||
|
||||
bitmap_ind16 *m_tmp_bitmap[RLT_NUM_BITMAPS];
|
||||
|
||||
dac_device *m_dac_1;
|
||||
dac_device *m_dac_2;
|
||||
required_device<dac_device> m_dac_1;
|
||||
required_device<dac_device> m_dac_2;
|
||||
|
||||
UINT8 *m_samples_1;
|
||||
UINT8 *m_samples_2;
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "video/segaic24.h"
|
||||
#include "sound/dac.h"
|
||||
|
||||
class segas24_state : public driver_device
|
||||
{
|
||||
@ -6,7 +7,8 @@ public:
|
||||
segas24_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag) ,
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_subcpu(*this, "subcpu") { }
|
||||
m_subcpu(*this, "subcpu"),
|
||||
m_dac(*this, "dac") { }
|
||||
|
||||
|
||||
static const UINT8 mahmajn_mlt[8];
|
||||
@ -122,4 +124,5 @@ public:
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(irq_vbl);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_subcpu;
|
||||
required_device<dac_device> m_dac;
|
||||
};
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "sound/dac.h"
|
||||
|
||||
class suna16_state : public driver_device
|
||||
{
|
||||
public:
|
||||
@ -5,13 +7,20 @@ public:
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this,"maincpu"),
|
||||
m_spriteram(*this, "spriteram"),
|
||||
m_spriteram2(*this, "spriteram2")
|
||||
m_spriteram2(*this, "spriteram2"),
|
||||
m_dac1(*this, "dac1"),
|
||||
m_dac2(*this, "dac2"),
|
||||
m_dac3(*this, "dac3"),
|
||||
m_dac4(*this, "dac4")
|
||||
{ }
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_shared_ptr<UINT16> m_spriteram;
|
||||
optional_shared_ptr<UINT16> m_spriteram2;
|
||||
|
||||
required_device<dac_device> m_dac1;
|
||||
required_device<dac_device> m_dac2;
|
||||
optional_device<dac_device> m_dac3;
|
||||
optional_device<dac_device> m_dac4;
|
||||
UINT8 m_prot;
|
||||
UINT16 *m_paletteram;
|
||||
int m_color_bank;
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "sound/dac.h"
|
||||
|
||||
class taitosj_state : public driver_device
|
||||
{
|
||||
public:
|
||||
@ -19,7 +21,8 @@ public:
|
||||
m_kikstart_scrollram(*this, "kikstart_scroll"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_audiocpu(*this, "audiocpu"),
|
||||
m_mcu(*this, "mcu") { }
|
||||
m_mcu(*this, "mcu"),
|
||||
m_dac(*this, "dac") { }
|
||||
|
||||
typedef void (taitosj_state::*copy_layer_func_t)(bitmap_ind16 &,
|
||||
const rectangle &, int, int *, rectangle *);
|
||||
@ -120,4 +123,5 @@ public:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_audiocpu;
|
||||
optional_device<cpu_device> m_mcu;
|
||||
required_device<dac_device> m_dac;
|
||||
};
|
||||
|
@ -137,7 +137,7 @@ public:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_audiocpu;
|
||||
required_device<cpu_device> m_subcpu;
|
||||
required_device<cpu_device> m_subcpu2;
|
||||
optional_device<cpu_device> m_subcpu2;
|
||||
required_device<okim6295_device> m_oki;
|
||||
};
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "namcos2.h"
|
||||
#include "sound/dac.h"
|
||||
|
||||
class tceptor_state : public driver_device
|
||||
{
|
||||
@ -11,7 +12,8 @@ public:
|
||||
m_m68k_shared_ram(*this, "m68k_shared_ram"),
|
||||
m_sprite_ram(*this, "sprite_ram"),
|
||||
m_c45_road(*this, "c45_road") ,
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_dac(*this, "dac") { }
|
||||
|
||||
UINT8 m_m6809_irq_enable;
|
||||
UINT8 m_m68k_irq_enable;
|
||||
@ -77,4 +79,5 @@ public:
|
||||
inline UINT8 fix_input0(UINT8 in1, UINT8 in2);
|
||||
inline UINT8 fix_input1(UINT8 in1, UINT8 in2);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<dac_device> m_dac;
|
||||
};
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "sound/dac.h"
|
||||
|
||||
#define MAX_SAMPLES 0x2f /* max samples */
|
||||
|
||||
@ -23,7 +24,8 @@ public:
|
||||
m_audiocpu(*this, "audiocpu"),
|
||||
m_subcpu(*this, "sub"),
|
||||
m_mcu(*this, "mcu"),
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_dac(*this, "dac") { }
|
||||
|
||||
/* memory pointers */
|
||||
// UINT8 * m_paletteram; // currently this uses generic palette handling
|
||||
@ -109,4 +111,5 @@ public:
|
||||
void mcu_handle_coins( int coin );
|
||||
DECLARE_WRITE_LINE_MEMBER(irqhandler);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
optional_device<dac_device> m_dac;
|
||||
};
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "sound/dac.h"
|
||||
|
||||
class truco_state : public driver_device
|
||||
{
|
||||
public:
|
||||
@ -5,7 +7,8 @@ public:
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_videoram(*this, "videoram"),
|
||||
m_battery_ram(*this, "battery_ram"),
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_dac(*this, "dac") { }
|
||||
|
||||
required_shared_ptr<UINT8> m_videoram;
|
||||
required_shared_ptr<UINT8> m_battery_ram;
|
||||
@ -20,4 +23,5 @@ public:
|
||||
UINT32 screen_update_truco(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(truco_interrupt);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<dac_device> m_dac;
|
||||
};
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "sound/dac.h"
|
||||
|
||||
class trucocl_state : public driver_device
|
||||
{
|
||||
public:
|
||||
@ -5,7 +7,8 @@ public:
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_videoram(*this, "videoram"),
|
||||
m_colorram(*this, "colorram"),
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_dac(*this, "dac") { }
|
||||
|
||||
int m_cur_dac_address;
|
||||
int m_cur_dac_address_index;
|
||||
@ -26,4 +29,5 @@ public:
|
||||
INTERRUPT_GEN_MEMBER(trucocl_interrupt);
|
||||
TIMER_CALLBACK_MEMBER(dac_irq);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<dac_device> m_dac;
|
||||
};
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "sound/dac.h"
|
||||
|
||||
class zaccaria_state : public driver_device
|
||||
{
|
||||
public:
|
||||
@ -8,7 +10,8 @@ public:
|
||||
m_spriteram(*this, "spriteram"),
|
||||
m_spriteram2(*this, "spriteram2"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_audiocpu(*this, "audiocpu") { }
|
||||
m_audiocpu(*this, "audiocpu"),
|
||||
m_dac2(*this, "dac2") { }
|
||||
|
||||
int m_dsw;
|
||||
int m_active_8910;
|
||||
@ -52,4 +55,5 @@ public:
|
||||
void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect,UINT8 *spriteram,int color,int section);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_audiocpu;
|
||||
required_device<dac_device> m_dac2;
|
||||
};
|
||||
|
@ -131,7 +131,7 @@ void a310_state::machine_start()
|
||||
archimedes_init();
|
||||
|
||||
// reset the DAC to centerline
|
||||
//machine().device<dac_device>("dac")->write_signed8(0x80);
|
||||
//m_dac->write_signed8(0x80);
|
||||
}
|
||||
|
||||
void a310_state::machine_reset()
|
||||
|
@ -230,8 +230,6 @@ DRIVER_INIT_MEMBER(craft_state,craft)
|
||||
|
||||
void craft_state::machine_reset()
|
||||
{
|
||||
m_dac = machine().device<dac_device>("dac");
|
||||
|
||||
m_dac->write_unsigned8(0x00);
|
||||
|
||||
m_frame_start_cycle = 0;
|
||||
|
@ -235,8 +235,9 @@ class dectalk_state : public driver_device
|
||||
public:
|
||||
dectalk_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_terminal(*this, TERMINAL_TAG) ,
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
m_terminal(*this, TERMINAL_TAG) ,
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_dac(*this, "dac") { }
|
||||
|
||||
UINT8 m_data[8]; // hack to prevent gcc bitching about struct pointers. not used.
|
||||
UINT8 m_x2214_sram[256]; // NVRAM chip's temp sram space
|
||||
@ -285,6 +286,7 @@ public:
|
||||
void dectalk_semaphore_w ( UINT16 data );
|
||||
UINT16 dectalk_outfifo_r ( );
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<dac_device> m_dac;
|
||||
};
|
||||
|
||||
|
||||
@ -783,13 +785,12 @@ INPUT_PORTS_END
|
||||
TIMER_CALLBACK_MEMBER(dectalk_state::outfifo_read_cb)
|
||||
{
|
||||
UINT16 data;
|
||||
dac_device *speaker = machine().device<dac_device>("dac");
|
||||
data = dectalk_outfifo_r();
|
||||
#ifdef VERBOSE
|
||||
if (data!= 0x8000) logerror("sample output: %04X\n", data);
|
||||
#endif
|
||||
machine().scheduler().timer_set(attotime::from_hz(10000), timer_expired_delegate(FUNC(dectalk_state::outfifo_read_cb),this));
|
||||
speaker->write_signed16(data);
|
||||
m_dac->write_signed16(data);
|
||||
// hack for break key, requires hacked up duart core so disabled for now
|
||||
// also it doesn't work well, the setup menu is badly corrupt
|
||||
/*device_t *duart = machine().device("duart68681");
|
||||
|
@ -93,7 +93,8 @@ public:
|
||||
pockstat_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_lcd_buffer(*this, "lcd_buffer"),
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_dac(*this, "dac") { }
|
||||
|
||||
required_shared_ptr<UINT32> m_lcd_buffer;
|
||||
ps_ftlb_regs_t m_ftlb_regs;
|
||||
@ -133,6 +134,7 @@ public:
|
||||
void ps_intc_set_interrupt_line(UINT32 line, int state);
|
||||
void ps_timer_start(int index);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<dac_device> m_dac;
|
||||
};
|
||||
|
||||
|
||||
@ -818,7 +820,7 @@ WRITE32_MEMBER(pockstat_state::ps_audio_w)
|
||||
|
||||
WRITE32_MEMBER(pockstat_state::ps_dac_w)
|
||||
{
|
||||
machine().device<dac_device>("dac")->write_unsigned16((UINT16)((data + 0x8000) & 0x0000ffff));
|
||||
m_dac->write_unsigned16((UINT16)((data + 0x8000) & 0x0000ffff));
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START(pockstat_mem, AS_PROGRAM, 32, pockstat_state )
|
||||
|
@ -9,7 +9,7 @@
|
||||
#ifdef CHARDEV
|
||||
#include "devices/chardev.h"
|
||||
#endif
|
||||
|
||||
#include "sound/dac.h"
|
||||
/* model */
|
||||
enum hp48_models {
|
||||
HP48_S,
|
||||
@ -45,7 +45,8 @@ class hp48_state : public driver_device
|
||||
public:
|
||||
hp48_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_dac(*this, "dac") { }
|
||||
|
||||
UINT8 *m_videoram;
|
||||
UINT8 m_io[64];
|
||||
@ -88,6 +89,7 @@ public:
|
||||
void hp48_update_annunciators();
|
||||
void hp48_apply_modules();
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<dac_device> m_dac;
|
||||
};
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
#ifndef ORAO_H_
|
||||
#define ORAO_H_
|
||||
|
||||
#include "sound/dac.h"
|
||||
|
||||
class orao_state : public driver_device
|
||||
{
|
||||
@ -15,7 +15,8 @@ public:
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_memory(*this, "memory"),
|
||||
m_video_ram(*this, "video_ram"),
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_dac(*this, "dac") { }
|
||||
|
||||
required_shared_ptr<UINT8> m_memory;
|
||||
required_shared_ptr<UINT8> m_video_ram;
|
||||
@ -27,6 +28,7 @@ public:
|
||||
virtual void video_start();
|
||||
UINT32 screen_update_orao(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<dac_device> m_dac;
|
||||
};
|
||||
|
||||
#endif /* ORAO_H_ */
|
||||
|
@ -246,7 +246,7 @@ void hp48_reg_out( device_t *device, int out )
|
||||
/* bits 9-10: unused */
|
||||
|
||||
/* bit 11: beeper */
|
||||
device->machine().device<dac_device>("dac")->write_unsigned8((out & 0x800) ? 0x80 : 00 );
|
||||
state->m_dac->write_unsigned8((out & 0x800) ? 0x80 : 00 );
|
||||
}
|
||||
|
||||
static int hp48_get_in( running_machine &machine )
|
||||
|
@ -72,7 +72,6 @@ WRITE8_MEMBER(orao_state::orao_io_w)
|
||||
{
|
||||
if (offset == 0x0800)
|
||||
{
|
||||
dac_device *dac = machine().device<dac_device>("dac");
|
||||
dac->write_unsigned8(data); //beeper
|
||||
m_dac->write_unsigned8(data); //beeper
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user