From 4954f7bcb4232ca7707f5f1bcf298b61dfd50227 Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Tue, 25 Aug 2020 11:00:33 -0700 Subject: Updated netlist licenses to CC0. Various minor adjustments based on PR comments. --- src/devices/sound/sp0250.cpp | 9 ++++--- src/mame/audio/nl_armora.cpp | 2 +- src/mame/audio/nl_armora.h | 2 +- src/mame/audio/nl_astrob.cpp | 2 +- src/mame/audio/nl_astrob.h | 2 +- src/mame/audio/nl_barrier.cpp | 2 +- src/mame/audio/nl_barrier.h | 2 +- src/mame/audio/nl_boxingb.cpp | 2 +- src/mame/audio/nl_boxingb.h | 2 +- src/mame/audio/nl_elim.cpp | 2 +- src/mame/audio/nl_elim.h | 2 +- src/mame/audio/nl_ripoff.cpp | 2 +- src/mame/audio/nl_ripoff.h | 2 +- src/mame/audio/nl_segaspeech.cpp | 2 +- src/mame/audio/nl_segaspeech.h | 2 +- src/mame/audio/nl_segausb.cpp | 2 +- src/mame/audio/nl_segausb.h | 2 +- src/mame/audio/nl_solarq.cpp | 2 +- src/mame/audio/nl_solarq.h | 2 +- src/mame/audio/nl_spacewar.cpp | 2 +- src/mame/audio/nl_spacewar.h | 2 +- src/mame/audio/nl_spacfury.cpp | 2 +- src/mame/audio/nl_spacfury.h | 2 +- src/mame/audio/nl_speedfrk.cpp | 2 +- src/mame/audio/nl_speedfrk.h | 2 +- src/mame/audio/nl_starcas.cpp | 2 +- src/mame/audio/nl_starcas.h | 2 +- src/mame/audio/nl_starhawk.cpp | 2 +- src/mame/audio/nl_starhawk.h | 2 +- src/mame/audio/nl_sundance.cpp | 2 +- src/mame/audio/nl_sundance.h | 2 +- src/mame/audio/nl_tailg.cpp | 2 +- src/mame/audio/nl_tailg.h | 2 +- src/mame/audio/nl_warrior.cpp | 2 +- src/mame/audio/nl_warrior.h | 2 +- src/mame/audio/segag80.cpp | 54 +++++++++++++++++----------------------- src/mame/audio/segag80.h | 29 +++++++++++---------- src/mame/audio/segaspeech.cpp | 2 ++ src/mame/audio/segaspeech.h | 2 -- src/mame/audio/segausb.cpp | 40 ++++++++++++++--------------- src/mame/drivers/segag80r.cpp | 2 +- src/mame/drivers/segag80v.cpp | 10 ++++---- src/mame/includes/segag80r.h | 2 +- src/mame/includes/segag80v.h | 2 +- 44 files changed, 105 insertions(+), 115 deletions(-) diff --git a/src/devices/sound/sp0250.cpp b/src/devices/sound/sp0250.cpp index a2476c9d521..58a8328dda8 100644 --- a/src/devices/sound/sp0250.cpp +++ b/src/devices/sound/sp0250.cpp @@ -93,10 +93,11 @@ void sp0250_device::device_start() save_item(NAME(m_rcount)); for (int index = 0; index < 6; index++) { - save_item(NAME(m_filter[index].F), index); - save_item(NAME(m_filter[index].B), index); - save_item(NAME(m_filter[index].z1), index); - save_item(NAME(m_filter[index].z2), index); + auto &filter = m_filter[index]; + save_item(STRUCT_MEMBER(filter, F), index); + save_item(STRUCT_MEMBER(filter, B), index); + save_item(STRUCT_MEMBER(filter, z1), index); + save_item(STRUCT_MEMBER(filter, z2), index); } // FIFO state diff --git a/src/mame/audio/nl_armora.cpp b/src/mame/audio/nl_armora.cpp index 05c92e8a258..53b102be96b 100644 --- a/src/mame/audio/nl_armora.cpp +++ b/src/mame/audio/nl_armora.cpp @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:CC0 // copyright-holders:Aaron Giles // diff --git a/src/mame/audio/nl_armora.h b/src/mame/audio/nl_armora.h index a6109f0861c..d15e235ef7d 100644 --- a/src/mame/audio/nl_armora.h +++ b/src/mame/audio/nl_armora.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:CC0 // copyright-holders:Aaron Giles #ifndef MAME_AUDIO_NL_ARMORA_H #define MAME_AUDIO_NL_ARMORA_H diff --git a/src/mame/audio/nl_astrob.cpp b/src/mame/audio/nl_astrob.cpp index 2d5a5894c52..ba966702284 100644 --- a/src/mame/audio/nl_astrob.cpp +++ b/src/mame/audio/nl_astrob.cpp @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:CC0 // copyright-holders:Aaron Giles // diff --git a/src/mame/audio/nl_astrob.h b/src/mame/audio/nl_astrob.h index 952dad78bfa..c3ddb2965ea 100644 --- a/src/mame/audio/nl_astrob.h +++ b/src/mame/audio/nl_astrob.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:CC0 // copyright-holders:Aaron Giles #ifndef MAME_AUDIO_NL_ASTROB_H #define MAME_AUDIO_NL_ASTROB_H diff --git a/src/mame/audio/nl_barrier.cpp b/src/mame/audio/nl_barrier.cpp index ba3ec462be9..edd7c3d71a3 100644 --- a/src/mame/audio/nl_barrier.cpp +++ b/src/mame/audio/nl_barrier.cpp @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:CC0 // copyright-holders:Aaron Giles // diff --git a/src/mame/audio/nl_barrier.h b/src/mame/audio/nl_barrier.h index 451bf922f2d..59e53699c1e 100644 --- a/src/mame/audio/nl_barrier.h +++ b/src/mame/audio/nl_barrier.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:CC0 // copyright-holders:Aaron Giles #ifndef MAME_AUDIO_NL_BARRIER_H #define MAME_AUDIO_NL_BARRIER_H diff --git a/src/mame/audio/nl_boxingb.cpp b/src/mame/audio/nl_boxingb.cpp index b60fcca2a83..39be6050b19 100644 --- a/src/mame/audio/nl_boxingb.cpp +++ b/src/mame/audio/nl_boxingb.cpp @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:CC0 // copyright-holders:Aaron Giles // diff --git a/src/mame/audio/nl_boxingb.h b/src/mame/audio/nl_boxingb.h index 11d2648d3c3..e066fe59a4e 100644 --- a/src/mame/audio/nl_boxingb.h +++ b/src/mame/audio/nl_boxingb.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:CC0 // copyright-holders:Aaron Giles #ifndef MAME_AUDIO_NL_BOXINGB_H #define MAME_AUDIO_NL_BOXINGB_H diff --git a/src/mame/audio/nl_elim.cpp b/src/mame/audio/nl_elim.cpp index 147441f3a6f..d027cd1a244 100644 --- a/src/mame/audio/nl_elim.cpp +++ b/src/mame/audio/nl_elim.cpp @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:CC0 // copyright-holders:Aaron Giles //NL_CONTAINS elim zektor diff --git a/src/mame/audio/nl_elim.h b/src/mame/audio/nl_elim.h index a9cd5a2ea4b..38f4522bb70 100644 --- a/src/mame/audio/nl_elim.h +++ b/src/mame/audio/nl_elim.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:CC0 // copyright-holders:Aaron Giles #ifndef MAME_AUDIO_NL_ELIM_H #define MAME_AUDIO_NL_ELIM_H diff --git a/src/mame/audio/nl_ripoff.cpp b/src/mame/audio/nl_ripoff.cpp index aa9925183f5..84ccfea212a 100644 --- a/src/mame/audio/nl_ripoff.cpp +++ b/src/mame/audio/nl_ripoff.cpp @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:CC0 // copyright-holders:Aaron Giles // diff --git a/src/mame/audio/nl_ripoff.h b/src/mame/audio/nl_ripoff.h index e4c5efe5a7d..2ac0a8d8c53 100644 --- a/src/mame/audio/nl_ripoff.h +++ b/src/mame/audio/nl_ripoff.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:CC0 // copyright-holders:Aaron Giles #ifndef MAME_AUDIO_NL_RIPOFF_H #define MAME_AUDIO_NL_RIPOFF_H diff --git a/src/mame/audio/nl_segaspeech.cpp b/src/mame/audio/nl_segaspeech.cpp index 8dc301f2db6..e5c1c0a6657 100644 --- a/src/mame/audio/nl_segaspeech.cpp +++ b/src/mame/audio/nl_segaspeech.cpp @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:CC0 // copyright-holders:Aaron Giles // diff --git a/src/mame/audio/nl_segaspeech.h b/src/mame/audio/nl_segaspeech.h index e9779772eba..2affc0665a1 100644 --- a/src/mame/audio/nl_segaspeech.h +++ b/src/mame/audio/nl_segaspeech.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:CC0 // copyright-holders:Aaron Giles #ifndef MAME_AUDIO_NL_SEGASPEECH_H #define MAME_AUDIO_NL_SEGASPEECH_H diff --git a/src/mame/audio/nl_segausb.cpp b/src/mame/audio/nl_segausb.cpp index ac03fac0662..a169974f967 100644 --- a/src/mame/audio/nl_segausb.cpp +++ b/src/mame/audio/nl_segausb.cpp @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:CC0 // copyright-holders:Aaron Giles // diff --git a/src/mame/audio/nl_segausb.h b/src/mame/audio/nl_segausb.h index ec217540801..e492d5246b9 100644 --- a/src/mame/audio/nl_segausb.h +++ b/src/mame/audio/nl_segausb.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:CC0 // copyright-holders:Aaron Giles #ifndef MAME_AUDIO_NL_SEGAUSB_H #define MAME_AUDIO_NL_SEGAUSB_H diff --git a/src/mame/audio/nl_solarq.cpp b/src/mame/audio/nl_solarq.cpp index 0fb791db9a1..be6ef4bca6f 100644 --- a/src/mame/audio/nl_solarq.cpp +++ b/src/mame/audio/nl_solarq.cpp @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:CC0 // copyright-holders:Aaron Giles // diff --git a/src/mame/audio/nl_solarq.h b/src/mame/audio/nl_solarq.h index 2176bed0dc2..b2a2f029546 100644 --- a/src/mame/audio/nl_solarq.h +++ b/src/mame/audio/nl_solarq.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:CC0 // copyright-holders:Aaron Giles #ifndef MAME_AUDIO_NL_SOLARQ_H #define MAME_AUDIO_NL_SOLARQ_H diff --git a/src/mame/audio/nl_spacewar.cpp b/src/mame/audio/nl_spacewar.cpp index 6676cd2863d..778906b31ad 100644 --- a/src/mame/audio/nl_spacewar.cpp +++ b/src/mame/audio/nl_spacewar.cpp @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:CC0 // copyright-holders:Aaron Giles // diff --git a/src/mame/audio/nl_spacewar.h b/src/mame/audio/nl_spacewar.h index 0b972b2585c..c5ee89bfdb8 100644 --- a/src/mame/audio/nl_spacewar.h +++ b/src/mame/audio/nl_spacewar.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:CC0 // copyright-holders:Aaron Giles #ifndef MAME_AUDIO_NL_SPACEWAR_H #define MAME_AUDIO_NL_SPACEWAR_H diff --git a/src/mame/audio/nl_spacfury.cpp b/src/mame/audio/nl_spacfury.cpp index c1926f6f817..5114b1a4c9c 100644 --- a/src/mame/audio/nl_spacfury.cpp +++ b/src/mame/audio/nl_spacfury.cpp @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:CC0 // copyright-holders:Aaron Giles // diff --git a/src/mame/audio/nl_spacfury.h b/src/mame/audio/nl_spacfury.h index f53e47d9674..ac803417a92 100644 --- a/src/mame/audio/nl_spacfury.h +++ b/src/mame/audio/nl_spacfury.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:CC0 // copyright-holders:Aaron Giles #ifndef MAME_AUDIO_NL_SPACFURY_H #define MAME_AUDIO_NL_SPACFURY_H diff --git a/src/mame/audio/nl_speedfrk.cpp b/src/mame/audio/nl_speedfrk.cpp index fdd78e3dac1..56a42c5b2b0 100644 --- a/src/mame/audio/nl_speedfrk.cpp +++ b/src/mame/audio/nl_speedfrk.cpp @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:CC0 // copyright-holders:Aaron Giles // diff --git a/src/mame/audio/nl_speedfrk.h b/src/mame/audio/nl_speedfrk.h index 7d32b702ad5..a103b8258fe 100644 --- a/src/mame/audio/nl_speedfrk.h +++ b/src/mame/audio/nl_speedfrk.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:CC0 // copyright-holders:Aaron Giles #ifndef MAME_AUDIO_NL_SPEEDFRK_H #define MAME_AUDIO_NL_SPEEDFRK_H diff --git a/src/mame/audio/nl_starcas.cpp b/src/mame/audio/nl_starcas.cpp index cf0b11bf6c0..fd6dee8d968 100644 --- a/src/mame/audio/nl_starcas.cpp +++ b/src/mame/audio/nl_starcas.cpp @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:CC0 // copyright-holders:Aaron Giles //NL_CONTAINS starcas wotw diff --git a/src/mame/audio/nl_starcas.h b/src/mame/audio/nl_starcas.h index 5cb02ace8fc..ba3fa7abe6a 100644 --- a/src/mame/audio/nl_starcas.h +++ b/src/mame/audio/nl_starcas.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:CC0 // copyright-holders:Aaron Giles #ifndef MAME_AUDIO_NL_STARCAS_H #define MAME_AUDIO_NL_STARCAS_H diff --git a/src/mame/audio/nl_starhawk.cpp b/src/mame/audio/nl_starhawk.cpp index 4d69b59a3e4..8b6a39eedfa 100644 --- a/src/mame/audio/nl_starhawk.cpp +++ b/src/mame/audio/nl_starhawk.cpp @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:CC0 // copyright-holders:Aaron Giles // diff --git a/src/mame/audio/nl_starhawk.h b/src/mame/audio/nl_starhawk.h index 65071c7be17..6d15ba88592 100644 --- a/src/mame/audio/nl_starhawk.h +++ b/src/mame/audio/nl_starhawk.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:CC0 // copyright-holders:Aaron Giles #ifndef MAME_AUDIO_NL_STARHAWK_H #define MAME_AUDIO_NL_STARHAWK_H diff --git a/src/mame/audio/nl_sundance.cpp b/src/mame/audio/nl_sundance.cpp index 6860fed38ff..7dc8730ee00 100644 --- a/src/mame/audio/nl_sundance.cpp +++ b/src/mame/audio/nl_sundance.cpp @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:CC0 // copyright-holders:Aaron Giles // diff --git a/src/mame/audio/nl_sundance.h b/src/mame/audio/nl_sundance.h index 0e926c7fea6..04c11b340ec 100644 --- a/src/mame/audio/nl_sundance.h +++ b/src/mame/audio/nl_sundance.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:CC0 // copyright-holders:Aaron Giles #ifndef MAME_AUDIO_NL_SUNDANCE_H #define MAME_AUDIO_NL_SUNDANCE_H diff --git a/src/mame/audio/nl_tailg.cpp b/src/mame/audio/nl_tailg.cpp index bec696e1348..fab4b88bf9c 100644 --- a/src/mame/audio/nl_tailg.cpp +++ b/src/mame/audio/nl_tailg.cpp @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:CC0 // copyright-holders:Aaron Giles // diff --git a/src/mame/audio/nl_tailg.h b/src/mame/audio/nl_tailg.h index d2bdc2311f8..4ff8f4b423d 100644 --- a/src/mame/audio/nl_tailg.h +++ b/src/mame/audio/nl_tailg.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:CC0 // copyright-holders:Aaron Giles #ifndef MAME_AUDIO_NL_TAILG_H #define MAME_AUDIO_NL_TAILG_H diff --git a/src/mame/audio/nl_warrior.cpp b/src/mame/audio/nl_warrior.cpp index f64e330ad2e..d5403559420 100644 --- a/src/mame/audio/nl_warrior.cpp +++ b/src/mame/audio/nl_warrior.cpp @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:CC0 // copyright-holders:Aaron Giles // diff --git a/src/mame/audio/nl_warrior.h b/src/mame/audio/nl_warrior.h index 42142474de9..16034c9cec7 100644 --- a/src/mame/audio/nl_warrior.h +++ b/src/mame/audio/nl_warrior.h @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:CC0 // copyright-holders:Aaron Giles #ifndef MAME_AUDIO_NL_WARRIOR_H #define MAME_AUDIO_NL_WARRIOR_H diff --git a/src/mame/audio/segag80.cpp b/src/mame/audio/segag80.cpp index f3d2d9b9179..6d266f3ba24 100644 --- a/src/mame/audio/segag80.cpp +++ b/src/mame/audio/segag80.cpp @@ -23,23 +23,21 @@ * *************************************/ -segag80_audio_device::segag80_audio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 lomask, u8 himask, bool haspsg, void (*netlist)(netlist::nlparse_t &), double output_scale) - : device_t(mconfig, type, tag, owner, clock) - , device_mixer_interface(mconfig, *this) - , m_lo_input(*this, "sound_nl:lo_%u", 0) - , m_hi_input(*this, "sound_nl:hi_%u", 0) - , m_psg(*this, "psg") - , m_lo_vals(0xff) - , m_hi_vals(0xff) - , m_lo_mask(lomask) - , m_hi_mask(himask) - , m_has_psg(haspsg) - , m_netlist(netlist) - , m_output_scale(output_scale) +segag80_audio_device_base::segag80_audio_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 lomask, u8 himask, bool haspsg, netlist_ptr netlist, double output_scale) : + device_t(mconfig, type, tag, owner, clock), + device_mixer_interface(mconfig, *this), + m_lo_input(*this, "sound_nl:lo_%u", 0), + m_hi_input(*this, "sound_nl:hi_%u", 0), + m_psg(*this, "psg"), + m_lo_mask(lomask), + m_hi_mask(himask), + m_has_psg(haspsg), + m_netlist(netlist), + m_output_scale(output_scale) { } -void segag80_audio_device::device_add_mconfig(machine_config &config) +void segag80_audio_device_base::device_add_mconfig(machine_config &config) { NETLIST_SOUND(config, "sound_nl", 48000) .set_source(m_netlist) @@ -96,29 +94,23 @@ void segag80_audio_device::device_add_mconfig(machine_config &config) NETLIST_STREAM_OUTPUT(config, "sound_nl:cout0", 0, "OUTPUT").set_mult_offset(m_output_scale, 0.0); } -void segag80_audio_device::device_start() +void segag80_audio_device_base::device_start() { } -void segag80_audio_device::device_stop() -{ -} - -void segag80_audio_device::write(offs_t addr, uint8_t data) +void segag80_audio_device_base::write(offs_t addr, uint8_t data) { addr &= 1; auto &inputs = (addr == 0) ? m_lo_input : m_hi_input; - auto &oldvals = (addr == 0) ? m_lo_vals : m_hi_vals; auto &mask = (addr == 0) ? m_lo_mask : m_hi_mask; for (int bit = 0; bit < 8; bit++) if (BIT(mask, bit)) inputs[bit]->write_line(BIT(data, bit)); - oldvals = data; } -void segag80_audio_device::write_ay(offs_t addr, uint8_t data) +void segag80_audio_device_base::write_ay(offs_t addr, uint8_t data) { assert(m_has_psg); m_psg->address_data_w(addr, data); @@ -134,8 +126,8 @@ void segag80_audio_device::write_ay(offs_t addr, uint8_t data) DEFINE_DEVICE_TYPE(ELIMINATOR_AUDIO, elim_audio_device, "elim_audio", "Eliminator Sound Board") -elim_audio_device::elim_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) - : segag80_audio_device(mconfig, ELIMINATOR_AUDIO, tag, owner, clock, 0xfe, 0xff, false, NETLIST_NAME(elim), 5000.0) +elim_audio_device::elim_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : + segag80_audio_device_base(mconfig, ELIMINATOR_AUDIO, tag, owner, clock, 0xfe, 0xff, false, NETLIST_NAME(elim), 5000.0) { } @@ -149,8 +141,8 @@ elim_audio_device::elim_audio_device(const machine_config &mconfig, const char * DEFINE_DEVICE_TYPE(ZEKTOR_AUDIO, zektor_audio_device, "zektor_audio", "Zektor Sound Board") -zektor_audio_device::zektor_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) - : segag80_audio_device(mconfig, ZEKTOR_AUDIO, tag, owner, clock, 0xfe, 0xff, true, NETLIST_NAME(zektor), 5000.0) +zektor_audio_device::zektor_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : + segag80_audio_device_base(mconfig, ZEKTOR_AUDIO, tag, owner, clock, 0xfe, 0xff, true, NETLIST_NAME(zektor), 5000.0) { } @@ -164,8 +156,8 @@ zektor_audio_device::zektor_audio_device(const machine_config &mconfig, const ch DEFINE_DEVICE_TYPE(SPACE_FURY_AUDIO, spacfury_audio_device, "spcfury_audio", "Space Fury Sound Board") -spacfury_audio_device::spacfury_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) - : segag80_audio_device(mconfig, SPACE_FURY_AUDIO, tag, owner, clock, 0xc7, 0x3f, false, NETLIST_NAME(spacfury), 60000.0) +spacfury_audio_device::spacfury_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : + segag80_audio_device_base(mconfig, SPACE_FURY_AUDIO, tag, owner, clock, 0xc7, 0x3f, false, NETLIST_NAME(spacfury), 60000.0) { } @@ -179,7 +171,7 @@ spacfury_audio_device::spacfury_audio_device(const machine_config &mconfig, cons DEFINE_DEVICE_TYPE(ASTRO_BLASTER_AUDIO, astrob_audio_device, "astrob_audio", "Astro Blaster Sound Board") -astrob_audio_device::astrob_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) - : segag80_audio_device(mconfig, ASTRO_BLASTER_AUDIO, tag, owner, clock, 0xff, 0xff, false, NETLIST_NAME(astrob), 25000.0) +astrob_audio_device::astrob_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : + segag80_audio_device_base(mconfig, ASTRO_BLASTER_AUDIO, tag, owner, clock, 0xff, 0xff, false, NETLIST_NAME(astrob), 25000.0) { } diff --git a/src/mame/audio/segag80.h b/src/mame/audio/segag80.h index 4f6c29b324a..c850d1e0190 100644 --- a/src/mame/audio/segag80.h +++ b/src/mame/audio/segag80.h @@ -10,56 +10,55 @@ #include "sound/ay8910.h" -class segag80_audio_device : public device_t, public device_mixer_interface +class segag80_audio_device_base : public device_t, public device_mixer_interface { -public: - segag80_audio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 lomask, u8 himask, bool haspsg, void (*netlist)(netlist::nlparse_t &), double output_scale); + using netlist_ptr = void (*)(netlist::nlparse_t &); +public: void write(offs_t addr, uint8_t data); void write_ay(offs_t addr, uint8_t data); protected: + segag80_audio_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 lomask, u8 himask, bool haspsg, netlist_ptr netlist, double output_scale); + virtual void device_add_mconfig(machine_config &config) override; virtual void device_start() override; - virtual void device_stop() override; optional_device_array m_lo_input; optional_device_array m_hi_input; optional_device m_psg; private: - u8 m_lo_vals; - u8 m_hi_vals; - u8 m_lo_mask; - u8 m_hi_mask; - bool m_has_psg; - void (*m_netlist)(netlist::nlparse_t &) = nullptr; - double m_output_scale = 0; + u8 const m_lo_mask; + u8 const m_hi_mask; + bool const m_has_psg; + netlist_ptr const m_netlist; + double const m_output_scale; }; -class elim_audio_device : public segag80_audio_device +class elim_audio_device : public segag80_audio_device_base { public: elim_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); }; -class zektor_audio_device : public segag80_audio_device +class zektor_audio_device : public segag80_audio_device_base { public: zektor_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); }; -class spacfury_audio_device : public segag80_audio_device +class spacfury_audio_device : public segag80_audio_device_base { public: spacfury_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); }; -class astrob_audio_device : public segag80_audio_device +class astrob_audio_device : public segag80_audio_device_base { public: astrob_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); diff --git a/src/mame/audio/segaspeech.cpp b/src/mame/audio/segaspeech.cpp index d158b0b7d2e..81a74350476 100644 --- a/src/mame/audio/segaspeech.cpp +++ b/src/mame/audio/segaspeech.cpp @@ -19,6 +19,8 @@ #define VERBOSE 0 #include "logmacro.h" +#define ENABLE_NETLIST_FILTERING (0) + /*************************************************************************** CONSTANTS diff --git a/src/mame/audio/segaspeech.h b/src/mame/audio/segaspeech.h index 81894b2ce25..5250c359a2b 100644 --- a/src/mame/audio/segaspeech.h +++ b/src/mame/audio/segaspeech.h @@ -10,8 +10,6 @@ #pragma once -#define ENABLE_NETLIST_FILTERING (0) - #include "cpu/mcs48/mcs48.h" #include "machine/netlist.h" #include "machine/timer.h" diff --git a/src/mame/audio/segausb.cpp b/src/mame/audio/segausb.cpp index 59e1c226854..cd4d1997289 100644 --- a/src/mame/audio/segausb.cpp +++ b/src/mame/audio/segausb.cpp @@ -12,9 +12,6 @@ #include "segausb.h" #include "nl_segausb.h" -#include "includes/segag80r.h" -#include "includes/segag80v.h" - #include @@ -139,24 +136,24 @@ void usb_sound_device::device_start() for (int tchan = 0; tchan < 3; tchan++) { timer8253::channel &channel = group.chan[tchan]; - save_item(NAME(channel.holding), tgroup * 3 + tchan); - save_item(NAME(channel.latchmode), tgroup * 3 + tchan); - save_item(NAME(channel.latchtoggle), tgroup * 3 + tchan); - save_item(NAME(channel.clockmode), tgroup * 3 + tchan); - save_item(NAME(channel.bcdmode), tgroup * 3 + tchan); - save_item(NAME(channel.output), tgroup * 3 + tchan); - save_item(NAME(channel.lastgate), tgroup * 3 + tchan); - save_item(NAME(channel.gate), tgroup * 3 + tchan); - save_item(NAME(channel.subcount), tgroup * 3 + tchan); - save_item(NAME(channel.count), tgroup * 3 + tchan); - save_item(NAME(channel.remain), tgroup * 3 + tchan); + save_item(STRUCT_MEMBER(channel, holding), tgroup * 3 + tchan); + save_item(STRUCT_MEMBER(channel, latchmode), tgroup * 3 + tchan); + save_item(STRUCT_MEMBER(channel, latchtoggle), tgroup * 3 + tchan); + save_item(STRUCT_MEMBER(channel, clockmode), tgroup * 3 + tchan); + save_item(STRUCT_MEMBER(channel, bcdmode), tgroup * 3 + tchan); + save_item(STRUCT_MEMBER(channel, output), tgroup * 3 + tchan); + save_item(STRUCT_MEMBER(channel, lastgate), tgroup * 3 + tchan); + save_item(STRUCT_MEMBER(channel, gate), tgroup * 3 + tchan); + save_item(STRUCT_MEMBER(channel, subcount), tgroup * 3 + tchan); + save_item(STRUCT_MEMBER(channel, count), tgroup * 3 + tchan); + save_item(STRUCT_MEMBER(channel, remain), tgroup * 3 + tchan); } - save_item(NAME(group.env), tgroup); - save_item(NAME(group.chan_filter[0].capval), tgroup); - save_item(NAME(group.chan_filter[1].capval), tgroup); - save_item(NAME(group.gate1.capval), tgroup); - save_item(NAME(group.gate2.capval), tgroup); - save_item(NAME(group.config), tgroup); + save_item(STRUCT_MEMBER(group, env), tgroup); + save_item(STRUCT_MEMBER(group.chan_filter[0], capval), tgroup); + save_item(STRUCT_MEMBER(group.chan_filter[1], capval), tgroup); + save_item(STRUCT_MEMBER(group.gate1, capval), tgroup); + save_item(STRUCT_MEMBER(group.gate2, capval), tgroup); + save_item(STRUCT_MEMBER(group, config), tgroup); } save_item(NAME(m_timer_mode)); @@ -212,7 +209,8 @@ u8 usb_sound_device::status_r() { LOG("%s:usb_data_r = %02X\n", machine().describe_context(), (m_out_latch & 0x81) | (m_in_latch & 0x7e)); - m_maincpu->adjust_icount(-200); + if (!machine().side_effects_disabled()) + m_maincpu->adjust_icount(-200); // only bits 0 and 7 are controlled by the I8035; the remaining // bits 1-6 reflect the current input latch values diff --git a/src/mame/drivers/segag80r.cpp b/src/mame/drivers/segag80r.cpp index db74169b8e9..4d9ae3d94c5 100644 --- a/src/mame/drivers/segag80r.cpp +++ b/src/mame/drivers/segag80r.cpp @@ -1586,7 +1586,7 @@ void segag80r_state::init_astrob() iospace.install_write_handler(0x3b, 0x3b, write8smo_delegate(*m_speech, FUNC(sega_speech_device::control_w))); /* install Astro Blaster sound board */ - iospace.install_write_handler(0x3e, 0x3f, write8sm_delegate(*m_g80_audio, FUNC(segag80_audio_device::write))); + iospace.install_write_handler(0x3e, 0x3f, write8sm_delegate(*m_g80_audio, FUNC(astrob_audio_device::write))); } diff --git a/src/mame/drivers/segag80v.cpp b/src/mame/drivers/segag80v.cpp index f251ba7f315..9c3289191d8 100644 --- a/src/mame/drivers/segag80v.cpp +++ b/src/mame/drivers/segag80v.cpp @@ -1321,7 +1321,7 @@ void segag80v_state::init_elim2() m_decrypt = segag80_security(70); // configure sound - iospace.install_write_handler(0x3e, 0x3f, write8sm_delegate(*m_g80_audio, FUNC(segag80_audio_device::write))); + iospace.install_write_handler(0x3e, 0x3f, write8sm_delegate(*m_g80_audio, FUNC(elim_audio_device::write))); } @@ -1335,7 +1335,7 @@ void segag80v_state::init_elim4() m_decrypt = segag80_security(76); // configure sound - iospace.install_write_handler(0x3e, 0x3f, write8sm_delegate(*m_g80_audio, FUNC(segag80_audio_device::write))); + iospace.install_write_handler(0x3e, 0x3f, write8sm_delegate(*m_g80_audio, FUNC(elim_audio_device::write))); // configure inputs iospace.install_write_handler(0xf8, 0xf8, write8smo_delegate(*this, FUNC(segag80v_state::spinner_select_w))); @@ -1355,7 +1355,7 @@ void segag80v_state::init_spacfury() // configure sound iospace.install_write_handler(0x38, 0x38, write8smo_delegate(*m_speech, FUNC(sega_speech_device::data_w))); iospace.install_write_handler(0x3b, 0x3b, write8smo_delegate(*m_speech, FUNC(sega_speech_device::control_w))); - iospace.install_write_handler(0x3e, 0x3f, write8sm_delegate(*m_g80_audio, FUNC(segag80_audio_device::write))); + iospace.install_write_handler(0x3e, 0x3f, write8sm_delegate(*m_g80_audio, FUNC(spacfury_audio_device::write))); } @@ -1371,8 +1371,8 @@ void segag80v_state::init_zektor() // configure sound iospace.install_write_handler(0x38, 0x38, write8smo_delegate(*m_speech, FUNC(sega_speech_device::data_w))); iospace.install_write_handler(0x3b, 0x3b, write8smo_delegate(*m_speech, FUNC(sega_speech_device::control_w))); - iospace.install_write_handler(0x3c, 0x3d, write8sm_delegate(*m_g80_audio, FUNC(segag80_audio_device::write_ay))); - iospace.install_write_handler(0x3e, 0x3f, write8sm_delegate(*m_g80_audio, FUNC(segag80_audio_device::write))); + iospace.install_write_handler(0x3c, 0x3d, write8sm_delegate(*m_g80_audio, FUNC(zektor_audio_device::write_ay))); + iospace.install_write_handler(0x3e, 0x3f, write8sm_delegate(*m_g80_audio, FUNC(zektor_audio_device::write))); // configure inputs iospace.install_write_handler(0xf8, 0xf8, write8smo_delegate(*this, FUNC(segag80v_state::spinner_select_w))); diff --git a/src/mame/includes/segag80r.h b/src/mame/includes/segag80r.h index a4c996149fd..7846fab93b3 100644 --- a/src/mame/includes/segag80r.h +++ b/src/mame/includes/segag80r.h @@ -95,7 +95,7 @@ private: optional_device m_soundbrd; optional_device m_samples; optional_device m_speech; - optional_device m_g80_audio; + optional_device m_g80_audio; optional_device m_usbsnd; optional_device m_005snd; required_device m_gfxdecode; diff --git a/src/mame/includes/segag80v.h b/src/mame/includes/segag80v.h index 0e058e7bae7..0ddf7552821 100644 --- a/src/mame/includes/segag80v.h +++ b/src/mame/includes/segag80v.h @@ -105,7 +105,7 @@ private: optional_device m_samples; optional_device m_speech; optional_device m_usb; - optional_device m_g80_audio; + optional_device m_g80_audio; optional_device m_aysnd; required_device m_vector; required_device m_screen; -- cgit v1.2.3