mirror of
https://github.com/holub/mame
synced 2025-07-02 08:39:21 +03:00
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.
This commit is contained in:
parent
59769e3f30
commit
9091010c87
@ -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);
|
||||
|
@ -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<void (device_t &)> device_interrupt_delegate;
|
||||
typedef device_delegate<void (device_t &)> 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<void (device_t &, int)> device_irq_acknowledge_delegate;
|
||||
typedef device_delegate<void (device_t &, int)> device_irq_acknowledge_delegate;
|
||||
typedef int (*device_irq_acknowledge_callback)(device_t *device, int irqnum);
|
||||
|
||||
|
||||
|
@ -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];
|
||||
}
|
||||
}
|
||||
|
@ -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<UINT8> m_outputmap; // map of inputs to outputs
|
||||
sound_stream * m_mixer_stream; // mixing stream
|
||||
};
|
||||
|
||||
|
1790
src/mame/audio/mcr.c
1790
src/mame/audio/mcr.c
File diff suppressed because it is too large
Load Diff
@ -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<z80_device> m_cpu;
|
||||
required_device<ay8910_device> m_ay0;
|
||||
required_device<ay8910_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<m68000_device> m_cpu;
|
||||
required_device<pia6821_device> m_pia;
|
||||
required_device<dac_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<m68000_device> m_cpu;
|
||||
required_device<pia6821_device> m_pia;
|
||||
required_device<dac_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<m6809e_device> m_cpu;
|
||||
required_device<pia6821_device> m_pia;
|
||||
required_device<dac_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<m6802_device> m_cpu;
|
||||
required_device<pia6821_device> m_pia0;
|
||||
required_device<pia6821_device> m_pia1;
|
||||
optional_device<tms5200_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__ */
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -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<mcr3_state>();
|
||||
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<mcr3_state>();
|
||||
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<midway_ssio_device>("ssio")->set_custom_input(1, 0x60, read8_delegate(FUNC(mcr3_state::spyhunt_ip1_r),state));
|
||||
machine.device<midway_ssio_device>("ssio")->set_custom_input(2, 0xff, read8_delegate(FUNC(mcr3_state::spyhunt_ip2_r),state));
|
||||
machine.device<midway_ssio_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<mcr3_state>();
|
||||
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<midway_ssio_device>("ssio")->set_custom_input(1, 0x60, read8_delegate(FUNC(mcr3_state::spyhunt_ip1_r),state));
|
||||
machine.device<midway_ssio_device>("ssio")->set_custom_input(2, 0xff, read8_delegate(FUNC(mcr3_state::turbotag_ip2_r),state));
|
||||
machine.device<midway_ssio_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<cpu_device>("csdcpu")->suspend(SUSPEND_REASON_DISABLE, 1);
|
||||
machine.device<cpu_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));
|
||||
|
@ -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) )
|
||||
|
@ -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"
|
||||
|
@ -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<UINT8> m_spriteram;
|
||||
optional_shared_ptr<UINT8> m_videoram;
|
||||
|
||||
optional_device<midway_ssio_device> m_ssio;
|
||||
optional_device<midway_chip_squeak_deluxe_device> m_chip_squeak_deluxe;
|
||||
optional_device<midway_sounds_good_device> m_sounds_good;
|
||||
optional_device<midway_turbo_chip_squeak_device> m_turbo_chip_squeak;
|
||||
optional_device<midway_squawk_n_talk_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);
|
||||
};
|
||||
|
||||
|
||||
|
@ -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<UINT16> m_videoram16;
|
||||
optional_device<midway_chip_squeak_deluxe_device> m_chip_squeak_deluxe;
|
||||
optional_device<midway_sounds_good_device> m_sounds_good;
|
||||
optional_device<midway_turbo_chip_squeak_device> m_turbo_chip_squeak;
|
||||
|
||||
required_shared_ptr<UINT16> m_videoram;
|
||||
required_shared_ptr<UINT16> 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<UINT16> m_spriteram16;
|
||||
DECLARE_READ16_MEMBER(zwackery_6840_r);
|
||||
DECLARE_WRITE16_MEMBER(xenophobe_control_w);
|
||||
DECLARE_WRITE16_MEMBER(blasted_control_w);
|
||||
|
@ -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
|
||||
|
@ -296,7 +296,7 @@ WRITE_LINE_DEVICE_HANDLER( zwackery_ca2_w )
|
||||
{
|
||||
mcr68_state *drvstate = device->machine().driver_data<mcr68_state>();
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
static TILE_GET_INFO( get_bg_tile_info )
|
||||
{
|
||||
mcr68_state *state = machine.driver_data<mcr68_state>();
|
||||
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<mcr68_state>();
|
||||
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<mcr68_state>();
|
||||
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<mcr68_state>();
|
||||
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<mcr68_state>();
|
||||
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;
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user