mirror of
https://github.com/holub/mame
synced 2025-04-26 18:23:08 +03:00
mcr.cpp, mcr3.cpp, audio/bally.cpp, audio/midway.cpp: Simplify handler signatures; split mcr3 state class a little (nw)
This commit is contained in:
parent
6c6a55d5bb
commit
e45c20c93e
@ -89,7 +89,8 @@ DISCRETE_SOUND_END
|
||||
//-------------------------------------------------
|
||||
// sound_select - handle an external write to the board
|
||||
//-------------------------------------------------
|
||||
WRITE8_MEMBER(bally_as2888_device::sound_select)
|
||||
|
||||
void bally_as2888_device::sound_select(uint8_t data)
|
||||
{
|
||||
machine().scheduler().synchronize(timer_expired_delegate(FUNC(bally_as2888_device::sound_select_sync), this), data);
|
||||
}
|
||||
@ -103,6 +104,7 @@ TIMER_CALLBACK_MEMBER(bally_as2888_device::sound_select_sync)
|
||||
//-------------------------------------------------
|
||||
// sound_int - handle an external sound interrupt to the board
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE_LINE_MEMBER(bally_as2888_device::sound_int)
|
||||
{
|
||||
machine().scheduler().synchronize(timer_expired_delegate(FUNC(bally_as2888_device::sound_int_sync), this), state);
|
||||
@ -120,6 +122,7 @@ TIMER_CALLBACK_MEMBER(bally_as2888_device::sound_int_sync)
|
||||
//-------------------------------------------------
|
||||
// device_add_mconfig - add device configuration
|
||||
//-------------------------------------------------
|
||||
|
||||
void bally_as2888_device::device_add_mconfig(machine_config &config)
|
||||
{
|
||||
DISCRETE(config, m_discrete, as2888_discrete);
|
||||
@ -132,6 +135,7 @@ void bally_as2888_device::device_add_mconfig(machine_config &config)
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void bally_as2888_device::device_start()
|
||||
{
|
||||
save_item(NAME(m_sound_select));
|
||||
@ -172,6 +176,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(bally_as2888_device::timer_as2888)
|
||||
//--------------------------------------------------------------------------
|
||||
// IO ports
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
static INPUT_PORTS_START(as3022)
|
||||
PORT_START("SW1")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_NAME("Sound Test") PORT_CHANGED_MEMBER(DEVICE_SELF, bally_as3022_device, sw1, 0)
|
||||
@ -191,7 +196,8 @@ INPUT_CHANGED_MEMBER(bally_as3022_device::sw1)
|
||||
//-------------------------------------------------
|
||||
// sound_select - handle an external write to the board
|
||||
//-------------------------------------------------
|
||||
WRITE8_MEMBER(bally_as3022_device::sound_select)
|
||||
|
||||
void bally_as3022_device::sound_select(uint8_t data)
|
||||
{
|
||||
machine().scheduler().synchronize(timer_expired_delegate(FUNC(bally_as3022_device::sound_select_sync), this), data);
|
||||
}
|
||||
@ -205,6 +211,7 @@ TIMER_CALLBACK_MEMBER(bally_as3022_device::sound_select_sync)
|
||||
//-------------------------------------------------
|
||||
// sound_int - handle an external sound interrupt to the board
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE_LINE_MEMBER(bally_as3022_device::sound_int)
|
||||
{
|
||||
machine().scheduler().synchronize(timer_expired_delegate(FUNC(bally_as3022_device::sound_int_sync), this), state);
|
||||
@ -218,6 +225,7 @@ TIMER_CALLBACK_MEMBER(bally_as3022_device::sound_int_sync)
|
||||
//-------------------------------------------------
|
||||
// pia_irq_w - IRQ line state changes
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE_LINE_MEMBER(bally_as3022_device::pia_irq_w)
|
||||
{
|
||||
int combined_state = m_pia->irq_a_state() | m_pia->irq_b_state();
|
||||
@ -227,6 +235,7 @@ WRITE_LINE_MEMBER(bally_as3022_device::pia_irq_w)
|
||||
//-------------------------------------------------
|
||||
// CPU map, from schematics
|
||||
//-------------------------------------------------
|
||||
|
||||
void bally_as3022_device::as3022_map(address_map &map)
|
||||
{
|
||||
map.unmap_value_high();
|
||||
@ -239,6 +248,7 @@ void bally_as3022_device::as3022_map(address_map &map)
|
||||
//-------------------------------------------------
|
||||
// device_add_mconfig - add device configuration
|
||||
//-------------------------------------------------
|
||||
|
||||
void bally_as3022_device::device_add_mconfig(machine_config &config)
|
||||
{
|
||||
M6808(config, m_cpu, DERIVED_CLOCK(1, 1));
|
||||
@ -268,6 +278,7 @@ void bally_as3022_device::device_add_mconfig(machine_config &config)
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void bally_as3022_device::device_start()
|
||||
{
|
||||
// Set volumes to a sane default.
|
||||
@ -284,7 +295,8 @@ void bally_as3022_device::device_start()
|
||||
//-------------------------------------------------
|
||||
// pia_porta_r - PIA port A reads
|
||||
//-------------------------------------------------
|
||||
READ8_MEMBER(bally_as3022_device::pia_porta_r)
|
||||
|
||||
uint8_t bally_as3022_device::pia_porta_r()
|
||||
{
|
||||
if (m_bc1 && !m_bdir)
|
||||
{
|
||||
@ -301,7 +313,8 @@ READ8_MEMBER(bally_as3022_device::pia_porta_r)
|
||||
//-------------------------------------------------
|
||||
// pia_porta_w - PIA port A writes
|
||||
//-------------------------------------------------
|
||||
WRITE8_MEMBER(bally_as3022_device::pia_porta_w)
|
||||
|
||||
void bally_as3022_device::pia_porta_w(uint8_t data)
|
||||
{
|
||||
if (m_bc1 && !m_bdir)
|
||||
{
|
||||
@ -314,7 +327,8 @@ WRITE8_MEMBER(bally_as3022_device::pia_porta_w)
|
||||
//-------------------------------------------------
|
||||
// pia_portb_w - PIA port B writes
|
||||
//-------------------------------------------------
|
||||
WRITE8_MEMBER(bally_as3022_device::pia_portb_w)
|
||||
|
||||
void bally_as3022_device::pia_portb_w(uint8_t data)
|
||||
{
|
||||
m_bc1 = BIT(data, 0);
|
||||
m_bdir = BIT(data, 1);
|
||||
@ -328,6 +342,7 @@ WRITE8_MEMBER(bally_as3022_device::pia_portb_w)
|
||||
//-------------------------------------------------
|
||||
// pia_cb2_w - PIA CB2 writes
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE_LINE_MEMBER(bally_as3022_device::pia_cb2_w)
|
||||
{
|
||||
// This pin is hooked up to the amp, and disables sounds when hi
|
||||
@ -348,7 +363,8 @@ WRITE_LINE_MEMBER(bally_as3022_device::pia_cb2_w)
|
||||
//-------------------------------------------------
|
||||
// ay_io_r - AY8912 IO A reads (B is unconnected)
|
||||
//-------------------------------------------------
|
||||
READ8_MEMBER(bally_as3022_device::ay_io_r)
|
||||
|
||||
uint8_t bally_as3022_device::ay_io_r()
|
||||
{
|
||||
// The two high bits are unconnected, the others are inverted.
|
||||
return ~m_sound_select & 0x3f;
|
||||
@ -374,6 +390,7 @@ void bally_as3022_device::update_ay_bus()
|
||||
//-------------------------------------------------
|
||||
// device_add_mconfig - add device configuration
|
||||
//-------------------------------------------------
|
||||
|
||||
void bally_sounds_plus_device::device_add_mconfig(machine_config &config)
|
||||
{
|
||||
bally_as3022_device::device_add_mconfig(config);
|
||||
@ -393,6 +410,7 @@ void bally_sounds_plus_device::device_add_mconfig(machine_config &config)
|
||||
//-------------------------------------------------
|
||||
// CPU map, from schematics
|
||||
//-------------------------------------------------
|
||||
|
||||
void bally_sounds_plus_device::sounds_plus_map(address_map &map)
|
||||
{
|
||||
map.unmap_value_high();
|
||||
@ -404,13 +422,14 @@ void bally_sounds_plus_device::sounds_plus_map(address_map &map)
|
||||
//-------------------------------------------------
|
||||
// pia_portb_w - PIA port B writes
|
||||
//-------------------------------------------------
|
||||
WRITE8_MEMBER(bally_sounds_plus_device::vocalizer_pia_portb_w)
|
||||
|
||||
void bally_sounds_plus_device::vocalizer_pia_portb_w(uint8_t data)
|
||||
{
|
||||
bool speech_clock = BIT(data, 6);
|
||||
bool speech_data = BIT(data, 7);
|
||||
m_mc3417->clock_w(speech_clock ? 1 : 0);
|
||||
m_mc3417->digit_w(speech_data ? 1 : 0);
|
||||
pia_portb_w(space, offset, data);
|
||||
pia_portb_w(data);
|
||||
}
|
||||
|
||||
|
||||
@ -440,7 +459,8 @@ INPUT_CHANGED_MEMBER(bally_cheap_squeak_device::sw1)
|
||||
//-------------------------------------------------
|
||||
// sound_select - handle an external write to the board
|
||||
//-------------------------------------------------
|
||||
WRITE8_MEMBER(bally_cheap_squeak_device::sound_select)
|
||||
|
||||
void bally_cheap_squeak_device::sound_select(uint8_t data)
|
||||
{
|
||||
machine().scheduler().synchronize(timer_expired_delegate(FUNC(bally_cheap_squeak_device::sound_select_sync), this), data);
|
||||
}
|
||||
@ -468,6 +488,7 @@ TIMER_CALLBACK_MEMBER(bally_cheap_squeak_device::sound_int_sync)
|
||||
//-------------------------------------------------
|
||||
// CPU map, from schematics
|
||||
//-------------------------------------------------
|
||||
|
||||
void bally_cheap_squeak_device::cheap_squeak_map(address_map &map)
|
||||
{
|
||||
map.unmap_value_high();
|
||||
@ -479,6 +500,7 @@ void bally_cheap_squeak_device::cheap_squeak_map(address_map &map)
|
||||
//-------------------------------------------------
|
||||
// device_add_mconfig - add device configuration
|
||||
//-------------------------------------------------
|
||||
|
||||
void bally_cheap_squeak_device::device_add_mconfig(machine_config &config)
|
||||
{
|
||||
M6803(config, m_cpu, DERIVED_CLOCK(1, 1));
|
||||
@ -496,6 +518,7 @@ void bally_cheap_squeak_device::device_add_mconfig(machine_config &config)
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void bally_cheap_squeak_device::device_start()
|
||||
{
|
||||
m_sound_ack_w_handler.resolve();
|
||||
@ -506,7 +529,8 @@ void bally_cheap_squeak_device::device_start()
|
||||
//-------------------------------------------------
|
||||
// out_p1_cb - IO port 1 write
|
||||
//-------------------------------------------------
|
||||
WRITE8_MEMBER(bally_cheap_squeak_device::out_p1_cb)
|
||||
|
||||
void bally_cheap_squeak_device::out_p1_cb(uint8_t data)
|
||||
{
|
||||
m_dac->write(data);
|
||||
}
|
||||
@ -514,7 +538,8 @@ WRITE8_MEMBER(bally_cheap_squeak_device::out_p1_cb)
|
||||
//-------------------------------------------------
|
||||
// in_p2_cb - IO port 2 read
|
||||
//-------------------------------------------------
|
||||
READ8_MEMBER(bally_cheap_squeak_device::in_p2_cb)
|
||||
|
||||
uint8_t bally_cheap_squeak_device::in_p2_cb()
|
||||
{
|
||||
int sound_int_bit = m_sound_int ? 1 : 0;
|
||||
return 0x40 | (m_sound_select & 0x0f) << 1 | sound_int_bit;
|
||||
@ -523,7 +548,8 @@ READ8_MEMBER(bally_cheap_squeak_device::in_p2_cb)
|
||||
//-------------------------------------------------
|
||||
// out_p2_cb - IO port 2 write
|
||||
//-------------------------------------------------
|
||||
WRITE8_MEMBER(bally_cheap_squeak_device::out_p2_cb)
|
||||
|
||||
void bally_cheap_squeak_device::out_p2_cb(uint8_t data)
|
||||
{
|
||||
m_sound_ack = BIT(data, 0);
|
||||
if (!m_sound_ack_w_handler.isnull())
|
||||
@ -567,7 +593,8 @@ INPUT_CHANGED_MEMBER(bally_squawk_n_talk_device::sw1)
|
||||
//-------------------------------------------------
|
||||
// sound_select - handle an external write to the board
|
||||
//-------------------------------------------------
|
||||
WRITE8_MEMBER(bally_squawk_n_talk_device::sound_select)
|
||||
|
||||
void bally_squawk_n_talk_device::sound_select(uint8_t data)
|
||||
{
|
||||
machine().scheduler().synchronize(timer_expired_delegate(FUNC(bally_squawk_n_talk_device::sound_select_sync), this), data);
|
||||
}
|
||||
@ -580,6 +607,7 @@ TIMER_CALLBACK_MEMBER(bally_squawk_n_talk_device::sound_select_sync)
|
||||
//-------------------------------------------------
|
||||
// sound_int - handle an external sound interrupt to the board
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE_LINE_MEMBER(bally_squawk_n_talk_device::sound_int)
|
||||
{
|
||||
machine().scheduler().synchronize(timer_expired_delegate(FUNC(bally_squawk_n_talk_device::sound_int_sync), this), state);
|
||||
@ -594,6 +622,7 @@ TIMER_CALLBACK_MEMBER(bally_squawk_n_talk_device::sound_int_sync)
|
||||
//-------------------------------------------------
|
||||
// CPU map, from schematics
|
||||
//-------------------------------------------------
|
||||
|
||||
void bally_squawk_n_talk_device::squawk_n_talk_map(address_map &map)
|
||||
{
|
||||
map.unmap_value_high();
|
||||
@ -609,6 +638,7 @@ void bally_squawk_n_talk_device::squawk_n_talk_map(address_map &map)
|
||||
//-------------------------------------------------
|
||||
// device_add_mconfig - add device configuration
|
||||
//-------------------------------------------------
|
||||
|
||||
void bally_squawk_n_talk_device::device_add_mconfig(machine_config &config)
|
||||
{
|
||||
M6802(config, m_cpu, DERIVED_CLOCK(1, 1)); // could also be jumpered to use a 6808
|
||||
@ -648,6 +678,7 @@ void bally_squawk_n_talk_device::device_add_mconfig(machine_config &config)
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void bally_squawk_n_talk_device::device_start()
|
||||
{
|
||||
save_item(NAME(m_sound_select));
|
||||
@ -656,7 +687,8 @@ void bally_squawk_n_talk_device::device_start()
|
||||
//-------------------------------------------------
|
||||
// pia1_portb_w - PIA 1 port B write
|
||||
//-------------------------------------------------
|
||||
WRITE8_MEMBER(bally_squawk_n_talk_device::pia1_portb_w)
|
||||
|
||||
void bally_squawk_n_talk_device::pia1_portb_w(uint8_t data)
|
||||
{
|
||||
m_tms5200->rsq_w(BIT(data, 0));
|
||||
m_tms5200->wsq_w(BIT(data, 1));
|
||||
@ -665,7 +697,8 @@ WRITE8_MEMBER(bally_squawk_n_talk_device::pia1_portb_w)
|
||||
//-------------------------------------------------
|
||||
// pia2_porta_r - PIA 2 port A reads
|
||||
//-------------------------------------------------
|
||||
READ8_MEMBER(bally_squawk_n_talk_device::pia2_porta_r)
|
||||
|
||||
uint8_t bally_squawk_n_talk_device::pia2_porta_r()
|
||||
{
|
||||
// 5 lines and they go through inverters
|
||||
return ~m_sound_select & 0x1f;
|
||||
@ -674,6 +707,7 @@ READ8_MEMBER(bally_squawk_n_talk_device::pia2_porta_r)
|
||||
//-------------------------------------------------
|
||||
// pia2_ca2_w - PIA 2 CA2 writes
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE_LINE_MEMBER(bally_squawk_n_talk_device::pia2_ca2_w)
|
||||
{
|
||||
machine().output().set_value("sound_led0", state);
|
||||
@ -729,7 +763,8 @@ void bally_squawk_n_talk_ay_device::device_start()
|
||||
//-------------------------------------------------
|
||||
// pia2_porta_r - PIA 2 port A reads
|
||||
//-------------------------------------------------
|
||||
READ8_MEMBER(bally_squawk_n_talk_ay_device::pia2_porta_r)
|
||||
|
||||
uint8_t bally_squawk_n_talk_ay_device::pia2_porta_r()
|
||||
{
|
||||
if (m_bc1 && !m_bdir)
|
||||
{
|
||||
@ -743,7 +778,8 @@ READ8_MEMBER(bally_squawk_n_talk_ay_device::pia2_porta_r)
|
||||
//-------------------------------------------------
|
||||
// pia2_porta_w - PIA 2 port A writes
|
||||
//-------------------------------------------------
|
||||
WRITE8_MEMBER(bally_squawk_n_talk_ay_device::pia2_porta_w)
|
||||
|
||||
void bally_squawk_n_talk_ay_device::pia2_porta_w(uint8_t data)
|
||||
{
|
||||
if (m_bc1 && !m_bdir)
|
||||
{
|
||||
@ -756,7 +792,8 @@ WRITE8_MEMBER(bally_squawk_n_talk_ay_device::pia2_porta_w)
|
||||
//-------------------------------------------------
|
||||
// pia2_portb_w - PIA 2 port B writes
|
||||
//-------------------------------------------------
|
||||
WRITE8_MEMBER(bally_squawk_n_talk_ay_device::pia2_portb_w)
|
||||
|
||||
void bally_squawk_n_talk_ay_device::pia2_portb_w(uint8_t data)
|
||||
{
|
||||
m_bc1 = BIT(data, 0);
|
||||
m_bdir = BIT(data, 1);
|
||||
@ -790,7 +827,8 @@ WRITE_LINE_MEMBER(bally_squawk_n_talk_ay_device::pia2_cb2_w)
|
||||
//-------------------------------------------------
|
||||
// ay_io_r - AY8910 read
|
||||
//-------------------------------------------------
|
||||
READ8_MEMBER(bally_squawk_n_talk_ay_device::ay_io_r)
|
||||
|
||||
uint8_t bally_squawk_n_talk_ay_device::ay_io_r()
|
||||
{
|
||||
// 5 lines and they go through inverters
|
||||
return ~m_sound_select & 0x1f;
|
||||
|
@ -57,7 +57,7 @@ public:
|
||||
{ }
|
||||
|
||||
// read/write
|
||||
DECLARE_WRITE8_MEMBER(sound_select);
|
||||
void sound_select(uint8_t data);
|
||||
DECLARE_WRITE_LINE_MEMBER(sound_int);
|
||||
|
||||
void as2888_map(address_map &map);
|
||||
@ -114,7 +114,7 @@ public:
|
||||
|
||||
// read/write
|
||||
DECLARE_INPUT_CHANGED_MEMBER(sw1);
|
||||
DECLARE_WRITE8_MEMBER(sound_select);
|
||||
void sound_select(uint8_t data);
|
||||
DECLARE_WRITE_LINE_MEMBER(sound_int);
|
||||
|
||||
void as3022_map(address_map &map);
|
||||
@ -151,7 +151,7 @@ protected:
|
||||
optional_device<mc3417_device> m_mc3417;
|
||||
|
||||
// overwridden by children
|
||||
DECLARE_WRITE8_MEMBER(pia_portb_w);
|
||||
void pia_portb_w(uint8_t data);
|
||||
|
||||
private:
|
||||
bool m_bc1;
|
||||
@ -162,11 +162,11 @@ private:
|
||||
// internal communications
|
||||
TIMER_CALLBACK_MEMBER(sound_select_sync);
|
||||
TIMER_CALLBACK_MEMBER(sound_int_sync);
|
||||
DECLARE_READ8_MEMBER(pia_porta_r);
|
||||
DECLARE_WRITE8_MEMBER(pia_porta_w);
|
||||
uint8_t pia_porta_r();
|
||||
void pia_porta_w(uint8_t data);
|
||||
DECLARE_WRITE_LINE_MEMBER(pia_cb2_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(pia_irq_w);
|
||||
DECLARE_READ8_MEMBER(ay_io_r);
|
||||
uint8_t ay_io_r();
|
||||
|
||||
void update_ay_bus();
|
||||
};
|
||||
@ -192,7 +192,7 @@ protected:
|
||||
|
||||
private:
|
||||
// internal communications
|
||||
DECLARE_WRITE8_MEMBER(vocalizer_pia_portb_w);
|
||||
void vocalizer_pia_portb_w(uint8_t data);
|
||||
};
|
||||
|
||||
|
||||
@ -213,7 +213,7 @@ public:
|
||||
|
||||
// read/write
|
||||
DECLARE_INPUT_CHANGED_MEMBER(sw1);
|
||||
DECLARE_WRITE8_MEMBER(sound_select);
|
||||
void sound_select(uint8_t data);
|
||||
DECLARE_WRITE_LINE_MEMBER(sound_int);
|
||||
|
||||
void cheap_squeak_map(address_map &map);
|
||||
@ -251,9 +251,9 @@ private:
|
||||
// internal communications
|
||||
TIMER_CALLBACK_MEMBER(sound_select_sync);
|
||||
TIMER_CALLBACK_MEMBER(sound_int_sync);
|
||||
DECLARE_WRITE8_MEMBER(out_p1_cb);
|
||||
DECLARE_READ8_MEMBER(in_p2_cb);
|
||||
DECLARE_WRITE8_MEMBER(out_p2_cb);
|
||||
void out_p1_cb(uint8_t data);
|
||||
uint8_t in_p2_cb();
|
||||
void out_p2_cb(uint8_t data);
|
||||
|
||||
void update_led();
|
||||
};
|
||||
@ -275,7 +275,7 @@ public:
|
||||
|
||||
// read/write
|
||||
DECLARE_INPUT_CHANGED_MEMBER(sw1);
|
||||
DECLARE_WRITE8_MEMBER(sound_select);
|
||||
void sound_select(uint8_t data);
|
||||
DECLARE_WRITE_LINE_MEMBER(sound_int);
|
||||
|
||||
void squawk_n_talk_map(address_map &map);
|
||||
@ -318,13 +318,13 @@ protected:
|
||||
|
||||
uint8_t m_sound_select;
|
||||
|
||||
DECLARE_READ8_MEMBER(pia2_porta_r);
|
||||
uint8_t pia2_porta_r();
|
||||
|
||||
private:
|
||||
// internal communications
|
||||
TIMER_CALLBACK_MEMBER(sound_select_sync);
|
||||
TIMER_CALLBACK_MEMBER(sound_int_sync);
|
||||
DECLARE_WRITE8_MEMBER(pia1_portb_w);
|
||||
void pia1_portb_w(uint8_t data);
|
||||
DECLARE_WRITE_LINE_MEMBER(pia2_ca2_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(pia_irq_w);
|
||||
};
|
||||
@ -346,17 +346,17 @@ protected:
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
virtual void device_start() override;
|
||||
|
||||
DECLARE_READ8_MEMBER(pia2_porta_r);
|
||||
uint8_t pia2_porta_r();
|
||||
|
||||
private:
|
||||
bool m_bc1;
|
||||
bool m_bdir;
|
||||
uint8_t m_ay_data;
|
||||
|
||||
DECLARE_WRITE8_MEMBER(pia2_porta_w);
|
||||
DECLARE_WRITE8_MEMBER(pia2_portb_w);
|
||||
void pia2_porta_w(uint8_t data);
|
||||
void pia2_portb_w(uint8_t data);
|
||||
DECLARE_WRITE_LINE_MEMBER(pia2_cb2_w);
|
||||
DECLARE_READ8_MEMBER(ay_io_r);
|
||||
uint8_t ay_io_r();
|
||||
|
||||
void update_ay_bus();
|
||||
};
|
||||
|
@ -70,7 +70,7 @@ void midway_ssio_device::suspend_cpu()
|
||||
// read - return the status value
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER(midway_ssio_device::read)
|
||||
uint8_t midway_ssio_device::read()
|
||||
{
|
||||
return m_status;
|
||||
}
|
||||
@ -81,7 +81,7 @@ READ8_MEMBER(midway_ssio_device::read)
|
||||
// input latches
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER(midway_ssio_device::write)
|
||||
void midway_ssio_device::write(offs_t offset, uint8_t data)
|
||||
{
|
||||
synchronize(0, (offset << 8) | (data & 0xff));
|
||||
}
|
||||
@ -112,12 +112,12 @@ WRITE_LINE_MEMBER(midway_ssio_device::reset_write)
|
||||
// on the device
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER(midway_ssio_device::ioport_read)
|
||||
uint8_t midway_ssio_device::ioport_read(offs_t offset)
|
||||
{
|
||||
uint8_t result = m_ports[offset].read_safe(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]);
|
||||
(m_custom_input[offset]() & m_custom_input_mask[offset]);
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -127,11 +127,11 @@ READ8_MEMBER(midway_ssio_device::ioport_read)
|
||||
// on the device
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER(midway_ssio_device::ioport_write)
|
||||
void midway_ssio_device::ioport_write(offs_t offset, uint8_t data)
|
||||
{
|
||||
int which = offset >> 2;
|
||||
if (!m_custom_output[which].isnull())
|
||||
m_custom_output[which](space, offset & 4, data & m_custom_output_mask[which], 0xff);
|
||||
m_custom_output[which](data & m_custom_output_mask[which]);
|
||||
}
|
||||
|
||||
|
||||
@ -233,11 +233,14 @@ INTERRUPT_GEN_MEMBER(midway_ssio_device::clock_14024)
|
||||
// irq_clear - reset the IRQ state and 14024 count
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER(midway_ssio_device::irq_clear)
|
||||
uint8_t midway_ssio_device::irq_clear()
|
||||
{
|
||||
// a read here asynchronously resets the 14024 count, clearing /SINT
|
||||
if (!machine().side_effects_disabled())
|
||||
{
|
||||
m_14024_count = 0;
|
||||
m_cpu->set_input_line(0, CLEAR_LINE);
|
||||
}
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
@ -246,7 +249,7 @@ READ8_MEMBER(midway_ssio_device::irq_clear)
|
||||
// status_w - set the outgoing status value
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER(midway_ssio_device::status_w)
|
||||
void midway_ssio_device::status_w(uint8_t data)
|
||||
{
|
||||
m_status = data;
|
||||
}
|
||||
@ -256,7 +259,7 @@ WRITE8_MEMBER(midway_ssio_device::status_w)
|
||||
// data_r - read incoming data latches
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER(midway_ssio_device::data_r)
|
||||
uint8_t midway_ssio_device::data_r(offs_t offset)
|
||||
{
|
||||
return m_data[offset];
|
||||
}
|
||||
@ -266,7 +269,7 @@ READ8_MEMBER(midway_ssio_device::data_r)
|
||||
// porta0_w - handle writes to AY-8910 #0 port A
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER(midway_ssio_device::porta0_w)
|
||||
void midway_ssio_device::porta0_w(uint8_t data)
|
||||
{
|
||||
m_duty_cycle[0][0] = data & 15;
|
||||
m_duty_cycle[0][1] = data >> 4;
|
||||
@ -278,7 +281,7 @@ WRITE8_MEMBER(midway_ssio_device::porta0_w)
|
||||
// portb0_w - handle writes to AY-8910 #0 port B
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER(midway_ssio_device::portb0_w)
|
||||
void midway_ssio_device::portb0_w(uint8_t data)
|
||||
{
|
||||
m_duty_cycle[0][2] = data & 15;
|
||||
m_overall[0] = (data >> 4) & 7;
|
||||
@ -290,7 +293,7 @@ WRITE8_MEMBER(midway_ssio_device::portb0_w)
|
||||
// porta1_w - handle writes to AY-8910 #1 port A
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER(midway_ssio_device::porta1_w)
|
||||
void midway_ssio_device::porta1_w(uint8_t data)
|
||||
{
|
||||
m_duty_cycle[1][0] = data & 15;
|
||||
m_duty_cycle[1][1] = data >> 4;
|
||||
@ -302,7 +305,7 @@ WRITE8_MEMBER(midway_ssio_device::porta1_w)
|
||||
// portb1_w - handle writes to AY-8910 #1 port B
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER(midway_ssio_device::portb1_w)
|
||||
void midway_ssio_device::portb1_w(uint8_t data)
|
||||
{
|
||||
m_duty_cycle[1][2] = data & 15;
|
||||
m_overall[1] = (data >> 4) & 7;
|
||||
@ -483,7 +486,7 @@ midway_sounds_good_device::midway_sounds_good_device(const machine_config &mconf
|
||||
// read - return the status value
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER(midway_sounds_good_device::read)
|
||||
uint8_t midway_sounds_good_device::read()
|
||||
{
|
||||
return m_status;
|
||||
}
|
||||
@ -494,7 +497,7 @@ READ8_MEMBER(midway_sounds_good_device::read)
|
||||
// latch
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER(midway_sounds_good_device::write)
|
||||
void midway_sounds_good_device::write(uint8_t data)
|
||||
{
|
||||
synchronize(0, data);
|
||||
}
|
||||
@ -515,7 +518,7 @@ WRITE_LINE_MEMBER(midway_sounds_good_device::reset_write)
|
||||
// porta_w - PIA port A writes
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER(midway_sounds_good_device::porta_w)
|
||||
void midway_sounds_good_device::porta_w(uint8_t data)
|
||||
{
|
||||
m_dacval = (data << 2) | (m_dacval & 3);
|
||||
m_dac->write(m_dacval);
|
||||
@ -526,7 +529,7 @@ WRITE8_MEMBER(midway_sounds_good_device::porta_w)
|
||||
// portb_w - PIA port B writes
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER(midway_sounds_good_device::portb_w)
|
||||
void midway_sounds_good_device::portb_w(uint8_t data)
|
||||
{
|
||||
uint8_t z_mask = m_pia->port_b_z_mask();
|
||||
|
||||
@ -646,7 +649,7 @@ midway_turbo_cheap_squeak_device::midway_turbo_cheap_squeak_device(const machine
|
||||
// read - return the status value
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER(midway_turbo_cheap_squeak_device::read)
|
||||
uint8_t midway_turbo_cheap_squeak_device::read()
|
||||
{
|
||||
return m_status;
|
||||
}
|
||||
@ -657,7 +660,7 @@ READ8_MEMBER(midway_turbo_cheap_squeak_device::read)
|
||||
// latch
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER(midway_turbo_cheap_squeak_device::write)
|
||||
void midway_turbo_cheap_squeak_device::write(uint8_t data)
|
||||
{
|
||||
synchronize(0, data);
|
||||
}
|
||||
@ -677,7 +680,7 @@ WRITE_LINE_MEMBER(midway_turbo_cheap_squeak_device::reset_write)
|
||||
// porta_w - PIA port A writes
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER(midway_turbo_cheap_squeak_device::porta_w)
|
||||
void midway_turbo_cheap_squeak_device::porta_w(uint8_t data)
|
||||
{
|
||||
m_dacval = (data << 2) | (m_dacval & 3);
|
||||
m_dac->write(m_dacval);
|
||||
@ -688,7 +691,7 @@ WRITE8_MEMBER(midway_turbo_cheap_squeak_device::porta_w)
|
||||
// portb_w - PIA port B writes
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER(midway_turbo_cheap_squeak_device::portb_w)
|
||||
void midway_turbo_cheap_squeak_device::portb_w(uint8_t data)
|
||||
{
|
||||
m_dacval = (m_dacval & ~3) | (data >> 6);
|
||||
m_dac->write(m_dacval);
|
||||
|
@ -51,11 +51,11 @@ public:
|
||||
void suspend_cpu();
|
||||
|
||||
// read/write
|
||||
DECLARE_READ8_MEMBER(read);
|
||||
DECLARE_WRITE8_MEMBER(write);
|
||||
uint8_t read();
|
||||
void write(offs_t offset, uint8_t data);
|
||||
DECLARE_WRITE_LINE_MEMBER(reset_write);
|
||||
DECLARE_READ8_MEMBER(ioport_read);
|
||||
DECLARE_WRITE8_MEMBER(ioport_write);
|
||||
uint8_t ioport_read(offs_t offset);
|
||||
void ioport_write(offs_t offset, uint8_t data);
|
||||
|
||||
// configuration
|
||||
template <typename... T> void set_custom_input(int which, uint8_t mask, T &&... args)
|
||||
@ -70,9 +70,9 @@ public:
|
||||
}
|
||||
|
||||
// internal communications
|
||||
DECLARE_READ8_MEMBER(irq_clear);
|
||||
DECLARE_WRITE8_MEMBER(status_w);
|
||||
DECLARE_READ8_MEMBER(data_r);
|
||||
uint8_t irq_clear();
|
||||
void status_w(uint8_t data);
|
||||
uint8_t data_r(offs_t offset);
|
||||
|
||||
void ssio_map(address_map &map);
|
||||
static void ssio_input_ports(address_map &map, const char *ssio);
|
||||
@ -110,15 +110,15 @@ private:
|
||||
|
||||
// I/O port overrides
|
||||
uint8_t m_custom_input_mask[5];
|
||||
read8_delegate::array<5> m_custom_input;
|
||||
read8smo_delegate::array<5> m_custom_input;
|
||||
uint8_t m_custom_output_mask[2];
|
||||
write8_delegate::array<2> m_custom_output;
|
||||
write8smo_delegate::array<2> m_custom_output;
|
||||
|
||||
INTERRUPT_GEN_MEMBER(clock_14024);
|
||||
DECLARE_WRITE8_MEMBER(porta0_w);
|
||||
DECLARE_WRITE8_MEMBER(portb0_w);
|
||||
DECLARE_WRITE8_MEMBER(porta1_w);
|
||||
DECLARE_WRITE8_MEMBER(portb1_w);
|
||||
void porta0_w(uint8_t data);
|
||||
void portb0_w(uint8_t data);
|
||||
void porta1_w(uint8_t data);
|
||||
void portb1_w(uint8_t data);
|
||||
};
|
||||
|
||||
|
||||
@ -132,8 +132,8 @@ public:
|
||||
midway_sounds_good_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 16'000'000);
|
||||
|
||||
// read/write
|
||||
DECLARE_READ8_MEMBER(read);
|
||||
DECLARE_WRITE8_MEMBER(write);
|
||||
uint8_t read();
|
||||
void write(uint8_t data);
|
||||
DECLARE_WRITE_LINE_MEMBER(reset_write);
|
||||
|
||||
void soundsgood_map(address_map &map);
|
||||
@ -155,8 +155,8 @@ private:
|
||||
uint16_t m_dacval;
|
||||
|
||||
// internal communications
|
||||
DECLARE_WRITE8_MEMBER(porta_w);
|
||||
DECLARE_WRITE8_MEMBER(portb_w);
|
||||
void porta_w(uint8_t data);
|
||||
void portb_w(uint8_t data);
|
||||
DECLARE_WRITE_LINE_MEMBER(irq_w);
|
||||
};
|
||||
|
||||
@ -171,8 +171,8 @@ public:
|
||||
midway_turbo_cheap_squeak_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 8'000'000);
|
||||
|
||||
// read/write
|
||||
DECLARE_READ8_MEMBER(read);
|
||||
DECLARE_WRITE8_MEMBER(write);
|
||||
uint8_t read();
|
||||
void write(uint8_t data);
|
||||
DECLARE_WRITE_LINE_MEMBER(reset_write);
|
||||
|
||||
void turbocs_map(address_map &map);
|
||||
@ -194,8 +194,8 @@ private:
|
||||
uint16_t m_dacval;
|
||||
|
||||
// internal communications
|
||||
DECLARE_WRITE8_MEMBER(porta_w);
|
||||
DECLARE_WRITE8_MEMBER(portb_w);
|
||||
void porta_w(uint8_t data);
|
||||
void portb_w(uint8_t data);
|
||||
DECLARE_WRITE_LINE_MEMBER(irq_w);
|
||||
};
|
||||
|
||||
|
@ -293,7 +293,7 @@
|
||||
#include "dpoker.lh"
|
||||
|
||||
|
||||
WRITE8_MEMBER(mcr_state::mcr_control_port_w)
|
||||
void mcr_state::mcr_control_port_w(uint8_t data)
|
||||
{
|
||||
/*
|
||||
Bit layout is as follows:
|
||||
@ -320,7 +320,7 @@ WRITE8_MEMBER(mcr_state::mcr_control_port_w)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
READ8_MEMBER(mcr_state::solarfox_ip0_r)
|
||||
uint8_t mcr_state::solarfox_ip0_r()
|
||||
{
|
||||
/* This is a kludge; according to the wiring diagram, the player 2 */
|
||||
/* controls are hooked up as documented below. If you go into test */
|
||||
@ -334,7 +334,7 @@ READ8_MEMBER(mcr_state::solarfox_ip0_r)
|
||||
}
|
||||
|
||||
|
||||
READ8_MEMBER(mcr_state::solarfox_ip1_r)
|
||||
uint8_t mcr_state::solarfox_ip1_r()
|
||||
{
|
||||
/* same deal as above */
|
||||
if (m_mcr_cocktail_flip)
|
||||
@ -351,7 +351,7 @@ READ8_MEMBER(mcr_state::solarfox_ip1_r)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
READ8_MEMBER(mcr_state::kick_ip1_r)
|
||||
uint8_t mcr_state::kick_ip1_r()
|
||||
{
|
||||
return (ioport("DIAL2")->read() << 4) & 0xf0;
|
||||
}
|
||||
@ -396,7 +396,7 @@ INPUT_CHANGED_MEMBER(mcr_dpoker_state::coin_in_hit)
|
||||
}
|
||||
}
|
||||
|
||||
READ8_MEMBER(mcr_dpoker_state::ip0_r)
|
||||
uint8_t mcr_dpoker_state::ip0_r()
|
||||
{
|
||||
// d0: Coin-in Hit
|
||||
// d1: Coin-in Release
|
||||
@ -411,7 +411,7 @@ READ8_MEMBER(mcr_dpoker_state::ip0_r)
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(mcr_dpoker_state::lamps1_w)
|
||||
void mcr_dpoker_state::lamps1_w(uint8_t data)
|
||||
{
|
||||
// cpanel button lamps (white)
|
||||
m_lamps[0] = BIT(data, 0); // hold 1
|
||||
@ -424,7 +424,7 @@ WRITE8_MEMBER(mcr_dpoker_state::lamps1_w)
|
||||
m_lamps[7] = BIT(data, 3); // stand
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(mcr_dpoker_state::lamps2_w)
|
||||
void mcr_dpoker_state::lamps2_w(uint8_t data)
|
||||
{
|
||||
// d5: button lamp: service or change
|
||||
m_lamps[8] = BIT(data, 5);
|
||||
@ -436,7 +436,7 @@ WRITE8_MEMBER(mcr_dpoker_state::lamps2_w)
|
||||
// d6, d7: unused?
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(mcr_dpoker_state::output_w)
|
||||
void mcr_dpoker_state::output_w(uint8_t data)
|
||||
{
|
||||
// d0: ? coin return
|
||||
// d1: ? divertor (active low)
|
||||
@ -452,7 +452,7 @@ WRITE8_MEMBER(mcr_dpoker_state::output_w)
|
||||
m_output = data;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(mcr_dpoker_state::meters_w)
|
||||
void mcr_dpoker_state::meters_w(uint8_t data)
|
||||
{
|
||||
// meters?
|
||||
}
|
||||
@ -465,13 +465,13 @@ WRITE8_MEMBER(mcr_dpoker_state::meters_w)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
WRITE8_MEMBER(mcr_state::wacko_op4_w)
|
||||
void mcr_state::wacko_op4_w(uint8_t data)
|
||||
{
|
||||
m_input_mux = data & 1;
|
||||
}
|
||||
|
||||
|
||||
READ8_MEMBER(mcr_state::wacko_ip1_r)
|
||||
uint8_t mcr_state::wacko_ip1_r()
|
||||
{
|
||||
if (!m_input_mux)
|
||||
return ioport("ssio:IP1")->read();
|
||||
@ -480,7 +480,7 @@ READ8_MEMBER(mcr_state::wacko_ip1_r)
|
||||
}
|
||||
|
||||
|
||||
READ8_MEMBER(mcr_state::wacko_ip2_r)
|
||||
uint8_t mcr_state::wacko_ip2_r()
|
||||
{
|
||||
if (!m_input_mux)
|
||||
return ioport("ssio:IP2")->read();
|
||||
@ -496,14 +496,14 @@ READ8_MEMBER(mcr_state::wacko_ip2_r)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
READ8_MEMBER(mcr_state::kroozr_ip1_r)
|
||||
uint8_t mcr_state::kroozr_ip1_r()
|
||||
{
|
||||
int dial = ioport("DIAL")->read();
|
||||
return ((dial & 0x80) >> 1) | ((dial & 0x70) >> 4);
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(mcr_state::kroozr_op4_w)
|
||||
void mcr_state::kroozr_op4_w(uint8_t data)
|
||||
{
|
||||
/*
|
||||
bit 2 = ship control
|
||||
@ -520,7 +520,7 @@ WRITE8_MEMBER(mcr_state::kroozr_op4_w)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
WRITE8_MEMBER(mcr_state::journey_op4_w)
|
||||
void mcr_state::journey_op4_w(uint8_t data)
|
||||
{
|
||||
/* if we're not playing the sample yet, start it */
|
||||
if (!m_samples->playing(0))
|
||||
@ -538,7 +538,7 @@ WRITE8_MEMBER(mcr_state::journey_op4_w)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
WRITE8_MEMBER(mcr_state::twotiger_op4_w)
|
||||
void mcr_state::twotiger_op4_w(uint8_t data)
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
@ -562,7 +562,7 @@ WRITE8_MEMBER(mcr_state::twotiger_op4_w)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
WRITE8_MEMBER(mcr_state::dotron_op4_w)
|
||||
void mcr_state::dotron_op4_w(uint8_t data)
|
||||
{
|
||||
/*
|
||||
Flasher Control:
|
||||
@ -621,7 +621,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) */
|
||||
m_squawk_n_talk->sound_select(machine().dummy_space(), offset, data & 0x0f);
|
||||
m_squawk_n_talk->sound_select(data & 0x0f);
|
||||
m_squawk_n_talk->sound_int(BIT(data, 4));
|
||||
}
|
||||
|
||||
@ -633,7 +633,7 @@ WRITE8_MEMBER(mcr_state::dotron_op4_w)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
READ8_MEMBER(mcr_nflfoot_state::ip2_r)
|
||||
uint8_t mcr_nflfoot_state::ip2_r()
|
||||
{
|
||||
/* bit 7 = J3-2 on IPU board = TXDA on SIO */
|
||||
uint8_t val = m_ipu_sio_txda << 7;
|
||||
@ -641,7 +641,7 @@ READ8_MEMBER(mcr_nflfoot_state::ip2_r)
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(mcr_nflfoot_state::op4_w)
|
||||
void mcr_nflfoot_state::op4_w(uint8_t data)
|
||||
{
|
||||
/* bit 7 = J3-7 on IPU board = /RXDA on SIO */
|
||||
m_ipu_sio->rxa_w(!((data >> 7) & 1));
|
||||
@ -651,7 +651,7 @@ WRITE8_MEMBER(mcr_nflfoot_state::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) */
|
||||
m_squawk_n_talk->sound_select(machine().dummy_space(), offset, data & 0x0f);
|
||||
m_squawk_n_talk->sound_select(data & 0x0f);
|
||||
m_squawk_n_talk->sound_int(BIT(data, 4));
|
||||
}
|
||||
|
||||
@ -663,25 +663,25 @@ WRITE8_MEMBER(mcr_nflfoot_state::op4_w)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
READ8_MEMBER(mcr_state::demoderb_ip1_r)
|
||||
uint8_t mcr_state::demoderb_ip1_r()
|
||||
{
|
||||
return ioport("ssio:IP1")->read() |
|
||||
(ioport(m_input_mux ? "ssio:IP1.ALT2" : "ssio:IP1.ALT1")->read() << 2);
|
||||
}
|
||||
|
||||
|
||||
READ8_MEMBER(mcr_state::demoderb_ip2_r)
|
||||
uint8_t mcr_state::demoderb_ip2_r()
|
||||
{
|
||||
return ioport("ssio:IP2")->read() |
|
||||
(ioport(m_input_mux ? "ssio:IP2.ALT2" : "ssio:IP2.ALT1")->read() << 2);
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(mcr_state::demoderb_op4_w)
|
||||
void mcr_state::demoderb_op4_w(uint8_t data)
|
||||
{
|
||||
if (data & 0x40) m_input_mux = 1;
|
||||
if (data & 0x80) m_input_mux = 0;
|
||||
m_turbo_cheap_squeak->write(space, offset, data);
|
||||
m_turbo_cheap_squeak->write(data);
|
||||
}
|
||||
|
||||
|
||||
@ -2908,10 +2908,10 @@ void mcr_dpoker_state::init_dpoker()
|
||||
m_maincpu->space(AS_IO).install_read_port(0x28, 0x28, "P28");
|
||||
m_maincpu->space(AS_IO).install_read_port(0x2c, 0x2c, "P2C");
|
||||
|
||||
m_maincpu->space(AS_IO).install_write_handler(0x2c, 0x2c, write8_delegate(*this, FUNC(mcr_dpoker_state::lamps1_w)));
|
||||
m_maincpu->space(AS_IO).install_write_handler(0x30, 0x30, write8_delegate(*this, FUNC(mcr_dpoker_state::lamps2_w)));
|
||||
m_maincpu->space(AS_IO).install_write_handler(0x34, 0x34, write8_delegate(*this, FUNC(mcr_dpoker_state::output_w)));
|
||||
m_maincpu->space(AS_IO).install_write_handler(0x3f, 0x3f, write8_delegate(*this, FUNC(mcr_dpoker_state::meters_w)));
|
||||
m_maincpu->space(AS_IO).install_write_handler(0x2c, 0x2c, write8smo_delegate(*this, FUNC(mcr_dpoker_state::lamps1_w)));
|
||||
m_maincpu->space(AS_IO).install_write_handler(0x30, 0x30, write8smo_delegate(*this, FUNC(mcr_dpoker_state::lamps2_w)));
|
||||
m_maincpu->space(AS_IO).install_write_handler(0x34, 0x34, write8smo_delegate(*this, FUNC(mcr_dpoker_state::output_w)));
|
||||
m_maincpu->space(AS_IO).install_write_handler(0x3f, 0x3f, write8smo_delegate(*this, FUNC(mcr_dpoker_state::meters_w)));
|
||||
|
||||
m_coin_status = 0;
|
||||
m_output = 0;
|
||||
@ -2942,7 +2942,7 @@ void mcr_state::init_twotiger()
|
||||
mcr_init(90010, 91399, 90913);
|
||||
|
||||
m_ssio->set_custom_output(4, 0xff, *this, FUNC(mcr_state::twotiger_op4_w));
|
||||
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xe800, 0xefff, 0, 0x1000, 0, read8_delegate(*this, FUNC(mcr_state::twotiger_videoram_r)), write8_delegate(*this, FUNC(mcr_state::twotiger_videoram_w)));
|
||||
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xe800, 0xefff, 0, 0x1000, 0, read8sm_delegate(*this, FUNC(mcr_state::twotiger_videoram_r)), write8sm_delegate(*this, FUNC(mcr_state::twotiger_videoram_w)));
|
||||
}
|
||||
|
||||
|
||||
|
@ -118,7 +118,7 @@
|
||||
|
||||
|
||||
|
||||
WRITE8_MEMBER(mcr3_state::mcrmono_control_port_w)
|
||||
void mcr3_state::mcrmono_control_port_w(uint8_t data)
|
||||
{
|
||||
/*
|
||||
Bit layout is as follows:
|
||||
@ -143,28 +143,28 @@ WRITE8_MEMBER(mcr3_state::mcrmono_control_port_w)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
READ8_MEMBER(mcr3_state::demoderm_ip1_r)
|
||||
uint8_t mcr3_state::demoderm_ip1_r()
|
||||
{
|
||||
return ioport("MONO.IP1")->read() |
|
||||
(ioport(m_input_mux ? "MONO.IP1.ALT2" : "MONO.IP1.ALT1")->read() << 2);
|
||||
}
|
||||
|
||||
|
||||
READ8_MEMBER(mcr3_state::demoderm_ip2_r)
|
||||
uint8_t mcr3_state::demoderm_ip2_r()
|
||||
{
|
||||
return ioport("MONO.IP2")->read() |
|
||||
(ioport(m_input_mux ? "MONO.IP2.ALT2" : "MONO.IP2.ALT1")->read() << 2);
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(mcr3_state::demoderm_op6_w)
|
||||
void mcr3_state::demoderm_op6_w(uint8_t data)
|
||||
{
|
||||
/* top 2 bits select the input */
|
||||
if (data & 0x80) m_input_mux = 0;
|
||||
if (data & 0x40) m_input_mux = 1;
|
||||
|
||||
/* low 5 bits control the turbo CS */
|
||||
m_turbo_cheap_squeak->write(space, offset, data);
|
||||
m_turbo_cheap_squeak->write(data);
|
||||
}
|
||||
|
||||
|
||||
@ -175,13 +175,13 @@ WRITE8_MEMBER(mcr3_state::demoderm_op6_w)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
READ8_MEMBER(mcr3_state::maxrpm_ip1_r)
|
||||
uint8_t maxrpm_state::maxrpm_ip1_r()
|
||||
{
|
||||
return m_latched_input;
|
||||
}
|
||||
|
||||
|
||||
READ8_MEMBER(mcr3_state::maxrpm_ip2_r)
|
||||
uint8_t maxrpm_state::maxrpm_ip2_r()
|
||||
{
|
||||
/* this is a blatant hack, should really do a better implementation */
|
||||
static const uint8_t shift_bits[5] = { 0x00, 0x05, 0x06, 0x01, 0x02 };
|
||||
@ -226,17 +226,17 @@ READ8_MEMBER(mcr3_state::maxrpm_ip2_r)
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(mcr3_state::maxrpm_op5_w)
|
||||
void maxrpm_state::maxrpm_op5_w(uint8_t data)
|
||||
{
|
||||
/* latch bits 1-4 as input to the ADC0844 */
|
||||
m_maxrpm_adc_control = (data >> 1) & 0x0f;
|
||||
|
||||
/* remaining bits go to standard connections */
|
||||
mcrmono_control_port_w(space, offset, data);
|
||||
mcrmono_control_port_w(data);
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(mcr3_state::maxrpm_op6_w)
|
||||
void maxrpm_state::maxrpm_op6_w(uint8_t data)
|
||||
{
|
||||
/*
|
||||
Reflective Sensor Control:
|
||||
@ -266,7 +266,7 @@ WRITE8_MEMBER(mcr3_state::maxrpm_op6_w)
|
||||
m_maxrpm_adc->write(bitswap<4>(m_maxrpm_adc_control, 2, 3, 1, 0));
|
||||
|
||||
/* low 5 bits control the turbo CS */
|
||||
m_turbo_cheap_squeak->write(space, offset, data);
|
||||
m_turbo_cheap_squeak->write(data);
|
||||
}
|
||||
|
||||
|
||||
@ -277,19 +277,19 @@ WRITE8_MEMBER(mcr3_state::maxrpm_op6_w)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
READ8_MEMBER(mcr3_state::rampage_ip4_r)
|
||||
uint8_t mcr3_state::rampage_ip4_r()
|
||||
{
|
||||
return ioport("MONO.IP4")->read() | (m_sounds_good->read(space,0) << 7);
|
||||
return ioport("MONO.IP4")->read() | (m_sounds_good->read() << 7);
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(mcr3_state::rampage_op6_w)
|
||||
void mcr3_state::rampage_op6_w(uint8_t data)
|
||||
{
|
||||
/* bit 5 controls reset of the Sounds Good board */
|
||||
m_sounds_good->reset_write((~data >> 5) & 1);
|
||||
|
||||
/* low 5 bits go directly to the Sounds Good board */
|
||||
m_sounds_good->write(space, offset, data);
|
||||
m_sounds_good->write(data);
|
||||
}
|
||||
|
||||
|
||||
@ -300,13 +300,13 @@ WRITE8_MEMBER(mcr3_state::rampage_op6_w)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
READ8_MEMBER(mcr3_state::powerdrv_ip2_r)
|
||||
uint8_t mcr3_state::powerdrv_ip2_r()
|
||||
{
|
||||
return ioport("MONO.IP2")->read() | (m_sounds_good->read(space, 0) << 7);
|
||||
return ioport("MONO.IP2")->read() | (m_sounds_good->read() << 7);
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(mcr3_state::powerdrv_op5_w)
|
||||
void mcr3_state::powerdrv_op5_w(uint8_t data)
|
||||
{
|
||||
/*
|
||||
Lamp Board:
|
||||
@ -323,17 +323,17 @@ WRITE8_MEMBER(mcr3_state::powerdrv_op5_w)
|
||||
m_lamps[2] = BIT(data, 1);
|
||||
|
||||
/* remaining bits go to standard connections */
|
||||
mcrmono_control_port_w(space, offset, data);
|
||||
mcrmono_control_port_w(data);
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(mcr3_state::powerdrv_op6_w)
|
||||
void mcr3_state::powerdrv_op6_w(uint8_t data)
|
||||
{
|
||||
/* bit 5 controls reset of the Sounds Good board */
|
||||
m_sounds_good->reset_write((~data >> 5) & 1);
|
||||
|
||||
/* low 5 bits go directly to the Sounds Good board */
|
||||
m_sounds_good->write(space, offset, data);
|
||||
m_sounds_good->write(data);
|
||||
}
|
||||
|
||||
|
||||
@ -344,16 +344,16 @@ WRITE8_MEMBER(mcr3_state::powerdrv_op6_w)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
READ8_MEMBER(mcr3_state::stargrds_ip0_r)
|
||||
uint8_t mcr3_state::stargrds_ip0_r()
|
||||
{
|
||||
uint8_t result = ioport("MONO.IP0")->read();
|
||||
if (m_input_mux)
|
||||
result = (result & ~0x0a) | (ioport("MONO.IP0.ALT")->read() & 0x0a);
|
||||
return (result & ~0x10) | ((m_sounds_good->read(space, 0) << 4) & 0x10);
|
||||
return (result & ~0x10) | ((m_sounds_good->read() << 4) & 0x10);
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(mcr3_state::stargrds_op5_w)
|
||||
void mcr3_state::stargrds_op5_w(uint8_t data)
|
||||
{
|
||||
/* bit 1 controls input muxing on port 0 */
|
||||
m_input_mux = (data >> 1) & 1;
|
||||
@ -366,17 +366,17 @@ WRITE8_MEMBER(mcr3_state::stargrds_op5_w)
|
||||
m_lamps[2] = BIT(data, 4);
|
||||
|
||||
/* remaining bits go to standard connections */
|
||||
mcrmono_control_port_w(space, offset, data);
|
||||
mcrmono_control_port_w(data);
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(mcr3_state::stargrds_op6_w)
|
||||
void mcr3_state::stargrds_op6_w(uint8_t data)
|
||||
{
|
||||
/* bit 6 controls reset of the Sounds Good board */
|
||||
m_sounds_good->reset_write((~data >> 6) & 1);
|
||||
|
||||
/* unline the other games, the STROBE is in the high bit instead of the low bit */
|
||||
m_sounds_good->write(space, offset, (data << 1) | (data >> 7));
|
||||
m_sounds_good->write((data << 1) | (data >> 7));
|
||||
}
|
||||
|
||||
|
||||
@ -387,20 +387,20 @@ WRITE8_MEMBER(mcr3_state::stargrds_op6_w)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
READ8_MEMBER(mcr3_state::spyhunt_ip1_r)
|
||||
uint8_t mcrsc_csd_state::spyhunt_ip1_r()
|
||||
{
|
||||
return ioport("ssio:IP1")->read() | (m_cheap_squeak_deluxe->stat_r() << 5);
|
||||
}
|
||||
|
||||
|
||||
READ8_MEMBER(mcr3_state::spyhunt_ip2_r)
|
||||
uint8_t mcrsc_csd_state::spyhunt_ip2_r()
|
||||
{
|
||||
/* multiplexed steering wheel/gas pedal */
|
||||
return ioport(m_input_mux ? "ssio:IP2.ALT" : "ssio:IP2")->read();
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(mcr3_state::spyhunt_op4_w)
|
||||
void mcrsc_csd_state::spyhunt_op4_w(uint8_t data)
|
||||
{
|
||||
/* Spy Hunter uses port 4 for talking to the Cheap Squeak Deluxe */
|
||||
/* (and for toggling the lamps and muxing the analog inputs) */
|
||||
@ -441,7 +441,7 @@ WRITE8_MEMBER(mcr3_state::spyhunt_op4_w)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
READ8_MEMBER(mcr3_state::turbotag_ip2_r)
|
||||
uint8_t mcrsc_csd_state::turbotag_ip2_r()
|
||||
{
|
||||
/* multiplexed steering wheel/gas pedal */
|
||||
if (m_input_mux)
|
||||
@ -451,7 +451,7 @@ READ8_MEMBER(mcr3_state::turbotag_ip2_r)
|
||||
}
|
||||
|
||||
|
||||
READ8_MEMBER(mcr3_state::turbotag_kludge_r)
|
||||
uint8_t mcrsc_csd_state::turbotag_kludge_r()
|
||||
{
|
||||
/* The checksum on the ttprog1.bin ROM seems to be bad by 1 bit */
|
||||
/* The checksum should come out to $82 but it should be $92 */
|
||||
@ -1128,7 +1128,7 @@ void mcr3_state::mono_tcs(machine_config &config)
|
||||
m_turbo_cheap_squeak->add_route(ALL_OUTPUTS, "rspeaker", 1.0);
|
||||
}
|
||||
|
||||
void mcr3_state::maxrpm(machine_config &config)
|
||||
void maxrpm_state::maxrpm(machine_config &config)
|
||||
{
|
||||
mono_tcs(config);
|
||||
|
||||
@ -1180,7 +1180,7 @@ void mcr3_state::mcrscroll(machine_config &config)
|
||||
|
||||
|
||||
/* Spy Hunter = scrolling system with an SSIO and a cheap squeak deluxe */
|
||||
void mcr3_state::mcrsc_csd(machine_config &config)
|
||||
void mcrsc_csd_state::mcrsc_csd(machine_config &config)
|
||||
{
|
||||
mcrscroll(config);
|
||||
|
||||
@ -1569,26 +1569,26 @@ void mcr3_state::mcr_common_init()
|
||||
void mcr3_state::init_demoderm()
|
||||
{
|
||||
mcr_common_init();
|
||||
m_maincpu->space(AS_IO).install_read_handler(0x01, 0x01, read8_delegate(*this, FUNC(mcr3_state::demoderm_ip1_r)));
|
||||
m_maincpu->space(AS_IO).install_read_handler(0x02, 0x02, read8_delegate(*this, FUNC(mcr3_state::demoderm_ip2_r)));
|
||||
m_maincpu->space(AS_IO).install_write_handler(0x06, 0x06, write8_delegate(*this, FUNC(mcr3_state::demoderm_op6_w)));
|
||||
m_maincpu->space(AS_IO).install_read_handler(0x01, 0x01, read8smo_delegate(*this, FUNC(mcr3_state::demoderm_ip1_r)));
|
||||
m_maincpu->space(AS_IO).install_read_handler(0x02, 0x02, read8smo_delegate(*this, FUNC(mcr3_state::demoderm_ip2_r)));
|
||||
m_maincpu->space(AS_IO).install_write_handler(0x06, 0x06, write8smo_delegate(*this, FUNC(mcr3_state::demoderm_op6_w)));
|
||||
}
|
||||
|
||||
|
||||
void mcr3_state::init_sarge()
|
||||
{
|
||||
mcr_common_init();
|
||||
m_maincpu->space(AS_IO).install_write_handler(0x06, 0x06, write8_delegate(*m_turbo_cheap_squeak, FUNC(midway_turbo_cheap_squeak_device::write)));
|
||||
m_maincpu->space(AS_IO).install_write_handler(0x06, 0x06, write8smo_delegate(*m_turbo_cheap_squeak, FUNC(midway_turbo_cheap_squeak_device::write)));
|
||||
}
|
||||
|
||||
|
||||
void mcr3_state::init_maxrpm()
|
||||
void maxrpm_state::init_maxrpm()
|
||||
{
|
||||
mcr_common_init();
|
||||
m_maincpu->space(AS_IO).install_read_handler(0x01, 0x01, read8_delegate(*this, FUNC(mcr3_state::maxrpm_ip1_r)));
|
||||
m_maincpu->space(AS_IO).install_read_handler(0x02, 0x02, read8_delegate(*this, FUNC(mcr3_state::maxrpm_ip2_r)));
|
||||
m_maincpu->space(AS_IO).install_write_handler(0x05, 0x05, write8_delegate(*this, FUNC(mcr3_state::maxrpm_op5_w)));
|
||||
m_maincpu->space(AS_IO).install_write_handler(0x06, 0x06, write8_delegate(*this, FUNC(mcr3_state::maxrpm_op6_w)));
|
||||
m_maincpu->space(AS_IO).install_read_handler(0x01, 0x01, read8smo_delegate(*this, FUNC(maxrpm_state::maxrpm_ip1_r)));
|
||||
m_maincpu->space(AS_IO).install_read_handler(0x02, 0x02, read8smo_delegate(*this, FUNC(maxrpm_state::maxrpm_ip2_r)));
|
||||
m_maincpu->space(AS_IO).install_write_handler(0x05, 0x05, write8smo_delegate(*this, FUNC(maxrpm_state::maxrpm_op5_w)));
|
||||
m_maincpu->space(AS_IO).install_write_handler(0x06, 0x06, write8smo_delegate(*this, FUNC(maxrpm_state::maxrpm_op6_w)));
|
||||
|
||||
save_item(NAME(m_maxrpm_adc_control));
|
||||
save_item(NAME(m_maxrpm_last_shift));
|
||||
@ -1600,35 +1600,35 @@ void mcr3_state::init_maxrpm()
|
||||
void mcr3_state::init_rampage()
|
||||
{
|
||||
mcr_common_init();
|
||||
m_maincpu->space(AS_IO).install_read_handler(0x04, 0x04, read8_delegate(*this, FUNC(mcr3_state::rampage_ip4_r)));
|
||||
m_maincpu->space(AS_IO).install_write_handler(0x06, 0x06, write8_delegate(*this, FUNC(mcr3_state::rampage_op6_w)));
|
||||
m_maincpu->space(AS_IO).install_read_handler(0x04, 0x04, read8smo_delegate(*this, FUNC(mcr3_state::rampage_ip4_r)));
|
||||
m_maincpu->space(AS_IO).install_write_handler(0x06, 0x06, write8smo_delegate(*this, FUNC(mcr3_state::rampage_op6_w)));
|
||||
}
|
||||
|
||||
|
||||
void mcr3_state::init_powerdrv()
|
||||
{
|
||||
mcr_common_init();
|
||||
m_maincpu->space(AS_IO).install_read_handler(0x02, 0x02, read8_delegate(*this, FUNC(mcr3_state::powerdrv_ip2_r)));
|
||||
m_maincpu->space(AS_IO).install_write_handler(0x05, 0x05, write8_delegate(*this, FUNC(mcr3_state::powerdrv_op5_w)));
|
||||
m_maincpu->space(AS_IO).install_write_handler(0x06, 0x06, write8_delegate(*this, FUNC(mcr3_state::powerdrv_op6_w)));
|
||||
m_maincpu->space(AS_IO).install_read_handler(0x02, 0x02, read8smo_delegate(*this, FUNC(mcr3_state::powerdrv_ip2_r)));
|
||||
m_maincpu->space(AS_IO).install_write_handler(0x05, 0x05, write8smo_delegate(*this, FUNC(mcr3_state::powerdrv_op5_w)));
|
||||
m_maincpu->space(AS_IO).install_write_handler(0x06, 0x06, write8smo_delegate(*this, FUNC(mcr3_state::powerdrv_op6_w)));
|
||||
}
|
||||
|
||||
|
||||
void mcr3_state::init_stargrds()
|
||||
{
|
||||
mcr_common_init();
|
||||
m_maincpu->space(AS_IO).install_read_handler(0x00, 0x00, read8_delegate(*this, FUNC(mcr3_state::stargrds_ip0_r)));
|
||||
m_maincpu->space(AS_IO).install_write_handler(0x05, 0x05, write8_delegate(*this, FUNC(mcr3_state::stargrds_op5_w)));
|
||||
m_maincpu->space(AS_IO).install_write_handler(0x06, 0x06, write8_delegate(*this, FUNC(mcr3_state::stargrds_op6_w)));
|
||||
m_maincpu->space(AS_IO).install_read_handler(0x00, 0x00, read8smo_delegate(*this, FUNC(mcr3_state::stargrds_ip0_r)));
|
||||
m_maincpu->space(AS_IO).install_write_handler(0x05, 0x05, write8smo_delegate(*this, FUNC(mcr3_state::stargrds_op5_w)));
|
||||
m_maincpu->space(AS_IO).install_write_handler(0x06, 0x06, write8smo_delegate(*this, FUNC(mcr3_state::stargrds_op6_w)));
|
||||
}
|
||||
|
||||
|
||||
void mcr3_state::init_spyhunt()
|
||||
void mcrsc_csd_state::init_spyhunt()
|
||||
{
|
||||
mcr_common_init();
|
||||
m_ssio->set_custom_input(1, 0x60, *this, FUNC(mcr3_state::spyhunt_ip1_r));
|
||||
m_ssio->set_custom_input(2, 0xff, *this, FUNC(mcr3_state::spyhunt_ip2_r));
|
||||
m_ssio->set_custom_output(4, 0xff, *this, FUNC(mcr3_state::spyhunt_op4_w));
|
||||
m_ssio->set_custom_input(1, 0x60, *this, FUNC(mcrsc_csd_state::spyhunt_ip1_r));
|
||||
m_ssio->set_custom_input(2, 0xff, *this, FUNC(mcrsc_csd_state::spyhunt_ip2_r));
|
||||
m_ssio->set_custom_output(4, 0xff, *this, FUNC(mcrsc_csd_state::spyhunt_op4_w));
|
||||
|
||||
m_spyhunt_sprite_color_mask = 0x00;
|
||||
m_spyhunt_scroll_offset = 16;
|
||||
@ -1645,12 +1645,12 @@ void mcr3_state::init_crater()
|
||||
}
|
||||
|
||||
|
||||
void mcr3_state::init_turbotag()
|
||||
void mcrsc_csd_state::init_turbotag()
|
||||
{
|
||||
mcr_common_init();
|
||||
m_ssio->set_custom_input(1, 0x60, *this, FUNC(mcr3_state::spyhunt_ip1_r));
|
||||
m_ssio->set_custom_input(2, 0xff, *this, FUNC(mcr3_state::turbotag_ip2_r));
|
||||
m_ssio->set_custom_output(4, 0xff, *this, FUNC(mcr3_state::spyhunt_op4_w));
|
||||
m_ssio->set_custom_input(1, 0x60, *this, FUNC(mcrsc_csd_state::spyhunt_ip1_r));
|
||||
m_ssio->set_custom_input(2, 0xff, *this, FUNC(mcrsc_csd_state::turbotag_ip2_r));
|
||||
m_ssio->set_custom_output(4, 0xff, *this, FUNC(mcrsc_csd_state::spyhunt_op4_w));
|
||||
|
||||
m_spyhunt_sprite_color_mask = 0x00;
|
||||
m_spyhunt_scroll_offset = 88;
|
||||
@ -1659,7 +1659,7 @@ void mcr3_state::init_turbotag()
|
||||
m_cheap_squeak_deluxe->suspend_cpu();
|
||||
|
||||
/* kludge for bad ROM read */
|
||||
m_maincpu->space(AS_PROGRAM).install_read_handler(0x0b53, 0x0b53, read8_delegate(*this, FUNC(mcr3_state::turbotag_kludge_r)));
|
||||
m_maincpu->space(AS_PROGRAM).install_read_handler(0x0b53, 0x0b53, read8smo_delegate(*this, FUNC(mcrsc_csd_state::turbotag_kludge_r)));
|
||||
}
|
||||
|
||||
|
||||
@ -1673,14 +1673,14 @@ void mcr3_state::init_turbotag()
|
||||
/* MCR monoboard games */
|
||||
GAME( 1984, demoderm, demoderb, mono_tcs, demoderm, mcr3_state, init_demoderm, ROT0, "Bally Midway", "Demolition Derby (MCR-3 Mono Board Version)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1985, sarge, 0, mono_tcs, sarge, mcr3_state, init_sarge, ROT0, "Bally Midway", "Sarge", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1986, maxrpm, 0, maxrpm, maxrpm, mcr3_state, init_maxrpm, ROT0, "Bally Midway", "Max RPM (ver 2)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1986, maxrpm, 0, maxrpm, maxrpm, maxrpm_state, init_maxrpm, ROT0, "Bally Midway", "Max RPM (ver 2)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1986, rampage, 0, mono_sg, rampage, mcr3_state, init_rampage, ROT0, "Bally Midway", "Rampage (Rev 3, 8/27/86)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1986, rampage2, rampage, mono_sg, rampage, mcr3_state, init_rampage, ROT0, "Bally Midway", "Rampage (Rev 2, 8/4/86)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1986, powerdrv, 0, mono_sg, powerdrv, mcr3_state, init_powerdrv, ROT0, "Bally Midway", "Power Drive", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1987, stargrds, 0, mono_sg, stargrds, mcr3_state, init_stargrds, ROT0, "Bally Midway", "Star Guards", MACHINE_SUPPORTS_SAVE )
|
||||
|
||||
/* MCR scrolling games */
|
||||
GAMEL( 1983, spyhunt, 0, mcrsc_csd, spyhunt, mcr3_state, init_spyhunt, ROT90, "Bally Midway", "Spy Hunter", MACHINE_SUPPORTS_SAVE, layout_spyhunt )
|
||||
GAMEL( 1983, spyhuntp, spyhunt, mcrsc_csd, spyhunt, mcr3_state, init_spyhunt, ROT90, "Bally Midway (Playtronic license)", "Spy Hunter (Playtronic license)", MACHINE_SUPPORTS_SAVE, layout_spyhunt )
|
||||
GAMEL( 1983, spyhunt, 0, mcrsc_csd, spyhunt, mcrsc_csd_state, init_spyhunt, ROT90, "Bally Midway", "Spy Hunter", MACHINE_SUPPORTS_SAVE, layout_spyhunt )
|
||||
GAMEL( 1983, spyhuntp, spyhunt, mcrsc_csd, spyhunt, mcrsc_csd_state, init_spyhunt, ROT90, "Bally Midway (Playtronic license)", "Spy Hunter (Playtronic license)", MACHINE_SUPPORTS_SAVE, layout_spyhunt )
|
||||
GAME( 1984, crater, 0, mcrscroll, crater, mcr3_state, init_crater, ORIENTATION_FLIP_X, "Bally Midway", "Crater Raider", MACHINE_SUPPORTS_SAVE )
|
||||
GAMEL( 1985, turbotag, 0, mcrsc_csd, turbotag, mcr3_state, init_turbotag, ROT90, "Bally Midway", "Turbo Tag (prototype)", MACHINE_SUPPORTS_SAVE, layout_turbotag )
|
||||
GAMEL( 1985, turbotag, 0, mcrsc_csd, turbotag, mcrsc_csd_state, init_turbotag, ROT90, "Bally Midway", "Turbo Tag (prototype)", MACHINE_SUPPORTS_SAVE, layout_turbotag )
|
||||
|
@ -78,7 +78,7 @@ WRITE16_MEMBER(mcr68_state::xenophobe_control_w)
|
||||
{
|
||||
COMBINE_DATA(&m_control_word);
|
||||
/* 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));
|
||||
m_sounds_good->write(((m_control_word & 0x000f) << 1) | ((m_control_word & 0x0010) >> 4));
|
||||
}
|
||||
|
||||
|
||||
@ -93,7 +93,7 @@ WRITE16_MEMBER(mcr68_state::blasted_control_w)
|
||||
{
|
||||
COMBINE_DATA(&m_control_word);
|
||||
/* m_sounds_good->reset_write(~m_control_word & 0x0020);*/
|
||||
m_sounds_good->write(space, offset, (m_control_word >> 8) & 0x1f);
|
||||
m_sounds_good->write((m_control_word >> 8) & 0x1f);
|
||||
}
|
||||
|
||||
|
||||
@ -109,14 +109,14 @@ READ16_MEMBER(mcr68_state::spyhunt2_port_0_r)
|
||||
int result = ioport("IN0")->read();
|
||||
int analog = m_adc->read();
|
||||
|
||||
return result | ((m_sounds_good->read(space, 0) & 1) << 5) | (analog << 8);
|
||||
return result | ((m_sounds_good->read() & 1) << 5) | (analog << 8);
|
||||
}
|
||||
|
||||
|
||||
READ16_MEMBER(mcr68_state::spyhunt2_port_1_r)
|
||||
{
|
||||
int result = ioport("IN1")->read();
|
||||
return result | ((m_turbo_cheap_squeak->read(space, 0) & 1) << 7);
|
||||
return result | ((m_turbo_cheap_squeak->read() & 1) << 7);
|
||||
}
|
||||
|
||||
|
||||
@ -125,10 +125,10 @@ WRITE16_MEMBER(mcr68_state::spyhunt2_control_w)
|
||||
COMBINE_DATA(&m_control_word);
|
||||
|
||||
/* m_turbo_cheap_squeak->reset_write(~m_control_word & 0x0080);*/
|
||||
m_turbo_cheap_squeak->write(space, offset, (m_control_word >> 8) & 0x001f);
|
||||
m_turbo_cheap_squeak->write((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);
|
||||
m_sounds_good->write((m_control_word >> 8) & 0x001f);
|
||||
|
||||
m_adc->write((m_control_word >> 3) & 0x0f);
|
||||
}
|
||||
|
@ -48,27 +48,27 @@ public:
|
||||
m_palette(*this, "palette")
|
||||
{ }
|
||||
|
||||
DECLARE_WRITE8_MEMBER(mcr_control_port_w);
|
||||
DECLARE_WRITE8_MEMBER(mcr_paletteram9_w);
|
||||
DECLARE_WRITE8_MEMBER(mcr_90009_videoram_w);
|
||||
DECLARE_WRITE8_MEMBER(mcr_90010_videoram_w);
|
||||
DECLARE_READ8_MEMBER(twotiger_videoram_r);
|
||||
DECLARE_WRITE8_MEMBER(twotiger_videoram_w);
|
||||
DECLARE_WRITE8_MEMBER(mcr_91490_videoram_w);
|
||||
DECLARE_READ8_MEMBER(solarfox_ip0_r);
|
||||
DECLARE_READ8_MEMBER(solarfox_ip1_r);
|
||||
DECLARE_READ8_MEMBER(kick_ip1_r);
|
||||
DECLARE_WRITE8_MEMBER(wacko_op4_w);
|
||||
DECLARE_READ8_MEMBER(wacko_ip1_r);
|
||||
DECLARE_READ8_MEMBER(wacko_ip2_r);
|
||||
DECLARE_READ8_MEMBER(kroozr_ip1_r);
|
||||
DECLARE_WRITE8_MEMBER(kroozr_op4_w);
|
||||
DECLARE_WRITE8_MEMBER(journey_op4_w);
|
||||
DECLARE_WRITE8_MEMBER(twotiger_op4_w);
|
||||
DECLARE_WRITE8_MEMBER(dotron_op4_w);
|
||||
DECLARE_READ8_MEMBER(demoderb_ip1_r);
|
||||
DECLARE_READ8_MEMBER(demoderb_ip2_r);
|
||||
DECLARE_WRITE8_MEMBER(demoderb_op4_w);
|
||||
void mcr_control_port_w(uint8_t data);
|
||||
void mcr_paletteram9_w(offs_t offset, uint8_t data);
|
||||
void mcr_90009_videoram_w(offs_t offset, uint8_t data);
|
||||
void mcr_90010_videoram_w(offs_t offset, uint8_t data);
|
||||
uint8_t twotiger_videoram_r(offs_t offset);
|
||||
void twotiger_videoram_w(offs_t offset, uint8_t data);
|
||||
void mcr_91490_videoram_w(offs_t offset, uint8_t data);
|
||||
uint8_t solarfox_ip0_r();
|
||||
uint8_t solarfox_ip1_r();
|
||||
uint8_t kick_ip1_r();
|
||||
void wacko_op4_w(uint8_t data);
|
||||
uint8_t wacko_ip1_r();
|
||||
uint8_t wacko_ip2_r();
|
||||
uint8_t kroozr_ip1_r();
|
||||
void kroozr_op4_w(uint8_t data);
|
||||
void journey_op4_w(uint8_t data);
|
||||
void twotiger_op4_w(uint8_t data);
|
||||
void dotron_op4_w(uint8_t data);
|
||||
uint8_t demoderb_ip1_r();
|
||||
uint8_t demoderb_ip2_r();
|
||||
void demoderb_op4_w(uint8_t data);
|
||||
|
||||
void init_mcr_91490();
|
||||
void init_kroozr();
|
||||
@ -150,11 +150,11 @@ public:
|
||||
m_lamps(*this, "lamp%u", 0U)
|
||||
{ }
|
||||
|
||||
DECLARE_READ8_MEMBER(ip0_r);
|
||||
DECLARE_WRITE8_MEMBER(lamps1_w);
|
||||
DECLARE_WRITE8_MEMBER(lamps2_w);
|
||||
DECLARE_WRITE8_MEMBER(output_w);
|
||||
DECLARE_WRITE8_MEMBER(meters_w);
|
||||
uint8_t ip0_r();
|
||||
void lamps1_w(uint8_t data);
|
||||
void lamps2_w(uint8_t data);
|
||||
void output_w(uint8_t data);
|
||||
void meters_w(uint8_t data);
|
||||
|
||||
DECLARE_INPUT_CHANGED_MEMBER(coin_in_hit);
|
||||
|
||||
@ -191,11 +191,11 @@ public:
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(sio_txda_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(sio_txdb_w);
|
||||
DECLARE_WRITE8_MEMBER(ipu_laserdisk_w);
|
||||
DECLARE_READ8_MEMBER(ipu_watchdog_r);
|
||||
DECLARE_WRITE8_MEMBER(ipu_watchdog_w);
|
||||
DECLARE_READ8_MEMBER(ip2_r);
|
||||
DECLARE_WRITE8_MEMBER(op4_w);
|
||||
void ipu_laserdisk_w(offs_t offset, uint8_t data);
|
||||
uint8_t ipu_watchdog_r();
|
||||
void ipu_watchdog_w(uint8_t data);
|
||||
uint8_t ip2_r();
|
||||
void op4_w(uint8_t data);
|
||||
|
||||
TIMER_CALLBACK_MEMBER(ipu_watchdog_reset);
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(ipu_interrupt);
|
||||
|
@ -23,78 +23,59 @@ public:
|
||||
mcr3_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: mcr_state(mconfig, type, tag)
|
||||
, m_spyhunt_alpharam(*this, "spyhunt_alpha")
|
||||
, m_maxrpm_adc(*this, "adc")
|
||||
, m_lamplatch(*this, "lamplatch")
|
||||
, m_screen(*this, "screen")
|
||||
, m_lamps(*this, "lamp%u", 0U)
|
||||
{ }
|
||||
|
||||
DECLARE_WRITE8_MEMBER(mcr3_videoram_w);
|
||||
DECLARE_WRITE8_MEMBER(spyhunt_videoram_w);
|
||||
DECLARE_WRITE8_MEMBER(spyhunt_alpharam_w);
|
||||
DECLARE_WRITE8_MEMBER(spyhunt_scroll_value_w);
|
||||
DECLARE_WRITE8_MEMBER(mcrmono_control_port_w);
|
||||
DECLARE_READ8_MEMBER(demoderm_ip1_r);
|
||||
DECLARE_READ8_MEMBER(demoderm_ip2_r);
|
||||
DECLARE_WRITE8_MEMBER(demoderm_op6_w);
|
||||
DECLARE_READ8_MEMBER(maxrpm_ip1_r);
|
||||
DECLARE_READ8_MEMBER(maxrpm_ip2_r);
|
||||
DECLARE_WRITE8_MEMBER(maxrpm_op5_w);
|
||||
DECLARE_WRITE8_MEMBER(maxrpm_op6_w);
|
||||
DECLARE_READ8_MEMBER(rampage_ip4_r);
|
||||
DECLARE_WRITE8_MEMBER(rampage_op6_w);
|
||||
DECLARE_READ8_MEMBER(powerdrv_ip2_r);
|
||||
DECLARE_WRITE8_MEMBER(powerdrv_op5_w);
|
||||
DECLARE_WRITE8_MEMBER(powerdrv_op6_w);
|
||||
DECLARE_READ8_MEMBER(stargrds_ip0_r);
|
||||
DECLARE_WRITE8_MEMBER(stargrds_op5_w);
|
||||
DECLARE_WRITE8_MEMBER(stargrds_op6_w);
|
||||
DECLARE_READ8_MEMBER(spyhunt_ip1_r);
|
||||
DECLARE_READ8_MEMBER(spyhunt_ip2_r);
|
||||
DECLARE_WRITE8_MEMBER(spyhunt_op4_w);
|
||||
DECLARE_READ8_MEMBER(turbotag_ip2_r);
|
||||
DECLARE_READ8_MEMBER(turbotag_kludge_r);
|
||||
void mcrmono(machine_config &config);
|
||||
void mono_tcs(machine_config &config);
|
||||
void mcrscroll(machine_config &config);
|
||||
void mono_sg(machine_config &config);
|
||||
|
||||
void init_crater();
|
||||
void init_demoderm();
|
||||
void init_turbotag();
|
||||
void init_powerdrv();
|
||||
void init_stargrds();
|
||||
void init_maxrpm();
|
||||
void init_rampage();
|
||||
void init_spyhunt();
|
||||
void init_sarge();
|
||||
|
||||
protected:
|
||||
void mcr3_videoram_w(offs_t offset, uint8_t data);
|
||||
void spyhunt_videoram_w(offs_t offset, uint8_t data);
|
||||
void spyhunt_alpharam_w(offs_t offset, uint8_t data);
|
||||
void spyhunt_scroll_value_w(offs_t offset, uint8_t data);
|
||||
void mcrmono_control_port_w(uint8_t data);
|
||||
uint8_t demoderm_ip1_r();
|
||||
uint8_t demoderm_ip2_r();
|
||||
void demoderm_op6_w(uint8_t data);
|
||||
uint8_t rampage_ip4_r();
|
||||
void rampage_op6_w(uint8_t data);
|
||||
uint8_t powerdrv_ip2_r();
|
||||
void powerdrv_op5_w(uint8_t data);
|
||||
void powerdrv_op6_w(uint8_t data);
|
||||
uint8_t stargrds_ip0_r();
|
||||
void stargrds_op5_w(uint8_t data);
|
||||
void stargrds_op6_w(uint8_t data);
|
||||
|
||||
DECLARE_VIDEO_START(spyhunt);
|
||||
void spyhunt_palette(palette_device &palette) const;
|
||||
|
||||
uint32_t screen_update_mcr3(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
uint32_t screen_update_spyhunt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
void mcrmono(machine_config &config);
|
||||
void maxrpm(machine_config &config);
|
||||
void mcrsc_csd(machine_config &config);
|
||||
void mono_tcs(machine_config &config);
|
||||
void mcrscroll(machine_config &config);
|
||||
void mono_sg(machine_config &config);
|
||||
void mcrmono_map(address_map &map);
|
||||
void mcrmono_portmap(address_map &map);
|
||||
void spyhunt_map(address_map &map);
|
||||
void spyhunt_portmap(address_map &map);
|
||||
protected:
|
||||
|
||||
virtual void machine_start() override { m_lamps.resolve(); }
|
||||
virtual void video_start() override;
|
||||
|
||||
private:
|
||||
optional_shared_ptr<uint8_t> m_spyhunt_alpharam;
|
||||
optional_device<adc0844_device> m_maxrpm_adc;
|
||||
optional_device<cd4099_device> m_lamplatch;
|
||||
required_device<screen_device> m_screen;
|
||||
output_finder<3> m_lamps;
|
||||
|
||||
uint8_t m_latched_input;
|
||||
uint8_t m_maxrpm_adc_control;
|
||||
uint8_t m_maxrpm_last_shift;
|
||||
int8_t m_maxrpm_p1_shift;
|
||||
int8_t m_maxrpm_p2_shift;
|
||||
uint8_t m_spyhunt_sprite_color_mask;
|
||||
int16_t m_spyhunt_scroll_offset;
|
||||
int16_t m_spyhunt_scrollx;
|
||||
@ -109,4 +90,53 @@ private:
|
||||
void mcr_common_init();
|
||||
};
|
||||
|
||||
class maxrpm_state : public mcr3_state
|
||||
{
|
||||
public:
|
||||
maxrpm_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: mcr3_state(mconfig, type, tag)
|
||||
, m_maxrpm_adc(*this, "adc")
|
||||
{ }
|
||||
|
||||
void maxrpm(machine_config &config);
|
||||
|
||||
void init_maxrpm();
|
||||
|
||||
private:
|
||||
uint8_t maxrpm_ip1_r();
|
||||
uint8_t maxrpm_ip2_r();
|
||||
void maxrpm_op5_w(uint8_t data);
|
||||
void maxrpm_op6_w(uint8_t data);
|
||||
|
||||
required_device<adc0844_device> m_maxrpm_adc;
|
||||
|
||||
uint8_t m_maxrpm_adc_control;
|
||||
uint8_t m_maxrpm_last_shift;
|
||||
int8_t m_maxrpm_p1_shift;
|
||||
int8_t m_maxrpm_p2_shift;
|
||||
};
|
||||
|
||||
class mcrsc_csd_state : public mcr3_state
|
||||
{
|
||||
public:
|
||||
mcrsc_csd_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: mcr3_state(mconfig, type, tag)
|
||||
, m_lamplatch(*this, "lamplatch")
|
||||
{ }
|
||||
|
||||
void mcrsc_csd(machine_config &config);
|
||||
|
||||
void init_spyhunt();
|
||||
void init_turbotag();
|
||||
|
||||
private:
|
||||
uint8_t spyhunt_ip1_r();
|
||||
uint8_t spyhunt_ip2_r();
|
||||
void spyhunt_op4_w(uint8_t data);
|
||||
uint8_t turbotag_ip2_r();
|
||||
uint8_t turbotag_kludge_r();
|
||||
|
||||
optional_device<cd4099_device> m_lamplatch;
|
||||
};
|
||||
|
||||
#endif // MAME_INCLUDES_MCR3_H
|
||||
|
@ -158,7 +158,7 @@ WRITE_LINE_MEMBER(mcr_nflfoot_state::sio_txdb_w)
|
||||
m_ipu_sio->rxb_w(state);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(mcr_nflfoot_state::ipu_laserdisk_w)
|
||||
void mcr_nflfoot_state::ipu_laserdisk_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
/* bit 3 enables (1) LD video regardless of PIX SW */
|
||||
/* bit 2 enables (1) LD right channel audio */
|
||||
@ -179,16 +179,17 @@ TIMER_CALLBACK_MEMBER(mcr_nflfoot_state::ipu_watchdog_reset)
|
||||
m_ipu_sio->reset();
|
||||
}
|
||||
|
||||
READ8_MEMBER(mcr_nflfoot_state::ipu_watchdog_r)
|
||||
uint8_t mcr_nflfoot_state::ipu_watchdog_r()
|
||||
{
|
||||
/* watchdog counter is clocked by 7.3728MHz crystal / 16 */
|
||||
/* watchdog is tripped when 14-bit counter overflows => / 32768 = 14.0625Hz*/
|
||||
if (!machine().side_effects_disabled())
|
||||
m_ipu_watchdog_timer->adjust(attotime::from_hz(7372800 / 16 / 32768));
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(mcr_nflfoot_state::ipu_watchdog_w)
|
||||
void mcr_nflfoot_state::ipu_watchdog_w(uint8_t data)
|
||||
{
|
||||
ipu_watchdog_r(space,0);
|
||||
(void)ipu_watchdog_r();
|
||||
}
|
||||
|
@ -159,7 +159,7 @@ void mcr_state::journey_set_color(int index, int data)
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(mcr_state::mcr_paletteram9_w)
|
||||
void mcr_state::mcr_paletteram9_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
// palette RAM is actually 9 bit (a 93419 SRAM)
|
||||
// however, there is no way for the CPU to read back
|
||||
@ -177,14 +177,14 @@ WRITE8_MEMBER(mcr_state::mcr_paletteram9_w)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
WRITE8_MEMBER(mcr_state::mcr_90009_videoram_w)
|
||||
void mcr_state::mcr_90009_videoram_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
m_videoram[offset] = data;
|
||||
m_bg_tilemap->mark_tile_dirty(offset);
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(mcr_state::mcr_90010_videoram_w)
|
||||
void mcr_state::mcr_90010_videoram_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
m_videoram[offset] = data;
|
||||
m_bg_tilemap->mark_tile_dirty(offset / 2);
|
||||
@ -200,14 +200,14 @@ WRITE8_MEMBER(mcr_state::mcr_90010_videoram_w)
|
||||
}
|
||||
|
||||
|
||||
READ8_MEMBER(mcr_state::twotiger_videoram_r)
|
||||
uint8_t mcr_state::twotiger_videoram_r(offs_t offset)
|
||||
{
|
||||
/* Two Tigers swizzles the address bits on videoram */
|
||||
int effoffs = ((offset << 1) & 0x7fe) | ((offset >> 10) & 1);
|
||||
return m_videoram[effoffs];
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(mcr_state::twotiger_videoram_w)
|
||||
void mcr_state::twotiger_videoram_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
/* Two Tigers swizzles the address bits on videoram */
|
||||
int effoffs = ((offset << 1) & 0x7fe) | ((offset >> 10) & 1);
|
||||
@ -221,7 +221,7 @@ WRITE8_MEMBER(mcr_state::twotiger_videoram_w)
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(mcr_state::mcr_91490_videoram_w)
|
||||
void mcr_state::mcr_91490_videoram_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
m_videoram[offset] = data;
|
||||
m_bg_tilemap->mark_tile_dirty(offset / 2);
|
||||
|
@ -119,28 +119,28 @@ VIDEO_START_MEMBER(mcr3_state,spyhunt)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
WRITE8_MEMBER(mcr3_state::mcr3_videoram_w)
|
||||
void mcr3_state::mcr3_videoram_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
m_videoram[offset] = data;
|
||||
m_bg_tilemap->mark_tile_dirty(offset / 2);
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(mcr3_state::spyhunt_videoram_w)
|
||||
void mcr3_state::spyhunt_videoram_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
m_videoram[offset] = data;
|
||||
m_bg_tilemap->mark_tile_dirty(offset);
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(mcr3_state::spyhunt_alpharam_w)
|
||||
void mcr3_state::spyhunt_alpharam_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
m_spyhunt_alpharam[offset] = data;
|
||||
m_alpha_tilemap->mark_tile_dirty(offset);
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(mcr3_state::spyhunt_scroll_value_w)
|
||||
void mcr3_state::spyhunt_scroll_value_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
switch (offset)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user