diff options
Diffstat (limited to 'src/mame/drivers/mcr3.cpp')
-rw-r--r-- | src/mame/drivers/mcr3.cpp | 132 |
1 files changed, 66 insertions, 66 deletions
diff --git a/src/mame/drivers/mcr3.cpp b/src/mame/drivers/mcr3.cpp index b0602f799db..ab2f9eb7407 100644 --- a/src/mame/drivers/mcr3.cpp +++ b/src/mame/drivers/mcr3.cpp @@ -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,24 +226,24 @@ 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: 4 bits of input from OP5 are routed to a transceiver at U2, and ultimately on to the low 4 I/O pins of the ADC0844. The /EN on the transceiver is directly connected to J2-2. Note that two bits - get swapped in the process: OP53 = MA3 and OP54 = MA2. + get swapped in the process: OP53 = MA3 and OP54 = MA2. In order to perform a read or a write to the ADC0844, the /RD and /WR signals are directly controlled via J2-8 and J2-7 respectively. @@ -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 ) -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( 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, mcrsc_csd_state, init_turbotag, ROT90, "Bally Midway", "Turbo Tag (prototype)", MACHINE_SUPPORTS_SAVE, layout_turbotag ) |