From 9091010c87bf6697a2b8cc18cfa6ad0c88ba293f Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Tue, 17 Apr 2012 14:58:05 +0000 Subject: [PATCH] Broke dependency between mcr68 and mcr by creating sound devices for each of the Midway 8-bit sound boards. This will also aid in eventually hooking them up to pinballs. Enhanced the mixer interface support to allow for more than one output line. To use this you need to use the MCFG_MIXER_ROUTE macro instead of MCFG_SOUND_ROUTE so that the mixer output index can be specified. See midway_ssio_device for an example. --- src/emu/diexec.c | 5 + src/emu/diexec.h | 14 +- src/emu/disound.c | 38 +- src/emu/disound.h | 16 +- src/mame/audio/mcr.c | 1790 +++++++++++++++++++++------------- src/mame/audio/mcr.h | 336 ++++++- src/mame/drivers/mcr.c | 387 ++++---- src/mame/drivers/mcr3.c | 137 +-- src/mame/drivers/mcr68.c | 73 +- src/mame/includes/gottlieb.h | 31 + src/mame/includes/mcr.h | 29 +- src/mame/includes/mcr68.h | 19 +- src/mame/machine/mcr.c | 27 - src/mame/machine/mcr68.c | 2 +- src/mame/video/mcr68.c | 38 +- src/osd/windows/windows.mak | 3 + 16 files changed, 1873 insertions(+), 1072 deletions(-) diff --git a/src/emu/diexec.c b/src/emu/diexec.c index 5192753a829..01aeb3f43dd 100644 --- a/src/emu/diexec.c +++ b/src/emu/diexec.c @@ -529,6 +529,11 @@ void device_execute_interface::interface_validity_check(validity_checker &valid) void device_execute_interface::interface_pre_start() { + // bind delegates + m_vblank_interrupt.bind_relative_to(device()); + m_timed_interrupt.bind_relative_to(device()); +// m_driver_irq.bind_relative_to(device()); + // fill in the initial states execute_interface_iterator iter(device().machine().root_device()); int index = iter.indexof(*this); diff --git a/src/emu/diexec.h b/src/emu/diexec.h index a39ef45b789..73b6501b93a 100644 --- a/src/emu/diexec.h +++ b/src/emu/diexec.h @@ -123,13 +123,19 @@ enum device_execute_interface::static_set_vblank_int(*device, _func, _tag); \ #define MCFG_DEVICE_VBLANK_INT_DRIVER(_tag, _class, _func) \ - device_execute_interface::static_set_vblank_int(*device, device_interrupt_delegate(&_class::_func, #_class "::" #_func, downcast<_class *>(&config.root_device())), _tag); \ + device_execute_interface::static_set_vblank_int(*device, device_interrupt_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF_OWNER, (_class *)0), _tag); \ + +#define MCFG_DEVICE_VBLANK_INT_DEVICE(_devtag, _tag, _class, _func) \ + device_execute_interface::static_set_vblank_int(*device, device_interrupt_delegate(&_class::_func, #_class "::" #_func, _devtag, (_class *)0), _tag); \ #define MCFG_DEVICE_PERIODIC_INT(_func, _rate) \ device_execute_interface::static_set_periodic_int(*device, _func, attotime::from_hz(_rate)); \ #define MCFG_DEVICE_PERIODIC_INT_DRIVER(_class, _func, _rate) \ - device_execute_interface::static_set_periodic_int(*device, device_interrupt_delegate(&_class::_func, #_class "::" #_func, downcast<_class *>(&config.root_device())), attotime::from_hz(_rate)); \ + device_execute_interface::static_set_periodic_int(*device, device_interrupt_delegate(&_class::_func, #_class "::" #_func, DEVICE_SELF_OWNER, (_class *)0), attotime::from_hz(_rate)); \ + +#define MCFG_DEVICE_PERIODIC_INT_DEVICE(_devtag, _class, _func, _rate) \ + device_execute_interface::static_set_periodic_int(*device, device_interrupt_delegate(&_class::_func, #_class "::" #_func, _devtag, (_class *)0), attotime::from_hz(_rate)); \ @@ -142,11 +148,11 @@ class screen_device; // interrupt callback for VBLANK and timed interrupts -typedef delegate device_interrupt_delegate; +typedef device_delegate device_interrupt_delegate; typedef void (*device_interrupt_func)(device_t *device); // IRQ callback to be called by executing devices when an IRQ is actually taken -typedef delegate device_irq_acknowledge_delegate; +typedef device_delegate device_irq_acknowledge_delegate; typedef int (*device_irq_acknowledge_callback)(device_t *device, int irqnum); diff --git a/src/emu/disound.c b/src/emu/disound.c index 4c4819c69f2..de6b141dc9f 100644 --- a/src/emu/disound.c +++ b/src/emu/disound.c @@ -71,7 +71,7 @@ device_sound_interface::~device_sound_interface() // a new route to the device //------------------------------------------------- -void device_sound_interface::static_add_route(device_t &device, UINT32 output, const char *target, double gain, UINT32 input) +device_sound_interface::sound_route &device_sound_interface::static_add_route(device_t &device, UINT32 output, const char *target, double gain, UINT32 input, UINT32 mixoutput) { // find our sound interface device_sound_interface *sound; @@ -79,7 +79,7 @@ void device_sound_interface::static_add_route(device_t &device, UINT32 output, c throw emu_fatalerror("MCFG_SOUND_ROUTE called on device '%s' with no sound interface", device.tag()); // append a new route to the list - sound->m_route_list.append(*global_alloc(sound_route(output, input, gain, target))); + return sound->m_route_list.append(*global_alloc(sound_route(output, input, gain, target, mixoutput))); } @@ -356,10 +356,11 @@ void device_sound_interface::interface_pre_reset() // sound_route - constructor //------------------------------------------------- -device_sound_interface::sound_route::sound_route(int output, int input, float gain, const char *target) +device_sound_interface::sound_route::sound_route(int output, int input, float gain, const char *target, UINT32 mixoutput) : m_next(NULL), m_output(output), m_input(input), + m_mixoutput(mixoutput), m_gain(gain), m_target(target) { @@ -409,6 +410,24 @@ void device_mixer_interface::interface_pre_start() return; } + // generate the output map + m_outputmap.resize(m_auto_allocated_inputs); + + // iterate through all routes that point to us and note their mixer output + sound_interface_iterator iter(m_device.machine().root_device()); + for (device_sound_interface *sound = iter.first(); sound != NULL; sound = iter.next()) + for (const sound_route *route = sound->first_route(); route != NULL; route = route->next()) + { + // see if we are the target of this route + device_t *target_device = sound->device().siblingdevice(route->m_target); + if (target_device == &device() && route->m_input < m_auto_allocated_inputs) + { + int count = (route->m_output == ALL_OUTPUTS) ? sound->outputs() : 1; + for (int output = 0; output < count; output++) + m_outputmap[route->m_input + output] = route->m_mixoutput; + } + } + // allocate the mixer stream m_mixer_stream = stream_alloc(m_auto_allocated_inputs, m_outputs, device().machine().sample_rate()); } @@ -435,13 +454,16 @@ void device_mixer_interface::interface_post_load() void device_mixer_interface::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) { + // clear output buffers + for (int output = 0; output < m_outputs; output++) + memset(outputs[output], 0, samples * sizeof(outputs[0][0])); + // loop over samples + const UINT8 *outmap = &m_outputmap[0]; for (int pos = 0; pos < samples; pos++) { - // add up all the inputs - INT32 sample = inputs[0][pos]; - for (int inp = 1; inp < m_auto_allocated_inputs; inp++) - sample += inputs[inp][pos]; - outputs[0][pos] = sample; + // for each input, add it to the appropriate output + for (int inp = 0; inp < m_auto_allocated_inputs; inp++) + outputs[outmap[inp]][pos] += inputs[inp][pos]; } } diff --git a/src/emu/disound.h b/src/emu/disound.h index dcce6e97133..8aea952fe3e 100644 --- a/src/emu/disound.h +++ b/src/emu/disound.h @@ -75,16 +75,20 @@ const int AUTO_ALLOC_INPUT = 65535; #define MCFG_SOUND_CONFIG(_config) \ MCFG_DEVICE_CONFIG(_config) +#define MCFG_SOUND_ROUTE(_output, _target, _gain) \ + device_sound_interface::static_add_route(*device, _output, _target, _gain); \ + #define MCFG_SOUND_ROUTE_EX(_output, _target, _gain, _input) \ device_sound_interface::static_add_route(*device, _output, _target, _gain, _input); \ -#define MCFG_SOUND_ROUTE(_output, _target, _gain) \ - MCFG_SOUND_ROUTE_EX(_output, _target, _gain, AUTO_ALLOC_INPUT) - #define MCFG_SOUND_ROUTES_RESET() \ device_sound_interface::static_reset_routes(*device); \ +#define MCFG_MIXER_ROUTE(_output, _target, _gain, _mixoutput) \ + device_sound_interface::static_add_route(*device, _output, _target, _gain, AUTO_ALLOC_INPUT, _mixoutput); \ + + //************************************************************************** // TYPE DEFINITIONS @@ -101,13 +105,14 @@ public: class sound_route { public: - sound_route(int output, int input, float gain, const char *target); + sound_route(int output, int input, float gain, const char *target, UINT32 mixoutput); const sound_route *next() const { return m_next; } sound_route * m_next; // pointer to next route UINT32 m_output; // output index, or ALL_OUTPUTS UINT32 m_input; // target input index + UINT32 m_mixoutput; // target mixer output float m_gain; // gain astring m_target; // target tag }; @@ -120,7 +125,7 @@ public: const sound_route *first_route() const { return m_route_list.first(); } // static inline configuration helpers - static void static_add_route(device_t &device, UINT32 output, const char *target, double gain, UINT32 input = AUTO_ALLOC_INPUT); + static sound_route &static_add_route(device_t &device, UINT32 output, const char *target, double gain, UINT32 input = AUTO_ALLOC_INPUT, UINT32 mixoutput = 0); static void static_reset_routes(device_t &device); // sound stream update overrides @@ -173,6 +178,7 @@ protected: // internal state UINT8 m_outputs; // number of outputs + dynamic_array m_outputmap; // map of inputs to outputs sound_stream * m_mixer_stream; // mixing stream }; diff --git a/src/mame/audio/mcr.c b/src/mame/audio/mcr.c index e84bf8f2b32..6d70d0ab73d 100644 --- a/src/mame/audio/mcr.c +++ b/src/mame/audio/mcr.c @@ -2,18 +2,42 @@ audio/mcr.c - Functions to emulate general the various MCR sound cards. + Functions to emulate general the various Midway sound cards. + +**************************************************************************** + + Copyright Aaron Giles + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + * Neither the name 'MAME' nor the names of its contributors may be + used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. ***************************************************************************/ #include "emu.h" -#include "cpu/z80/z80.h" -#include "cpu/m68000/m68000.h" -#include "cpu/m6800/m6800.h" -#include "cpu/m6809/m6809.h" -#include "sound/tms5220.h" -#include "sound/ay8910.h" -#include "sound/dac.h" #include "audio/williams.h" #include "includes/mcr.h" #include "audio/mcr.h" @@ -44,57 +68,6 @@ static UINT8 mcr_sound_config; -/************************************* - * - * Statics - * - *************************************/ - -static UINT16 dacval; - -/* SSIO-specific globals */ -static device_t *ssio_sound_cpu; -static UINT8 ssio_data[4]; -static UINT8 ssio_status; -static UINT8 ssio_14024_count; -static UINT8 ssio_mute; -static UINT8 ssio_overall[2]; -static UINT8 ssio_duty_cycle[2][3]; -static UINT8 ssio_ayvolume_lookup[16]; -static UINT8 ssio_custom_input_mask[5]; -static UINT8 ssio_custom_output_mask[2]; -static read8_delegate ssio_custom_input[5]; -static write8_delegate ssio_custom_output[2]; - -/* Chip Squeak Deluxe-specific globals */ -static device_t *csdeluxe_sound_cpu; -static UINT8 csdeluxe_status; - -/* Turbo Chip Squeak-specific globals */ -static device_t *turbocs_sound_cpu; -static UINT8 turbocs_status; - -/* Sounds Good-specific globals */ -static device_t *soundsgood_sound_cpu; -static UINT8 soundsgood_status; - -/* Squawk n' Talk-specific globals */ -static device_t *squawkntalk_sound_cpu; -static UINT8 squawkntalk_tms_command; -static UINT8 squawkntalk_tms_strobes; - - - -/************************************* - * - * Prototypes - * - *************************************/ - -static void ssio_compute_ay8910_modulation(running_machine &machine); - - - /************************************* * * Generic MCR sound initialization @@ -105,49 +78,7 @@ void mcr_sound_init(running_machine &machine, UINT8 config) { mcr_sound_config = config; - /* SSIO */ - if (mcr_sound_config & MCR_SSIO) - { - ssio_sound_cpu = machine.device("ssiocpu"); - ssio_compute_ay8910_modulation(machine); - state_save_register_global_array(machine, ssio_data); - state_save_register_global(machine, ssio_status); - state_save_register_global(machine, ssio_14024_count); - state_save_register_global(machine, ssio_mute); - state_save_register_global_array(machine, ssio_overall); - state_save_register_global_2d_array(machine, ssio_duty_cycle); - } - - /* Turbo Chip Squeak */ - if (mcr_sound_config & MCR_TURBO_CHIP_SQUEAK) - { - turbocs_sound_cpu = machine.device("tcscpu"); - state_save_register_global(machine, turbocs_status); - } - - /* Chip Squeak Deluxe */ - if (mcr_sound_config & MCR_CHIP_SQUEAK_DELUXE) - { - csdeluxe_sound_cpu = machine.device("csdcpu"); - state_save_register_global(machine, csdeluxe_status); - } - - /* Sounds Good */ - if (mcr_sound_config & MCR_SOUNDS_GOOD) - { - soundsgood_sound_cpu = machine.device("sgcpu"); - state_save_register_global(machine, soundsgood_status); - } - - /* Squawk n Talk */ - if (mcr_sound_config & MCR_SQUAWK_N_TALK) - { - squawkntalk_sound_cpu = machine.device("sntcpu"); - state_save_register_global(machine, squawkntalk_tms_command); - state_save_register_global(machine, squawkntalk_tms_strobes); - } - - /* Advanced Audio */ + // Advanced Audio if (mcr_sound_config & MCR_WILLIAMS_SOUND) williams_cvsd_init(machine); } @@ -155,42 +86,42 @@ void mcr_sound_init(running_machine &machine, UINT8 config) void mcr_sound_reset(running_machine &machine) { - /* SSIO */ + // SSIO if (mcr_sound_config & MCR_SSIO) { - ssio_reset_w(machine, 1); - ssio_reset_w(machine, 0); + machine.device("ssio")->reset_write(1); + machine.device("ssio")->reset_write(0); } - /* Turbo Chip Squeak */ + // Turbo Chip Squeak if (mcr_sound_config & MCR_TURBO_CHIP_SQUEAK) { - turbocs_reset_w(machine, 1); - turbocs_reset_w(machine, 0); + machine.device("tcs")->reset_write(1); + machine.device("tcs")->reset_write(0); } - /* Chip Squeak Deluxe */ + // Chip Squeak Deluxe if (mcr_sound_config & MCR_CHIP_SQUEAK_DELUXE) { - csdeluxe_reset_w(machine, 1); - csdeluxe_reset_w(machine, 0); + machine.device("csd")->reset_write(1); + machine.device("csd")->reset_write(0); } - /* Sounds Good */ + // Sounds Good if (mcr_sound_config & MCR_SOUNDS_GOOD) { - soundsgood_reset_w(machine, 1); - soundsgood_reset_w(machine, 0); + machine.device("sg")->reset_write(1); + machine.device("sg")->reset_write(0); } - /* Squawk n Talk */ + // Squawk n Talk if (mcr_sound_config & MCR_SQUAWK_N_TALK) { - squawkntalk_reset_w(machine, 1); - squawkntalk_reset_w(machine, 0); + machine.device("snt")->reset_write(1); + machine.device("snt")->reset_write(0); } - /* Advanced Audio */ + // Advanced Audio if (mcr_sound_config & MCR_WILLIAMS_SOUND) { williams_cvsd_reset_w(machine, 1); @@ -200,233 +131,343 @@ void mcr_sound_reset(running_machine &machine) -/************************************* - * - * MCR SSIO communications - * - * Z80, 2 AY-8910 - * - *************************************/ +//************************************************************************** +// GLOBAL VARIABLES +//************************************************************************** -/* - AY-8910 modulation: +extern const device_type MIDWAY_SSIO = &device_creator; +extern const device_type MIDWAY_CHIP_SQUEAK_DELUXE = &device_creator; +extern const device_type MIDWAY_SOUNDS_GOOD = &device_creator; +extern const device_type MIDWAY_TURBO_CHIP_SQUEAK = &device_creator; +extern const device_type MIDWAY_SQUAWK_N_TALK = &device_creator; - Starts with a 16MHz oscillator - /2 via 7474 flip-flip @ F11 - This signal clocks the binary counter @ E11 which - cascades into the decade counter @ D11. This combo - effectively counts from 0-159 and then wraps. The - value from these counters is input to an 82S123 PROM, - which appears to be standard on all games. - One bit at a time from this PROM is clocked at a time - and the resulting inverted signal becomes a clock for - the down counters at F3, F4, F5, F8, F9, and F10. The - value in these down counters are reloaded after the 160 - counts from the binary/decade counter combination. +//************************************************************************** +// SUPER SOUND I/O BOARD (SSIO) +//************************************************************************** - When these down counters are loaded, the TC signal is - clear, which mutes the voice. When the down counters - cross through 0, the TC signal goes high and the 4016 - multiplexers allow the AY-8910 voice to go through. - Thus, writing a 0 to the counters will enable the - voice for the longest period of time, while writing - a 15 enables it for the shortest period of time. - This creates an effective duty cycle for the voice. +//------------------------------------------------- +// midway_ssio_device - constructor +//------------------------------------------------- - Given that the down counters are reset 50000 times per - second (SSIO_CLOCK/2/160), which is above the typical - frequency of sound output. So we simply apply a volume - adjustment to each voice according to the duty cycle. -*/ -static void ssio_compute_ay8910_modulation(running_machine &machine) +midway_ssio_device::midway_ssio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, MIDWAY_SSIO, "Midway SSIO Sound Board", "midssio", tag, owner, clock), + device_mixer_interface(mconfig, *this, 2), + m_cpu(*this, "cpu"), + m_ay0(*this, "ay0"), + m_ay1(*this, "ay1"), + m_status(0), + m_14024_count(0), + m_mute(0) { - UINT8 *prom = machine.region("proms")->base(); - int volval; + memset(m_data, 0, sizeof(m_data)); + memset(m_overall, 0, sizeof(m_overall)); + memset(m_duty_cycle, 0, sizeof(m_duty_cycle)); + memset(m_ayvolume_lookup, 0, sizeof(m_ayvolume_lookup)); + memset(m_custom_input_mask, 0, sizeof(m_custom_input_mask)); + memset(m_custom_output_mask, 0, sizeof(m_custom_output_mask)); +} - /* loop over all possible values of the duty cycle */ - for (volval = 0; volval < 16; volval++) + +//------------------------------------------------- +// read - return the status value +//------------------------------------------------- + +READ8_MEMBER(midway_ssio_device::read) +{ + return m_status; +} + + +//------------------------------------------------- +// write - handle an external write to one of the +// input latches +//------------------------------------------------- + +WRITE8_MEMBER(midway_ssio_device::write) +{ + synchronize(0, (offset << 8) | (data & 0xff)); +} + + +//------------------------------------------------- +// reset_write - write to the reset line +//------------------------------------------------- + +WRITE_LINE_MEMBER(midway_ssio_device::reset_write) +{ + // going high halts the CPU + if (state) { + device_reset(); + m_cpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); + } + + // going low resets and reactivates the CPU + else + m_cpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); +} + + +//------------------------------------------------- +// ioport_read - read from one of the I/O ports +// on the device +//------------------------------------------------- + +READ8_MEMBER(midway_ssio_device::ioport_read) +{ + static const char *const port[] = { "IP0", "IP1", "IP2", "IP3", "IP4" }; + astring tempstr; + UINT8 result = input_port_read_safe(machine(), subtag(tempstr, port[offset]), 0xff); + if (!m_custom_input[offset].isnull()) + result = (result & ~m_custom_input_mask[offset]) | + (m_custom_input[offset](space, offset, 0xff) & m_custom_input_mask[offset]); + return result; +} + + +//------------------------------------------------- +// ioport_write - write to one of the I/O ports +// on the device +//------------------------------------------------- + +WRITE8_MEMBER(midway_ssio_device::ioport_write) +{ + int which = offset >> 2; + if (!m_custom_output[which].isnull()) + m_custom_output[which](space, offset, data & m_custom_output_mask[which], 0xff); +} + + +//------------------------------------------------- +// set_custom_input - configure a custom port +// reader +//------------------------------------------------- + +void midway_ssio_device::set_custom_input(int which, UINT8 mask, read8_delegate handler) +{ + m_custom_input[which] = handler; + m_custom_input_mask[which] = mask; +} + + +//------------------------------------------------- +// set_custom_output - configure a custom port +// writer +//------------------------------------------------- + +void midway_ssio_device::set_custom_output(int which, UINT8 mask, write8_delegate handler) +{ + m_custom_output[which/4] = handler; + m_custom_output_mask[which/4] = mask; +} + + +//------------------------------------------------- +// compute_ay8910_modulation - precompute +// volume modulation tables based on the duty +// cycle described by the PROMs +//------------------------------------------------- + +void midway_ssio_device::compute_ay8910_modulation() +{ + // + // AY-8910 modulation: + // + // Starts with a 16MHz oscillator + // /2 via 7474 flip-flip @ F11 + // + // This signal clocks the binary counter @ E11 which + // cascades into the decade counter @ D11. This combo + // effectively counts from 0-159 and then wraps. The + // value from these counters is input to an 82S123 PROM, + // which appears to be standard on all games. + // + // One bit at a time from this PROM is clocked at a time + // and the resulting inverted signal becomes a clock for + // the down counters at F3, F4, F5, F8, F9, and F10. The + // value in these down counters are reloaded after the 160 + // counts from the binary/decade counter combination. + // + // When these down counters are loaded, the TC signal is + // clear, which mutes the voice. When the down counters + // cross through 0, the TC signal goes high and the 4016 + // multiplexers allow the AY-8910 voice to go through. + // Thus, writing a 0 to the counters will enable the + // voice for the longest period of time, while writing + // a 15 enables it for the shortest period of time. + // This creates an effective duty cycle for the voice. + // + // Given that the down counters are reset 50000 times per + // second (SSIO_CLOCK/2/160), which is above the typical + // frequency of sound output. So we simply apply a volume + // adjustment to each voice according to the duty cycle. + // + + // loop over all possible values of the duty cycle + UINT8 *prom = machine().region("proms")->base(); + for (int volval = 0; volval < 16; volval++) + { + // loop over all the clocks until we run out; look up in the PROM + // to find out when the next clock should fire int remaining_clocks = volval; - int clock, cur = 0, prev = 1; - - /* loop over all the clocks until we run out; look up in the PROM */ - /* to find out when the next clock should fire */ - for (clock = 0; clock < 160 && remaining_clocks; clock++) + int cur = 0, prev = 1; + int curclock; + for (curclock = 0; curclock < 160 && remaining_clocks; curclock++) { - cur = prom[clock / 8] & (0x80 >> (clock % 8)); + cur = prom[curclock / 8] & (0x80 >> (curclock % 8)); - /* check for a high -> low transition */ + // check for a high -> low transition if (cur == 0 && prev != 0) remaining_clocks--; prev = cur; } - /* treat the duty cycle as a volume */ - ssio_ayvolume_lookup[15-volval] = clock * 100 / 160; + // treat the duty cycle as a volume + m_ayvolume_lookup[15 - volval] = curclock * 100 / 160; } } -/********* internal interfaces ***********/ -static INTERRUPT_GEN( ssio_14024_clock ) + +//------------------------------------------------- +// clock_14024 - periodic timer to clock the +// 7-bit async counter at C12 +//------------------------------------------------- + +INTERRUPT_GEN_MEMBER(midway_ssio_device::clock_14024) { - /* - /SINT is generated as follows: + // + // /SINT is generated as follows: + // + // Starts with a 16MHz oscillator + // /2 via 7474 flip-flop @ F11 + // /16 via 74161 binary counter @ E11 + // /10 via 74190 decade counter @ D11 + // + // Bit 3 of the decade counter clocks a 14024 7-bit async counter @ C12. + // This routine is called to clock this 7-bit counter. + // Bit 6 of the output is inverted and connected to /SINT. + // + m_14024_count = (m_14024_count + 1) & 0x7f; - Starts with a 16MHz oscillator - /2 via 7474 flip-flop @ F11 - /16 via 74161 binary counter @ E11 - /10 via 74190 decade counter @ D11 - - Bit 3 of the decade counter clocks a 14024 7-bit async counter @ C12. - This routine is called to clock this 7-bit counter. - Bit 6 of the output is inverted and connected to /SINT. - */ - ssio_14024_count = (ssio_14024_count + 1) & 0x7f; - - /* if the low 5 bits clocked to 0, bit 6 has changed state */ - if ((ssio_14024_count & 0x3f) == 0) - device_set_input_line(device, 0, (ssio_14024_count & 0x40) ? ASSERT_LINE : CLEAR_LINE); + // if the low 5 bits clocked to 0, bit 6 has changed state + if ((m_14024_count & 0x3f) == 0) + m_cpu->set_input_line(0, (m_14024_count & 0x40) ? ASSERT_LINE : CLEAR_LINE); } -READ8_MEMBER(mcr_state::ssio_irq_clear) + +//------------------------------------------------- +// irq_clear - reset the IRQ state and 14024 count +//------------------------------------------------- + +READ8_MEMBER(midway_ssio_device::irq_clear) { - /* a read here asynchronously resets the 14024 count, clearing /SINT */ - ssio_14024_count = 0; - device_set_input_line(ssio_sound_cpu, 0, CLEAR_LINE); + // a read here asynchronously resets the 14024 count, clearing /SINT + m_14024_count = 0; + m_cpu->set_input_line(0, CLEAR_LINE); return 0xff; } -WRITE8_MEMBER(mcr_state::ssio_status_w) + +//------------------------------------------------- +// status_w - set the outgoing status value +//------------------------------------------------- + +WRITE8_MEMBER(midway_ssio_device::status_w) { - ssio_status = data; -} - -READ8_MEMBER(mcr_state::ssio_data_r) -{ - return ssio_data[offset]; -} - -static TIMER_CALLBACK( ssio_delayed_data_w ) -{ - ssio_data[param >> 8] = param & 0xff; -} - -static void ssio_update_volumes(running_machine &machine) -{ - device_t *ay0 = machine.device("ssio.1"); - device_t *ay1 = machine.device("ssio.2"); - ay8910_set_volume(ay0, 0, ssio_mute ? 0 : ssio_ayvolume_lookup[ssio_duty_cycle[0][0]]); - ay8910_set_volume(ay0, 1, ssio_mute ? 0 : ssio_ayvolume_lookup[ssio_duty_cycle[0][1]]); - ay8910_set_volume(ay0, 2, ssio_mute ? 0 : ssio_ayvolume_lookup[ssio_duty_cycle[0][2]]); - ay8910_set_volume(ay1, 0, ssio_mute ? 0 : ssio_ayvolume_lookup[ssio_duty_cycle[1][0]]); - ay8910_set_volume(ay1, 1, ssio_mute ? 0 : ssio_ayvolume_lookup[ssio_duty_cycle[1][1]]); - ay8910_set_volume(ay1, 2, ssio_mute ? 0 : ssio_ayvolume_lookup[ssio_duty_cycle[1][2]]); -} - -static WRITE8_DEVICE_HANDLER( ssio_porta0_w ) -{ - ssio_duty_cycle[0][0] = data & 15; - ssio_duty_cycle[0][1] = data >> 4; - ssio_update_volumes(device->machine()); -} - -static WRITE8_DEVICE_HANDLER( ssio_portb0_w ) -{ - ssio_duty_cycle[0][2] = data & 15; - ssio_overall[0] = (data >> 4) & 7; - ssio_update_volumes(device->machine()); -} - -static WRITE8_DEVICE_HANDLER( ssio_porta1_w ) -{ - ssio_duty_cycle[1][0] = data & 15; - ssio_duty_cycle[1][1] = data >> 4; - ssio_update_volumes(device->machine()); -} - -static WRITE8_DEVICE_HANDLER( ssio_portb1_w ) -{ - ssio_duty_cycle[1][2] = data & 15; - ssio_overall[1] = (data >> 4) & 7; - ssio_mute = data & 0x80; - ssio_update_volumes(device->machine()); -} - -/********* external interfaces ***********/ -WRITE8_MEMBER(mcr_state::ssio_data_w) -{ - machine().scheduler().synchronize(FUNC(ssio_delayed_data_w), (offset << 8) | (data & 0xff)); -} - -READ8_MEMBER(mcr_state::ssio_status_r) -{ - return ssio_status; -} - -void ssio_reset_w(running_machine &machine, int state) -{ - /* going high halts the CPU */ - if (state) - { - int i; - - device_set_input_line(ssio_sound_cpu, INPUT_LINE_RESET, ASSERT_LINE); - - /* latches also get reset */ - for (i = 0; i < 4; i++) - ssio_data[i] = 0; - ssio_status = 0; - ssio_14024_count = 0; - } - /* going low resets and reactivates the CPU */ - else - device_set_input_line(ssio_sound_cpu, INPUT_LINE_RESET, CLEAR_LINE); -} - -READ8_MEMBER(mcr_state::ssio_input_port_r) -{ - static const char *const port[] = { "SSIO.IP0", "SSIO.IP1", "SSIO.IP2", "SSIO.IP3", "SSIO.IP4" }; - UINT8 result = input_port_read_safe(machine(), port[offset], 0xff); - if (!ssio_custom_input[offset].isnull()) - result = (result & ~ssio_custom_input_mask[offset]) | - (ssio_custom_input[offset](*&space, offset, 0xff) & ssio_custom_input_mask[offset]); - return result; -} - -WRITE8_MEMBER(mcr_state::ssio_output_port_w) -{ - int which = offset >> 2; - if (which == 0) - mcr_control_port_w(*&space, offset, data); - if (!ssio_custom_output[which].isnull()) - ssio_custom_output[which](*&space, offset, data & ssio_custom_output_mask[which],0xff); -} - -void ssio_set_custom_input(int which, int mask, read8_delegate handler) -{ - ssio_custom_input[which] = handler; - ssio_custom_input_mask[which] = mask; -} - -void ssio_set_custom_output(int which, int mask, write8_delegate handler) -{ - ssio_custom_output[which/4] = handler; - ssio_custom_output_mask[which/4] = mask; + m_status = data; } -/********* sound interfaces ***********/ +//------------------------------------------------- +// data_r - read incoming data latches +//------------------------------------------------- + +READ8_MEMBER(midway_ssio_device::data_r) +{ + return m_data[offset]; +} + + +//------------------------------------------------- +// porta0_w - handle writes to AY-8910 #0 port A +//------------------------------------------------- + +WRITE8_MEMBER(midway_ssio_device::porta0_w) +{ + m_duty_cycle[0][0] = data & 15; + m_duty_cycle[0][1] = data >> 4; + update_volumes(); +} + + +//------------------------------------------------- +// portb0_w - handle writes to AY-8910 #0 port B +//------------------------------------------------- + +WRITE8_MEMBER(midway_ssio_device::portb0_w) +{ + m_duty_cycle[0][2] = data & 15; + m_overall[0] = (data >> 4) & 7; + update_volumes(); +} + + +//------------------------------------------------- +// porta1_w - handle writes to AY-8910 #1 port A +//------------------------------------------------- + +WRITE8_MEMBER(midway_ssio_device::porta1_w) +{ + m_duty_cycle[1][0] = data & 15; + m_duty_cycle[1][1] = data >> 4; + update_volumes(); +} + + +//------------------------------------------------- +// portb1_w - handle writes to AY-8910 #1 port B +//------------------------------------------------- + +WRITE8_MEMBER(midway_ssio_device::portb1_w) +{ + m_duty_cycle[1][2] = data & 15; + m_overall[1] = (data >> 4) & 7; + m_mute = data & 0x80; + update_volumes(); +} + + +//------------------------------------------------- +// update_volumes - update the volumes of each +// AY-8910 channel based on modulation and mute +//------------------------------------------------- + +void midway_ssio_device::update_volumes() +{ + ay8910_set_volume(m_ay0, 0, m_mute ? 0 : m_ayvolume_lookup[m_duty_cycle[0][0]]); + ay8910_set_volume(m_ay0, 1, m_mute ? 0 : m_ayvolume_lookup[m_duty_cycle[0][1]]); + ay8910_set_volume(m_ay0, 2, m_mute ? 0 : m_ayvolume_lookup[m_duty_cycle[0][2]]); + ay8910_set_volume(m_ay1, 0, m_mute ? 0 : m_ayvolume_lookup[m_duty_cycle[1][0]]); + ay8910_set_volume(m_ay1, 1, m_mute ? 0 : m_ayvolume_lookup[m_duty_cycle[1][1]]); + ay8910_set_volume(m_ay1, 2, m_mute ? 0 : m_ayvolume_lookup[m_duty_cycle[1][2]]); +} + + +//------------------------------------------------- +// AY-8910 interfaces +//------------------------------------------------- + static const ay8910_interface ssio_ay8910_interface_1 = { AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, DEVCB_NULL, DEVCB_NULL, - DEVCB_HANDLER(ssio_porta0_w), - DEVCB_HANDLER(ssio_portb0_w) + DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, midway_ssio_device, porta0_w), + DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, midway_ssio_device, portb0_w) }; static const ay8910_interface ssio_ay8910_interface_2 = @@ -435,564 +476,939 @@ static const ay8910_interface ssio_ay8910_interface_2 = AY8910_DEFAULT_LOADS, DEVCB_NULL, DEVCB_NULL, - DEVCB_HANDLER(ssio_porta1_w), - DEVCB_HANDLER(ssio_portb1_w) + DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, midway_ssio_device, porta1_w), + DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, midway_ssio_device, portb1_w) }; -/********* memory interfaces ***********/ +//------------------------------------------------- +// audio CPU map +//------------------------------------------------- -/* address map verified from schematics */ -static ADDRESS_MAP_START( ssio_map, AS_PROGRAM, 8, mcr_state ) +// address map verified from schematics +static ADDRESS_MAP_START( ssio_map, AS_PROGRAM, 8, midway_ssio_device ) ADDRESS_MAP_UNMAP_HIGH AM_RANGE(0x0000, 0x3fff) AM_ROM AM_RANGE(0x8000, 0x83ff) AM_MIRROR(0x0c00) AM_RAM - AM_RANGE(0x9000, 0x9003) AM_MIRROR(0x0ffc) AM_READ(ssio_data_r) - AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x0ffc) AM_DEVWRITE_LEGACY("ssio.1", ay8910_address_w) - AM_RANGE(0xa001, 0xa001) AM_MIRROR(0x0ffc) AM_DEVREAD_LEGACY("ssio.1", ay8910_r) - AM_RANGE(0xa002, 0xa002) AM_MIRROR(0x0ffc) AM_DEVWRITE_LEGACY("ssio.1", ay8910_data_w) - AM_RANGE(0xb000, 0xb000) AM_MIRROR(0x0ffc) AM_DEVWRITE_LEGACY("ssio.2", ay8910_address_w) - AM_RANGE(0xb001, 0xb001) AM_MIRROR(0x0ffc) AM_DEVREAD_LEGACY("ssio.2", ay8910_r) - AM_RANGE(0xb002, 0xb002) AM_MIRROR(0x0ffc) AM_DEVWRITE_LEGACY("ssio.2", ay8910_data_w) - AM_RANGE(0xc000, 0xcfff) AM_READNOP AM_WRITE(ssio_status_w) - AM_RANGE(0xd000, 0xdfff) AM_WRITENOP /* low bit controls yellow LED */ - AM_RANGE(0xe000, 0xefff) AM_READ(ssio_irq_clear) - AM_RANGE(0xf000, 0xffff) AM_READ_PORT("SSIO.DIP") /* 6 DIP switches */ + AM_RANGE(0x9000, 0x9003) AM_MIRROR(0x0ffc) AM_READ(data_r) + AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x0ffc) AM_DEVWRITE_LEGACY("ay0", ay8910_address_w) + AM_RANGE(0xa001, 0xa001) AM_MIRROR(0x0ffc) AM_DEVREAD_LEGACY("ay0", ay8910_r) + AM_RANGE(0xa002, 0xa002) AM_MIRROR(0x0ffc) AM_DEVWRITE_LEGACY("ay0", ay8910_data_w) + AM_RANGE(0xb000, 0xb000) AM_MIRROR(0x0ffc) AM_DEVWRITE_LEGACY("ay1", ay8910_address_w) + AM_RANGE(0xb001, 0xb001) AM_MIRROR(0x0ffc) AM_DEVREAD_LEGACY("ay1", ay8910_r) + AM_RANGE(0xb002, 0xb002) AM_MIRROR(0x0ffc) AM_DEVWRITE_LEGACY("ay1", ay8910_data_w) + AM_RANGE(0xc000, 0xcfff) AM_READNOP AM_WRITE(status_w) + AM_RANGE(0xd000, 0xdfff) AM_WRITENOP // low bit controls yellow LED + AM_RANGE(0xe000, 0xefff) AM_READ(irq_clear) + AM_RANGE(0xf000, 0xffff) AM_READ_PORT("DIP") // 6 DIP switches ADDRESS_MAP_END -/********* machine driver ***********/ -MACHINE_CONFIG_FRAGMENT(mcr_ssio) - MCFG_CPU_ADD("ssiocpu", Z80, SSIO_CLOCK/2/4) +//------------------------------------------------- +// machine configuration +//------------------------------------------------- + +MACHINE_CONFIG_FRAGMENT( midway_ssio ) + MCFG_CPU_ADD("cpu", Z80, SSIO_CLOCK/2/4) MCFG_CPU_PROGRAM_MAP(ssio_map) - MCFG_CPU_PERIODIC_INT(ssio_14024_clock, SSIO_CLOCK/2/16/10) + MCFG_DEVICE_PERIODIC_INT_DEVICE(DEVICE_SELF_OWNER, midway_ssio_device, clock_14024, SSIO_CLOCK/2/16/10) - MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") - MCFG_SOUND_ADD("ssio.1", AY8910, SSIO_CLOCK/2/4) + MCFG_SOUND_ADD("ay0", AY8910, SSIO_CLOCK/2/4) MCFG_SOUND_CONFIG(ssio_ay8910_interface_1) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.33) + MCFG_MIXER_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.33, 0) - MCFG_SOUND_ADD("ssio.2", AY8910, SSIO_CLOCK/2/4) + MCFG_SOUND_ADD("ay1", AY8910, SSIO_CLOCK/2/4) MCFG_SOUND_CONFIG(ssio_ay8910_interface_2) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.33) + MCFG_MIXER_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.33, 1) MACHINE_CONFIG_END +//------------------------------------------------- +// device_mconfig_additions - return a pointer to +// the device's machine fragment +//------------------------------------------------- -/************************************* - * - * Chip Squeak Deluxe communications - * - * MC68000, 1 PIA, 10-bit DAC - * - *************************************/ - -/********* internal interfaces ***********/ -static WRITE8_DEVICE_HANDLER( csdeluxe_porta_w ) +machine_config_constructor midway_ssio_device::device_mconfig_additions() const { - dacval = (dacval & ~0x3fc) | (data << 2); - dac_signed_data_16_w(device->machine().device("csddac"), dacval << 6); + return MACHINE_CONFIG_NAME( midway_ssio ); } -static WRITE8_DEVICE_HANDLER( csdeluxe_portb_w ) + +//------------------------------------------------- +// device_input_ports - return a pointer to +// the device's I/O ports +//------------------------------------------------- + +ioport_constructor midway_ssio_device::device_input_ports() const { - UINT8 z_mask = downcast(device)->port_b_z_mask(); - - dacval = (dacval & ~0x003) | (data >> 6); - dac_signed_data_16_w(device->machine().device("csddac"), dacval << 6); - - if (~z_mask & 0x10) csdeluxe_status = (csdeluxe_status & ~1) | ((data >> 4) & 1); - if (~z_mask & 0x20) csdeluxe_status = (csdeluxe_status & ~2) | ((data >> 4) & 2); + return NULL; +// return INPUT_PORTS_NAME( midway_ssio ); } -static WRITE_LINE_DEVICE_HANDLER( csdeluxe_irq ) -{ - pia6821_device *pia = downcast(device); - int combined_state = pia->irq_a_state() | pia->irq_b_state(); - device_set_input_line(csdeluxe_sound_cpu, 4, combined_state ? ASSERT_LINE : CLEAR_LINE); +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void midway_ssio_device::device_start() +{ + compute_ay8910_modulation(); + save_item(NAME(m_data)); + save_item(NAME(m_status)); + save_item(NAME(m_14024_count)); + save_item(NAME(m_mute)); + save_item(NAME(m_overall)); + save_item(NAME(m_duty_cycle)); } -static TIMER_CALLBACK( csdeluxe_delayed_data_w ) + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void midway_ssio_device::device_reset() { - pia6821_device *pia = machine.device("csdpia"); - - pia->portb_w(param & 0x0f); - pia->ca1_w(~param & 0x10); - - /* oftentimes games will write one nibble at a time; the sync on this is very */ - /* important, so we boost the interleave briefly while this happens */ - machine.scheduler().boost_interleave(attotime::zero, attotime::from_usec(100)); + // latches also get reset + memset(m_data, 0, sizeof(m_data)); + m_status = 0; + m_14024_count = 0; } -static READ16_DEVICE_HANDLER( csdeluxe_pia_r ) + +//------------------------------------------------- +// device_timer - timer callbacks +//------------------------------------------------- + +void midway_ssio_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) { - /* Spy Hunter accesses the MSB; Turbo Tag access via the LSB */ - /* My guess is that Turbo Tag works through a fluke, whereby the 68000 */ - /* using the MOVEP instruction outputs the same value on the high and */ - /* low bytes. */ - pia6821_device *pia = downcast(device); + m_data[param >> 8] = param & 0xff; +} + + + +//************************************************************************** +// CHIP SQUEAK DELUXE BOARD +//************************************************************************** + +//------------------------------------------------- +// midway_chip_squeak_deluxe_device - constructor +//------------------------------------------------- + +midway_chip_squeak_deluxe_device::midway_chip_squeak_deluxe_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, MIDWAY_CHIP_SQUEAK_DELUXE, "Midway Chip Squeak Deluxe Sound Board", "midcsd", tag, owner, clock), + device_mixer_interface(mconfig, *this), + m_cpu(*this, "cpu"), + m_pia(*this, "pia"), + m_dac(*this, "dac"), + m_status(0), + m_dacval(0) +{ +} + + +//------------------------------------------------- +// read - return the status value +//------------------------------------------------- + +READ8_MEMBER(midway_chip_squeak_deluxe_device::read) +{ + return m_status; +} + + +//------------------------------------------------- +// write - handle an external write to the input +// latch +//------------------------------------------------- + +WRITE8_MEMBER(midway_chip_squeak_deluxe_device::write) +{ + synchronize(0, data); +} + + +//------------------------------------------------- +// reset_write - write to the reset line +//------------------------------------------------- + +WRITE_LINE_MEMBER(midway_chip_squeak_deluxe_device::reset_write) +{ + m_cpu->set_input_line(INPUT_LINE_RESET, state ? ASSERT_LINE : CLEAR_LINE); +} + + +//------------------------------------------------- +// porta_w - PIA port A writes +//------------------------------------------------- + +WRITE8_MEMBER(midway_chip_squeak_deluxe_device::porta_w) +{ + m_dacval = (m_dacval & ~0x3fc) | (data << 2); + dac_signed_data_16_w(m_dac, m_dacval << 6); +} + + +//------------------------------------------------- +// portb_w - PIA port B writes +//------------------------------------------------- + +WRITE8_MEMBER(midway_chip_squeak_deluxe_device::portb_w) +{ + m_dacval = (m_dacval & ~0x003) | (data >> 6); + dac_signed_data_16_w(m_dac, m_dacval << 6); + + UINT8 z_mask = m_pia->port_b_z_mask(); + if (~z_mask & 0x10) m_status = (m_status & ~1) | ((data >> 4) & 1); + if (~z_mask & 0x20) m_status = (m_status & ~2) | ((data >> 4) & 2); +} + + +//------------------------------------------------- +// irq_w - IRQ line state changes +//------------------------------------------------- + +WRITE_LINE_MEMBER(midway_chip_squeak_deluxe_device::irq_w) +{ + int combined_state = m_pia->irq_a_state() | m_pia->irq_b_state(); + m_cpu->set_input_line(4, combined_state ? ASSERT_LINE : CLEAR_LINE); +} + + +//------------------------------------------------- +// pia_r - PIA read access +//------------------------------------------------- + +READ16_MEMBER(midway_chip_squeak_deluxe_device::pia_r) +{ + // Spy Hunter accesses the MSB; Turbo Tag access via the LSB + // My guess is that Turbo Tag works through a fluke, whereby the 68000 + // using the MOVEP instruction outputs the same value on the high and + // low bytes. if (ACCESSING_BITS_8_15) - return pia->read_alt(*device->machine().memory().first_space(), offset) << 8; + return m_pia->read_alt(space, offset) << 8; else - return pia->read_alt(*device->machine().memory().first_space(), offset); + return m_pia->read_alt(space, offset); } -static WRITE16_DEVICE_HANDLER( csdeluxe_pia_w ) + +//------------------------------------------------- +// pia_w - PIA write access +//------------------------------------------------- + +WRITE16_MEMBER(midway_chip_squeak_deluxe_device::pia_w) { - pia6821_device *pia = downcast(device); if (ACCESSING_BITS_8_15) - pia->write_alt(*device->machine().memory().first_space(), offset, data >> 8); + m_pia->write_alt(space, offset, data >> 8); else - pia->write_alt(*device->machine().memory().first_space(), offset, data); + m_pia->write_alt(space, offset, data); } -/********* external interfaces ***********/ -WRITE8_MEMBER(mcr_state::csdeluxe_data_w) -{ - machine().scheduler().synchronize(FUNC(csdeluxe_delayed_data_w), data); -} +//------------------------------------------------- +// audio CPU map +//------------------------------------------------- -READ8_MEMBER(mcr_state::csdeluxe_status_r) -{ - return csdeluxe_status; -} - -void csdeluxe_reset_w(running_machine &machine, int state) -{ - device_set_input_line(csdeluxe_sound_cpu, INPUT_LINE_RESET, state ? ASSERT_LINE : CLEAR_LINE); -} - - -/********* memory interfaces ***********/ - -/* address map determined by PAL; not verified */ -static ADDRESS_MAP_START( csdeluxe_map, AS_PROGRAM, 16, mcr_state ) +// address map determined by PAL; not verified +static ADDRESS_MAP_START( csdeluxe_map, AS_PROGRAM, 16, midway_chip_squeak_deluxe_device ) ADDRESS_MAP_UNMAP_HIGH ADDRESS_MAP_GLOBAL_MASK(0x1ffff) AM_RANGE(0x000000, 0x007fff) AM_ROM - AM_RANGE(0x018000, 0x018007) AM_DEVREADWRITE_LEGACY("csdpia", csdeluxe_pia_r, csdeluxe_pia_w) + AM_RANGE(0x018000, 0x018007) AM_READWRITE(pia_r, pia_w) AM_RANGE(0x01c000, 0x01cfff) AM_RAM ADDRESS_MAP_END -/********* PIA interfaces ***********/ +//------------------------------------------------- +// 6821 PIA interface +//------------------------------------------------- + static const pia6821_interface csdeluxe_pia_intf = { - DEVCB_NULL, /* port A in */ - DEVCB_NULL, /* port B in */ - DEVCB_NULL, /* line CA1 in */ - DEVCB_NULL, /* line CB1 in */ - DEVCB_NULL, /* line CA2 in */ - DEVCB_NULL, /* line CB2 in */ - DEVCB_HANDLER(csdeluxe_porta_w), /* port A out */ - DEVCB_HANDLER(csdeluxe_portb_w), /* port B out */ - DEVCB_NULL, /* line CA2 out */ - DEVCB_NULL, /* port CB2 out */ - DEVCB_LINE(csdeluxe_irq), /* IRQA */ - DEVCB_LINE(csdeluxe_irq) /* IRQB */ + DEVCB_NULL, // port A in + DEVCB_NULL, // port B in + DEVCB_NULL, // line CA1 in + DEVCB_NULL, // line CB1 in + DEVCB_NULL, // line CA2 in + DEVCB_NULL, // line CB2 in + DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, midway_chip_squeak_deluxe_device, porta_w), // port A out + DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, midway_chip_squeak_deluxe_device, portb_w), // port B out + DEVCB_NULL, // line CA2 out + DEVCB_NULL, // port CB2 out + DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, midway_chip_squeak_deluxe_device, irq_w), // IRQA + DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, midway_chip_squeak_deluxe_device, irq_w) // IRQB }; -/********* machine driver ***********/ -MACHINE_CONFIG_FRAGMENT(chip_squeak_deluxe) - MCFG_CPU_ADD("csdcpu", M68000, CSDELUXE_CLOCK/2) +//------------------------------------------------- +// machine configuration +//------------------------------------------------- + +MACHINE_CONFIG_FRAGMENT(midway_chip_squeak_deluxe) + MCFG_CPU_ADD("cpu", M68000, CSDELUXE_CLOCK/2) MCFG_CPU_PROGRAM_MAP(csdeluxe_map) - MCFG_PIA6821_ADD("csdpia", csdeluxe_pia_intf) + MCFG_PIA6821_ADD("pia", csdeluxe_pia_intf) - MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("csddac", DAC, 0) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) -MACHINE_CONFIG_END - -MACHINE_CONFIG_FRAGMENT(chip_squeak_deluxe_stereo) - MCFG_CPU_ADD("csdcpu", M68000, CSDELUXE_CLOCK/2) - MCFG_CPU_PROGRAM_MAP(csdeluxe_map) - - MCFG_PIA6821_ADD("csdpia", csdeluxe_pia_intf) - - MCFG_SOUND_ADD("csddac", DAC, 0) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) + MCFG_SOUND_ADD("dac", DAC, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 1.0) MACHINE_CONFIG_END +//------------------------------------------------- +// device_mconfig_additions - return a pointer to +// the device's machine fragment +//------------------------------------------------- -/************************************* - * - * MCR Sounds Good communications - * - * MC68000, 1 PIA, 10-bit DAC - * - *************************************/ - -/********* internal interfaces ***********/ -static WRITE8_DEVICE_HANDLER( soundsgood_porta_w ) +machine_config_constructor midway_chip_squeak_deluxe_device::device_mconfig_additions() const { - dacval = (dacval & ~0x3fc) | (data << 2); - dac_signed_data_16_w(device->machine().device("sgdac"), dacval << 6); -} - -static WRITE8_DEVICE_HANDLER( soundsgood_portb_w ) -{ - UINT8 z_mask = downcast(device)->port_b_z_mask(); - - dacval = (dacval & ~0x003) | (data >> 6); - dac_signed_data_16_w(device->machine().device("sgdac"), dacval << 6); - - if (~z_mask & 0x10) soundsgood_status = (soundsgood_status & ~1) | ((data >> 4) & 1); - if (~z_mask & 0x20) soundsgood_status = (soundsgood_status & ~2) | ((data >> 4) & 2); -} - -static WRITE_LINE_DEVICE_HANDLER( soundsgood_irq ) -{ - pia6821_device *pia = downcast(device); - int combined_state = pia->irq_a_state() | pia->irq_b_state(); - - device_set_input_line(soundsgood_sound_cpu, 4, combined_state ? ASSERT_LINE : CLEAR_LINE); -} - -static TIMER_CALLBACK( soundsgood_delayed_data_w ) -{ - pia6821_device *pia = machine.device("sgpia"); - - pia->portb_w((param >> 1) & 0x0f); - pia->ca1_w(~param & 0x01); - - /* oftentimes games will write one nibble at a time; the sync on this is very */ - /* important, so we boost the interleave briefly while this happens */ - machine.scheduler().boost_interleave(attotime::zero, attotime::from_usec(250)); + return MACHINE_CONFIG_NAME( midway_chip_squeak_deluxe ); } -/********* external interfaces ***********/ -WRITE8_MEMBER(mcr_state::soundsgood_data_w) +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void midway_chip_squeak_deluxe_device::device_start() { - machine().scheduler().synchronize(FUNC(soundsgood_delayed_data_w), data); + save_item(NAME(m_status)); + save_item(NAME(m_dacval)); } -READ8_MEMBER(mcr_state::soundsgood_status_r) + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void midway_chip_squeak_deluxe_device::device_reset() { - return soundsgood_status; } -void soundsgood_reset_w(running_machine &machine, int state) + +//------------------------------------------------- +// device_timer - timer callbacks +//------------------------------------------------- + +void midway_chip_squeak_deluxe_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) +{ + m_pia->portb_w(param & 0x0f); + m_pia->ca1_w(~param & 0x10); + + // oftentimes games will write one nibble at a time; the sync on this is very + // important, so we boost the interleave briefly while this happens + machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100)); +} + + + +//************************************************************************** +// SOUNDS GOOD BOARD +//************************************************************************** + +//------------------------------------------------- +// midway_sounds_good_device - constructor +//------------------------------------------------- + +midway_sounds_good_device::midway_sounds_good_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, MIDWAY_SOUNDS_GOOD, "Midway Sounds Good Sound Board", "midsg", tag, owner, clock), + device_mixer_interface(mconfig, *this), + m_cpu(*this, "cpu"), + m_pia(*this, "pia"), + m_dac(*this, "dac"), + m_status(0), + m_dacval(0) +{ +} + + +//------------------------------------------------- +// read - return the status value +//------------------------------------------------- + +READ8_MEMBER(midway_sounds_good_device::read) +{ + return m_status; +} + + +//------------------------------------------------- +// write - handle an external write to the input +// latch +//------------------------------------------------- + +WRITE8_MEMBER(midway_sounds_good_device::write) +{ + synchronize(0, data); +} + + +//------------------------------------------------- +// reset_write - write to the reset line +//------------------------------------------------- + +WRITE_LINE_MEMBER(midway_sounds_good_device::reset_write) { //if (state) mame_printf_debug("SG Reset\n"); - device_set_input_line(soundsgood_sound_cpu, INPUT_LINE_RESET, state ? ASSERT_LINE : CLEAR_LINE); + m_cpu->set_input_line(INPUT_LINE_RESET, state ? ASSERT_LINE : CLEAR_LINE); } -/********* memory interfaces ***********/ +//------------------------------------------------- +// porta_w - PIA port A writes +//------------------------------------------------- -/* address map determined by PAL; not verified */ -static ADDRESS_MAP_START( soundsgood_map, AS_PROGRAM, 16, mcr_state ) +WRITE8_MEMBER(midway_sounds_good_device::porta_w) +{ + m_dacval = (m_dacval & ~0x3fc) | (data << 2); + dac_signed_data_16_w(m_dac, m_dacval << 6); +} + + +//------------------------------------------------- +// portb_w - PIA port B writes +//------------------------------------------------- + +WRITE8_MEMBER(midway_sounds_good_device::portb_w) +{ + UINT8 z_mask = m_pia->port_b_z_mask(); + + m_dacval = (m_dacval & ~0x003) | (data >> 6); + dac_signed_data_16_w(m_dac, m_dacval << 6); + + if (~z_mask & 0x10) m_status = (m_status & ~1) | ((data >> 4) & 1); + if (~z_mask & 0x20) m_status = (m_status & ~2) | ((data >> 4) & 2); +} + + +//------------------------------------------------- +// irq_w - IRQ line state changes +//------------------------------------------------- + +WRITE_LINE_MEMBER(midway_sounds_good_device::irq_w) +{ + int combined_state = m_pia->irq_a_state() | m_pia->irq_b_state(); + m_cpu->set_input_line(4, combined_state ? ASSERT_LINE : CLEAR_LINE); +} + + +//------------------------------------------------- +// audio CPU map +//------------------------------------------------- + +// address map determined by PAL; not verified +static ADDRESS_MAP_START( soundsgood_map, AS_PROGRAM, 16, midway_sounds_good_device ) ADDRESS_MAP_UNMAP_HIGH ADDRESS_MAP_GLOBAL_MASK(0x7ffff) AM_RANGE(0x000000, 0x03ffff) AM_ROM - AM_RANGE(0x060000, 0x060007) AM_DEVREADWRITE8("sgpia", pia6821_device, read_alt, write_alt, 0xff00) + AM_RANGE(0x060000, 0x060007) AM_DEVREADWRITE8("pia", pia6821_device, read_alt, write_alt, 0xff00) AM_RANGE(0x070000, 0x070fff) AM_RAM ADDRESS_MAP_END -/********* PIA interfaces ***********/ +//------------------------------------------------- +// 6821 PIA interface +//------------------------------------------------- + static const pia6821_interface soundsgood_pia_intf = { - DEVCB_NULL, /* port A in */ - DEVCB_NULL, /* port B in */ - DEVCB_NULL, /* line CA1 in */ - DEVCB_NULL, /* line CB1 in */ - DEVCB_NULL, /* line CA2 in */ - DEVCB_NULL, /* line CB2 in */ - DEVCB_HANDLER(soundsgood_porta_w), /* port A out */ - DEVCB_HANDLER(soundsgood_portb_w), /* port B out */ - DEVCB_NULL, /* line CA2 out */ - DEVCB_NULL, /* port CB2 out */ - DEVCB_LINE(soundsgood_irq), /* IRQA */ - DEVCB_LINE(soundsgood_irq) /* IRQB */ + DEVCB_NULL, // port A in + DEVCB_NULL, // port B in + DEVCB_NULL, // line CA1 in + DEVCB_NULL, // line CB1 in + DEVCB_NULL, // line CA2 in + DEVCB_NULL, // line CB2 in + DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, midway_sounds_good_device, porta_w), // port A out + DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, midway_sounds_good_device, portb_w), // port B out + DEVCB_NULL, // line CA2 out + DEVCB_NULL, // port CB2 out + DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, midway_sounds_good_device, irq_w), // IRQA + DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, midway_sounds_good_device, irq_w) // IRQB }; -/********* machine driver ***********/ -MACHINE_CONFIG_FRAGMENT(sounds_good) - MCFG_CPU_ADD("sgcpu", M68000, SOUNDSGOOD_CLOCK/2) +//------------------------------------------------- +// machine configuration +//------------------------------------------------- + +MACHINE_CONFIG_FRAGMENT(midway_sounds_good) + MCFG_CPU_ADD("cpu", M68000, SOUNDSGOOD_CLOCK/2) MCFG_CPU_PROGRAM_MAP(soundsgood_map) - MCFG_PIA6821_ADD("sgpia", soundsgood_pia_intf) + MCFG_PIA6821_ADD("pia", soundsgood_pia_intf) - MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("sgdac", DAC, 0) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) + MCFG_SOUND_ADD("dac", DAC, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 1.0) MACHINE_CONFIG_END +//------------------------------------------------- +// device_mconfig_additions - return a pointer to +// the device's machine fragment +//------------------------------------------------- -/************************************* - * - * MCR Turbo Chip Squeak communications - * - * MC6809, 1 PIA, 10-bit DAC - * - *************************************/ - -/********* internal interfaces ***********/ -static WRITE8_DEVICE_HANDLER( turbocs_porta_w ) +machine_config_constructor midway_sounds_good_device::device_mconfig_additions() const { - dacval = (dacval & ~0x3fc) | (data << 2); - dac_signed_data_16_w(device->machine().device("tcsdac"), dacval << 6); -} - -static WRITE8_DEVICE_HANDLER( turbocs_portb_w ) -{ - dacval = (dacval & ~0x003) | (data >> 6); - dac_signed_data_16_w(device->machine().device("tcsdac"), dacval << 6); - turbocs_status = (data >> 4) & 3; -} - -static WRITE_LINE_DEVICE_HANDLER( turbocs_irq ) -{ - pia6821_device *pia = downcast(device); - int combined_state = pia->irq_a_state() | pia->irq_b_state(); - - device_set_input_line(turbocs_sound_cpu, M6809_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE); -} - -static TIMER_CALLBACK( turbocs_delayed_data_w ) -{ - pia6821_device *pia = machine.device("tcspia"); - - pia->portb_w((param >> 1) & 0x0f); - pia->ca1_w(~param & 0x01); - - /* oftentimes games will write one nibble at a time; the sync on this is very */ - /* important, so we boost the interleave briefly while this happens */ - machine.scheduler().boost_interleave(attotime::zero, attotime::from_usec(100)); + return MACHINE_CONFIG_NAME( midway_sounds_good ); } -/********* external interfaces ***********/ -WRITE8_MEMBER(mcr_state::turbocs_data_w) -{ - machine().scheduler().synchronize(FUNC(turbocs_delayed_data_w), data); -} +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- -READ8_MEMBER(mcr_state::turbocs_status_r) +void midway_sounds_good_device::device_start() { - return turbocs_status; -} - -void turbocs_reset_w(running_machine &machine, int state) -{ - device_set_input_line(turbocs_sound_cpu, INPUT_LINE_RESET, state ? ASSERT_LINE : CLEAR_LINE); + save_item(NAME(m_status)); + save_item(NAME(m_dacval)); } -/********* memory interfaces ***********/ +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- -/* address map verified from schematics */ -static ADDRESS_MAP_START( turbocs_map, AS_PROGRAM, 8, mcr_state ) +void midway_sounds_good_device::device_reset() +{ +} + + +//------------------------------------------------- +// device_timer - timer callbacks +//------------------------------------------------- + +void midway_sounds_good_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) +{ + m_pia->portb_w((param >> 1) & 0x0f); + m_pia->ca1_w(~param & 0x01); + + // oftentimes games will write one nibble at a time; the sync on this is very + // important, so we boost the interleave briefly while this happens + machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(250)); +} + + + +//************************************************************************** +// TURBO CHIP SQUEAK BOARD +//************************************************************************** + +//------------------------------------------------- +// midway_turbo_chip_squeak_device - constructor +//------------------------------------------------- + +midway_turbo_chip_squeak_device::midway_turbo_chip_squeak_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, MIDWAY_TURBO_CHIP_SQUEAK, "Midway Turbo Chip Squeak Sound Board", "midtcs", tag, owner, clock), + device_mixer_interface(mconfig, *this), + m_cpu(*this, "cpu"), + m_pia(*this, "pia"), + m_dac(*this, "dac"), + m_status(0), + m_dacval(0) +{ +} + + +//------------------------------------------------- +// read - return the status value +//------------------------------------------------- + +READ8_MEMBER(midway_turbo_chip_squeak_device::read) +{ + return m_status; +} + + +//------------------------------------------------- +// write - handle an external write to the input +// latch +//------------------------------------------------- + +WRITE8_MEMBER(midway_turbo_chip_squeak_device::write) +{ + synchronize(0, data); +} + + +//------------------------------------------------- +// reset_write - write to the reset line +//------------------------------------------------- + +WRITE_LINE_MEMBER(midway_turbo_chip_squeak_device::reset_write) +{ + m_cpu->set_input_line(INPUT_LINE_RESET, state ? ASSERT_LINE : CLEAR_LINE); +} + + +//------------------------------------------------- +// porta_w - PIA port A writes +//------------------------------------------------- + +WRITE8_MEMBER(midway_turbo_chip_squeak_device::porta_w) +{ + m_dacval = (m_dacval & ~0x3fc) | (data << 2); + dac_signed_data_16_w(m_dac, m_dacval << 6); +} + + +//------------------------------------------------- +// portb_w - PIA port B writes +//------------------------------------------------- + +WRITE8_MEMBER(midway_turbo_chip_squeak_device::portb_w) +{ + m_dacval = (m_dacval & ~0x003) | (data >> 6); + dac_signed_data_16_w(m_dac, m_dacval << 6); + m_status = (data >> 4) & 3; +} + + +//------------------------------------------------- +// irq_w - IRQ line state changes +//------------------------------------------------- + +WRITE_LINE_MEMBER(midway_turbo_chip_squeak_device::irq_w) +{ + int combined_state = m_pia->irq_a_state() | m_pia->irq_b_state(); + m_cpu->set_input_line(M6809_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE); +} + + +//------------------------------------------------- +// audio CPU map +//------------------------------------------------- + +// address map verified from schematics +static ADDRESS_MAP_START( turbocs_map, AS_PROGRAM, 8, midway_turbo_chip_squeak_device ) ADDRESS_MAP_UNMAP_HIGH AM_RANGE(0x0000, 0x07ff) AM_MIRROR(0x3800) AM_RAM - AM_RANGE(0x4000, 0x4003) AM_MIRROR(0x3ffc) AM_DEVREADWRITE("tcspia", pia6821_device, read_alt, write_alt) + AM_RANGE(0x4000, 0x4003) AM_MIRROR(0x3ffc) AM_DEVREADWRITE("pia", pia6821_device, read_alt, write_alt) AM_RANGE(0x8000, 0xffff) AM_ROM ADDRESS_MAP_END -/********* PIA interfaces ***********/ +//------------------------------------------------- +// 6821 PIA interface +//------------------------------------------------- + static const pia6821_interface turbocs_pia_intf = { - DEVCB_NULL, /* port A in */ - DEVCB_NULL, /* port B in */ - DEVCB_NULL, /* line CA1 in */ - DEVCB_NULL, /* line CB1 in */ - DEVCB_NULL, /* line CA2 in */ - DEVCB_NULL, /* line CB2 in */ - DEVCB_HANDLER(turbocs_porta_w), /* port A out */ - DEVCB_HANDLER(turbocs_portb_w), /* port B out */ - DEVCB_NULL, /* line CA2 out */ - DEVCB_NULL, /* port CB2 out */ - DEVCB_LINE(turbocs_irq), /* IRQA */ - DEVCB_LINE(turbocs_irq) /* IRQB */ + DEVCB_NULL, // port A in + DEVCB_NULL, // port B in + DEVCB_NULL, // line CA1 in + DEVCB_NULL, // line CB1 in + DEVCB_NULL, // line CA2 in + DEVCB_NULL, // line CB2 in + DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, midway_turbo_chip_squeak_device, porta_w), // port A out + DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, midway_turbo_chip_squeak_device, portb_w), // port B out + DEVCB_NULL, // line CA2 out + DEVCB_NULL, // port CB2 out + DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, midway_turbo_chip_squeak_device, irq_w), // IRQA + DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, midway_turbo_chip_squeak_device, irq_w) // IRQB }; -/********* machine driver ***********/ -MACHINE_CONFIG_FRAGMENT(turbo_chip_squeak) - MCFG_CPU_ADD("tcscpu", M6809E, TURBOCS_CLOCK) +//------------------------------------------------- +// machine configuration +//------------------------------------------------- + +MACHINE_CONFIG_FRAGMENT(midway_turbo_chip_squeak) + MCFG_CPU_ADD("cpu", M6809E, TURBOCS_CLOCK) MCFG_CPU_PROGRAM_MAP(turbocs_map) - MCFG_PIA6821_ADD("tcspia", turbocs_pia_intf) + MCFG_PIA6821_ADD("pia", turbocs_pia_intf) - MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("tcsdac", DAC, 0) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) + MCFG_SOUND_ADD("dac", DAC, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 1.0) MACHINE_CONFIG_END +//------------------------------------------------- +// device_mconfig_additions - return a pointer to +// the device's machine fragment +//------------------------------------------------- -/************************************* - * - * MCR Squawk n Talk communications - * - * MC6802, 2 PIAs, TMS5200, AY8912 (not used), 8-bit DAC (not used) - * - *************************************/ +machine_config_constructor midway_turbo_chip_squeak_device::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( midway_turbo_chip_squeak ); +} -/********* internal interfaces ***********/ -static WRITE8_DEVICE_HANDLER( squawkntalk_porta1_w ) + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void midway_turbo_chip_squeak_device::device_start() +{ + save_item(NAME(m_status)); + save_item(NAME(m_dacval)); +} + + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void midway_turbo_chip_squeak_device::device_reset() +{ +} + + +//------------------------------------------------- +// device_timer - timer callbacks +//------------------------------------------------- + +void midway_turbo_chip_squeak_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) +{ + m_pia->portb_w((param >> 1) & 0x0f); + m_pia->ca1_w(~param & 0x01); + + // oftentimes games will write one nibble at a time; the sync on this is very + // important, so we boost the interleave briefly while this happens + machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100)); +} + + +//************************************************************************** +// SQUAWK 'N' TALK BOARD +//************************************************************************** + +//------------------------------------------------- +// midway_squawk_n_talk_device - constructor +//------------------------------------------------- + +midway_squawk_n_talk_device::midway_squawk_n_talk_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, MIDWAY_SQUAWK_N_TALK, "Midway Squawk 'n' Talk Sound Board", "midsnt", tag, owner, clock), + device_mixer_interface(mconfig, *this), + m_cpu(*this, "cpu"), + m_pia0(*this, "pia0"), + m_pia1(*this, "pia1"), + m_tms5200(*this, "tms5200"), + m_tms_command(0), + m_tms_strobes(0) +{ +} + + +//------------------------------------------------- +// write - handle an external write to the input +// latch +//------------------------------------------------- + +WRITE8_MEMBER(midway_squawk_n_talk_device::write) +{ + synchronize(0, data); +} + + +//------------------------------------------------- +// reset_write - write to the reset line +//------------------------------------------------- + +WRITE_LINE_MEMBER(midway_squawk_n_talk_device::reset_write) +{ + m_cpu->set_input_line(INPUT_LINE_RESET, state ? ASSERT_LINE : CLEAR_LINE); +} + + +//------------------------------------------------- +// porta1_w - PIA #1 port A writes +//------------------------------------------------- + +WRITE8_MEMBER(midway_squawk_n_talk_device::porta1_w ) { logerror("Write to AY-8912 = %02X\n", data); } -WRITE8_MEMBER(mcr_state::squawkntalk_dac_w) + +//------------------------------------------------- +// dac_w - DAC data writes +//------------------------------------------------- + +WRITE8_MEMBER(midway_squawk_n_talk_device::dac_w) { logerror("Write to DAC = %02X\n", data); } -static WRITE8_DEVICE_HANDLER( squawkntalk_porta2_w ) + +//------------------------------------------------- +// porta2_w - PIA #2 port A writes +//------------------------------------------------- + +WRITE8_MEMBER(midway_squawk_n_talk_device::porta2_w) { - squawkntalk_tms_command = data; + m_tms_command = data; } -static WRITE8_DEVICE_HANDLER( squawkntalk_portb2_w ) -{ - device_t *tms = device->machine().device("sntspeech"); - pia6821_device *pia = downcast(device); - /* bits 0-1 select read/write strobes on the TMS5200 */ +//------------------------------------------------- +// portb2_w - PIA #2 port B writes +//------------------------------------------------- + +WRITE8_MEMBER(midway_squawk_n_talk_device::portb2_w) +{ + // bits 0-1 select read/write strobes on the TMS5200 data &= 0x03; - /* write strobe -- pass the current command to the TMS5200 */ - if (((data ^ squawkntalk_tms_strobes) & 0x02) && !(data & 0x02)) + // write strobe -- pass the current command to the TMS5200 + if (((data ^ m_tms_strobes) & 0x02) && !(data & 0x02)) { - tms5220_data_w(tms, offset, squawkntalk_tms_command); + tms5220_data_w(m_tms5200, offset, m_tms_command); - /* DoT expects the ready line to transition on a command/write here, so we oblige */ - pia->ca2_w(1); - pia->ca2_w(0); + // DoT expects the ready line to transition on a command/write here, so we oblige + m_pia1->ca2_w(1); + m_pia1->ca2_w(0); } - /* read strobe -- read the current status from the TMS5200 */ - else if (((data ^ squawkntalk_tms_strobes) & 0x01) && !(data & 0x01)) + // read strobe -- read the current status from the TMS5200 + else if (((data ^ m_tms_strobes) & 0x01) && !(data & 0x01)) { - pia->porta_w(tms5220_status_r(tms, offset)); + m_pia1->porta_w(tms5220_status_r(m_tms5200, offset)); - /* DoT expects the ready line to transition on a command/write here, so we oblige */ - pia->ca2_w(1); - pia->ca2_w(0); + // DoT expects the ready line to transition on a command/write here, so we oblige + m_pia1->ca2_w(1); + m_pia1->ca2_w(0); } - /* remember the state */ - squawkntalk_tms_strobes = data; + // remember the state + m_tms_strobes = data; } -static WRITE_LINE_DEVICE_HANDLER( squawkntalk_irq ) + +//------------------------------------------------- +// irq_w - IRQ line state changes +//------------------------------------------------- + +WRITE_LINE_MEMBER(midway_squawk_n_talk_device::irq_w) { - pia6821_device *pia0 = device->machine().device("sntpia0"); - pia6821_device *pia1 = device->machine().device("sntpia1"); - int combined_state = pia0->irq_a_state() | pia0->irq_b_state() | pia1->irq_a_state() | pia1->irq_b_state(); - - device_set_input_line(squawkntalk_sound_cpu, M6800_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE); -} - -static TIMER_CALLBACK( squawkntalk_delayed_data_w ) -{ - pia6821_device *pia0 = machine.device("sntpia0"); - - pia0->porta_w(~param & 0x0f); - pia0->cb1_w(~param & 0x10); + int combined_state = m_pia0->irq_a_state() | m_pia0->irq_b_state() | m_pia1->irq_a_state() | m_pia1->irq_b_state(); + m_cpu->set_input_line(M6800_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE); } -/********* external interfaces ***********/ -WRITE8_MEMBER(mcr_state::squawkntalk_data_w) -{ - machine().scheduler().synchronize(FUNC(squawkntalk_delayed_data_w), data); -} +//------------------------------------------------- +// audio CPU map +//------------------------------------------------- -void squawkntalk_reset_w(running_machine &machine, int state) -{ - device_set_input_line(squawkntalk_sound_cpu, INPUT_LINE_RESET, state ? ASSERT_LINE : CLEAR_LINE); -} - - -/********* memory interfaces ***********/ - -/* address map verified from schematics */ -/* note that jumpers control the ROM sizes; if these are changed, use the alternate */ -/* address map below */ -static ADDRESS_MAP_START( squawkntalk_map, AS_PROGRAM, 8, mcr_state ) +// address map verified from schematics +// note that jumpers control the ROM sizes; if these are changed, use the alternate +// address map below +static ADDRESS_MAP_START( squawkntalk_map, AS_PROGRAM, 8, midway_squawk_n_talk_device ) ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x0000, 0x007f) AM_RAM /* internal RAM */ - AM_RANGE(0x0080, 0x0083) AM_MIRROR(0x4f6c) AM_DEVREADWRITE("sntpia0", pia6821_device, read, write) - AM_RANGE(0x0090, 0x0093) AM_MIRROR(0x4f6c) AM_DEVREADWRITE("sntpia1", pia6821_device, read, write) - AM_RANGE(0x1000, 0x1fff) AM_MIRROR(0x4000) AM_WRITE(squawkntalk_dac_w) + AM_RANGE(0x0000, 0x007f) AM_RAM // internal RAM + AM_RANGE(0x0080, 0x0083) AM_MIRROR(0x4f6c) AM_DEVREADWRITE("pia0", pia6821_device, read, write) + AM_RANGE(0x0090, 0x0093) AM_MIRROR(0x4f6c) AM_DEVREADWRITE("pia1", pia6821_device, read, write) + AM_RANGE(0x1000, 0x1fff) AM_MIRROR(0x4000) AM_WRITE(dac_w) AM_RANGE(0x8000, 0xbfff) AM_MIRROR(0x4000) AM_ROM ADDRESS_MAP_END -/* alternate address map if the ROM jumpers are changed to support a smaller */ -/* ROM size of 2k */ +// alternate address map if the ROM jumpers are changed to support a smaller +// ROM size of 2k #ifdef UNUSED_FUNCTION -ADDRESS_MAP_START( squawkntalk_alt_map, AS_PROGRAM, 8, mcr_state ) +static ADDRESS_MAP_START( squawkntalk_alt_map, AS_PROGRAM, 8, midway_squawk_n_talk_device ) ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x0000, 0x007f) AM_RAM /* internal RAM */ - AM_RANGE(0x0080, 0x0083) AM_MIRROR(0x676c) AM_DEVREADWRITE("sntpia0", pia6821_device, read, write) - AM_RANGE(0x0090, 0x0093) AM_MIRROR(0x676c) AM_DEVREADWRITE("sntpia1", pia6821_device, read, write) - AM_RANGE(0x0800, 0x0fff) AM_MIRROR(0x6000) AM_WRITE(squawkntalk_dac_w) + AM_RANGE(0x0000, 0x007f) AM_RAM // internal RAM + AM_RANGE(0x0080, 0x0083) AM_MIRROR(0x676c) AM_DEVREADWRITE("pia0", pia6821_device, read, write) + AM_RANGE(0x0090, 0x0093) AM_MIRROR(0x676c) AM_DEVREADWRITE("pia1", pia6821_device, read, write) + AM_RANGE(0x0800, 0x0fff) AM_MIRROR(0x6000) AM_WRITE(dac_w) AM_RANGE(0x8000, 0x9fff) AM_MIRROR(0x6000) AM_ROM ADDRESS_MAP_END #endif -/********* PIA interfaces ***********/ +//------------------------------------------------- +// 6821 PIA interfaces +//------------------------------------------------- + static const pia6821_interface squawkntalk_pia0_intf = { - DEVCB_NULL, /* port A in */ - DEVCB_NULL, /* port B in */ - DEVCB_NULL, /* line CA1 in */ - DEVCB_NULL, /* line CB1 in */ - DEVCB_NULL, /* line CA2 in */ - DEVCB_NULL, /* line CB2 in */ - DEVCB_HANDLER(squawkntalk_porta1_w), /* port A out */ - DEVCB_NULL, /* port B out */ - DEVCB_NULL, /* line CA2 out */ - DEVCB_NULL, /* port CB2 out */ - DEVCB_LINE(squawkntalk_irq), /* IRQA */ - DEVCB_LINE(squawkntalk_irq) /* IRQB */ + DEVCB_NULL, // port A in + DEVCB_NULL, // port B in + DEVCB_NULL, // line CA1 in + DEVCB_NULL, // line CB1 in + DEVCB_NULL, // line CA2 in + DEVCB_NULL, // line CB2 in + DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, midway_squawk_n_talk_device, porta1_w), // port A out + DEVCB_NULL, // port B out + DEVCB_NULL, // line CA2 out + DEVCB_NULL, // port CB2 out + DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, midway_squawk_n_talk_device, irq_w), // IRQA + DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, midway_squawk_n_talk_device, irq_w) // IRQB }; static const pia6821_interface squawkntalk_pia1_intf = { - DEVCB_NULL, /* port A in */ - DEVCB_NULL, /* port B in */ - DEVCB_NULL, /* line CA1 in */ - DEVCB_NULL, /* line CB1 in */ - DEVCB_NULL, /* line CA2 in */ - DEVCB_NULL, /* line CB2 in */ - DEVCB_HANDLER(squawkntalk_porta2_w), /* port A out */ - DEVCB_HANDLER(squawkntalk_portb2_w), /* port B out */ - DEVCB_NULL, /* line CA2 out */ - DEVCB_NULL, /* port CB2 out */ - DEVCB_LINE(squawkntalk_irq), /* IRQA */ - DEVCB_LINE(squawkntalk_irq) /* IRQB */ + DEVCB_NULL, // port A in + DEVCB_NULL, // port B in + DEVCB_NULL, // line CA1 in + DEVCB_NULL, // line CB1 in + DEVCB_NULL, // line CA2 in + DEVCB_NULL, // line CB2 in + DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, midway_squawk_n_talk_device, porta2_w), // port A out + DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, midway_squawk_n_talk_device, portb2_w), // port B out + DEVCB_NULL, // line CA2 out + DEVCB_NULL, // port CB2 out + DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, midway_squawk_n_talk_device, irq_w), // IRQA + DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, midway_squawk_n_talk_device, irq_w) // IRQB }; -/********* machine driver ***********/ -MACHINE_CONFIG_FRAGMENT(squawk_n_talk) - MCFG_CPU_ADD("sntcpu", M6802, SQUAWKTALK_CLOCK) +//------------------------------------------------- +// machine configuration +//------------------------------------------------- + +MACHINE_CONFIG_FRAGMENT(midway_squawk_n_talk) + MCFG_CPU_ADD("cpu", M6802, SQUAWKTALK_CLOCK) MCFG_CPU_PROGRAM_MAP(squawkntalk_map) - MCFG_PIA6821_ADD("sntpia0", squawkntalk_pia0_intf) - MCFG_PIA6821_ADD("sntpia1", squawkntalk_pia1_intf) + MCFG_PIA6821_ADD("pia0", squawkntalk_pia0_intf) + MCFG_PIA6821_ADD("pia1", squawkntalk_pia1_intf) - /* only used on Discs of Tron, which is stereo */ - MCFG_SOUND_ADD("sntspeech", TMS5200, 640000) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.60) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.60) + // only used on Discs of Tron, which is stereo + MCFG_SOUND_ADD("tms5200", TMS5200, 640000) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.60) - /* the board also supports an AY-8912 and/or an 8-bit DAC, neither of */ - /* which are populated on the Discs of Tron board */ + // the board also supports an AY-8912 and/or an 8-bit DAC, neither of + // which are populated on the Discs of Tron board MACHINE_CONFIG_END + + +//------------------------------------------------- +// device_mconfig_additions - return a pointer to +// the device's machine fragment +//------------------------------------------------- + +machine_config_constructor midway_squawk_n_talk_device::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( midway_squawk_n_talk ); +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void midway_squawk_n_talk_device::device_start() +{ + save_item(NAME(m_tms_command)); + save_item(NAME(m_tms_strobes)); +} + + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void midway_squawk_n_talk_device::device_reset() +{ +} + + +//------------------------------------------------- +// device_timer - timer callbacks +//------------------------------------------------- + +void midway_squawk_n_talk_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) +{ + m_pia0->porta_w(~param & 0x0f); + m_pia0->cb1_w(~param & 0x10); +} diff --git a/src/mame/audio/mcr.h b/src/mame/audio/mcr.h index afb371082dd..3dbc52f9d7b 100644 --- a/src/mame/audio/mcr.h +++ b/src/mame/audio/mcr.h @@ -2,12 +2,312 @@ audio/mcr.h - Functions to emulate general the various MCR sound cards. + Functions to emulate general the various Midway sound cards. + +**************************************************************************** + + Copyright Aaron Giles + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + * Neither the name 'MAME' nor the names of its contributors may be + used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. ***************************************************************************/ -#include "machine/6821pia.h" +#pragma once +#ifndef __MIDWAY_AUDIO__ +#define __MIDWAY_AUDIO__ + +#include "cpu/z80/z80.h" +#include "cpu/m68000/m68000.h" +#include "cpu/m6800/m6800.h" +#include "cpu/m6809/m6809.h" +#include "machine/6821pia.h" +#include "sound/tms5220.h" +#include "sound/ay8910.h" +#include "sound/dac.h" + + +//************************************************************************** +// GLOBAL VARIABLES +//************************************************************************** + +extern const device_type MIDWAY_SSIO; +extern const device_type MIDWAY_CHIP_SQUEAK_DELUXE; +extern const device_type MIDWAY_SOUNDS_GOOD; +extern const device_type MIDWAY_TURBO_CHIP_SQUEAK; +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 +//************************************************************************** + +// ======================> midway_ssio_device + +class midway_ssio_device : public device_t, + public device_mixer_interface +{ +public: + // construction/destruction + midway_ssio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // read/write + DECLARE_READ8_MEMBER(read); + DECLARE_WRITE8_MEMBER(write); + DECLARE_WRITE_LINE_MEMBER(reset_write); + DECLARE_READ8_MEMBER(ioport_read); + DECLARE_WRITE8_MEMBER(ioport_write); + + // configuration + void set_custom_input(int which, UINT8 mask, read8_delegate handler); + void set_custom_output(int which, UINT8 mask, write8_delegate handler); + + // internal communications + INTERRUPT_GEN_MEMBER(clock_14024); + READ8_MEMBER(irq_clear); + DECLARE_WRITE8_MEMBER(status_w); + DECLARE_READ8_MEMBER(data_r); + DECLARE_WRITE8_MEMBER(porta0_w); + DECLARE_WRITE8_MEMBER(portb0_w); + DECLARE_WRITE8_MEMBER(porta1_w); + DECLARE_WRITE8_MEMBER(portb1_w); + +protected: + // device-level overrides + virtual machine_config_constructor device_mconfig_additions() const; + virtual ioport_constructor device_input_ports() const; + virtual void device_start(); + virtual void device_reset(); + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); + +private: + // internal helpers + void compute_ay8910_modulation(); + void update_volumes(); + + // devices + required_device m_cpu; + required_device m_ay0; + required_device m_ay1; + + // internal state + UINT8 m_data[4]; + UINT8 m_status; + UINT8 m_14024_count; + UINT8 m_mute; + UINT8 m_overall[2]; + UINT8 m_duty_cycle[2][3]; + UINT8 m_ayvolume_lookup[16]; + + // I/O port overrides + UINT8 m_custom_input_mask[5]; + read8_delegate m_custom_input[5]; + UINT8 m_custom_output_mask[2]; + write8_delegate m_custom_output[2]; +}; + + +// ======================> midway_chip_squeak_deluxe_device + +class midway_chip_squeak_deluxe_device : public device_t, + public device_mixer_interface +{ +public: + // construction/destruction + midway_chip_squeak_deluxe_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // read/write + DECLARE_READ8_MEMBER(read); + DECLARE_WRITE8_MEMBER(write); + DECLARE_WRITE_LINE_MEMBER(reset_write); + + // internal communications + DECLARE_WRITE8_MEMBER(porta_w); + DECLARE_WRITE8_MEMBER(portb_w); + DECLARE_WRITE_LINE_MEMBER(irq_w); + DECLARE_READ16_MEMBER(pia_r); + DECLARE_WRITE16_MEMBER(pia_w); + +protected: + // device-level overrides + virtual machine_config_constructor device_mconfig_additions() const; + virtual void device_start(); + virtual void device_reset(); + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); + +private: + // devices + required_device m_cpu; + required_device m_pia; + required_device m_dac; + + // internal state + UINT8 m_status; + UINT16 m_dacval; +}; + + +// ======================> midway_sounds_good_device + +class midway_sounds_good_device : public device_t, + public device_mixer_interface +{ +public: + // construction/destruction + midway_sounds_good_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // read/write + DECLARE_READ8_MEMBER(read); + DECLARE_WRITE8_MEMBER(write); + DECLARE_WRITE_LINE_MEMBER(reset_write); + + // internal communications + DECLARE_WRITE8_MEMBER(porta_w); + DECLARE_WRITE8_MEMBER(portb_w); + DECLARE_WRITE_LINE_MEMBER(irq_w); + +protected: + // device-level overrides + virtual machine_config_constructor device_mconfig_additions() const; + virtual void device_start(); + virtual void device_reset(); + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); + +private: + // devices + required_device m_cpu; + required_device m_pia; + required_device m_dac; + + // internal state + UINT8 m_status; + UINT16 m_dacval; +}; + + +// ======================> midway_turbo_chip_squeak_device + +class midway_turbo_chip_squeak_device : public device_t, + public device_mixer_interface +{ +public: + // construction/destruction + midway_turbo_chip_squeak_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // read/write + DECLARE_READ8_MEMBER(read); + DECLARE_WRITE8_MEMBER(write); + DECLARE_WRITE_LINE_MEMBER(reset_write); + + // internal communications + DECLARE_WRITE8_MEMBER(porta_w); + DECLARE_WRITE8_MEMBER(portb_w); + DECLARE_WRITE_LINE_MEMBER(irq_w); + +protected: + // device-level overrides + virtual machine_config_constructor device_mconfig_additions() const; + virtual void device_start(); + virtual void device_reset(); + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); + +private: + // devices + required_device m_cpu; + required_device m_pia; + required_device m_dac; + + // internal state + UINT8 m_status; + UINT16 m_dacval; +}; + + +// ======================> midway_squawk_n_talk_device + +class midway_squawk_n_talk_device : public device_t, + public device_mixer_interface +{ +public: + // construction/destruction + midway_squawk_n_talk_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // read/write + DECLARE_WRITE8_MEMBER(write); + DECLARE_WRITE_LINE_MEMBER(reset_write); + + // internal communications + DECLARE_WRITE8_MEMBER(porta1_w); + DECLARE_WRITE8_MEMBER(dac_w); + DECLARE_WRITE8_MEMBER(porta2_w); + DECLARE_WRITE8_MEMBER(portb2_w); + DECLARE_WRITE_LINE_MEMBER(irq_w); + +protected: + // device-level overrides + virtual machine_config_constructor device_mconfig_additions() const; + virtual void device_start(); + virtual void device_reset(); + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); + +private: + // devices + required_device m_cpu; + required_device m_pia0; + required_device m_pia1; + optional_device m_tms5200; + + // internal state + UINT8 m_tms_command; + UINT8 m_tms_strobes; +}; /************ Generic MCR routines ***************/ @@ -15,18 +315,6 @@ void mcr_sound_init(running_machine &machine, UINT8 config); void mcr_sound_reset(running_machine &machine); -void ssio_reset_w(running_machine &machine, int state); -void ssio_set_custom_input(int which, int mask, read8_delegate handler); -void ssio_set_custom_output(int which, int mask, write8_delegate handler); - -void csdeluxe_reset_w(running_machine &machine, int state); - -void turbocs_reset_w(running_machine &machine, int state); - -void soundsgood_reset_w(running_machine &machine, int state); - -void squawkntalk_reset_w(running_machine &machine, int state); - /************ Sound Configuration ***************/ @@ -42,19 +330,11 @@ void squawkntalk_reset_w(running_machine &machine, int state); /************ SSIO input ports ***************/ -#define SSIO_INPUT_PORTS \ - AM_RANGE(0x00, 0x04) AM_MIRROR(0x18) AM_READ(ssio_input_port_r) \ - AM_RANGE(0x07, 0x07) AM_MIRROR(0x18) AM_READ(ssio_status_r) \ - AM_RANGE(0x00, 0x07) AM_MIRROR(0x03) AM_WRITE(ssio_output_port_w) \ - AM_RANGE(0x1c, 0x1f) AM_WRITE(ssio_data_w) +#define SSIO_INPUT_PORTS(ssio) \ + AM_RANGE(0x00, 0x04) AM_MIRROR(0x18) AM_DEVREAD(ssio, midway_ssio_device, ioport_read) \ + AM_RANGE(0x07, 0x07) AM_MIRROR(0x18) AM_DEVREAD(ssio, midway_ssio_device, read) \ + AM_RANGE(0x00, 0x07) AM_MIRROR(0x03) AM_DEVWRITE(ssio, midway_ssio_device, ioport_write) \ + AM_RANGE(0x1c, 0x1f) AM_DEVWRITE(ssio, midway_ssio_device, write) - -/************ External definitions ***************/ - -MACHINE_CONFIG_EXTERN( mcr_ssio ); -MACHINE_CONFIG_EXTERN( chip_squeak_deluxe ); -MACHINE_CONFIG_EXTERN( chip_squeak_deluxe_stereo ); -MACHINE_CONFIG_EXTERN( sounds_good ); -MACHINE_CONFIG_EXTERN( turbo_chip_squeak ); -MACHINE_CONFIG_EXTERN( squawk_n_talk ); +#endif /* __MIDWAY_AUDIO__ */ diff --git a/src/mame/drivers/mcr.c b/src/mame/drivers/mcr.c index 252387f6c6d..6f008f69999 100644 --- a/src/mame/drivers/mcr.c +++ b/src/mame/drivers/mcr.c @@ -302,6 +302,27 @@ static UINT8 nflfoot_serial_in_numbits; +WRITE8_MEMBER(mcr_state::mcr_control_port_w) +{ + /* + Bit layout is as follows: + D7 = n/c + D6 = cocktail flip + D5 = red LED + D4 = green LED + D3 = n/c + D2 = coin meter 3 + D1 = coin meter 2 + D0 = coin meter 1 + */ + + coin_counter_w(machine(), 0, (data >> 0) & 1); + coin_counter_w(machine(), 1, (data >> 1) & 1); + coin_counter_w(machine(), 2, (data >> 2) & 1); + mcr_cocktail_flip = (data >> 6) & 1; +} + + /************************************* * * Solar Fox input ports @@ -316,9 +337,9 @@ READ8_MEMBER(mcr_state::solarfox_ip0_r) /* game in cocktail mode, they don't work at all. So we fake-mux */ /* the controls through player 1's ports */ if (mcr_cocktail_flip) - return input_port_read(machine(), "SSIO.IP0") | 0x08; + return input_port_read(machine(), "ssio:IP0") | 0x08; else - return ((input_port_read(machine(), "SSIO.IP0") & ~0x14) | 0x08) | ((input_port_read(machine(), "SSIO.IP0") & 0x08) >> 1) | ((input_port_read(machine(), "SSIO.IP2") & 0x01) << 4); + return ((input_port_read(machine(), "ssio:IP0") & ~0x14) | 0x08) | ((input_port_read(machine(), "ssio:IP0") & 0x08) >> 1) | ((input_port_read(machine(), "ssio:IP2") & 0x01) << 4); } @@ -326,9 +347,9 @@ READ8_MEMBER(mcr_state::solarfox_ip1_r) { /* same deal as above */ if (mcr_cocktail_flip) - return input_port_read(machine(), "SSIO.IP1") | 0xf0; + return input_port_read(machine(), "ssio:IP1") | 0xf0; else - return (input_port_read(machine(), "SSIO.IP1") >> 4) | 0xf0; + return (input_port_read(machine(), "ssio:IP1") >> 4) | 0xf0; } @@ -361,18 +382,18 @@ WRITE8_MEMBER(mcr_state::wacko_op4_w) READ8_MEMBER(mcr_state::wacko_ip1_r) { if (!input_mux) - return input_port_read(machine(), "SSIO.IP1"); + return input_port_read(machine(), "ssio:IP1"); else - return input_port_read(machine(), "SSIO.IP1.ALT"); + return input_port_read(machine(), "ssio:IP1.ALT"); } READ8_MEMBER(mcr_state::wacko_ip2_r) { if (!input_mux) - return input_port_read(machine(), "SSIO.IP2"); + return input_port_read(machine(), "ssio:IP2"); else - return input_port_read(machine(), "SSIO.IP2.ALT"); + return input_port_read(machine(), "ssio:IP2.ALT"); } @@ -512,7 +533,7 @@ WRITE8_MEMBER(mcr_state::dotron_op4_w) /* bit 4 = SEL0 (J1-8) on squawk n talk board */ /* bits 3-0 = MD3-0 connected to squawk n talk (J1-4,3,2,1) */ - squawkntalk_data_w(space, offset, data); + m_squawk_n_talk->write(space, offset, data); } @@ -595,7 +616,7 @@ WRITE8_MEMBER(mcr_state::nflfoot_op4_w) /* bit 4 = SEL0 (J1-8) on squawk n talk board */ /* bits 3-0 = MD3-0 connected to squawk n talk (J1-4,3,2,1) */ - squawkntalk_data_w(space, offset, data); + m_squawk_n_talk->write(space, offset, data); } @@ -608,15 +629,15 @@ WRITE8_MEMBER(mcr_state::nflfoot_op4_w) READ8_MEMBER(mcr_state::demoderb_ip1_r) { - return input_port_read(machine(), "SSIO.IP1") | - (input_port_read(machine(), input_mux ? "SSIO.IP1.ALT2" : "SSIO.IP1.ALT1") << 2); + return input_port_read(machine(), "ssio:IP1") | + (input_port_read(machine(), input_mux ? "ssio:IP1.ALT2" : "ssio:IP1.ALT1") << 2); } READ8_MEMBER(mcr_state::demoderb_ip2_r) { - return input_port_read(machine(), "SSIO.IP2") | - (input_port_read(machine(), input_mux ? "SSIO.IP2.ALT2" : "SSIO.IP2.ALT1") << 2); + return input_port_read(machine(), "ssio:IP2") | + (input_port_read(machine(), input_mux ? "ssio:IP2.ALT2" : "ssio:IP2.ALT1") << 2); } @@ -624,7 +645,7 @@ WRITE8_MEMBER(mcr_state::demoderb_op4_w) { if (data & 0x40) input_mux = 1; if (data & 0x80) input_mux = 0; - turbocs_data_w(space, offset, data); + m_turbo_chip_squeak->write(space, offset, data); } @@ -650,7 +671,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( cpu_90009_portmap, AS_IO, 8, mcr_state ) ADDRESS_MAP_UNMAP_HIGH ADDRESS_MAP_GLOBAL_MASK(0xff) - SSIO_INPUT_PORTS + SSIO_INPUT_PORTS("ssio") AM_RANGE(0xe0, 0xe0) AM_WRITE(watchdog_reset_w) AM_RANGE(0xe8, 0xe8) AM_WRITENOP AM_RANGE(0xf0, 0xf3) AM_DEVREADWRITE_LEGACY("ctc", z80ctc_r, z80ctc_w) @@ -677,7 +698,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( cpu_90010_portmap, AS_IO, 8, mcr_state ) ADDRESS_MAP_UNMAP_HIGH ADDRESS_MAP_GLOBAL_MASK(0xff) - SSIO_INPUT_PORTS + SSIO_INPUT_PORTS("ssio") AM_RANGE(0xe0, 0xe0) AM_WRITE(watchdog_reset_w) AM_RANGE(0xe8, 0xe8) AM_WRITENOP AM_RANGE(0xf0, 0xf3) AM_DEVREADWRITE_LEGACY("ctc", z80ctc_r, z80ctc_w) @@ -705,7 +726,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( cpu_91490_portmap, AS_IO, 8, mcr_state ) ADDRESS_MAP_UNMAP_HIGH ADDRESS_MAP_GLOBAL_MASK(0xff) - SSIO_INPUT_PORTS + SSIO_INPUT_PORTS("ssio") AM_RANGE(0xe0, 0xe0) AM_WRITE(watchdog_reset_w) AM_RANGE(0xe8, 0xe8) AM_WRITENOP AM_RANGE(0xf0, 0xf3) AM_DEVREADWRITE_LEGACY("ctc", z80ctc_r, z80ctc_w) @@ -748,7 +769,7 @@ ADDRESS_MAP_END /* verified from wiring diagram, plus DIP switches from manual */ static INPUT_PORTS_START( solarfox ) - PORT_START("SSIO.IP0") /* J4 1-8 */ + PORT_START("ssio:IP0") /* J4 1-8 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) @@ -758,7 +779,7 @@ static INPUT_PORTS_START( solarfox ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) - PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ + PORT_START("ssio:IP1") /* J4 10-13,15-18 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY @@ -768,11 +789,11 @@ static INPUT_PORTS_START( solarfox ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL - PORT_START("SSIO.IP2") /* J5 1-8 */ + PORT_START("ssio:IP2") /* J5 1-8 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("SSIO.IP3") /* DIPSW @ B3 */ + PORT_START("ssio:IP3") /* DIPSW @ B3 */ PORT_DIPNAME( 0x03, 0x03, "Bonus" ) PORT_DIPSETTING( 0x02, DEF_STR( None ) ) PORT_DIPSETTING( 0x03, "After 10 racks" ) @@ -789,17 +810,17 @@ static INPUT_PORTS_START( solarfox ) PORT_DIPSETTING( 0x80, DEF_STR( Upright )) PORT_DIPSETTING( 0x00, DEF_STR( Cocktail )) - PORT_START("SSIO.IP4") /* J6 1-8 */ + PORT_START("ssio:IP4") /* J6 1-8 */ PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("SSIO.DIP") + PORT_START("ssio:DIP") PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) INPUT_PORTS_END /* verified from wiring diagram, plus DIP switches from manual */ static INPUT_PORTS_START( kick ) - PORT_START("SSIO.IP0") /* J4 1-8 */ + PORT_START("ssio:IP0") /* J4 1-8 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) @@ -809,22 +830,22 @@ static INPUT_PORTS_START( kick ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) - PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ + PORT_START("ssio:IP1") /* J4 10-13,15-18 */ PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(3) PORT_KEYDELTA(50) PORT_REVERSE - PORT_START("SSIO.IP2") /* J5 1-8 */ + PORT_START("ssio:IP2") /* J5 1-8 */ PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("SSIO.IP3") /* DIPSW @ B3 */ + PORT_START("ssio:IP3") /* DIPSW @ B3 */ PORT_DIPNAME( 0x01, 0x00, "Music" ) PORT_DIPSETTING( 0x01, DEF_STR( Off )) PORT_DIPSETTING( 0x00, DEF_STR( On )) PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("SSIO.IP4") /* J6 1-8 */ + PORT_START("ssio:IP4") /* J6 1-8 */ PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("SSIO.DIP") + PORT_START("ssio:DIP") PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("DIAL2") @@ -834,7 +855,7 @@ INPUT_PORTS_END /* verified from wiring diagram, plus DIP switches from manual */ static INPUT_PORTS_START( kickc ) - PORT_START("SSIO.IP0") /* J4 1-8 */ + PORT_START("ssio:IP0") /* J4 1-8 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) @@ -844,14 +865,14 @@ static INPUT_PORTS_START( kickc ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) - PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ + PORT_START("ssio:IP1") /* J4 10-13,15-18 */ PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(3) PORT_KEYDELTA(50) PORT_REVERSE - PORT_START("SSIO.IP2") /* J5 1-8 */ + PORT_START("ssio:IP2") /* J5 1-8 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("SSIO.IP3") /* DIPSW @ B3 */ + PORT_START("ssio:IP3") /* DIPSW @ B3 */ PORT_DIPNAME( 0x01, 0x00, "Music" ) PORT_DIPSETTING( 0x01, DEF_STR( Off )) PORT_DIPSETTING( 0x00, DEF_STR( On )) @@ -861,10 +882,10 @@ static INPUT_PORTS_START( kickc ) PORT_DIPSETTING( 0x40, DEF_STR( Cocktail )) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("SSIO.IP4") /* J6 1-8 */ + PORT_START("ssio:IP4") /* J6 1-8 */ PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("SSIO.DIP") + PORT_START("ssio:DIP") PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("DIAL2") @@ -874,7 +895,7 @@ INPUT_PORTS_END /* verified from wiring diagram, plus DIP switches from manual */ static INPUT_PORTS_START( shollow ) - PORT_START("SSIO.IP0") /* J4 1-8 */ + PORT_START("ssio:IP0") /* J4 1-8 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) @@ -884,7 +905,7 @@ static INPUT_PORTS_START( shollow ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) - PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ + PORT_START("ssio:IP1") /* J4 10-13,15-18 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) @@ -894,10 +915,10 @@ static INPUT_PORTS_START( shollow ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_START("SSIO.IP2") /* J5 1-8 */ + PORT_START("ssio:IP2") /* J5 1-8 */ PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("SSIO.IP3") /* DIPSW @ B3 */ + PORT_START("ssio:IP3") /* DIPSW @ B3 */ PORT_DIPNAME( 0x01, 0x01, "Coin Meters" ) PORT_DIPSETTING( 0x01, "1" ) PORT_DIPSETTING( 0x00, "2" ) @@ -906,17 +927,17 @@ static INPUT_PORTS_START( shollow ) PORT_DIPSETTING( 0x02, DEF_STR( Cocktail ) ) PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("SSIO.IP4") /* J6 1-8 */ + PORT_START("ssio:IP4") /* J6 1-8 */ PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("SSIO.DIP") + PORT_START("ssio:DIP") PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) INPUT_PORTS_END /* verified from wiring diagram, plus DIP switches from manual */ static INPUT_PORTS_START( tron ) - PORT_START("SSIO.IP0") /* J4 1-8 */ + PORT_START("ssio:IP0") /* J4 1-8 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) @@ -926,10 +947,10 @@ static INPUT_PORTS_START( tron ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) - PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ + PORT_START("ssio:IP1") /* J4 10-13,15-18 */ PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_CODE_DEC(KEYCODE_Z) PORT_CODE_INC(KEYCODE_X) PORT_REVERSE - PORT_START("SSIO.IP2") /* J5 1-8 */ + PORT_START("ssio:IP2") /* J5 1-8 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY @@ -939,7 +960,7 @@ static INPUT_PORTS_START( tron ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_START("SSIO.IP3") /* DIPSW @ B3 */ + PORT_START("ssio:IP3") /* DIPSW @ B3 */ PORT_DIPNAME( 0x01, 0x00, "Coin Meters" ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x01, "1" ) PORT_DIPSETTING( 0x00, "2" ) @@ -958,16 +979,16 @@ static INPUT_PORTS_START( tron ) // According to the manual, SW1 is a bank of *10* switches (9 is unused and 10 is freeze) // Where are the values for the other two bits read? - PORT_START("SSIO.IP4") /* J6 1-8 */ + PORT_START("ssio:IP4") /* J6 1-8 */ PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_REVERSE PORT_COCKTAIL - PORT_START("SSIO.DIP") + PORT_START("ssio:DIP") PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) INPUT_PORTS_END static INPUT_PORTS_START( tron3 ) - PORT_START("SSIO.IP0") /* J4 1-8 */ + PORT_START("ssio:IP0") /* J4 1-8 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) @@ -977,10 +998,10 @@ static INPUT_PORTS_START( tron3 ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) - PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ + PORT_START("ssio:IP1") /* J4 10-13,15-18 */ PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_CODE_DEC(KEYCODE_Z) PORT_CODE_INC(KEYCODE_X) PORT_REVERSE - PORT_START("SSIO.IP2") /* J5 1-8 */ + PORT_START("ssio:IP2") /* J5 1-8 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY @@ -990,7 +1011,7 @@ static INPUT_PORTS_START( tron3 ) // PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL // PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_START("SSIO.IP3") /* DIPSW @ B3 */ + PORT_START("ssio:IP3") /* DIPSW @ B3 */ PORT_DIPNAME( 0x01, 0x00, "Coin Meters" ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x01, "1" ) PORT_DIPSETTING( 0x00, "2" ) @@ -1009,11 +1030,11 @@ static INPUT_PORTS_START( tron3 ) // According to the manual, SW1 is a bank of *10* switches (9 is unused and 10 is freeze) // Where are the values for the other two bits read? - PORT_START("SSIO.IP4") /* J6 1-8 */ + PORT_START("ssio:IP4") /* J6 1-8 */ PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) // PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_REVERSE PORT_COCKTAIL - PORT_START("SSIO.DIP") + PORT_START("ssio:DIP") PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) INPUT_PORTS_END @@ -1022,7 +1043,7 @@ INPUT_PORTS_END /* verified from wiring diagram, plus DIP switches from manual */ static INPUT_PORTS_START( kroozr ) - PORT_START("SSIO.IP0") /* J4 1-8 */ + PORT_START("ssio:IP0") /* J4 1-8 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) @@ -1032,7 +1053,7 @@ static INPUT_PORTS_START( kroozr ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) - PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ + PORT_START("ssio:IP1") /* J4 10-13,15-18 */ PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* low 3 bits of spinner */ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* sensor J1-10 */ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* sensor J1-9 */ @@ -1040,20 +1061,20 @@ static INPUT_PORTS_START( kroozr ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* upper 1 bit of spinner */ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_START("SSIO.IP2") /* J5 1-8 */ + PORT_START("ssio:IP2") /* J5 1-8 */ PORT_BIT( 0xff, 0x64, IPT_AD_STICK_X ) PORT_MINMAX(48,152) PORT_SENSITIVITY(100) PORT_KEYDELTA(52) - PORT_START("SSIO.IP3") /* DIPSW @ B3 */ + PORT_START("ssio:IP3") /* DIPSW @ B3 */ PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("SSIO.IP4") /* J6 1-8 */ + PORT_START("ssio:IP4") /* J6 1-8 */ PORT_BIT( 0xff, 0x64, IPT_AD_STICK_Y ) PORT_MINMAX(48,152) PORT_SENSITIVITY(100) PORT_KEYDELTA(52) - PORT_START("SSIO.DIP") + PORT_START("ssio:DIP") PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("DIAL") @@ -1063,7 +1084,7 @@ INPUT_PORTS_END /* verified from wiring diagram, plus DIP switches from manual */ static INPUT_PORTS_START( domino ) - PORT_START("SSIO.IP0") /* J4 1-8 */ + PORT_START("ssio:IP0") /* J4 1-8 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) @@ -1073,14 +1094,14 @@ static INPUT_PORTS_START( domino ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) - PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ + PORT_START("ssio:IP1") /* J4 10-13,15-18 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("SSIO.IP2") /* J5 1-8 */ + PORT_START("ssio:IP2") /* J5 1-8 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL @@ -1088,7 +1109,7 @@ static INPUT_PORTS_START( domino ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("SSIO.IP3") /* DIPSW @ B3 */ + PORT_START("ssio:IP3") /* DIPSW @ B3 */ PORT_DIPNAME( 0x01, 0x00, "Music" ) PORT_DIPSETTING( 0x01, DEF_STR( Off )) PORT_DIPSETTING( 0x00, DEF_STR( On )) @@ -1103,17 +1124,17 @@ static INPUT_PORTS_START( domino ) PORT_DIPSETTING( 0x80, "1" ) PORT_DIPSETTING( 0x00, "2" ) - PORT_START("SSIO.IP4") /* J6 1-8 */ + PORT_START("ssio:IP4") /* J6 1-8 */ PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("SSIO.DIP") + PORT_START("ssio:DIP") PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) INPUT_PORTS_END /* verified from wiring diagram, plus DIP switches from manual */ static INPUT_PORTS_START( journey ) - PORT_START("SSIO.IP0") /* J4 1-8 */ + PORT_START("ssio:IP0") /* J4 1-8 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) @@ -1123,14 +1144,14 @@ static INPUT_PORTS_START( journey ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) - PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ + PORT_START("ssio:IP1") /* J4 10-13,15-18 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("SSIO.IP2") /* J5 1-8 */ + PORT_START("ssio:IP2") /* J5 1-8 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL @@ -1138,7 +1159,7 @@ static INPUT_PORTS_START( journey ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("SSIO.IP3") /* DIPSW @ B3 */ + PORT_START("ssio:IP3") /* DIPSW @ B3 */ PORT_DIPNAME( 0x01, 0x01, "Coin Meters" ) PORT_DIPSETTING( 0x01, "1" ) PORT_DIPSETTING( 0x00, "2" ) @@ -1147,17 +1168,17 @@ static INPUT_PORTS_START( journey ) PORT_DIPSETTING( 0x02, DEF_STR( Cocktail ) ) PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("SSIO.IP4") /* J6 1-8 */ + PORT_START("ssio:IP4") /* J6 1-8 */ PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("SSIO.DIP") + PORT_START("ssio:DIP") PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) INPUT_PORTS_END /* verified from wiring diagram, plus DIP switches from manual */ static INPUT_PORTS_START( wacko ) - PORT_START("SSIO.IP0") /* J4 1-8 */ + PORT_START("ssio:IP0") /* J4 1-8 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) @@ -1167,13 +1188,13 @@ static INPUT_PORTS_START( wacko ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) - PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ + PORT_START("ssio:IP1") /* J4 10-13,15-18 */ PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) - PORT_START("SSIO.IP2") /* J5 1-8 */ + PORT_START("ssio:IP2") /* J5 1-8 */ PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_REVERSE - PORT_START("SSIO.IP3") /* DIPSW @ B3 */ + PORT_START("ssio:IP3") /* DIPSW @ B3 */ PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) @@ -1182,7 +1203,7 @@ static INPUT_PORTS_START( wacko ) PORT_DIPSETTING( 0x80, "1" ) PORT_DIPSETTING( 0x00, "2" ) - PORT_START("SSIO.IP4") /* J6 1-8 */ + PORT_START("ssio:IP4") /* J6 1-8 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT ) PORT_4WAY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT ) PORT_4WAY PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN ) PORT_4WAY @@ -1192,20 +1213,20 @@ static INPUT_PORTS_START( wacko ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN ) PORT_4WAY PORT_COCKTAIL PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP ) PORT_4WAY PORT_COCKTAIL - PORT_START("SSIO.DIP") + PORT_START("ssio:DIP") PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("SSIO.IP1.ALT") + PORT_START("ssio:IP1.ALT") PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_COCKTAIL - PORT_START("SSIO.IP2.ALT") + PORT_START("ssio:IP2.ALT") PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_REVERSE PORT_COCKTAIL INPUT_PORTS_END /* not verified, no manual found */ static INPUT_PORTS_START( twotiger ) - PORT_START("SSIO.IP0") /* J4 1-8 */ + PORT_START("ssio:IP0") /* J4 1-8 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) @@ -1215,13 +1236,13 @@ static INPUT_PORTS_START( twotiger ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) - PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ + PORT_START("ssio:IP1") /* J4 10-13,15-18 */ PORT_BIT( 0xff, 0x67, IPT_AD_STICK_X ) PORT_MINMAX(0, 206) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(2) - PORT_START("SSIO.IP2") /* J5 1-8 */ + PORT_START("ssio:IP2") /* J5 1-8 */ PORT_BIT( 0xff, 0x67, IPT_AD_STICK_X ) PORT_MINMAX(0, 206) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1) - PORT_START("SSIO.IP3") /* DIPSW @ B3 */ + PORT_START("ssio:IP3") /* DIPSW @ B3 */ PORT_DIPNAME( 0x01, 0x00, "Shot Speed" ) PORT_DIPSETTING( 0x01, "Fast" ) PORT_DIPSETTING( 0x00, "Slow" ) @@ -1230,7 +1251,7 @@ static INPUT_PORTS_START( twotiger ) PORT_DIPSETTING( 0x02, "2 Credits" ) PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("SSIO.IP4") /* J6 1-8 */ + PORT_START("ssio:IP4") /* J6 1-8 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) @@ -1239,14 +1260,14 @@ static INPUT_PORTS_START( twotiger ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("SSIO.DIP") + PORT_START("ssio:DIP") PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) INPUT_PORTS_END /* not verified, no manual found */ static INPUT_PORTS_START( twotigrc ) - PORT_START("SSIO.IP0") /* J4 1-8 */ + PORT_START("ssio:IP0") /* J4 1-8 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) @@ -1256,30 +1277,30 @@ static INPUT_PORTS_START( twotigrc ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) - PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ + PORT_START("ssio:IP1") /* J4 10-13,15-18 */ PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(10) PORT_KEYDELTA(10) PORT_REVERSE - PORT_START("SSIO.IP2") /* J5 1-8 */ + PORT_START("ssio:IP2") /* J5 1-8 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("SSIO.IP3") /* DIPSW @ B3 */ + PORT_START("ssio:IP3") /* DIPSW @ B3 */ PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("SSIO.IP4") /* J6 1-8 */ + PORT_START("ssio:IP4") /* J6 1-8 */ PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(10) PORT_KEYDELTA(10) PORT_REVERSE PORT_PLAYER(2) - PORT_START("SSIO.DIP") + PORT_START("ssio:DIP") PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) INPUT_PORTS_END /* verified from wiring diagram, plus DIP switches from manual */ static INPUT_PORTS_START( tapper ) - PORT_START("SSIO.IP0") /* J4 1-8 */ + PORT_START("ssio:IP0") /* J4 1-8 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) @@ -1289,7 +1310,7 @@ static INPUT_PORTS_START( tapper ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) - PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ + PORT_START("ssio:IP1") /* J4 10-13,15-18 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY @@ -1297,7 +1318,7 @@ static INPUT_PORTS_START( tapper ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("SSIO.IP2") /* J5 1-8 */ + PORT_START("ssio:IP2") /* J5 1-8 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL @@ -1305,7 +1326,7 @@ static INPUT_PORTS_START( tapper ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("SSIO.IP3") /* DIPSW @ B3 */ + PORT_START("ssio:IP3") /* DIPSW @ B3 */ PORT_BIT( 0x03, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_DIPNAME( 0x04, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) @@ -1318,17 +1339,17 @@ static INPUT_PORTS_START( tapper ) PORT_DIPSETTING( 0x80, "1" ) PORT_DIPSETTING( 0x00, "2" ) - PORT_START("SSIO.IP4") /* J6 1-8 */ + PORT_START("ssio:IP4") /* J6 1-8 */ PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("SSIO.DIP") + PORT_START("ssio:DIP") PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) INPUT_PORTS_END /* not verified, no manual found */ static INPUT_PORTS_START( timber ) - PORT_START("SSIO.IP0") /* J4 1-8 */ + PORT_START("ssio:IP0") /* J4 1-8 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) @@ -1338,7 +1359,7 @@ static INPUT_PORTS_START( timber ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) - PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ + PORT_START("ssio:IP1") /* J4 10-13,15-18 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(1) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(1) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(1) @@ -1347,7 +1368,7 @@ static INPUT_PORTS_START( timber ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("SSIO.IP2") /* J5 1-8 */ + PORT_START("ssio:IP2") /* J5 1-8 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(2) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(2) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(2) @@ -1356,7 +1377,7 @@ static INPUT_PORTS_START( timber ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("SSIO.IP3") /* DIPSW @ B3 */ + PORT_START("ssio:IP3") /* DIPSW @ B3 */ PORT_BIT( 0x03, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_DIPNAME( 0x04, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) @@ -1369,17 +1390,17 @@ static INPUT_PORTS_START( timber ) PORT_DIPSETTING( 0x80, "1" ) PORT_DIPSETTING( 0x00, "2" ) - PORT_START("SSIO.IP4") /* J6 1-8 */ + PORT_START("ssio:IP4") /* J6 1-8 */ PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("SSIO.DIP") + PORT_START("ssio:DIP") PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) INPUT_PORTS_END /* verified from wiring diagram, plus DIP switches from manual */ static INPUT_PORTS_START( dotron ) - PORT_START("SSIO.IP0") /* J4 1-8 */ + PORT_START("ssio:IP0") /* J4 1-8 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) @@ -1389,11 +1410,11 @@ static INPUT_PORTS_START( dotron ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) - PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ + PORT_START("ssio:IP1") /* J4 10-13,15-18 */ PORT_BIT( 0x7f, 0x00, IPT_DIAL ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_CODE_DEC(KEYCODE_Z) PORT_CODE_INC(KEYCODE_X) PORT_REVERSE PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("SSIO.IP2") /* J5 1-8 */ + PORT_START("ssio:IP2") /* J5 1-8 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY @@ -1405,16 +1426,16 @@ static INPUT_PORTS_START( dotron ) PORT_DIPSETTING( 0x00, "Environmental" ) PORT_DIPSETTING( 0x80, DEF_STR( Upright ) ) - PORT_START("SSIO.IP3") /* DIPSW @ B3 */ + PORT_START("ssio:IP3") /* DIPSW @ B3 */ PORT_DIPNAME( 0x01, 0x01, "Coin Meters" ) PORT_DIPSETTING( 0x01, "1" ) PORT_DIPSETTING( 0x00, "2" ) PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("SSIO.IP4") /* J6 1-8 */ + PORT_START("ssio:IP4") /* J6 1-8 */ PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("SSIO.DIP") + PORT_START("ssio:DIP") PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("FAKE") /* fake port to make aiming up & down easier */ @@ -1424,7 +1445,7 @@ INPUT_PORTS_END static INPUT_PORTS_START( dotrone ) PORT_INCLUDE(dotron) - PORT_MODIFY("SSIO.IP2") + PORT_MODIFY("ssio:IP2") PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, "Environmental" ) PORT_DIPSETTING( 0x80, DEF_STR( Upright ) ) @@ -1433,7 +1454,7 @@ INPUT_PORTS_END /* verified from wiring diagram, plus DIP switches from manual */ static INPUT_PORTS_START( nflfoot ) - PORT_START("SSIO.IP0") /* J4 1-8 */ + PORT_START("ssio:IP0") /* J4 1-8 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BILL1 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) /* continue game */ @@ -1443,7 +1464,7 @@ static INPUT_PORTS_START( nflfoot ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) - PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ + PORT_START("ssio:IP1") /* J4 10-13,15-18 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) /* left engage */ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) /* left select #1 play */ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) /* left select #2 play */ @@ -1453,7 +1474,7 @@ static INPUT_PORTS_START( nflfoot ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_PLAYER(1) /* select one player */ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("SSIO.IP2") /* J5 1-8 */ + PORT_START("ssio:IP2") /* J5 1-8 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) /* right engage */ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) /* right select #1 play */ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) /* right select #2 play */ @@ -1463,16 +1484,16 @@ static INPUT_PORTS_START( nflfoot ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_PLAYER(2) /* select two player */ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) /* connects to IPU board */ - PORT_START("SSIO.IP3") /* DIPSW @ B3 */ + PORT_START("ssio:IP3") /* DIPSW @ B3 */ PORT_DIPNAME( 0x01, 0x01, "Coin Meters" ) PORT_DIPSETTING( 0x01, "1" ) PORT_DIPSETTING( 0x00, "2" ) PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("SSIO.IP4") /* J6 1-8 */ + PORT_START("ssio:IP4") /* J6 1-8 */ PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("SSIO.DIP") + PORT_START("ssio:DIP") PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) INPUT_PORTS_END @@ -1480,7 +1501,7 @@ INPUT_PORTS_END /* "wiring diagram was not available at time of publication" according to the manual */ /* DIPs verified from the manual */ static INPUT_PORTS_START( demoderb ) - PORT_START("SSIO.IP0") /* J4 1-8 */ + PORT_START("ssio:IP0") /* J4 1-8 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) @@ -1490,27 +1511,27 @@ static INPUT_PORTS_START( demoderb ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_TILT ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ /* The high 6 bits contain the steering wheel value */ + PORT_START("ssio:IP1") /* J4 10-13,15-18 */ /* The high 6 bits contain the steering wheel value */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_START("SSIO.IP1.ALT1") /* J4 10-13,15-18 */ /* The high 6 bits contain the steering wheel value */ + PORT_START("ssio:IP1.ALT1") /* J4 10-13,15-18 */ /* The high 6 bits contain the steering wheel value */ PORT_BIT( 0x3f, 0x00, IPT_DIAL ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_REVERSE PORT_PLAYER(1) - PORT_START("SSIO.IP1.ALT2") /* IN1 (muxed) -- the high 6 bits contain the steering wheel value */ + PORT_START("ssio:IP1.ALT2") /* IN1 (muxed) -- the high 6 bits contain the steering wheel value */ PORT_BIT( 0x3f, 0x00, IPT_DIAL ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_REVERSE PORT_PLAYER(3) - PORT_START("SSIO.IP2") /* J5 1-8 */ /* The high 6 bits contain the steering wheel value */ + PORT_START("ssio:IP2") /* J5 1-8 */ /* The high 6 bits contain the steering wheel value */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_START("SSIO.IP2.ALT1") /* J5 1-8 */ /* The high 6 bits contain the steering wheel value */ + PORT_START("ssio:IP2.ALT1") /* J5 1-8 */ /* The high 6 bits contain the steering wheel value */ PORT_BIT( 0x3f, 0x00, IPT_DIAL ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_REVERSE PORT_PLAYER(2) - PORT_START("SSIO.IP2.ALT2") /* IN2 (muxed) -- the high 6 bits contain the steering wheel value */ + PORT_START("ssio:IP2.ALT2") /* IN2 (muxed) -- the high 6 bits contain the steering wheel value */ PORT_BIT( 0x3f, 0x00, IPT_DIAL ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_REVERSE PORT_PLAYER(4) - PORT_START("SSIO.IP3") /* DIPSW @ B3 */ + PORT_START("ssio:IP3") /* DIPSW @ B3 */ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x01, "2P Upright" ) PORT_DIPSETTING( 0x00, "4P Cocktail" ) @@ -1530,7 +1551,7 @@ static INPUT_PORTS_START( demoderb ) PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) ) PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("SSIO.IP4") /* J6 1-8 */ + PORT_START("ssio:IP4") /* J6 1-8 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN4 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START3 ) @@ -1540,7 +1561,7 @@ static INPUT_PORTS_START( demoderb ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4) - PORT_START("SSIO.DIP") + PORT_START("ssio:DIP") PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) INPUT_PORTS_END @@ -1635,7 +1656,10 @@ static MACHINE_CONFIG_START( mcr_90009, mcr_state ) MCFG_VIDEO_START(mcr) /* sound hardware */ - MCFG_FRAGMENT_ADD(mcr_ssio) + MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") + MCFG_MIDWAY_SSIO_ADD("ssio") + MCFG_SOUND_ROUTE(0, "lspeaker", 1.0) + MCFG_SOUND_ROUTE(1, "rspeaker", 1.0) MACHINE_CONFIG_END @@ -1693,7 +1717,9 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( mcr_91490_snt, mcr_91490 ) /* basic machine hardware */ - MCFG_FRAGMENT_ADD(squawk_n_talk) + MCFG_MIDWAY_SQUAWK_N_TALK_ADD("snt") + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) MACHINE_CONFIG_END @@ -1721,7 +1747,9 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( mcr_91490_tcs, mcr_91490 ) /* basic machine hardware */ - MCFG_FRAGMENT_ADD(turbo_chip_squeak) + MCFG_MIDWAY_TURBO_CHIP_SQUEAK_ADD("tcs") + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) MACHINE_CONFIG_END @@ -1742,7 +1770,7 @@ ROM_START( solarfox ) ROM_LOAD( "sfcpu.6d", 0x5000, 0x1000, CRC(bd993cd9) SHA1(c074a6a40d0b9c0f4bf3fc5982263c89549fb338) ) ROM_LOAD( "sfcpu.7d", 0x6000, 0x1000, CRC(8ad8731d) SHA1(ffd19c3fbad3c5a240ab27963812cc300f3d7b89) ) - ROM_REGION( 0x10000, "ssiocpu", 0 ) + ROM_REGION( 0x10000, "ssio:cpu", 0 ) ROM_LOAD( "sfsnd.7a", 0x0000, 0x1000, CRC(cdecf83a) SHA1(5acd2709e214408d756b39916bb98cd4ecda7988) ) ROM_LOAD( "sfsnd.8a", 0x1000, 0x1000, CRC(cb7788cb) SHA1(9e86f9131a6f0fc96dd436e21baf45e215ee65f4) ) ROM_LOAD( "sfsnd.9a", 0x2000, 0x1000, CRC(304896ce) SHA1(00ff640eab50022da980cdc5ce8cedebaaebc9cf) ) @@ -1771,7 +1799,7 @@ ROM_START( kick ) ROM_LOAD( "1600e-v2.d5", 0x4000, 0x1000, CRC(1d2834c0) SHA1(176fad90ab14c922a575c3d12a2c8a339d1518d4) ) ROM_LOAD( "1700f-v2.d6", 0x5000, 0x1000, CRC(ddf84ce1) SHA1(6f80b9a5cbd75b6e4af569ca4bcfcde7daaad64f) ) - ROM_REGION( 0x10000, "ssiocpu", 0 ) + ROM_REGION( 0x10000, "ssio:cpu", 0 ) ROM_LOAD( "4200-a.a7", 0x0000, 0x1000, CRC(9e35c02e) SHA1(92afd0126dcfb2d4401927b2cf261090e186b6fa) ) ROM_LOAD( "4300-b.a8", 0x1000, 0x1000, CRC(ca2b7c28) SHA1(fdcca3b755822c045c3c321cccc3f58112e2ad11) ) ROM_LOAD( "4400-c.a9", 0x2000, 0x1000, CRC(d1901551) SHA1(fd7d6059f8ac59f95ae6f8ef12fbfce7ed16ec12) ) @@ -1800,7 +1828,7 @@ ROM_START( kickman ) ROM_LOAD( "1600-e-ur.d5", 0x4000, 0x1000, CRC(f24bc0d7) SHA1(31dc996898c01f3427403e396a47444732904674) ) ROM_LOAD( "1700-f-ur.d6", 0x5000, 0x1000, CRC(672361fc) SHA1(010029460c25935f2156eb64c9109c26ce40b752) ) - ROM_REGION( 0x10000, "ssiocpu", 0 ) + ROM_REGION( 0x10000, "ssio:cpu", 0 ) ROM_LOAD( "4200-a.a7", 0x0000, 0x1000, CRC(9e35c02e) SHA1(92afd0126dcfb2d4401927b2cf261090e186b6fa) ) ROM_LOAD( "4300-b.a8", 0x1000, 0x1000, CRC(ca2b7c28) SHA1(fdcca3b755822c045c3c321cccc3f58112e2ad11) ) ROM_LOAD( "4400-c.a9", 0x2000, 0x1000, CRC(d1901551) SHA1(fd7d6059f8ac59f95ae6f8ef12fbfce7ed16ec12) ) @@ -1829,7 +1857,7 @@ ROM_START( kickc ) ROM_LOAD( "1600-e.d5", 0x4000, 0x1000, CRC(eaaa78a7) SHA1(3c057d486f3938561fb9947e0463b1255ae04ef9) ) ROM_LOAD( "1700-f.d6", 0x5000, 0x1000, CRC(c06c880f) SHA1(d5ac5682de316b9cb09d433e2c02746efadd2a81) ) - ROM_REGION( 0x10000, "ssiocpu", 0 ) + ROM_REGION( 0x10000, "ssio:cpu", 0 ) ROM_LOAD( "4200-a.a7", 0x0000, 0x1000, CRC(9e35c02e) SHA1(92afd0126dcfb2d4401927b2cf261090e186b6fa) ) ROM_LOAD( "4300-b.a8", 0x1000, 0x1000, CRC(ca2b7c28) SHA1(fdcca3b755822c045c3c321cccc3f58112e2ad11) ) ROM_LOAD( "4400-c.a9", 0x2000, 0x1000, CRC(d1901551) SHA1(fd7d6059f8ac59f95ae6f8ef12fbfce7ed16ec12) ) @@ -1859,7 +1887,7 @@ ROM_START( shollow ) ROM_LOAD( "sh-pro.04", 0x8000, 0x2000, CRC(22fa9175) SHA1(fd8ea76b3a7ffaf48fc11dd3b7c58e548e3e57c5) ) ROM_LOAD( "sh-pro.05", 0xa000, 0x2000, CRC(1716e2bb) SHA1(771e4c20d63e4e1d99723e6355db67064a278ae5) ) - ROM_REGION( 0x10000, "ssiocpu", 0 ) + ROM_REGION( 0x10000, "ssio:cpu", 0 ) ROM_LOAD( "sh-snd.01", 0x0000, 0x1000, CRC(55a297cc) SHA1(b34f37fca61cdba26b5671feee991d133b8697a4) ) ROM_LOAD( "sh-snd.02", 0x1000, 0x1000, CRC(46fc31f6) SHA1(9b1a56962b2d210b1013bc35de780c6d5b3eb4bc) ) ROM_LOAD( "sh-snd.03", 0x2000, 0x1000, CRC(b1f4a6a8) SHA1(ba724f9cc0cc35dd31d4ad8b36a51da9d6cbfbcf) ) @@ -1887,7 +1915,7 @@ ROM_START( shollow2 ) ROM_LOAD( "sh-pro.04", 0x8000, 0x2000, CRC(22fa9175) SHA1(fd8ea76b3a7ffaf48fc11dd3b7c58e548e3e57c5) ) ROM_LOAD( "sh-pro.05", 0xa000, 0x2000, CRC(1716e2bb) SHA1(771e4c20d63e4e1d99723e6355db67064a278ae5) ) - ROM_REGION( 0x10000, "ssiocpu", 0 ) + ROM_REGION( 0x10000, "ssio:cpu", 0 ) ROM_LOAD( "snd-0.a7", 0x0000, 0x1000, CRC(9d815bb3) SHA1(51af797e08dbe3921e11ce70c3d0da50979336a4) ) ROM_LOAD( "snd-1.a8", 0x1000, 0x1000, CRC(9f253412) SHA1(a526e864073a2f9e67e2cbe53ab17fe726336241) ) ROM_LOAD( "snd-2.a9", 0x2000, 0x1000, CRC(7783d6c6) SHA1(1fb2117532e7da28afdb9837bcb6848165cf8173) ) @@ -1919,7 +1947,7 @@ ROM_START( tron ) ROM_LOAD( "scpu_pge.d6", 0x8000, 0x2000, CRC(24c185d8) SHA1(45ac7c53f6f4eba5c7bf3fc6559cddd3821eddad) ) ROM_LOAD( "scpu_pgf.d7", 0xA000, 0x2000, CRC(38c4bbaf) SHA1(a7cd496ce75199b8279ea963520cf70d5f562bb2) ) - ROM_REGION( 0x10000, "ssiocpu", 0 ) /* ROM's located on the Super Sound I/O Board (90913) */ + ROM_REGION( 0x10000, "ssio:cpu", 0 ) /* ROM's located on the Super Sound I/O Board (90913) */ ROM_LOAD( "ssi_0a.a7", 0x0000, 0x1000, CRC(765e6eba) SHA1(42efeefc8571dfc237c0be3368248f1e56add92e) ) ROM_LOAD( "ssi_0b.a8", 0x1000, 0x1000, CRC(1b90ccdd) SHA1(0876e5eeaa63bb8cc97f3634a6ddd8a29a9b012f) ) ROM_LOAD( "ssi_0c.a9", 0x2000, 0x1000, CRC(3a4bc629) SHA1(ce8452a99a313ae7429de471bbea39de08c9fd4b) ) @@ -1958,7 +1986,7 @@ ROM_START( tron2 ) ROM_LOAD( "scpu_pge.d6", 0x8000, 0x2000, CRC(24c185d8) SHA1(45ac7c53f6f4eba5c7bf3fc6559cddd3821eddad) ) ROM_LOAD( "scpu_pgf.d7", 0xa000, 0x2000, CRC(38c4bbaf) SHA1(a7cd496ce75199b8279ea963520cf70d5f562bb2) ) - ROM_REGION( 0x10000, "ssiocpu", 0 ) /* ROM's located on the Super Sound I/O Board (90913) */ + ROM_REGION( 0x10000, "ssio:cpu", 0 ) /* ROM's located on the Super Sound I/O Board (90913) */ ROM_LOAD( "ssi_0a.a7", 0x0000, 0x1000, CRC(765e6eba) SHA1(42efeefc8571dfc237c0be3368248f1e56add92e) ) ROM_LOAD( "ssi_0b.a8", 0x1000, 0x1000, CRC(1b90ccdd) SHA1(0876e5eeaa63bb8cc97f3634a6ddd8a29a9b012f) ) ROM_LOAD( "ssi_0c.a9", 0x2000, 0x1000, CRC(3a4bc629) SHA1(ce8452a99a313ae7429de471bbea39de08c9fd4b) ) @@ -1997,7 +2025,7 @@ ROM_START( tron3 ) ROM_LOAD( "scpu_pge(__0617).d6", 0x8000, 0x2000, CRC(ea198fa8) SHA1(d8c97ea87d504e77edc38c87c2953c8c4f1a405b) ) ROM_LOAD( "scpu_pgf(__0617).d7", 0xa000, 0x2000, CRC(4325fb08) SHA1(70727aa37354425315d8a8b3ca07bbe91f7e8f08) ) - ROM_REGION( 0x10000, "ssiocpu", 0 ) /* ROM's located on the Super Sound I/O Board (90913) */ + ROM_REGION( 0x10000, "ssio:cpu", 0 ) /* ROM's located on the Super Sound I/O Board (90913) */ ROM_LOAD( "ssi_0a.a7", 0x0000, 0x1000, CRC(765e6eba) SHA1(42efeefc8571dfc237c0be3368248f1e56add92e) ) ROM_LOAD( "ssi_0b.a8", 0x1000, 0x1000, CRC(1b90ccdd) SHA1(0876e5eeaa63bb8cc97f3634a6ddd8a29a9b012f) ) ROM_LOAD( "ssi_0c.a9", 0x2000, 0x1000, CRC(3a4bc629) SHA1(ce8452a99a313ae7429de471bbea39de08c9fd4b) ) @@ -2036,7 +2064,7 @@ ROM_START( tron4 ) ROM_LOAD( "pge-615.d6", 0x8000, 0x2000, CRC(ea198fa8) SHA1(d8c97ea87d504e77edc38c87c2953c8c4f1a405b) ) ROM_LOAD( "pgf-615.d7", 0xa000, 0x2000, CRC(790ee743) SHA1(14dc84b2bbaab22772e0579f11fe0bf136a0ddab) ) - ROM_REGION( 0x10000, "ssiocpu", 0 ) /* ROM's located on the Super Sound I/O Board (90913) */ + ROM_REGION( 0x10000, "ssio:cpu", 0 ) /* ROM's located on the Super Sound I/O Board (90913) */ ROM_LOAD( "ssi_oa.a7", 0x0000, 0x1000, CRC(2cbb332b) SHA1(48d1cbb336733588af728a3d0e02c8613d2b5fb2) ) ROM_LOAD( "ssi_ob.a8", 0x1000, 0x1000, CRC(1355b7e6) SHA1(61ed045212da67cd449910ae601058cf209b37e5) ) ROM_LOAD( "ssi_oc.a9", 0x2000, 0x1000, CRC(6dd4b7c9) SHA1(1ce78c242d1a7d9a4524a663a42fc8bc2870053a) ) @@ -2071,7 +2099,7 @@ ROM_START( kroozr ) ROM_LOAD( "kozmkcpu.5d", 0x6000, 0x2000, CRC(a0ec38c1) SHA1(adf3ef36355d255e4ebc0d4dc86b9d7910e26b03) ) ROM_LOAD( "kozmkcpu.6d", 0x8000, 0x2000, CRC(7044f2b6) SHA1(55b64c9233fe0c8b351688fab29aad049d49faf2) ) - ROM_REGION( 0x10000, "ssiocpu", 0 ) + ROM_REGION( 0x10000, "ssio:cpu", 0 ) ROM_LOAD( "kozmksnd.7a", 0x0000, 0x1000, CRC(6736e433) SHA1(d43216ef34a67f047b7c35001767d838386add7d) ) ROM_LOAD( "kozmksnd.8a", 0x1000, 0x1000, CRC(ea9cd919) SHA1(a1533b2857c881c83adce2c7bbfaa4a3148ead8e) ) ROM_LOAD( "kozmksnd.9a", 0x2000, 0x1000, CRC(9dfa7994) SHA1(0a2d824e9fe1d48c43027f5f10f4c43476f08e07) ) @@ -2098,7 +2126,7 @@ ROM_START( domino ) ROM_LOAD( "dmanpg2.bin", 0x4000, 0x2000, CRC(7dd2177a) SHA1(b4b17e2580679fbe340d8b8d8cb7171c49ae0a21) ) ROM_LOAD( "dmanpg3.bin", 0x6000, 0x2000, CRC(f2e0aa44) SHA1(2f04dc74c69dfe3847d5e4330e560b0a9f18c33a) ) - ROM_REGION( 0x10000, "ssiocpu", 0 ) + ROM_REGION( 0x10000, "ssio:cpu", 0 ) ROM_LOAD( "dm-a7.snd", 0x0000, 0x1000, CRC(fa982dcc) SHA1(970340bfa0ac13ad8c2bf5adc21d7ca7aa9e525a) ) ROM_LOAD( "dm-a8.snd", 0x1000, 0x1000, CRC(72839019) SHA1(4aa278cfb00fac76cba88600bb300ee88ec3f7ee) ) ROM_LOAD( "dm-a9.snd", 0x2000, 0x1000, CRC(ad760da7) SHA1(024fce0f5d46e82b66c4283925556130735b863e) ) @@ -2126,7 +2154,7 @@ ROM_START( wacko ) ROM_LOAD( "wackocpu.4d", 0x4000, 0x2000, CRC(515edff7) SHA1(9288cb5efb51086ef8610eecf8e3feae1da9fc2a) ) ROM_LOAD( "wackocpu.5d", 0x6000, 0x2000, CRC(9b01bf32) SHA1(d209ba2503d7b54786f74107bb399313a08a09ba) ) - ROM_REGION( 0x10000, "ssiocpu", 0 ) + ROM_REGION( 0x10000, "ssio:cpu", 0 ) ROM_LOAD( "wackosnd.7a", 0x0000, 0x1000, CRC(1a58763f) SHA1(37f0870d67d52c86ae2d188e9beaa56a3a8fa130) ) ROM_LOAD( "wackosnd.8a", 0x1000, 0x1000, CRC(a4e3c771) SHA1(fe677090423e1d80cde07d2e74be8380d8c55e95) ) ROM_LOAD( "wackosnd.9a", 0x2000, 0x1000, CRC(155ba3dd) SHA1(51aaeeb68b2b7eb8238c7c3b06e84dcf44683ee9) ) @@ -2153,7 +2181,7 @@ ROM_START( twotiger ) ROM_LOAD( "cpu_d4", 0x4000, 0x2000, CRC(f1ab8c4d) SHA1(0c410ddd2e1cd8a19c73bc0c7aca70d8c4308eeb) ) ROM_LOAD( "cpu_d5", 0x6000, 0x2000, CRC(d7129900) SHA1(af5093082cfbc9fa4b42cfc74e62adbf9b6c63db) ) - ROM_REGION( 0x10000, "ssiocpu", 0 ) + ROM_REGION( 0x10000, "ssio:cpu", 0 ) ROM_LOAD( "ssio_a7", 0x0000, 0x1000, CRC(64ddc16c) SHA1(e119e1702ea00ffb86d413ed8e68b4e9dfefa79e) ) ROM_LOAD( "ssio_a8", 0x1000, 0x1000, CRC(c3467612) SHA1(c968776d9561a7ac67e95a987b6d826ec2dc748e) ) ROM_LOAD( "ssio_a9", 0x2000, 0x1000, CRC(c50f7b2d) SHA1(0f4779d4955d500c50b544d945fa78a5428b86ce) ) @@ -2179,7 +2207,7 @@ ROM_START( twotigerc ) ROM_LOAD( "2tgrpg2.bin", 0x4000, 0x2000, CRC(b5ca3f17) SHA1(ac51eefe9ff49bc358daf58525e529070684ed1b) ) ROM_LOAD( "2tgrpg3.bin", 0x6000, 0x2000, CRC(8aa82049) SHA1(6e42d082d29986f5c0698ae39750fb8f9eb1e6cd) ) - ROM_REGION( 0x10000, "ssiocpu", 0 ) + ROM_REGION( 0x10000, "ssio:cpu", 0 ) ROM_LOAD( "2tgra7.bin", 0x0000, 0x1000, CRC(4620d970) SHA1(2c2c1da84199b846575a6291dc235f30539959fa) ) ROM_LOAD( "2tgra8.bin", 0x1000, 0x1000, CRC(e95d8cfe) SHA1(846d5543596bb86cf08f998056c1fc695cb4f62c) ) ROM_LOAD( "2tgra9.bin", 0x2000, 0x1000, CRC(81e6ce0e) SHA1(77e145e150763bfe5760ac3e4f68218a65b9bfe0) ) @@ -2207,7 +2235,7 @@ ROM_START( journey ) ROM_LOAD( "d5", 0x6000, 0x2000, CRC(c3023931) SHA1(e591a18c5fc8befcd9f2b93d9131374c572cdbcd) ) ROM_LOAD( "d6", 0x8000, 0x2000, CRC(5d445c99) SHA1(df2bce203f510b4bda42bb7114b79eb0b2b4e2e0) ) - ROM_REGION( 0x10000, "ssiocpu", 0 ) + ROM_REGION( 0x10000, "ssio:cpu", 0 ) ROM_LOAD( "a", 0x0000, 0x1000, CRC(2524a2aa) SHA1(4bd78b4fb42c2506fa6734419b42cbbe4c240e94) ) ROM_LOAD( "b", 0x1000, 0x1000, CRC(b8e35814) SHA1(379308431d1204d6cb5ae8a13e378ec7b3fab0a9) ) ROM_LOAD( "c", 0x2000, 0x1000, CRC(09c488cf) SHA1(7aa3321db748f2612693f8348e590369e8d48140) ) @@ -2239,7 +2267,7 @@ ROM_START( tapper ) ROM_LOAD( "tappg2.bin", 0x08000, 0x4000, CRC(3a1f8778) SHA1(cb46a2248289ced7282b1463f433dcb970c42c1a) ) ROM_LOAD( "tappg3.bin", 0x0c000, 0x2000, CRC(e8dcdaa4) SHA1(45bf1571a2418c7dc00ccc7061a3e04e65cb6bff) ) - ROM_REGION( 0x10000, "ssiocpu", 0 ) + ROM_REGION( 0x10000, "ssio:cpu", 0 ) ROM_LOAD( "tapsnda7.bin", 0x0000, 0x1000, CRC(0e8bb9d5) SHA1(9e281c340b7702523c86d56317efad9e3688e585) ) ROM_LOAD( "tapsnda8.bin", 0x1000, 0x1000, CRC(0cf0e29b) SHA1(14334b9d2bfece3fe5bda0cbd53158ead8d27e53) ) ROM_LOAD( "tapsnda9.bin", 0x2000, 0x1000, CRC(31eb6dc6) SHA1(b38bba5f12516d899e023f99147868e3402fbd7b) ) @@ -2270,7 +2298,7 @@ ROM_START( tappera ) ROM_LOAD( "pr02_3c.128", 0x08000, 0x4000, CRC(b3755d41) SHA1(434d3c27b9f1e43def081d79b9f56dbce93a9207) ) ROM_LOAD( "pr03_4c.64", 0x0c000, 0x2000, CRC(77273096) SHA1(5e4e2dc1703b39f588ba374f6a610f273d710532) ) - ROM_REGION( 0x10000, "ssiocpu", 0 ) + ROM_REGION( 0x10000, "ssio:cpu", 0 ) ROM_LOAD( "tapsnda7.bin", 0x0000, 0x1000, CRC(0e8bb9d5) SHA1(9e281c340b7702523c86d56317efad9e3688e585) ) ROM_LOAD( "tapsnda8.bin", 0x1000, 0x1000, CRC(0cf0e29b) SHA1(14334b9d2bfece3fe5bda0cbd53158ead8d27e53) ) ROM_LOAD( "tapsnda9.bin", 0x2000, 0x1000, CRC(31eb6dc6) SHA1(b38bba5f12516d899e023f99147868e3402fbd7b) ) @@ -2301,7 +2329,7 @@ ROM_START( sutapper ) ROM_LOAD( "5793", 0x8000, 0x4000, CRC(fecbf683) SHA1(de365f4e567d93a9ed9672fabbc739a3a0d47d59) ) ROM_LOAD( "5794", 0xc000, 0x2000, CRC(5bdc1916) SHA1(ee038443ae55598568bd1a53c0a671a2828d3949) ) - ROM_REGION( 0x10000, "ssiocpu", 0 ) + ROM_REGION( 0x10000, "ssio:cpu", 0 ) ROM_LOAD( "5788", 0x00000, 0x1000, CRC(5c1d0982) SHA1(c2c94ab26ebce30ce4efc239e555c6368794d265) ) ROM_LOAD( "5787", 0x01000, 0x1000, CRC(09e74ed8) SHA1(f5c8585d443bca67d4065314a06431d1f104c553) ) ROM_LOAD( "5786", 0x02000, 0x1000, CRC(c3e98284) SHA1(2a4dc0deca48f4d2ac9fe673ecb9548415c996a9) ) @@ -2332,7 +2360,7 @@ ROM_START( rbtapper ) ROM_LOAD( "rbtpg2.bin", 0x08000, 0x4000, CRC(0b332c97) SHA1(b9878c8a61a98e787e547bb6ab81c809875891f3) ) ROM_LOAD( "rbtpg3.bin", 0x0c000, 0x2000, CRC(698c06f2) SHA1(ddb21e39ede2222cb2286ec9dba06341fe1c9db7) ) - ROM_REGION( 0x10000, "ssiocpu", 0 ) + ROM_REGION( 0x10000, "ssio:cpu", 0 ) ROM_LOAD( "5788", 0x00000, 0x1000, CRC(5c1d0982) SHA1(c2c94ab26ebce30ce4efc239e555c6368794d265) ) ROM_LOAD( "5787", 0x01000, 0x1000, CRC(09e74ed8) SHA1(f5c8585d443bca67d4065314a06431d1f104c553) ) ROM_LOAD( "5786", 0x02000, 0x1000, CRC(c3e98284) SHA1(2a4dc0deca48f4d2ac9fe673ecb9548415c996a9) ) @@ -2364,7 +2392,7 @@ ROM_START( timber ) ROM_LOAD( "timpg2.bin", 0x08000, 0x4000, CRC(632989f9) SHA1(9e9dc343746299bb0dc7ada206211366c5a05075) ) ROM_LOAD( "timpg3.bin", 0x0c000, 0x2000, CRC(dae8a0dc) SHA1(f065fa3184efa6524d4f950616f3fbae4ea17513) ) - ROM_REGION( 0x10000, "ssiocpu", 0 ) + ROM_REGION( 0x10000, "ssio:cpu", 0 ) ROM_LOAD( "tima7.bin", 0x00000, 0x1000, CRC(c615dc3e) SHA1(664d5e3ac3936fd04a855ee0c88f1c1b4d1dea5b) ) ROM_LOAD( "tima8.bin", 0x01000, 0x1000, CRC(83841c87) SHA1(bd5a2e567e015e10e45651e15b42ffb3b69d2305) ) ROM_LOAD( "tima9.bin", 0x02000, 0x1000, CRC(22bcdcd3) SHA1(69cedc8cec52ca310f828dfe73d7de04729b06d3) ) @@ -2395,7 +2423,7 @@ ROM_START( dotron ) ROM_LOAD( "loc-pg2.3c", 0x08000, 0x4000, CRC(ab0b3800) SHA1(457a18bd98a3c4a9f893a3704dbc7d0fde4ef8ba) ) ROM_LOAD( "loc-pg1.4c", 0x0c000, 0x2000, CRC(f98c9f8e) SHA1(a215f0fd6cd9e8cacbe06cb7bfe4e2cced150c86) ) - ROM_REGION( 0x10000, "ssiocpu", 0 ) + ROM_REGION( 0x10000, "ssio:cpu", 0 ) ROM_LOAD( "sound0.a7", 0x00000, 0x1000, CRC(6d39bf19) SHA1(3d27466fcb6d41133f16119cddb815833c8b4eda) ) ROM_LOAD( "sound1.a8", 0x01000, 0x1000, CRC(ac872e1d) SHA1(c2833b20e124c505be3d5be2c885b9cf9927ca4c) ) ROM_LOAD( "sound2.a9", 0x02000, 0x1000, CRC(e8ef6519) SHA1(261b0463a73b403bc46df3e04f3d12173787d6e7) ) @@ -2426,7 +2454,7 @@ ROM_START( dotrona ) ROM_LOAD( "aloc-pg2.3c", 0x08000, 0x4000, CRC(cb89c9be) SHA1(c773a68891fbf94808a2ee0036928c0c48d6673d) ) ROM_LOAD( "aloc-pg1.4c", 0x0c000, 0x2000, CRC(5098faf4) SHA1(9f861f99cb170513b68aee48bbfd60ee439d7fa9) ) - ROM_REGION( 0x10000, "ssiocpu", 0 ) + ROM_REGION( 0x10000, "ssio:cpu", 0 ) ROM_LOAD( "asound0.a7", 0x00000, 0x1000, CRC(7fb54293) SHA1(6d538a3e48f98e269623850f1f6774848a89fd59) ) ROM_LOAD( "asound1.a8", 0x01000, 0x1000, CRC(edef7326) SHA1(5c9a64604252eea0628bf9d6221e8add82f66abe) ) ROM_LOAD( "sound2.a9", 0x02000, 0x1000, CRC(e8ef6519) SHA1(261b0463a73b403bc46df3e04f3d12173787d6e7) ) @@ -2457,13 +2485,13 @@ ROM_START( dotrone ) ROM_LOAD( "loc-cpu3", 0x08000, 0x4000, CRC(94bb1a0e) SHA1(af4769fac39e67eff840675bf93cc4304f2875fd) ) ROM_LOAD( "loc-cpu4", 0x0c000, 0x2000, CRC(c137383c) SHA1(ccf7cf9c7c0528aa819cfca34c1c0e89ab2d586a) ) - ROM_REGION( 0x10000, "ssiocpu", 0 ) + ROM_REGION( 0x10000, "ssio:cpu", 0 ) ROM_LOAD( "loc-a", 0x00000, 0x1000, CRC(2de6a8a8) SHA1(6bba00daed8836297f3189db4e4fe8e158adc465) ) ROM_LOAD( "loc-b", 0x01000, 0x1000, CRC(4097663e) SHA1(afb5224529550cec378415a5cd81b47f6c6c101b) ) ROM_LOAD( "loc-c", 0x02000, 0x1000, CRC(f576b9e7) SHA1(4ff39c46c390aa93d900f5f7a0b35fa71f066863) ) ROM_LOAD( "loc-d", 0x03000, 0x1000, CRC(74b0059e) SHA1(1fe393721446538036fb6110fdc3920959ebd596) ) - ROM_REGION( 0x10000, "sntcpu", 0 ) + ROM_REGION( 0x10000, "snt:cpu", 0 ) ROM_LOAD( "pre.u3", 0x09000, 0x1000, CRC(c3d0f762) SHA1(a1857641c35b5bcb33f29fe79a1a581c4cbf129b) ) ROM_LOAD( "pre.u4", 0x0a000, 0x1000, CRC(7ca79b43) SHA1(c995e1e67d70706a090eb777e9fec0f1ba03f82d) ) ROM_LOAD( "pre.u5", 0x0b000, 0x1000, CRC(24e9618e) SHA1(eb245ff381a76b314a0ed3519e140444afae341c) ) @@ -2494,12 +2522,12 @@ ROM_START( nflfoot ) ROM_LOAD( "nflcpupg.2c", 0x04000, 0x4000, CRC(2aa76168) SHA1(608df883f5e960153a963404d5cc4b4ce4ec435d) ) ROM_LOAD( "nflcpupg.3c", 0x08000, 0x4000, CRC(5ec01e09) SHA1(2bf60ab7d47f53583b677195976d6f6a9e90c55c) ) - ROM_REGION( 0x10000, "ssiocpu", 0 ) + ROM_REGION( 0x10000, "ssio:cpu", 0 ) ROM_LOAD( "nflsnd.a7", 0x0000, 0x1000, CRC(1339be2e) SHA1(5c1743f4d20f94053eb306d3749057608df4a6a2) ) ROM_LOAD( "nflsnd.a8", 0x1000, 0x1000, CRC(8630b560) SHA1(0c537f48184d3a7a9ee51c30d7c33dc39c46e823) ) ROM_LOAD( "nflsnd.a9", 0x2000, 0x1000, CRC(1e0fe4c8) SHA1(718dfaced2d8d84dab4c32265bed422e07af0f9e) ) - ROM_REGION( 0x10000, "sntcpu", 0 ) + ROM_REGION( 0x10000, "snt:cpu", 0 ) ROM_LOAD( "nfl-sqtk-11-15-83.u2", 0x08000, 0x1000, CRC(aeddda31) SHA1(8ebe9d8606c4328b1b3f4633db30d7636acf210b) ) ROM_LOAD( "nfl-sqtk-11-15-83.u3", 0x09000, 0x1000, CRC(36229d13) SHA1(d174098ce1e4bc89ded15a08db37933ab9532f2b) ) ROM_LOAD( "nfl-sqtk-11-15-83.u4", 0x0a000, 0x1000, CRC(b202439b) SHA1(b09e94b0b176f80b12fb4cefa6efd5b2cccb6192) ) @@ -2534,9 +2562,9 @@ ROM_START( demoderb ) ROM_LOAD( "dd_pro1", 0x04000, 0x4000, CRC(4c713bfe) SHA1(493b6ba01e86e7586ad123c53cf7f0a0c191d670) ) ROM_LOAD( "dd_pro2", 0x08000, 0x4000, CRC(c2cbd2a4) SHA1(fa642b2f61ff5529ab688a43c1dc14357a4eba6f) ) - ROM_REGION( 0x10000, "ssiocpu", ROMREGION_ERASE00 ) /* 64k for the audio CPU, not populated */ + ROM_REGION( 0x10000, "ssio:cpu", ROMREGION_ERASE00 ) /* 64k for the audio CPU, not populated */ - ROM_REGION( 0x10000, "tcscpu", 0 ) /* 64k for the Turbo Cheap Squeak */ + ROM_REGION( 0x10000, "tcs:cpu", 0 ) /* 64k for the Turbo Cheap Squeak */ ROM_LOAD( "tcs_u5.bin", 0x0c000, 0x2000, CRC(eca33b2c) SHA1(938b021ea3b0f23aed7a98a930a58af371a02303) ) ROM_LOAD( "tcs_u4.bin", 0x0e000, 0x2000, CRC(3490289a) SHA1(a9d56ea60bb901267da41ab408f8e1ed3742b0ac) ) @@ -2576,6 +2604,13 @@ static void mcr_init(running_machine &machine, int cpuboard, int vidboard, int s state_save_register_global(machine, input_mux); state_save_register_global(machine, last_op4); + + midway_ssio_device *ssio = machine.device("ssio"); + if (ssio != NULL) + { + mcr_state *state = machine.driver_data(); + ssio->set_custom_output(0, 0xff, write8_delegate(FUNC(mcr_state::mcr_control_port_w), state)); + } } @@ -2585,8 +2620,8 @@ static DRIVER_INIT( solarfox ) mcr_sound_init(machine, MCR_SSIO); mcr_state *state = machine.driver_data(); - ssio_set_custom_input(0, 0x1c, read8_delegate(FUNC(mcr_state::solarfox_ip0_r),state)); - ssio_set_custom_input(1, 0xff, read8_delegate(FUNC(mcr_state::solarfox_ip1_r),state)); + machine.device("ssio")->set_custom_input(0, 0x1c, read8_delegate(FUNC(mcr_state::solarfox_ip0_r),state)); + machine.device("ssio")->set_custom_input(1, 0xff, read8_delegate(FUNC(mcr_state::solarfox_ip1_r),state)); mcr12_sprite_xoffs = 16; } @@ -2598,7 +2633,7 @@ static DRIVER_INIT( kick ) mcr_sound_init(machine, MCR_SSIO); mcr_state *state = machine.driver_data(); - ssio_set_custom_input(1, 0xf0, read8_delegate(FUNC(mcr_state::kick_ip1_r),state)); + machine.device("ssio")->set_custom_input(1, 0xf0, read8_delegate(FUNC(mcr_state::kick_ip1_r),state)); mcr12_sprite_xoffs_flip = 16; } @@ -2617,9 +2652,9 @@ static DRIVER_INIT( wacko ) mcr_sound_init(machine, MCR_SSIO); mcr_state *state = machine.driver_data(); - ssio_set_custom_input(1, 0xff, read8_delegate(FUNC(mcr_state::wacko_ip1_r),state)); - ssio_set_custom_input(2, 0xff, read8_delegate(FUNC(mcr_state::wacko_ip2_r),state)); - ssio_set_custom_output(4, 0x01, write8_delegate(FUNC(mcr_state::wacko_op4_w),state)); + machine.device("ssio")->set_custom_input(1, 0xff, read8_delegate(FUNC(mcr_state::wacko_ip1_r),state)); + machine.device("ssio")->set_custom_input(2, 0xff, read8_delegate(FUNC(mcr_state::wacko_ip2_r),state)); + machine.device("ssio")->set_custom_output(4, 0x01, write8_delegate(FUNC(mcr_state::wacko_op4_w),state)); } @@ -2629,7 +2664,7 @@ static DRIVER_INIT( twotiger ) mcr_sound_init(machine, MCR_SSIO); mcr_state *state = machine.driver_data(); - ssio_set_custom_output(4, 0xff, write8_delegate(FUNC(mcr_state::twotiger_op4_w),state)); + machine.device("ssio")->set_custom_output(4, 0xff, write8_delegate(FUNC(mcr_state::twotiger_op4_w),state)); machine.device("maincpu")->memory().space(AS_PROGRAM)->install_readwrite_handler(0xe800, 0xefff, 0, 0x1000, read8_delegate(FUNC(mcr_state::twotiger_videoram_r),state), write8_delegate(FUNC(mcr_state::twotiger_videoram_w),state)); } @@ -2640,8 +2675,8 @@ static DRIVER_INIT( kroozr ) mcr_sound_init(machine, MCR_SSIO); mcr_state *state = machine.driver_data(); - ssio_set_custom_input(1, 0x47, read8_delegate(FUNC(mcr_state::kroozr_ip1_r),state)); - ssio_set_custom_output(4, 0x34, write8_delegate(FUNC(mcr_state::kroozr_op4_w),state)); + machine.device("ssio")->set_custom_input(1, 0x47, read8_delegate(FUNC(mcr_state::kroozr_ip1_r),state)); + machine.device("ssio")->set_custom_output(4, 0x34, write8_delegate(FUNC(mcr_state::kroozr_op4_w),state)); } @@ -2651,7 +2686,7 @@ static DRIVER_INIT( journey ) mcr_sound_init(machine, MCR_SSIO); mcr_state *state = machine.driver_data(); - ssio_set_custom_output(4, 0x01, write8_delegate(FUNC(mcr_state::journey_op4_w),state)); + machine.device("ssio")->set_custom_output(4, 0x01, write8_delegate(FUNC(mcr_state::journey_op4_w),state)); } @@ -2668,7 +2703,7 @@ static DRIVER_INIT( dotrone ) mcr_sound_init(machine, MCR_SSIO | MCR_SQUAWK_N_TALK); mcr_state *state = machine.driver_data(); - ssio_set_custom_output(4, 0xff, write8_delegate(FUNC(mcr_state::dotron_op4_w),state)); + machine.device("ssio")->set_custom_output(4, 0xff, write8_delegate(FUNC(mcr_state::dotron_op4_w),state)); } @@ -2678,8 +2713,8 @@ static DRIVER_INIT( nflfoot ) mcr_sound_init(machine, MCR_SSIO | MCR_SQUAWK_N_TALK); mcr_state *state = machine.driver_data(); - ssio_set_custom_input(2, 0x80, read8_delegate(FUNC(mcr_state::nflfoot_ip2_r),state)); - ssio_set_custom_output(4, 0xff, write8_delegate(FUNC(mcr_state::nflfoot_op4_w),state)); + machine.device("ssio")->set_custom_input(2, 0x80, read8_delegate(FUNC(mcr_state::nflfoot_ip2_r),state)); + machine.device("ssio")->set_custom_output(4, 0xff, write8_delegate(FUNC(mcr_state::nflfoot_op4_w),state)); nflfoot_serial_out_active = FALSE; nflfoot_serial_in_active = FALSE; @@ -2699,12 +2734,12 @@ static DRIVER_INIT( demoderb ) mcr_sound_init(machine, MCR_SSIO | MCR_TURBO_CHIP_SQUEAK); mcr_state *state = machine.driver_data(); - ssio_set_custom_input(1, 0xfc, read8_delegate(FUNC(mcr_state::demoderb_ip1_r),state)); - ssio_set_custom_input(2, 0xfc, read8_delegate(FUNC(mcr_state::demoderb_ip2_r),state)); - ssio_set_custom_output(4, 0xff, write8_delegate(FUNC(mcr_state::demoderb_op4_w),state)); + machine.device("ssio")->set_custom_input(1, 0xfc, read8_delegate(FUNC(mcr_state::demoderb_ip1_r),state)); + machine.device("ssio")->set_custom_input(2, 0xfc, read8_delegate(FUNC(mcr_state::demoderb_ip2_r),state)); + machine.device("ssio")->set_custom_output(4, 0xff, write8_delegate(FUNC(mcr_state::demoderb_op4_w),state)); /* the SSIO Z80 doesn't have any program to execute */ - machine.device("tcscpu")->suspend(SUSPEND_REASON_DISABLE, 1); + machine.device("ssio:cpu")->suspend(SUSPEND_REASON_DISABLE, 1); } diff --git a/src/mame/drivers/mcr3.c b/src/mame/drivers/mcr3.c index cbeb0c5e7bb..1a7b50d6910 100644 --- a/src/mame/drivers/mcr3.c +++ b/src/mame/drivers/mcr3.c @@ -162,7 +162,7 @@ WRITE8_MEMBER(mcr3_state::demoderm_op6_w) if (data & 0x40) m_input_mux = 1; /* low 5 bits control the turbo CS */ - turbocs_data_w(space, offset, data); + m_turbo_chip_squeak->write(space, offset, data); } @@ -265,7 +265,7 @@ WRITE8_MEMBER(mcr3_state::maxrpm_op6_w) m_maxrpm_adc_select = (m_maxrpm_adc_control >> 1) & 3; /* low 5 bits control the turbo CS */ - turbocs_data_w(space, offset, data); + m_turbo_chip_squeak->write(space, offset, data); } @@ -278,17 +278,17 @@ WRITE8_MEMBER(mcr3_state::maxrpm_op6_w) READ8_MEMBER(mcr3_state::rampage_ip4_r) { - return input_port_read(machine(), "MONO.IP4") | (soundsgood_status_r(space,0) << 7); + return input_port_read(machine(), "MONO.IP4") | (m_sounds_good->read(space,0) << 7); } WRITE8_MEMBER(mcr3_state::rampage_op6_w) { /* bit 5 controls reset of the Sounds Good board */ - soundsgood_reset_w(machine(), (~data >> 5) & 1); + m_sounds_good->reset_write((~data >> 5) & 1); /* low 5 bits go directly to the Sounds Good board */ - soundsgood_data_w(space, offset, data); + m_sounds_good->write(space, offset, data); } @@ -301,7 +301,7 @@ WRITE8_MEMBER(mcr3_state::rampage_op6_w) READ8_MEMBER(mcr3_state::powerdrv_ip2_r) { - return input_port_read(machine(), "MONO.IP2") | (soundsgood_status_r(space, 0) << 7); + return input_port_read(machine(), "MONO.IP2") | (m_sounds_good->read(space, 0) << 7); } @@ -329,10 +329,10 @@ WRITE8_MEMBER(mcr3_state::powerdrv_op5_w) WRITE8_MEMBER(mcr3_state::powerdrv_op6_w) { /* bit 5 controls reset of the Sounds Good board */ - soundsgood_reset_w(machine(), (~data >> 5) & 1); + m_sounds_good->reset_write((~data >> 5) & 1); /* low 5 bits go directly to the Sounds Good board */ - soundsgood_data_w(space, offset, data); + m_sounds_good->write(space, offset, data); } @@ -348,7 +348,7 @@ READ8_MEMBER(mcr3_state::stargrds_ip0_r) UINT8 result = input_port_read(machine(), "MONO.IP0"); if (m_input_mux) result = (result & ~0x0a) | (input_port_read(machine(), "MONO.IP0.ALT") & 0x0a); - return (result & ~0x10) | ((soundsgood_status_r(space, 0) << 4) & 0x10); + return (result & ~0x10) | ((m_sounds_good->read(space, 0) << 4) & 0x10); } @@ -372,10 +372,10 @@ WRITE8_MEMBER(mcr3_state::stargrds_op5_w) WRITE8_MEMBER(mcr3_state::stargrds_op6_w) { /* bit 6 controls reset of the Sounds Good board */ - soundsgood_reset_w(machine(), (~data >> 6) & 1); + m_sounds_good->reset_write((~data >> 6) & 1); /* unline the other games, the STROBE is in the high bit instead of the low bit */ - soundsgood_data_w(space, offset, (data << 1) | (data >> 7)); + m_sounds_good->write(space, offset, (data << 1) | (data >> 7)); } @@ -388,14 +388,14 @@ WRITE8_MEMBER(mcr3_state::stargrds_op6_w) READ8_MEMBER(mcr3_state::spyhunt_ip1_r) { - return input_port_read(machine(), "SSIO.IP1") | (csdeluxe_status_r(space, 0) << 5); + return input_port_read(machine(), "ssio:IP1") | (m_chip_squeak_deluxe->read(space, 0) << 5); } READ8_MEMBER(mcr3_state::spyhunt_ip2_r) { /* multiplexed steering wheel/gas pedal */ - return input_port_read(machine(), m_input_mux ? "SSIO.IP2.ALT" : "SSIO.IP2"); + return input_port_read(machine(), m_input_mux ? "ssio:IP2.ALT" : "ssio:IP2"); } @@ -432,7 +432,7 @@ WRITE8_MEMBER(mcr3_state::spyhunt_op4_w) m_last_op4 = data; /* low 5 bits go to control the Chip Squeak Deluxe */ - csdeluxe_data_w(space, offset, data); + m_chip_squeak_deluxe->write(space, offset, data); } @@ -447,9 +447,9 @@ READ8_MEMBER(mcr3_state::turbotag_ip2_r) { /* multiplexed steering wheel/gas pedal */ if (m_input_mux) - return input_port_read(machine(), "SSIO.IP2.ALT"); + return input_port_read(machine(), "ssio:IP2.ALT"); - return input_port_read(machine(), "SSIO.IP2") + 5 * (machine().primary_screen->frame_number() & 1); + return input_port_read(machine(), "ssio:IP2") + 5 * (machine().primary_screen->frame_number() & 1); } @@ -523,7 +523,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( spyhunt_portmap, AS_IO, 8, mcr3_state ) ADDRESS_MAP_UNMAP_HIGH ADDRESS_MAP_GLOBAL_MASK(0xff) - SSIO_INPUT_PORTS + SSIO_INPUT_PORTS("ssio") AM_RANGE(0x84, 0x86) AM_WRITE(spyhunt_scroll_value_w) AM_RANGE(0xe0, 0xe0) AM_WRITE(watchdog_reset_w) AM_RANGE(0xe8, 0xe8) AM_WRITENOP @@ -886,7 +886,7 @@ INPUT_PORTS_END /* verified from wiring diagram, plus DIP switches from manual */ static INPUT_PORTS_START( spyhunt ) - PORT_START("SSIO.IP0") /* J4 1-8 */ + PORT_START("ssio:IP0") /* J4 1-8 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x0c, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -895,7 +895,7 @@ static INPUT_PORTS_START( spyhunt ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) - PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ + PORT_START("ssio:IP1") /* J4 10-13,15-18 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Oil Slick") PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("Missiles") PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Weapon Truck") @@ -904,10 +904,10 @@ static INPUT_PORTS_START( spyhunt ) PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* status from CS deluxe, never read */ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("SSIO.IP2") /* J5 1-8 */ + PORT_START("ssio:IP2") /* J5 1-8 */ PORT_BIT( 0xff, 0x30, IPT_PEDAL ) PORT_MINMAX(0x30,0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) - PORT_START("SSIO.IP3") /* DIPSW @ B3 */ + PORT_START("ssio:IP3") /* DIPSW @ B3 */ PORT_DIPNAME( 0x01, 0x01, "Game Timer" ) PORT_DIPSETTING( 0x00, "1:00" ) PORT_DIPSETTING( 0x01, "1:30" ) @@ -918,20 +918,20 @@ static INPUT_PORTS_START( spyhunt ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("SSIO.IP4") /* J6 1-8 */ + PORT_START("ssio:IP4") /* J6 1-8 */ PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("SSIO.DIP") + PORT_START("ssio:DIP") PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("SSIO.IP2.ALT") + PORT_START("ssio:IP2.ALT") PORT_BIT( 0xff, 0x74, IPT_PADDLE ) PORT_MINMAX(0x34,0xb4) PORT_SENSITIVITY(40) PORT_KEYDELTA(10) INPUT_PORTS_END /* not verified, no manual found */ static INPUT_PORTS_START( crater ) - PORT_START("SSIO.IP0") /* J4 1-8 */ + PORT_START("ssio:IP0") /* J4 1-8 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) @@ -941,10 +941,10 @@ static INPUT_PORTS_START( crater ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) - PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ + PORT_START("ssio:IP1") /* J4 10-13,15-18 */ PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(10) PORT_CODE_DEC(KEYCODE_Z) PORT_CODE_INC(KEYCODE_X) PORT_REVERSE - PORT_START("SSIO.IP2") /* J5 1-8 */ + PORT_START("ssio:IP2") /* J5 1-8 */ PORT_BIT( 0x03, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_2WAY PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_2WAY @@ -953,20 +953,20 @@ static INPUT_PORTS_START( crater ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("SSIO.IP3") /* DIPSW @ B3 */ + PORT_START("ssio:IP3") /* DIPSW @ B3 */ PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("SSIO.IP4") /* J6 1-8 */ + PORT_START("ssio:IP4") /* J6 1-8 */ PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("SSIO.DIP") + PORT_START("ssio:DIP") PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) INPUT_PORTS_END /* not verified, no manual found */ static INPUT_PORTS_START( turbotag ) - PORT_START("SSIO.IP0") /* J4 1-8 */ + PORT_START("ssio:IP0") /* J4 1-8 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x0c, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -975,7 +975,7 @@ static INPUT_PORTS_START( turbotag ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) - PORT_START("SSIO.IP1") /* J4 10-13,15-18 */ + PORT_START("ssio:IP1") /* J4 10-13,15-18 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Left Button") PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("Left Trigger") PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Center Button") @@ -984,10 +984,10 @@ static INPUT_PORTS_START( turbotag ) PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* status from CS deluxe, never read */ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("SSIO.IP2") /* J5 1-8 */ + PORT_START("ssio:IP2") /* J5 1-8 */ PORT_BIT( 0xff, 0x3c, IPT_PEDAL ) PORT_MINMAX(60,180) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) - PORT_START("SSIO.IP3") /* DIPSW @ B3 */ + PORT_START("ssio:IP3") /* DIPSW @ B3 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) @@ -996,13 +996,13 @@ static INPUT_PORTS_START( turbotag ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("SSIO.IP4") /* J6 1-8 */ + PORT_START("ssio:IP4") /* J6 1-8 */ PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("SSIO.DIP") + PORT_START("ssio:DIP") PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("SSIO.IP2.ALT") + PORT_START("ssio:IP2.ALT") PORT_BIT( 0xff, 0x60, IPT_PADDLE ) PORT_SENSITIVITY(40) PORT_KEYDELTA(10) INPUT_PORTS_END @@ -1089,6 +1089,9 @@ static MACHINE_CONFIG_START( mcrmono, mcr3_state ) MCFG_MACHINE_START(mcr) MCFG_MACHINE_RESET(mcr) MCFG_NVRAM_ADD_0FILL("nvram") + + // sound hardware + MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") /* video hardware */ MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK) @@ -1114,7 +1117,9 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( mono_tcs, mcrmono ) /* basic machine hardware */ - MCFG_FRAGMENT_ADD(turbo_chip_squeak) + MCFG_MIDWAY_TURBO_CHIP_SQUEAK_ADD("tcs") + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) MACHINE_CONFIG_END @@ -1122,7 +1127,9 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( mono_sg, mcrmono ) /* basic machine hardware */ - MCFG_FRAGMENT_ADD(sounds_good) + MCFG_MIDWAY_SOUNDS_GOOD_ADD("sg") + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) MACHINE_CONFIG_END @@ -1133,7 +1140,9 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( mcrscroll, mcrmono ) /* basic machine hardware */ - MCFG_FRAGMENT_ADD(mcr_ssio) + MCFG_MIDWAY_SSIO_ADD("ssio") + MCFG_SOUND_ROUTE(0, "lspeaker", 1.0) + MCFG_SOUND_ROUTE(1, "rspeaker", 1.0) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(spyhunt_map) @@ -1156,7 +1165,9 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( mcrsc_csd, mcrscroll ) /* basic machine hardware */ - MCFG_FRAGMENT_ADD(chip_squeak_deluxe_stereo) + MCFG_MIDWAY_CHIP_SQUEAK_DELUXE_ADD("csd") + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) MACHINE_CONFIG_END @@ -1173,7 +1184,7 @@ ROM_START( demoderm ) ROM_LOAD( "pro1.5b", 0x08000, 0x8000, CRC(034c00fc) SHA1(0f0e8f123a34c330021bce76ed7f38bcb2e9af4e) ) ROM_FILL( 0x0e000, 0x2000, 0xff ) /* upper 8k is not mapped on monoboard */ - ROM_REGION( 0x10000, "tcscpu", 0 ) /* 64k for the Turbo Cheap Squeak */ + ROM_REGION( 0x10000, "tcs:cpu", 0 ) /* 64k for the Turbo Cheap Squeak */ ROM_LOAD( "tcs_u5.bin", 0x0c000, 0x2000, CRC(eca33b2c) SHA1(938b021ea3b0f23aed7a98a930a58af371a02303) ) ROM_LOAD( "tcs_u4.bin", 0x0e000, 0x2000, CRC(3490289a) SHA1(a9d56ea60bb901267da41ab408f8e1ed3742b0ac) ) @@ -1199,7 +1210,7 @@ ROM_START( sarge ) ROM_LOAD( "cpu_5b.bin", 0x08000, 0x8000, CRC(6800e746) SHA1(018c2b622b3654530ebc2c299b3f745777163d4b) ) ROM_FILL( 0x0e000, 0x2000, 0xff ) /* upper 8k is not mapped on monoboard */ - ROM_REGION( 0x10000, "tcscpu", 0 ) /* 64k for the Turbo Cheap Squeak */ + ROM_REGION( 0x10000, "tcs:cpu", 0 ) /* 64k for the Turbo Cheap Squeak */ ROM_LOAD( "tcs_u5.bin", 0xc000, 0x2000, CRC(a894ef8a) SHA1(7f53927fc185fff8ba1b1747f0d565e089d879e6) ) ROM_LOAD( "tcs_u4.bin", 0xe000, 0x2000, CRC(6ca6faf3) SHA1(4647e633dd11f55a65c3acf81adeb3af93624991) ) @@ -1230,7 +1241,7 @@ ROM_START( maxrpm ) ROM_LOAD( "pro.1", 0x08000, 0x8000, CRC(f628bb30) SHA1(0514906b9764a7f02a730a610affea4d42a4510d) ) ROM_FILL( 0x0e000, 0x2000, 0xff ) /* upper 8k is not mapped on monoboard */ - ROM_REGION( 0x10000, "tcscpu", 0 ) /* 64k for the Turbo Cheap Squeak */ + ROM_REGION( 0x10000, "tcs:cpu", 0 ) /* 64k for the Turbo Cheap Squeak */ ROM_LOAD( "turbskwk.u5", 0x8000, 0x4000, CRC(55c3b759) SHA1(89d690a007a996e9c7df7b365942e4da755d15d7) ) ROM_LOAD( "turbskwk.u4", 0xc000, 0x4000, CRC(31a2da2e) SHA1(582434b5d6bc8e84f39191976d8aa0ef9245f253) ) @@ -1252,7 +1263,7 @@ ROM_START( rampage ) ROM_LOAD( "pro1rev3.5b", 0x08000, 0x8000, CRC(d89bd9a4) SHA1(3531464ffe49dfaf2755d9e2dc1aea23819b3a5d) ) ROM_FILL( 0x0e000, 0x2000, 0xff ) /* upper 8k is not mapped on monoboard */ - ROM_REGION( 0x40000, "sgcpu", 0 ) /* 256k for the Sounds Good board */ + ROM_REGION( 0x40000, "sg:cpu", 0 ) /* 256k for the Sounds Good board */ ROM_LOAD16_BYTE( "ramp_u7.snd", 0x00000, 0x8000, CRC(cffd7fa5) SHA1(7c5cecce1d428f847fea37d53eb09c6f62055c6f) ) /* these are Revision 2 sound ROMs */ ROM_LOAD16_BYTE( "ramp_u17.snd", 0x00001, 0x8000, CRC(e92c596b) SHA1(4e2d87398f2e7b637cbad6cb16d832dfa8f8288c) ) ROM_LOAD16_BYTE( "ramp_u8.snd", 0x10000, 0x8000, CRC(11f787e4) SHA1(1fa195bf9169608099d17be5801738a4e17bec3d) ) @@ -1276,7 +1287,7 @@ ROM_START( rampage2 ) ROM_LOAD( "pro1rev2.5b", 0x08000, 0x8000, CRC(58523d75) SHA1(5cd512864568ec7793bda0164f21e7d72a7ea817) ) ROM_FILL( 0x0e000, 0x2000, 0xff ) /* upper 8k is not mapped on monoboard */ - ROM_REGION( 0x40000, "sgcpu", 0 ) /* 256k for the Sounds Good board */ + ROM_REGION( 0x40000, "sg:cpu", 0 ) /* 256k for the Sounds Good board */ ROM_LOAD16_BYTE( "ramp_u7.snd", 0x00000, 0x8000, CRC(cffd7fa5) SHA1(7c5cecce1d428f847fea37d53eb09c6f62055c6f) ) /* these are Revision 2 sound ROMs */ ROM_LOAD16_BYTE( "ramp_u17.snd", 0x00001, 0x8000, CRC(e92c596b) SHA1(4e2d87398f2e7b637cbad6cb16d832dfa8f8288c) ) ROM_LOAD16_BYTE( "ramp_u8.snd", 0x10000, 0x8000, CRC(11f787e4) SHA1(1fa195bf9169608099d17be5801738a4e17bec3d) ) @@ -1300,7 +1311,7 @@ ROM_START( powerdrv ) ROM_LOAD( "pdrv5b.bin", 0x08000, 0x8000, CRC(fa0544ad) SHA1(55a9cf8c8648761443e4a5a3b214f4d6236cbaff) ) ROM_FILL( 0x0e000, 0x2000, 0xff ) /* upper 8k is not mapped on monoboard */ - ROM_REGION( 0x40000, "sgcpu", 0 ) /* 256k for the Sounds Good board */ + ROM_REGION( 0x40000, "sg:cpu", 0 ) /* 256k for the Sounds Good board */ ROM_LOAD16_BYTE( "pdsndu7.bin", 0x00000, 0x8000, CRC(78713e78) SHA1(11382c024536f743e051ba208ae02d0f5e07cf5e) ) ROM_LOAD16_BYTE( "pdsndu17.bin", 0x00001, 0x8000, CRC(c41de6e4) SHA1(0391afd96ee80dd1d4a34e661e5df1e01fbbd57a) ) ROM_LOAD16_BYTE( "pdsndu8.bin", 0x10000, 0x8000, CRC(15714036) SHA1(77ca5f703eb7f146e13d9c01f4427f6aaa31df39) ) @@ -1324,7 +1335,7 @@ ROM_START( stargrds ) ROM_LOAD( "pro-1.5b", 0x08000, 0x8000, CRC(dba428b0) SHA1(72efa2f02e95f05a5503ced136fbdf3fcdf57554) ) ROM_FILL( 0x0e000, 0x2000, 0xff ) /* upper 8k is not mapped on monoboard */ - ROM_REGION( 0x40000, "sgcpu", 0 ) /* 256k for the Sounds Good board */ + ROM_REGION( 0x40000, "sg:cpu", 0 ) /* 256k for the Sounds Good board */ ROM_LOAD16_BYTE( "snd0.u7", 0x00000, 0x8000, CRC(7755a493) SHA1(a888fba45a2a31de5b3082bfc5ccef94dafc4d16) ) ROM_LOAD16_BYTE( "snd1.u17", 0x00001, 0x8000, CRC(d98d14ae) SHA1(51dbb97655ab8a389ca67f0e796ab57894f5bb32) ) @@ -1349,11 +1360,11 @@ ROM_START( spyhunt ) ROM_LOAD( "cpu_pg4.10d", 0x8000, 0x2000, CRC(a3033c15) SHA1(e9811450a7c952561912777d679fe45a6b5a794a) ) ROM_LOAD( "cpu_pg5.11d", 0xa000, 0x4000, CRC(53a4f7cd) SHA1(051b07ae993e14b329507710c0f7cadaa952f9ae) ) - ROM_REGION( 0x10000, "ssiocpu", 0 ) + ROM_REGION( 0x10000, "ssio:cpu", 0 ) ROM_LOAD( "snd_0sd.a8", 0x0000, 0x1000, CRC(c95cf31e) SHA1(d1b0e299a27e306ddbc0654fd3a9d981c92afe8c) ) ROM_LOAD( "snd_1sd.a7", 0x1000, 0x1000, CRC(12aaa48e) SHA1(c6b835fc45e4484a4d52b682ce015caa242c8b4f) ) - ROM_REGION( 0x8000, "csdcpu", 0 ) /* 32k for the Chip Squeak Deluxe */ + ROM_REGION( 0x8000, "csd:cpu", 0 ) /* 32k for the Chip Squeak Deluxe */ ROM_LOAD16_BYTE( "csd_u7a.u7", 0x00000, 0x2000, CRC(6e689fe7) SHA1(38ad2e9f12b9d389fb2568ebcb32c8bd1ac6879e) ) ROM_LOAD16_BYTE( "csd_u17b.u17", 0x00001, 0x2000, CRC(0d9ddce6) SHA1(d955c0e67fc78b517cc229601ab4023cc5a644c2) ) ROM_LOAD16_BYTE( "csd_u8c.u8", 0x04000, 0x2000, CRC(35563cd0) SHA1(5708d374dd56758194c95118f096ea51bf12bf64) ) @@ -1392,11 +1403,11 @@ ROM_START( spyhuntp ) ROM_LOAD( "sh_mb_6.bin", 0x8000, 0x2000, CRC(8cbf04d8) SHA1(e45cb36935367e46ea41de0177b3453cd8bdce85) ) ROM_LOAD( "cpu_pg5.11d", 0xa000, 0x4000, CRC(53a4f7cd) SHA1(051b07ae993e14b329507710c0f7cadaa952f9ae) ) - ROM_REGION( 0x10000, "ssiocpu", 0 ) + ROM_REGION( 0x10000, "ssio:cpu", 0 ) ROM_LOAD( "snd_0sd.a8", 0x0000, 0x1000, CRC(c95cf31e) SHA1(d1b0e299a27e306ddbc0654fd3a9d981c92afe8c) ) ROM_LOAD( "snd_1sd.a7", 0x1000, 0x1000, CRC(12aaa48e) SHA1(c6b835fc45e4484a4d52b682ce015caa242c8b4f) ) - ROM_REGION( 0x8000, "csdcpu", 0 ) /* 32k for the Chip Squeak Deluxe */ + ROM_REGION( 0x8000, "csd:cpu", 0 ) /* 32k for the Chip Squeak Deluxe */ ROM_LOAD16_BYTE( "csd_u7a.u7", 0x00000, 0x2000, CRC(6e689fe7) SHA1(38ad2e9f12b9d389fb2568ebcb32c8bd1ac6879e) ) ROM_LOAD16_BYTE( "csd_u17b.u17", 0x00001, 0x2000, CRC(0d9ddce6) SHA1(d955c0e67fc78b517cc229601ab4023cc5a644c2) ) ROM_LOAD16_BYTE( "csd_u8c.u8", 0x04000, 0x2000, CRC(35563cd0) SHA1(5708d374dd56758194c95118f096ea51bf12bf64) ) @@ -1434,7 +1445,7 @@ ROM_START( crater ) ROM_LOAD( "crcpu.9d", 0x6000, 0x2000, CRC(a03c4b11) SHA1(6a442a0828942dc51dbe0d3f19be855a52c12f39) ) ROM_LOAD( "crcpu.10d", 0x8000, 0x2000, CRC(44ae4cbd) SHA1(2188bf697f1b3fcbb2ad6cbd4d9098e3b8d56a95) ) - ROM_REGION( 0x10000, "ssiocpu", 0 ) + ROM_REGION( 0x10000, "ssio:cpu", 0 ) ROM_LOAD( "crsnd4.a7", 0x0000, 0x1000, CRC(fd666cb5) SHA1(257174266e264db8ac9af5f2296fd0a22847f85f) ) ROM_LOAD( "crsnd1.a8", 0x1000, 0x1000, CRC(90bf2c4c) SHA1(7adfbf2251b5d46043d614554320e2fe544cc570) ) ROM_LOAD( "crsnd2.a9", 0x2000, 0x1000, CRC(3b8deef1) SHA1(a14186a33a7b5ca07086ce44fb1c8c64900654d0) ) @@ -1474,9 +1485,9 @@ ROM_START( turbotag ) ROM_LOAD( "ttprog5.bin", 0xa000, 0x2000, CRC(11e62fe4) SHA1(72897702c61486b654e4b4a3f6560c144c862e1f) ) ROM_RELOAD( 0xc000, 0x2000 ) - ROM_REGION( 0x10000, "ssiocpu", ROMREGION_ERASE00 ) + ROM_REGION( 0x10000, "ssio:cpu", ROMREGION_ERASE00 ) - ROM_REGION( 0x8000, "csdcpu", 0 ) /* 32k for the Chip Squeak Deluxe */ + ROM_REGION( 0x8000, "csd:cpu", 0 ) /* 32k for the Chip Squeak Deluxe */ ROM_LOAD16_BYTE( "ttu7.bin", 0x00000, 0x2000, CRC(8ebb3302) SHA1(c516abdae6eea524a6d2a039ed9bd7dff72ab986) ) ROM_LOAD16_BYTE( "ttu17.bin", 0x00001, 0x2000, CRC(605d6c74) SHA1(a6c2bc95cca372fa823ab256c9dd1f92b6ba45fd) ) ROM_LOAD16_BYTE( "ttu8.bin", 0x04000, 0x2000, CRC(6bfcb22a) SHA1(7b895e3ae1e99f195bb32b052f801b58c63a401c) ) @@ -1538,7 +1549,7 @@ static DRIVER_INIT( sarge ) { mcr3_state *state = machine.driver_data(); mcr_common_init(machine, MCR_TURBO_CHIP_SQUEAK); - machine.device("maincpu")->memory().space(AS_IO)->install_write_handler(0x06, 0x06, write8_delegate(FUNC(mcr3_state::turbocs_data_w),state)); + machine.device("maincpu")->memory().space(AS_IO)->install_write_handler(0x06, 0x06, write8_delegate(FUNC(midway_turbo_chip_squeak_device::write),state->m_turbo_chip_squeak.target())); } @@ -1592,9 +1603,9 @@ static DRIVER_INIT( spyhunt ) { mcr3_state *state = machine.driver_data(); mcr_common_init(machine, MCR_SSIO | MCR_CHIP_SQUEAK_DELUXE); - ssio_set_custom_input(1, 0x60, read8_delegate(FUNC(mcr3_state::spyhunt_ip1_r),state)); - ssio_set_custom_input(2, 0xff, read8_delegate(FUNC(mcr3_state::spyhunt_ip2_r),state)); - ssio_set_custom_output(4, 0xff, write8_delegate(FUNC(mcr3_state::spyhunt_op4_w),state)); + machine.device("ssio")->set_custom_input(1, 0x60, read8_delegate(FUNC(mcr3_state::spyhunt_ip1_r),state)); + machine.device("ssio")->set_custom_input(2, 0xff, read8_delegate(FUNC(mcr3_state::spyhunt_ip2_r),state)); + machine.device("ssio")->set_custom_output(4, 0xff, write8_delegate(FUNC(mcr3_state::spyhunt_op4_w),state)); state->m_spyhunt_sprite_color_mask = 0x00; state->m_spyhunt_scroll_offset = 16; @@ -1615,15 +1626,15 @@ static DRIVER_INIT( turbotag ) { mcr3_state *state = machine.driver_data(); mcr_common_init(machine, MCR_SSIO | MCR_CHIP_SQUEAK_DELUXE); - ssio_set_custom_input(1, 0x60, read8_delegate(FUNC(mcr3_state::spyhunt_ip1_r),state)); - ssio_set_custom_input(2, 0xff, read8_delegate(FUNC(mcr3_state::turbotag_ip2_r),state)); - ssio_set_custom_output(4, 0xff, write8_delegate(FUNC(mcr3_state::spyhunt_op4_w),state)); + machine.device("ssio")->set_custom_input(1, 0x60, read8_delegate(FUNC(mcr3_state::spyhunt_ip1_r),state)); + machine.device("ssio")->set_custom_input(2, 0xff, read8_delegate(FUNC(mcr3_state::turbotag_ip2_r),state)); + machine.device("ssio")->set_custom_output(4, 0xff, write8_delegate(FUNC(mcr3_state::spyhunt_op4_w),state)); state->m_spyhunt_sprite_color_mask = 0x00; state->m_spyhunt_scroll_offset = 88; /* the SSIO Z80 doesn't have any program to execute */ - machine.device("csdcpu")->suspend(SUSPEND_REASON_DISABLE, 1); + machine.device("csd:cpu")->suspend(SUSPEND_REASON_DISABLE, 1); /* kludge for bad ROM read */ machine.device("maincpu")->memory().space(AS_PROGRAM)->install_read_handler(0x0b53, 0x0b53, read8_delegate(FUNC(mcr3_state::turbotag_kludge_r),state)); diff --git a/src/mame/drivers/mcr68.c b/src/mame/drivers/mcr68.c index 44d5f85d3e9..ac7f3883fdc 100644 --- a/src/mame/drivers/mcr68.c +++ b/src/mame/drivers/mcr68.c @@ -103,8 +103,8 @@ READ16_MEMBER(mcr68_state::zwackery_6840_r) WRITE16_MEMBER(mcr68_state::xenophobe_control_w) { COMBINE_DATA(&m_control_word); -/* soundsgood_reset_w(~m_control_word & 0x0020);*/ - soundsgood_data_w(space, offset, ((m_control_word & 0x000f) << 1) | ((m_control_word & 0x0010) >> 4)); +/* m_sounds_good->reset_write(~m_control_word & 0x0020);*/ + m_sounds_good->write(space, offset, ((m_control_word & 0x000f) << 1) | ((m_control_word & 0x0010) >> 4)); } @@ -118,8 +118,8 @@ WRITE16_MEMBER(mcr68_state::xenophobe_control_w) WRITE16_MEMBER(mcr68_state::blasted_control_w) { COMBINE_DATA(&m_control_word); -/* soundsgood_reset_w(~m_control_word & 0x0020);*/ - soundsgood_data_w(space, offset, (m_control_word >> 8) & 0x1f); +/* m_sounds_good->reset_write(~m_control_word & 0x0020);*/ + m_sounds_good->write(space, offset, (m_control_word >> 8) & 0x1f); } @@ -137,14 +137,14 @@ READ16_MEMBER(mcr68_state::spyhunt2_port_0_r) int which = (m_control_word >> 3) & 3; int analog = input_port_read(machine(), portnames[which]); - return result | ((soundsgood_status_r(space, 0) & 1) << 5) | (analog << 8); + return result | ((m_sounds_good->read(space, 0) & 1) << 5) | (analog << 8); } READ16_MEMBER(mcr68_state::spyhunt2_port_1_r) { int result = input_port_read(machine(), "IN1"); - return result | ((turbocs_status_r(space, 0) & 1) << 7); + return result | ((m_turbo_chip_squeak->read(space, 0) & 1) << 7); } @@ -152,11 +152,11 @@ WRITE16_MEMBER(mcr68_state::spyhunt2_control_w) { COMBINE_DATA(&m_control_word); -/* turbocs_reset_w(~m_control_word & 0x0080);*/ - turbocs_data_w(space, offset, (m_control_word >> 8) & 0x001f); +/* m_turbo_chip_squeak->reset_write(~m_control_word & 0x0080);*/ + m_turbo_chip_squeak->write(space, offset, (m_control_word >> 8) & 0x001f); - soundsgood_reset_w(machine(), ~m_control_word & 0x2000); - soundsgood_data_w(space, offset, (m_control_word >> 8) & 0x001f); + m_sounds_good->reset_write(~m_control_word & 0x2000); + m_sounds_good->write(space, offset, (m_control_word >> 8) & 0x001f); } @@ -305,9 +305,9 @@ static ADDRESS_MAP_START( mcr68_map, AS_PROGRAM, 16, mcr68_state ) ADDRESS_MAP_GLOBAL_MASK(0x1fffff) AM_RANGE(0x000000, 0x03ffff) AM_ROM AM_RANGE(0x060000, 0x063fff) AM_RAM - AM_RANGE(0x070000, 0x070fff) AM_RAM_WRITE(mcr68_videoram_w) AM_SHARE("videoram16") + AM_RANGE(0x070000, 0x070fff) AM_RAM_WRITE(mcr68_videoram_w) AM_SHARE("videoram") AM_RANGE(0x071000, 0x071fff) AM_RAM - AM_RANGE(0x080000, 0x080fff) AM_RAM AM_SHARE("spriteram16") + AM_RANGE(0x080000, 0x080fff) AM_RAM AM_SHARE("spriteram") AM_RANGE(0x090000, 0x09007f) AM_WRITE(mcr68_paletteram_w) AM_SHARE("paletteram") AM_RANGE(0x0a0000, 0x0a000f) AM_READWRITE(mcr68_6840_upper_r, mcr68_6840_upper_w) AM_RANGE(0x0b0000, 0x0bffff) AM_WRITE(watchdog_reset16_w) @@ -333,9 +333,9 @@ static ADDRESS_MAP_START( zwackery_map, AS_PROGRAM, 16, mcr68_state ) AM_RANGE(0x104000, 0x104007) AM_DEVREADWRITE8("pia0", pia6821_device, read, write, 0xff00) AM_RANGE(0x108000, 0x108007) AM_DEVREADWRITE8("pia1", pia6821_device, read, write, 0x00ff) AM_RANGE(0x10c000, 0x10c007) AM_DEVREADWRITE8("pia2", pia6821_device, read, write, 0x00ff) - AM_RANGE(0x800000, 0x800fff) AM_RAM_WRITE(zwackery_videoram_w) AM_SHARE("videoram16") + AM_RANGE(0x800000, 0x800fff) AM_RAM_WRITE(zwackery_videoram_w) AM_SHARE("videoram") AM_RANGE(0x802000, 0x803fff) AM_RAM_WRITE(zwackery_paletteram_w) AM_SHARE("paletteram") - AM_RANGE(0xc00000, 0xc00fff) AM_RAM_WRITE(zwackery_spriteram_w) AM_SHARE("spriteram16") + AM_RANGE(0xc00000, 0xc00fff) AM_RAM_WRITE(zwackery_spriteram_w) AM_SHARE("spriteram") ADDRESS_MAP_END @@ -354,10 +354,10 @@ static ADDRESS_MAP_START( pigskin_map, AS_PROGRAM, 16, mcr68_state ) AM_RANGE(0x0a0000, 0x0affff) AM_READ(pigskin_port_2_r) AM_RANGE(0x0c0000, 0x0c007f) AM_WRITE(mcr68_paletteram_w) AM_SHARE("paletteram") AM_RANGE(0x0e0000, 0x0effff) AM_WRITE(watchdog_reset16_w) - AM_RANGE(0x100000, 0x100fff) AM_RAM_WRITE(mcr68_videoram_w) AM_SHARE("videoram16") + AM_RANGE(0x100000, 0x100fff) AM_RAM_WRITE(mcr68_videoram_w) AM_SHARE("videoram") AM_RANGE(0x120000, 0x120001) AM_READWRITE(pigskin_protection_r, pigskin_protection_w) AM_RANGE(0x140000, 0x143fff) AM_RAM - AM_RANGE(0x160000, 0x1607ff) AM_RAM AM_SHARE("spriteram16") + AM_RANGE(0x160000, 0x1607ff) AM_RAM AM_SHARE("spriteram") AM_RANGE(0x180000, 0x18000f) AM_READWRITE(mcr68_6840_upper_r, mcr68_6840_upper_w) AM_RANGE(0x1a0000, 0x1affff) AM_WRITE(archrivl_control_w) AM_RANGE(0x1e0000, 0x1effff) AM_READ_PORT("IN0") @@ -379,8 +379,8 @@ static ADDRESS_MAP_START( trisport_map, AS_PROGRAM, 16, mcr68_state ) AM_RANGE(0x0a0000, 0x0affff) AM_READ_PORT("DSW") AM_RANGE(0x100000, 0x103fff) AM_RAM AM_SHARE("nvram") AM_RANGE(0x120000, 0x12007f) AM_WRITE(mcr68_paletteram_w) AM_SHARE("paletteram") - AM_RANGE(0x140000, 0x1407ff) AM_RAM AM_SHARE("spriteram16") - AM_RANGE(0x160000, 0x160fff) AM_RAM_WRITE(mcr68_videoram_w) AM_SHARE("videoram16") + AM_RANGE(0x140000, 0x1407ff) AM_RAM AM_SHARE("spriteram") + AM_RANGE(0x160000, 0x160fff) AM_RAM_WRITE(mcr68_videoram_w) AM_SHARE("videoram") AM_RANGE(0x180000, 0x18000f) AM_READWRITE(mcr68_6840_upper_r, mcr68_6840_upper_w) AM_RANGE(0x1a0000, 0x1affff) AM_WRITE(archrivl_control_w) AM_RANGE(0x1c0000, 0x1cffff) AM_WRITE(watchdog_reset16_w) @@ -991,7 +991,9 @@ static MACHINE_CONFIG_START( zwackery, mcr68_state ) MCFG_VIDEO_START(zwackery) /* sound hardware */ - MCFG_FRAGMENT_ADD(chip_squeak_deluxe) + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_MIDWAY_CHIP_SQUEAK_DELUXE_ADD("csd") + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) MACHINE_CONFIG_END @@ -1020,19 +1022,22 @@ static MACHINE_CONFIG_START( mcr68, mcr68_state ) MCFG_VIDEO_START(mcr68) /* sound hardware -- determined by specific machine */ + MCFG_SPEAKER_STANDARD_MONO("mono") MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( xenophob, mcr68 ) /* basic machine hardware */ - MCFG_FRAGMENT_ADD(sounds_good) + MCFG_MIDWAY_SOUNDS_GOOD_ADD("sg") + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( intlaser, mcr68 ) /* basic machine hardware */ - MCFG_FRAGMENT_ADD(sounds_good) + MCFG_MIDWAY_SOUNDS_GOOD_ADD("sg") + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) MCFG_WATCHDOG_VBLANK_INIT(800) MACHINE_CONFIG_END @@ -1041,15 +1046,17 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( spyhunt2, mcr68 ) /* basic machine hardware */ - MCFG_FRAGMENT_ADD(sounds_good) - MCFG_DEVICE_REMOVE("mono") - MCFG_FRAGMENT_ADD(turbo_chip_squeak) + MCFG_MIDWAY_SOUNDS_GOOD_ADD("sg") + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) + MCFG_MIDWAY_TURBO_CHIP_SQUEAK_ADD("tcs") + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( archrivl, mcr68 ) /* basic machine hardware */ + MCFG_DEVICE_REMOVE("mono") MCFG_FRAGMENT_ADD(williams_cvsd_sound) MACHINE_CONFIG_END @@ -1057,6 +1064,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( pigskin, mcr68 ) /* basic machine hardware */ + MCFG_DEVICE_REMOVE("mono") MCFG_FRAGMENT_ADD(williams_cvsd_sound) MCFG_CPU_MODIFY("maincpu") @@ -1067,6 +1075,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( trisport, mcr68 ) /* basic machine hardware */ + MCFG_DEVICE_REMOVE("mono") MCFG_FRAGMENT_ADD(williams_cvsd_sound) MCFG_CPU_MODIFY("maincpu") @@ -1100,7 +1109,7 @@ ROM_START( zwackery ) ROM_LOAD16_BYTE( "pro12.bin", 0x30000, 0x4000, CRC(e2d25e1f) SHA1(5d8ff303441eccf431422b453a173983a4513630) ) ROM_LOAD16_BYTE( "pro13.bin", 0x30001, 0x4000, CRC(e131f9b8) SHA1(08b131f2acc84d4c2c931bfd24e7de3d92a8a817) ) - ROM_REGION( 0x20000, "csdcpu", 0 ) + ROM_REGION( 0x20000, "csd:cpu", 0 ) ROM_LOAD16_BYTE( "csd7.bin", 0x00000, 0x2000, CRC(5501f54b) SHA1(84c0851fb868e81400cfe3ebfd7b91fe98a47bac) ) ROM_LOAD16_BYTE( "csd17.bin", 0x00001, 0x2000, CRC(2e482580) SHA1(92bd3e64ff580800ee16579d97bcb8b3bd9f755c) ) ROM_LOAD16_BYTE( "csd8.bin", 0x04000, 0x2000, CRC(13366575) SHA1(bcf25a7d4c6b2ccd7cd9978edafc66ef0cadfe72) ) @@ -1158,7 +1167,7 @@ ROM_START( xenophob ) /* Service mode shows "VERSION CO" */ ROM_LOAD16_BYTE( "xeno_pro.2c", 0x20000, 0x10000, CRC(e45bf669) SHA1(52b0ffd2311e4d300410de57fbddacab4b9857a1) ) ROM_LOAD16_BYTE( "xeno_pro.2b", 0x20001, 0x10000, CRC(da5d39d5) SHA1(f61b239eb3108faec2f3dbb8139c8d01b0e29873) ) - ROM_REGION( 0x40000, "sgcpu", 0 ) /* Sounds Good board */ + ROM_REGION( 0x40000, "sg:cpu", 0 ) /* Sounds Good board */ ROM_LOAD16_BYTE( "xeno_snd.u7", 0x00000, 0x10000, CRC(77561d15) SHA1(8c23a9270d54be6380f2d23939b6c6d8c31e334b) ) ROM_LOAD16_BYTE( "xeno_snd.u17", 0x00001, 0x10000, CRC(837a1a71) SHA1(d7d60ef1fd11e5e84dd1ffb9a077686bd2fb452e) ) ROM_LOAD16_BYTE( "xeno_snd.u8", 0x20000, 0x10000, CRC(6e2915c7) SHA1(df1f35f6b743afbab0a3a29adce3639a8c9dc66f) ) @@ -1202,11 +1211,11 @@ ROM_START( spyhunt2 ) ROM_LOAD16_BYTE( "sh22c.bin", 0x20000, 0x10000, CRC(8ee65009) SHA1(6adb00888f739b59e3ace1a6eaf1c58c4583d7fd) ) ROM_LOAD16_BYTE( "sh22b.bin", 0x20001, 0x10000, CRC(850c21ad) SHA1(3b944545cb469e2c53166a91eb2834c5f3891ddf) ) - ROM_REGION( 0x10000, "tcscpu", 0 ) /* 64k for the Turbo Cheap Squeak */ + ROM_REGION( 0x10000, "tcs:cpu", 0 ) /* 64k for the Turbo Cheap Squeak */ ROM_LOAD( "turbo-cs.u5", 0x08000, 0x4000, CRC(4b1d8a66) SHA1(a1a2f9fe3fc42b668ec97ad6c6ea6032f1dc0695) ) ROM_LOAD( "turbo-cs.u4", 0x0c000, 0x4000, CRC(3722ce48) SHA1(ae064be590c067bda66ca7a72c212ad47f3eb1c5) ) - ROM_REGION( 0x40000, "sgcpu", 0 ) /* Sounds Good board */ + ROM_REGION( 0x40000, "sg:cpu", 0 ) /* Sounds Good board */ ROM_LOAD16_BYTE( "sh2u7.bin", 0x00000, 0x10000, CRC(02362ea4) SHA1(2d37f06c9156554b8140ed565f6fdd1ef67bb54f) ) ROM_LOAD16_BYTE( "sh2u17.bin", 0x00001, 0x10000, CRC(e29a2c37) SHA1(e0d4df90b533d3325c905d42ddc6876667f32c82) ) @@ -1239,11 +1248,11 @@ ROM_START( spyhunt2a ) ROM_LOAD16_BYTE( "2c", 0x20000, 0x10000, CRC(bc834f3f) SHA1(05f6ab508ce2ebe55665e97114070e9d81db48c8) ) ROM_LOAD16_BYTE( "2b", 0x20001, 0x10000, CRC(8a9f7ef3) SHA1(353ebb0a3782c183cc9be800584903e23ca507d9) ) - ROM_REGION( 0x10000, "tcscpu", 0 ) /* 64k for the Turbo Cheap Squeak */ + ROM_REGION( 0x10000, "tcs:cpu", 0 ) /* 64k for the Turbo Cheap Squeak */ ROM_LOAD( "turbo-cs.u5", 0x08000, 0x4000, CRC(4b1d8a66) SHA1(a1a2f9fe3fc42b668ec97ad6c6ea6032f1dc0695) ) ROM_LOAD( "turbo-cs.u4", 0x0c000, 0x4000, CRC(3722ce48) SHA1(ae064be590c067bda66ca7a72c212ad47f3eb1c5) ) - ROM_REGION( 0x40000, "sgcpu", 0 ) /* Sounds Good board */ + ROM_REGION( 0x40000, "sg:cpu", 0 ) /* Sounds Good board */ ROM_LOAD16_BYTE( "sh2u7.bin", 0x00000, 0x10000, CRC(02362ea4) SHA1(2d37f06c9156554b8140ed565f6fdd1ef67bb54f) ) ROM_LOAD16_BYTE( "sh2u17.bin", 0x00001, 0x10000, CRC(e29a2c37) SHA1(e0d4df90b533d3325c905d42ddc6876667f32c82) ) @@ -1276,7 +1285,7 @@ ROM_START( blasted ) /* Service mode shows "prod. code v.1" and the date 4/27/88 ROM_LOAD16_BYTE( "2c", 0x20000, 0x10000, CRC(026f30bf) SHA1(de327ab5bd4dc9456fa5a91f3ccd293b3ab8c5c2) ) ROM_LOAD16_BYTE( "2b", 0x20001, 0x10000, CRC(8e0e91a9) SHA1(2dc2927a1fd552ead446606a902a2ba0c4595798) ) - ROM_REGION( 0x40000, "sgcpu", 0 ) /* Sounds Good board */ + ROM_REGION( 0x40000, "sg:cpu", 0 ) /* Sounds Good board */ ROM_LOAD16_BYTE( "blasted.u7", 0x00000, 0x10000, CRC(8d7c8ef6) SHA1(a414e91c20202f800f3e01e4c430e3f99e3df5bb) ) ROM_LOAD16_BYTE( "blasted.u17", 0x00001, 0x10000, CRC(c79040b9) SHA1(e6fa173ff5fb681ddfef831f1ef237a7c4303f32) ) ROM_LOAD16_BYTE( "blasted.u8", 0x20000, 0x10000, CRC(c53094c0) SHA1(8c54cefe8030bf18b9585008a4a6cf8a7dc23f71) ) @@ -1310,7 +1319,7 @@ ROM_START( intlaser ) /* Service mode shows "TOP SECRET PROJ. #F01" and the date ROM_LOAD16_BYTE( "2c.bin", 0x20000, 0x10000, CRC(d2cca853) SHA1(69e4ee8203c6dda7b4ec97c247fbcdc9fdc9ff8d) ) ROM_LOAD16_BYTE( "2b.bin", 0x20001, 0x10000, CRC(3802cfe2) SHA1(d10c802500bae14acc3230ca34c2d1806b68ce4a) ) - ROM_REGION( 0x40000, "sgcpu", 0 ) /* Sounds Good board */ + ROM_REGION( 0x40000, "sg:cpu", 0 ) /* Sounds Good board */ ROM_LOAD16_BYTE( "u7.bin", 0x00000, 0x10000, CRC(19ad1e45) SHA1(838ad7304248690d3fdf9e4edf3856936bf36d42) ) ROM_LOAD16_BYTE( "u17.bin", 0x00001, 0x10000, CRC(d6118949) SHA1(9e059f28d9eb8dee10301662a65588cffaf6fd16) ) ROM_LOAD16_BYTE( "u8.bin", 0x20000, 0x10000, CRC(d6cc99aa) SHA1(b970d6e87778959cf7322158b8df26c5028e3f45) ) diff --git a/src/mame/includes/gottlieb.h b/src/mame/includes/gottlieb.h index 12fee4ed29a..f7bbb894ce1 100644 --- a/src/mame/includes/gottlieb.h +++ b/src/mame/includes/gottlieb.h @@ -2,6 +2,37 @@ Gottlieb hardware +**************************************************************************** + + Copyright Aaron Giles + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + * Neither the name 'MAME' nor the names of its contributors may be + used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + ***************************************************************************/ #include "cpu/i86/i86.h" diff --git a/src/mame/includes/mcr.h b/src/mame/includes/mcr.h index b316c30bdb5..bc02f5938c8 100644 --- a/src/mame/includes/mcr.h +++ b/src/mame/includes/mcr.h @@ -9,6 +9,7 @@ #include "machine/z80ctc.h" #include "machine/z80pio.h" #include "machine/z80sio.h" +#include "audio/mcr.h" /* constants */ #define MAIN_OSC_MCR_I XTAL_19_968MHz @@ -21,7 +22,12 @@ public: : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_spriteram(*this, "spriteram") , - m_videoram(*this, "videoram"){ } + m_videoram(*this, "videoram"), + m_ssio(*this, "ssio"), + m_chip_squeak_deluxe(*this, "csd"), + m_sounds_good(*this, "sg"), + m_turbo_chip_squeak(*this, "tcs"), + m_squawk_n_talk(*this, "snt") { } // these should be required but can't because mcr68 shares with us // once the sound boards are properly device-ified, fix this @@ -29,6 +35,12 @@ public: optional_shared_ptr m_spriteram; optional_shared_ptr m_videoram; + optional_device m_ssio; + optional_device m_chip_squeak_deluxe; + optional_device m_sounds_good; + optional_device m_turbo_chip_squeak; + optional_device m_squawk_n_talk; + DECLARE_WRITE8_MEMBER(mcr_control_port_w); DECLARE_WRITE8_MEMBER(mcr_ipu_laserdisk_w); DECLARE_READ8_MEMBER(mcr_ipu_watchdog_r); @@ -55,21 +67,6 @@ public: DECLARE_READ8_MEMBER(demoderb_ip1_r); DECLARE_READ8_MEMBER(demoderb_ip2_r); DECLARE_WRITE8_MEMBER(demoderb_op4_w); - DECLARE_READ8_MEMBER(ssio_irq_clear); - DECLARE_WRITE8_MEMBER(ssio_status_w); - DECLARE_READ8_MEMBER(ssio_data_r); - DECLARE_WRITE8_MEMBER(ssio_data_w); - DECLARE_READ8_MEMBER(ssio_status_r); - DECLARE_READ8_MEMBER(ssio_input_port_r); - DECLARE_WRITE8_MEMBER(ssio_output_port_w); - DECLARE_WRITE8_MEMBER(csdeluxe_data_w); - DECLARE_READ8_MEMBER(csdeluxe_status_r); - DECLARE_WRITE8_MEMBER(soundsgood_data_w); - DECLARE_READ8_MEMBER(soundsgood_status_r); - DECLARE_WRITE8_MEMBER(turbocs_data_w); - DECLARE_READ8_MEMBER(turbocs_status_r); - DECLARE_WRITE8_MEMBER(squawkntalk_dac_w); - DECLARE_WRITE8_MEMBER(squawkntalk_data_w); }; diff --git a/src/mame/includes/mcr68.h b/src/mame/includes/mcr68.h index 105e385dbd2..fac9a5ba89e 100644 --- a/src/mame/includes/mcr68.h +++ b/src/mame/includes/mcr68.h @@ -10,15 +10,23 @@ struct counter_state attotime period; }; -class mcr68_state : public mcr_state +class mcr68_state : public driver_device { public: mcr68_state(const machine_config &mconfig, device_type type, const char *tag) - : mcr_state(mconfig, type, tag), - m_videoram16(*this, "videoram16"), - m_spriteram16(*this, "spriteram16") { } + : driver_device(mconfig, type, tag), + m_chip_squeak_deluxe(*this, "csd"), + m_sounds_good(*this, "sg"), + m_turbo_chip_squeak(*this, "tcs"), + m_videoram(*this, "videoram"), + m_spriteram(*this, "spriteram") { } - required_shared_ptr m_videoram16; + optional_device m_chip_squeak_deluxe; + optional_device m_sounds_good; + optional_device m_turbo_chip_squeak; + + required_shared_ptr m_videoram; + required_shared_ptr m_spriteram; UINT16 m_control_word; UINT8 m_protection_data[5]; attotime m_timing_factor; @@ -40,7 +48,6 @@ public: attotime m_m6840_internal_counter_period; tilemap_t *m_bg_tilemap; tilemap_t *m_fg_tilemap; - required_shared_ptr m_spriteram16; DECLARE_READ16_MEMBER(zwackery_6840_r); DECLARE_WRITE16_MEMBER(xenophobe_control_w); DECLARE_WRITE16_MEMBER(blasted_control_w); diff --git a/src/mame/machine/mcr.c b/src/mame/machine/mcr.c index ac623df231a..8a13a4f6d9a 100644 --- a/src/mame/machine/mcr.c +++ b/src/mame/machine/mcr.c @@ -226,33 +226,6 @@ TIMER_DEVICE_CALLBACK( mcr_ipu_interrupt ) } -/************************************* - * - * Generic MCR port write handlers - * - *************************************/ - -WRITE8_MEMBER(mcr_state::mcr_control_port_w) -{ - /* - Bit layout is as follows: - D7 = n/c - D6 = cocktail flip - D5 = red LED - D4 = green LED - D3 = n/c - D2 = coin meter 3 - D1 = coin meter 2 - D0 = coin meter 1 - */ - - coin_counter_w(machine(), 0, (data >> 0) & 1); - coin_counter_w(machine(), 1, (data >> 1) & 1); - coin_counter_w(machine(), 2, (data >> 2) & 1); - mcr_cocktail_flip = (data >> 6) & 1; -} - - /************************************* * * NFL Football IPU board diff --git a/src/mame/machine/mcr68.c b/src/mame/machine/mcr68.c index 2bd7ace1386..63e685666e5 100644 --- a/src/mame/machine/mcr68.c +++ b/src/mame/machine/mcr68.c @@ -296,7 +296,7 @@ WRITE_LINE_DEVICE_HANDLER( zwackery_ca2_w ) { mcr68_state *drvstate = device->machine().driver_data(); address_space *space = device->machine().device("maincpu")->memory().space(AS_PROGRAM); - drvstate->csdeluxe_data_w(*space, 0, (state << 4) | drvstate->m_zwackery_sound_data); + drvstate->m_chip_squeak_deluxe->write(*space, 0, (state << 4) | drvstate->m_zwackery_sound_data); } diff --git a/src/mame/video/mcr68.c b/src/mame/video/mcr68.c index 635a4088f79..9f938021f36 100644 --- a/src/mame/video/mcr68.c +++ b/src/mame/video/mcr68.c @@ -21,7 +21,7 @@ static TILE_GET_INFO( get_bg_tile_info ) { mcr68_state *state = machine.driver_data(); - UINT16 *videoram = state->m_videoram16; + UINT16 *videoram = state->m_videoram; int data = LOW_BYTE(videoram[tile_index * 2]) | (LOW_BYTE(videoram[tile_index * 2 + 1]) << 8); int code = (data & 0x3ff) | ((data >> 4) & 0xc00); int color = (~data >> 12) & 3; @@ -34,7 +34,7 @@ static TILE_GET_INFO( get_bg_tile_info ) static TILE_GET_INFO( zwackery_get_bg_tile_info ) { mcr68_state *state = machine.driver_data(); - UINT16 *videoram = state->m_videoram16; + UINT16 *videoram = state->m_videoram; int data = videoram[tile_index]; int color = (data >> 13) & 7; SET_TILE_INFO(0, data & 0x3ff, color, TILE_FLIPYX((data >> 11) & 3)); @@ -44,7 +44,7 @@ static TILE_GET_INFO( zwackery_get_bg_tile_info ) static TILE_GET_INFO( zwackery_get_fg_tile_info ) { mcr68_state *state = machine.driver_data(); - UINT16 *videoram = state->m_videoram16; + UINT16 *videoram = state->m_videoram; int data = videoram[tile_index]; int color = (data >> 13) & 7; SET_TILE_INFO(2, data & 0x3ff, color, TILE_FLIPYX((data >> 11) & 3)); @@ -179,7 +179,7 @@ WRITE16_MEMBER(mcr68_state::zwackery_paletteram_w) WRITE16_MEMBER(mcr68_state::mcr68_videoram_w) { - UINT16 *videoram = m_videoram16; + UINT16 *videoram = m_videoram; COMBINE_DATA(&videoram[offset]); m_bg_tilemap->mark_tile_dirty(offset / 2); } @@ -187,7 +187,7 @@ WRITE16_MEMBER(mcr68_state::mcr68_videoram_w) WRITE16_MEMBER(mcr68_state::zwackery_videoram_w) { - UINT16 *videoram = m_videoram16; + UINT16 *videoram = m_videoram; COMBINE_DATA(&videoram[offset]); m_bg_tilemap->mark_tile_dirty(offset); m_fg_tilemap->mark_tile_dirty(offset); @@ -198,8 +198,8 @@ WRITE16_MEMBER(mcr68_state::zwackery_spriteram_w) { /* yech -- Zwackery relies on the upper 8 bits of a spriteram read being $ff! */ /* to make this happen we always write $ff in the upper 8 bits */ - COMBINE_DATA(&m_spriteram16[offset]); - m_spriteram16[offset] |= 0xff00; + COMBINE_DATA(&m_spriteram[offset]); + m_spriteram[offset] |= 0xff00; } @@ -214,7 +214,7 @@ static void mcr68_update_sprites(running_machine &machine, bitmap_ind16 &bitmap, { mcr68_state *state = machine.driver_data(); rectangle sprite_clip = machine.primary_screen->visible_area(); - UINT16 *spriteram16 = state->m_spriteram16; + UINT16 *spriteram = state->m_spriteram; int offs; /* adjust for clipping */ @@ -225,12 +225,12 @@ static void mcr68_update_sprites(running_machine &machine, bitmap_ind16 &bitmap, machine.priority_bitmap.fill(1, sprite_clip); /* loop over sprite RAM */ - for (offs = state->m_spriteram16.bytes() / 2 - 4;offs >= 0;offs -= 4) + for (offs = state->m_spriteram.bytes() / 2 - 4;offs >= 0;offs -= 4) { int code, color, flipx, flipy, x, y, flags; - flags = LOW_BYTE(spriteram16[offs + 1]); - code = LOW_BYTE(spriteram16[offs + 2]) + 256 * ((flags >> 3) & 0x01) + 512 * ((flags >> 6) & 0x03); + flags = LOW_BYTE(spriteram[offs + 1]); + code = LOW_BYTE(spriteram[offs + 2]) + 256 * ((flags >> 3) & 0x01) + 512 * ((flags >> 6) & 0x03); /* skip if zero */ if (code == 0) @@ -244,8 +244,8 @@ static void mcr68_update_sprites(running_machine &machine, bitmap_ind16 &bitmap, color = ~flags & 0x03; flipx = flags & 0x10; flipy = flags & 0x20; - x = LOW_BYTE(spriteram16[offs + 3]) * 2 + state->m_sprite_xoffset; - y = (241 - LOW_BYTE(spriteram16[offs])) * 2; + x = LOW_BYTE(spriteram[offs + 3]) * 2 + state->m_sprite_xoffset; + y = (241 - LOW_BYTE(spriteram[offs])) * 2; /* allow sprites to clip off the left side */ if (x > 0x1f0) x -= 0x200; @@ -267,23 +267,23 @@ static void mcr68_update_sprites(running_machine &machine, bitmap_ind16 &bitmap, static void zwackery_update_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int priority) { mcr68_state *state = machine.driver_data(); - UINT16 *spriteram16 = state->m_spriteram16; + UINT16 *spriteram = state->m_spriteram; int offs; machine.priority_bitmap.fill(1, cliprect); /* loop over sprite RAM */ - for (offs = state->m_spriteram16.bytes() / 2 - 4;offs >= 0;offs -= 4) + for (offs = state->m_spriteram.bytes() / 2 - 4;offs >= 0;offs -= 4) { int code, color, flipx, flipy, x, y, flags; /* get the code and skip if zero */ - code = LOW_BYTE(spriteram16[offs + 2]); + code = LOW_BYTE(spriteram[offs + 2]); if (code == 0) continue; /* extract the flag bits and determine the color */ - flags = LOW_BYTE(spriteram16[offs + 1]); + flags = LOW_BYTE(spriteram[offs + 1]); color = ((~flags >> 2) & 0x0f) | ((flags & 0x02) << 3); /* for low priority, draw everything but color 7 */ @@ -303,8 +303,8 @@ static void zwackery_update_sprites(running_machine &machine, bitmap_ind16 &bitm /* determine flipping and coordinates */ flipx = ~flags & 0x40; flipy = flags & 0x80; - x = (231 - LOW_BYTE(spriteram16[offs + 3])) * 2; - y = (241 - LOW_BYTE(spriteram16[offs])) * 2; + x = (231 - LOW_BYTE(spriteram[offs + 3])) * 2; + y = (241 - LOW_BYTE(spriteram[offs])) * 2; if (x <= -32) x += 512; diff --git a/src/osd/windows/windows.mak b/src/osd/windows/windows.mak index 78ff6a8d94a..ffb92f6c71e 100644 --- a/src/osd/windows/windows.mak +++ b/src/osd/windows/windows.mak @@ -160,6 +160,9 @@ CPPONLYFLAGS += /wd4800 # disable better packing warning CPPONLYFLAGS += /wd4371 +# disable side effects warning in STL headers +CPPONLYFLAGS += /wd4548 + # disable macro redefinition warning CCOMFLAGS += /wd4005