From 4d197539132ad537885d9f7b1ff771a7c1596492 Mon Sep 17 00:00:00 2001 From: Robbbert Date: Thu, 4 Nov 2021 04:36:02 +1100 Subject: gp_1, gp_2 : WIP. Added some of the missing roms to mbossy. --- src/mame/drivers/allied.cpp | 97 +++++------ src/mame/drivers/g627.cpp | 3 + src/mame/drivers/gp_1.cpp | 208 +++++++++++++---------- src/mame/drivers/gp_2.cpp | 400 ++++++++++++++++++++++---------------------- src/mame/drivers/gts3.cpp | 4 + src/mame/drivers/gts3a.cpp | 3 + 6 files changed, 381 insertions(+), 334 deletions(-) diff --git a/src/mame/drivers/allied.cpp b/src/mame/drivers/allied.cpp index b2289896731..bf41203f4c4 100644 --- a/src/mame/drivers/allied.cpp +++ b/src/mame/drivers/allied.cpp @@ -51,6 +51,8 @@ ToDo: #include "machine/timer.h" #include "allied.lh" +namespace { + class allied_state : public genpin_class { public: @@ -72,38 +74,38 @@ public: void allied(machine_config &config); private: - void ic1_b_w(uint8_t data); - void ic2_b_w(uint8_t data); + void ic1_b_w(u8 data); + void ic2_b_w(u8 data); void ic2_cb2_w(int state); - void ic3_b_w(uint8_t data); - void ic4_b_w(uint8_t data); + void ic3_b_w(u8 data); + void ic4_b_w(u8 data); void ic4_cb2_w(int state); - void ic5_b_w(uint8_t data); - void ic6_b_w(uint8_t data); - void ic7_b_w(uint8_t data); - void ic8_a_w(uint8_t data); - void ic8_b_w(uint8_t data); - uint8_t ic1_a_r(); - uint8_t ic2_a_r(); - uint8_t ic4_a_r(); - uint8_t ic5_a_r(); - uint8_t ic6_a_r(); - uint8_t ic6_b_r(); - uint8_t ic7_a_r(); + void ic5_b_w(u8 data); + void ic6_b_w(u8 data); + void ic7_b_w(u8 data); + void ic8_a_w(u8 data); + void ic8_b_w(u8 data); + u8 ic1_a_r(); + u8 ic2_a_r(); + u8 ic4_a_r(); + u8 ic5_a_r(); + u8 ic6_a_r(); + u8 ic6_b_r(); + u8 ic7_a_r(); void ic8_cb2_w(int state); TIMER_DEVICE_CALLBACK_MEMBER(timer_a); - void allied_map(address_map &map); + void mem_map(address_map &map); - uint32_t m_player_score[6]; - uint8_t m_display; - uint8_t m_bit_counter; + u32 m_player_score[6]; + u8 m_display; + u8 m_bit_counter; bool m_disp_data; - uint8_t m_ic5a; - uint8_t m_ic6a0; - uint8_t m_ic6a1; - uint8_t m_ic6a2; - uint8_t m_ic6b4; - uint8_t m_ic6b7; + u8 m_ic5a; + u8 m_ic6a0; + u8 m_ic6a1; + u8 m_ic6a2; + u8 m_ic6b4; + u8 m_ic6b7; virtual void machine_reset() override; virtual void machine_start() override; required_device m_maincpu; @@ -120,7 +122,7 @@ private: }; -void allied_state::allied_map(address_map &map) +void allied_state::mem_map(address_map &map) { map(0x0000, 0x003f).ram(); // ic6 map(0x0044, 0x0047).rw(m_ic2, FUNC(pia6821_device::read), FUNC(pia6821_device::write)); @@ -369,25 +371,25 @@ static INPUT_PORTS_START( allied ) INPUT_PORTS_END // 1 target, 1 rollover -uint8_t allied_state::ic1_a_r() +u8 allied_state::ic1_a_r() { return ioport("X1A")->read(); } // 6 lamps -void allied_state::ic1_b_w(uint8_t data) +void allied_state::ic1_b_w(u8 data) { for (u8 i = 0; i < 8; i++) m_io_outputs[i+32] = !BIT(data, i); } // 8 switches -uint8_t allied_state::ic2_a_r() +u8 allied_state::ic2_a_r() { return ioport("X2A")->read(); } -void allied_state::ic2_b_w(uint8_t data) +void allied_state::ic2_b_w(u8 data) { // PB0-4,6 - lamps @@ -408,21 +410,21 @@ void allied_state::ic2_cb2_w(int state) } } -void allied_state::ic3_b_w(uint8_t data) +void allied_state::ic3_b_w(u8 data) { m_maincpu->set_input_line(M6504_IRQ_LINE, BIT(data, 7) ? CLEAR_LINE : ASSERT_LINE ); } // 6 switches -uint8_t allied_state::ic4_a_r() +u8 allied_state::ic4_a_r() { return ioport("X4A")->read(); } -void allied_state::ic4_b_w(uint8_t data) +void allied_state::ic4_b_w(u8 data) { - static const uint8_t patterns[16] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7c, 0x07, 0x7f, 0x67, 0x58, 0x4c, 0x62, 0x69, 0x78, 0 }; // 7446A - uint8_t segment, i; + static const u8 patterns[16] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7c, 0x07, 0x7f, 0x67, 0x58, 0x4c, 0x62, 0x69, 0x78, 0 }; // 7446A + u8 segment, i; for (i = 0; i < 4; i++) { if (!BIT(data, i+4)) @@ -466,13 +468,13 @@ void allied_state::ic4_cb2_w(int state) } // 8 of the adjustment connectors -uint8_t allied_state::ic5_a_r() +u8 allied_state::ic5_a_r() { return m_ic5a; } // cabinet solenoids -void allied_state::ic5_b_w(uint8_t data) +void allied_state::ic5_b_w(u8 data) { // PB0 - play meter // PB1 - replay meter @@ -496,18 +498,18 @@ void allied_state::ic5_b_w(uint8_t data) } // 4 adjustments, 3 coin slots, slam tilt -uint8_t allied_state::ic6_a_r() +u8 allied_state::ic6_a_r() { return m_ic6a0 | m_ic6a1 | m_ic6a2 | ioport("X6A")->read(); } // 1 adjustment, test switch -uint8_t allied_state::ic6_b_r() +u8 allied_state::ic6_b_r() { return m_ic6b4 | ioport("TEST")->read() | m_ic6b7 | 0x4f; } -void allied_state::ic6_b_w(uint8_t data) +void allied_state::ic6_b_w(u8 data) { // PB0-3 to drop targets for (u8 i = 0; i < 4; i++) @@ -517,12 +519,12 @@ void allied_state::ic6_b_w(uint8_t data) } // 6 inputs -uint8_t allied_state::ic7_a_r() +u8 allied_state::ic7_a_r() { return ioport("X7A")->read(); } -void allied_state::ic7_b_w(uint8_t data) +void allied_state::ic7_b_w(u8 data) { // PB7 - tilt lamp @@ -580,7 +582,7 @@ void allied_state::ic7_b_w(uint8_t data) } // playfield solenoids -void allied_state::ic8_a_w(uint8_t data) +void allied_state::ic8_a_w(u8 data) { if ((data & 0x07) < 0x07) // 3 bumpers m_samples->start(0, 0); @@ -598,7 +600,7 @@ void allied_state::ic8_a_w(uint8_t data) } // PB0-4 = ball 1-5 LED; PB5 = shoot again lamp -void allied_state::ic8_b_w(uint8_t data) +void allied_state::ic8_b_w(u8 data) { for (u8 i = 0; i < 6; i++) m_leds[i+1] = !BIT(data, i); @@ -615,7 +617,7 @@ void allied_state::ic8_cb2_w(int state) TIMER_DEVICE_CALLBACK_MEMBER( allied_state::timer_a ) { - uint8_t data = ioport("X6A")->read(); + u8 data = ioport("X6A")->read(); m_ic8->ca1_w(BIT(data, 4)); m_ic8->cb1_w(BIT(data, 5)); @@ -658,7 +660,7 @@ void allied_state::allied(machine_config &config) { /* basic machine hardware */ M6504(config, m_maincpu, 3572549/4); - m_maincpu->set_addrmap(AS_PROGRAM, &allied_state::allied_map); + m_maincpu->set_addrmap(AS_PROGRAM, &allied_state::mem_map); /* Video */ config.set_default_layout(layout_allied); @@ -755,6 +757,7 @@ ROM_END #define rom_circa33 rom_allied #define rom_starshot rom_allied +} // anonymous namespace GAME(1977, allied, 0, allied, allied, allied_state, empty_init, ROT0, "Allied Leisure", "Allied System", MACHINE_IS_BIOS_ROOT | MACHINE_NOT_WORKING ) GAME(1977, suprpick, allied, allied, allied, allied_state, empty_init, ROT0, "Allied Leisure", "Super Picker", MACHINE_IS_SKELETON_MECHANICAL | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/g627.cpp b/src/mame/drivers/g627.cpp index 7023a10e43c..3a2a2e9a841 100644 --- a/src/mame/drivers/g627.cpp +++ b/src/mame/drivers/g627.cpp @@ -49,6 +49,7 @@ ToDo: #include "g627.lh" +namespace { class g627_state : public genpin_class { @@ -390,6 +391,8 @@ ROM_START(rota_101) ROM_LOAD("v101-c.bin", 0x1000, 0x0800, CRC(c7e85638) SHA1(b59805d8b558ab8f5ea5b4b9261e862afca4b9d3)) ROM_END +} // anonymous namespace + GAME( 1978, rotation, 0, g627, g627, g627_state, init_v117, ROT0, "Midway", "Rotation VIII (v. 1.17)", MACHINE_IS_SKELETON_MECHANICAL | MACHINE_SUPPORTS_SAVE ) GAME( 1978, rota_115, rotation, g627, g627, g627_state, empty_init, ROT0, "Midway", "Rotation VIII (v. 1.15)", MACHINE_IS_SKELETON_MECHANICAL | MACHINE_SUPPORTS_SAVE ) GAME( 1978, rota_101, rotation, g627, g627, g627_state, empty_init, ROT0, "Midway", "Rotation VIII (v. 1.01)", MACHINE_IS_SKELETON_MECHANICAL | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/gp_1.cpp b/src/mame/drivers/gp_1.cpp index 8ee75b838a3..82a698118d9 100644 --- a/src/mame/drivers/gp_1.cpp +++ b/src/mame/drivers/gp_1.cpp @@ -2,36 +2,38 @@ // copyright-holders:Robbbert /******************************************************************************* - PINBALL - Game Plan MPU-1 - These are "cocktail" cabinets, although there is only one seating position. - -When first turned on, you need to press 9 to enter the setup program, then keep -pressing 9 until 05 shows in the balls display. Press the credit button to set -the first high score at which a free credit is awarded. Then press 9 to set the -2nd high score, then 9 to set the 3rd high score. Keep pressing 9 until you exit +PINBALL +Game Plan MPU-1 +These are "cocktail" cabinets, although there is only one seating position. + +When first turned on, you need to press num-0 to enter the setup program, then keep +pressing num-0 until 05 shows in the balls display. Press the credit button to set +the first high score at which a free credit is awarded. Then press num-0 to set the +2nd high score, then num-0 to set the 3rd high score. Keep pressing num-0 until you exit back to normal operation. If this setup is not done, each player will get 3 free games at the start of ball 1. +Status +- Working ToDo: -- Mechanical +- Nothing ********************************************************************************/ #include "emu.h" #include "machine/genpin.h" - #include "cpu/z80/z80.h" #include "machine/z80daisy.h" #include "machine/i8255.h" -#include "machine/timer.h" +#include "machine/clock.h" #include "machine/z80ctc.h" #include "sound/sn76477.h" #include "speaker.h" - #include "gp_1.lh" +namespace { + class gp_1_state : public genpin_class { public: @@ -51,27 +53,25 @@ public: , m_io_xa(*this, "XA") , m_io_xb(*this, "XB") , m_digits(*this, "digit%u", 0U) + , m_io_outputs(*this, "out%u", 0U) { } void gp_1(machine_config &config); void gp_1s(machine_config &config); - void init_gp_1(); - private: - void porta_w(uint8_t data); - void portas_w(uint8_t data); - void portc_w(uint8_t data); - uint8_t portb_r(); - TIMER_DEVICE_CALLBACK_MEMBER(zero_timer); - void gp_1_io(address_map &map); - void gp_1_map(address_map &map); - - uint8_t m_u14; - uint8_t m_digit; - uint8_t m_segment[16]; + void porta_w(u8 data); + void portas_w(u8 data); + void portc_w(u8 data); + u8 portb_r(); + void io_map(address_map &map); + void mem_map(address_map &map); + u8 m_u14 = 0; + u8 m_digit = 0; + u8 m_segment[16]; + u8 m_last_solenoid = 15; virtual void machine_reset() override; - virtual void machine_start() override { m_digits.resolve(); } + virtual void machine_start() override; required_device m_maincpu; required_device m_ppi; required_device m_ctc; @@ -86,16 +86,17 @@ private: required_ioport m_io_xa; required_ioport m_io_xb; output_finder<40> m_digits; + output_finder<64> m_io_outputs; // 16 solenoids + 48 lamps }; -void gp_1_state::gp_1_map(address_map &map) +void gp_1_state::mem_map(address_map &map) { - map(0x0000, 0x0fff).rom().region("roms", 0); + map(0x0000, 0x0fff).rom(); map(0x8c00, 0x8cff).ram().share("nvram"); } -void gp_1_state::gp_1_io(address_map &map) +void gp_1_state::io_map(address_map &map) { map.global_mask(0x0f); map(0x04, 0x07).rw(m_ppi, FUNC(i8255_device::read), FUNC(i8255_device::write)); @@ -246,45 +247,45 @@ static INPUT_PORTS_START( gp_1 ) PORT_DIPSETTING( 0xC0, "3") PORT_START("X7") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE2 ) PORT_NAME("Accounting Reset") // This pushbutton on the MPU board is called "S33" + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Accounting Reset") // This pushbutton on the MPU board is called "S33" PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START1 ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_TILT1 ) PORT_NAME("Slam Tilt") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_0) PORT_NAME("Slam Tilt") PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN3 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN1 ) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_TILT ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_9) PORT_NAME("Tilt") PORT_START("X8") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("L and R Target") PORT_CODE(KEYCODE_A) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Spinner C") PORT_CODE(KEYCODE_S) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Outhole") PORT_CODE(KEYCODE_X) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Spinner B") PORT_CODE(KEYCODE_D) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("R. Slingshot") PORT_CODE(KEYCODE_F) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Special when lit") PORT_CODE(KEYCODE_G) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("L. Slingshot") PORT_CODE(KEYCODE_H) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Extra when lit") PORT_CODE(KEYCODE_J) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("L and R Target") PORT_CODE(KEYCODE_A) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Spinner C") PORT_CODE(KEYCODE_B) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Outhole") PORT_CODE(KEYCODE_X) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Spinner B") PORT_CODE(KEYCODE_C) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("R. Slingshot") PORT_CODE(KEYCODE_D) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Special when lit") PORT_CODE(KEYCODE_E) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("L. Slingshot") PORT_CODE(KEYCODE_F) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Extra when lit") PORT_CODE(KEYCODE_G) PORT_START("X9") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("R. Spinner") PORT_CODE(KEYCODE_K) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("1000 and advance") PORT_CODE(KEYCODE_L) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("R. Spinner") PORT_CODE(KEYCODE_H) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("1000 and advance") PORT_CODE(KEYCODE_I) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Advance and Change") PORT_CODE(KEYCODE_Z) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("L. Bumper") PORT_CODE(KEYCODE_C) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("R. Bumper") PORT_CODE(KEYCODE_V) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("L. Spinner") PORT_CODE(KEYCODE_B) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Spinner A") PORT_CODE(KEYCODE_N) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Advance and Change") PORT_CODE(KEYCODE_J) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("L. Bumper") PORT_CODE(KEYCODE_K) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("R. Bumper") PORT_CODE(KEYCODE_L) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("L. Spinner") PORT_CODE(KEYCODE_M) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Spinner A") PORT_CODE(KEYCODE_N) PORT_START("XA") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("1000 Rollover") PORT_CODE(KEYCODE_M) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE1 ) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("1000 Rollover") PORT_CODE(KEYCODE_O) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("Setup") PORT_BIT( 0xfc, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_START("XB") PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) INPUT_PORTS_END -uint8_t gp_1_state::portb_r() +u8 gp_1_state::portb_r() { switch (m_u14) { @@ -310,15 +311,18 @@ uint8_t gp_1_state::portb_r() return 0; } -void gp_1_state::porta_w(uint8_t data) +void gp_1_state::porta_w(u8 data) { + if (m_last_solenoid < 15) + m_io_outputs[m_last_solenoid] = 0; + m_u14 = data >> 4; - if ((data > 0x0f) && (data < 0x30)) + if ((m_u14 >= 1) && (m_u14 <= 2)) { switch (data) { case 0x10: // chime c - m_samples->start(3, 3); + m_samples->start(1, 1); break; case 0x11: // chime b m_samples->start(2, 2); @@ -326,43 +330,46 @@ void gp_1_state::porta_w(uint8_t data) case 0x12: // knocker m_samples->start(0, 6); break; - case 0x13: // not used - case 0x14: // not used - break; case 0x15: // chime a - m_samples->start(1, 1); + m_samples->start(3, 3); break; case 0x16: // chime d m_samples->start(4, 4); break; case 0x17: // outhole - m_samples->start(5, 5); + m_samples->start(0, 5); break; case 0x18: // r sling case 0x19: // l sling - m_samples->start(0, 7); + m_samples->start(5, 7); break; case 0x1a: // C kickout m_samples->start(5, 5); break; case 0x1b: // r bumper - m_samples->start(0, 0); + m_samples->start(5, 0); break; case 0x1c: // B kickout m_samples->start(5, 5); break; case 0x1d: // l bumper - m_samples->start(0, 0); + m_samples->start(5, 0); break; case 0x1e: // A kickout m_samples->start(5, 5); break; - case 0x1f: // not used + default: + data = 15; break; } + if ((data & 15) < 15) + m_io_outputs[data & 15] = 1; + m_last_solenoid = data & 15; } + else + m_last_solenoid = 15; - static const uint8_t patterns[16] = { 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7c,0x07,0x7f,0x67,0x58,0x4c,0x62,0x69,0x78,0 }; // 7448 + static const u8 patterns[16] = { 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7c,0x07,0x7f,0x67,0x58,0x4c,0x62,0x69,0x78,0 }; // 7448 if (m_digit == 7) m_segment[m_u14] = data & 15; // only 8,9,10,11 are needed else @@ -373,9 +380,14 @@ void gp_1_state::porta_w(uint8_t data) m_digits[m_digit+16] = patterns[m_segment[10]]; m_digits[m_digit+24] = patterns[m_segment[11]]; } + + // Lamps + if ((m_u14 >= 3) && (m_u14 <= 5)) + for (u8 i = 0; i < 16; i++) + m_io_outputs[(m_u14 - 3) * 16 + 16 + i] = ((data & 15) == i); } -void gp_1_state::portas_w(uint8_t data) +void gp_1_state::portas_w(u8 data) { m_u14 = data >> 4; if (m_u14 == 1) @@ -410,23 +422,35 @@ void gp_1_state::portas_w(uint8_t data) porta_w(data); } -void gp_1_state::portc_w(uint8_t data) +void gp_1_state::portc_w(u8 data) { output().set_value("led0", !BIT(data, 3)); m_digit = data & 7; } -void gp_1_state::machine_reset() +void gp_1_state::machine_start() { - m_u14 = 0; - m_digit = 0xff; + genpin_class::machine_start(); + + m_digits.resolve(); + m_io_outputs.resolve(); + + save_item(NAME(m_u14)); + save_item(NAME(m_digit)); + save_item(NAME(m_segment)); + save_item(NAME(m_last_solenoid)); } -// zero-cross detection -TIMER_DEVICE_CALLBACK_MEMBER( gp_1_state::zero_timer ) +void gp_1_state::machine_reset() { - m_ctc->trg2(0); - m_ctc->trg2(1); + genpin_class::machine_reset(); + m_u14 = 0; + m_digit = 0xff; + m_last_solenoid = 15; + for (u8 i = 0; i < std::distance(m_io_outputs.begin(), m_io_outputs.end()); i++) + m_io_outputs[i] = 0; + for (u8 i = 0; i < std::size(m_segment); i++) + m_segment[i] = 0; } static const z80_daisy_config daisy_chain[] = @@ -439,8 +463,8 @@ void gp_1_state::gp_1(machine_config &config) { /* basic machine hardware */ Z80(config, m_maincpu, 2457600); - m_maincpu->set_addrmap(AS_PROGRAM, &gp_1_state::gp_1_map); - m_maincpu->set_addrmap(AS_IO, &gp_1_state::gp_1_io); + m_maincpu->set_addrmap(AS_PROGRAM, &gp_1_state::mem_map); + m_maincpu->set_addrmap(AS_IO, &gp_1_state::io_map); m_maincpu->set_daisy_config(daisy_chain); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); @@ -459,7 +483,9 @@ void gp_1_state::gp_1(machine_config &config) Z80CTC(config, m_ctc, 2457600); m_ctc->intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); // Todo: absence of ints will cause a watchdog reset - TIMER(config, "gp1").configure_periodic(FUNC(gp_1_state::zero_timer), attotime::from_hz(120)); // mains freq*2 + + clock_device &cpoint_clock(CLOCK(config, "cpoint_clock", 120)); // crosspoint detector + cpoint_clock.signal_handler().set(m_ctc, FUNC(z80ctc_device::trg2)); } void gp_1_state::gp_1s(machine_config &config) @@ -487,7 +513,7 @@ void gp_1_state::gp_1s(machine_config &config) ROM_START( gp_110 ) - ROM_REGION(0x1000, "roms", 0) + ROM_REGION(0x1000, "maincpu", 0) ROM_LOAD( "a-110.u12", 0x0000, 0x0800, CRC(ed0d518b) SHA1(8f3ca8792ad907c660d9149a1aa3a3528c7573e3)) ROM_LOAD( "b1-110.u13", 0x0800, 0x0800, CRC(a223f2e8) SHA1(767e15e19e11399935c890c1d1034dccf1ad7f92)) ROM_END @@ -523,7 +549,7 @@ ROM_END / Family Fun! (April 1979) - Model: Cocktail #120 /-------------------------------------------------------------------*/ ROM_START(famlyfun) - ROM_REGION(0x1000, "roms", 0) + ROM_REGION(0x1000, "maincpu", 0) ROM_LOAD( "family.u12", 0x0000, 0x0800, CRC(98f27fdf) SHA1(8bcff1e13b9b978f91110f1e83a3288723930a1d)) ROM_LOAD( "family.u13", 0x0800, 0x0800, CRC(b941a1a8) SHA1(a43f8acadb3db3e2274162d5305e30006f912339)) ROM_END @@ -532,7 +558,7 @@ ROM_END / Star Trip (April 1979) - Model: Cocktail #120 /-------------------------------------------------------------------*/ ROM_START(startrip) - ROM_REGION(0x1000, "roms", 0) + ROM_REGION(0x1000, "maincpu", 0) ROM_LOAD( "startrip.u12", 0x0000, 0x0800, CRC(98f27fdf) SHA1(8bcff1e13b9b978f91110f1e83a3288723930a1d)) ROM_LOAD( "startrip.u13", 0x0800, 0x0800, CRC(b941a1a8) SHA1(a43f8acadb3db3e2274162d5305e30006f912339)) ROM_END @@ -541,18 +567,24 @@ ROM_END / Vegas (August 1979) - Cocktail Model #140 /-------------------------------------------------------------------*/ ROM_START(vegasgp) - ROM_REGION(0x1000, "roms", 0) + ROM_REGION(0x1000, "maincpu", 0) ROM_LOAD( "140a.12", 0x0000, 0x0800, CRC(2c00bc19) SHA1(521d4b44f46dea0a08e90cd3aea5799462215863)) ROM_LOAD( "140b.13", 0x0800, 0x0800, CRC(cf26d67b) SHA1(05481e880e23a7bc1d1716b52ac1effc0db437f2)) ROM_END +} // anonymous namespace + GAME(1978, gp_110, 0, gp_1, gp_1, gp_1_state, empty_init, ROT0, "Game Plan", "Model 110", MACHINE_IS_BIOS_ROOT | MACHINE_NOT_WORKING) -GAME(1978, blvelvet, gp_110, gp_1, gp_1, gp_1_state, empty_init, ROT0, "Game Plan", "Black Velvet", MACHINE_MECHANICAL | MACHINE_NOT_WORKING) -GAME(1978, camlight, gp_110, gp_1, gp_1, gp_1_state, empty_init, ROT0, "Game Plan", "Camel Lights", MACHINE_MECHANICAL | MACHINE_NOT_WORKING) -GAME(1978, foxylady, gp_110, gp_1, gp_1, gp_1_state, empty_init, ROT0, "Game Plan", "Foxy Lady", MACHINE_MECHANICAL | MACHINE_NOT_WORKING) -GAME(1978, real, gp_110, gp_1, gp_1, gp_1_state, empty_init, ROT0, "Game Plan", "Real", MACHINE_MECHANICAL | MACHINE_NOT_WORKING) -GAME(1978, rio, gp_110, gp_1, gp_1, gp_1_state, empty_init, ROT0, "Game Plan", "Rio", MACHINE_MECHANICAL | MACHINE_NOT_WORKING) -GAME(1978, chucklck, gp_110, gp_1, gp_1, gp_1_state, empty_init, ROT0, "Game Plan", "Chuck-A-Luck", MACHINE_MECHANICAL | MACHINE_NOT_WORKING) -GAME(1979, famlyfun, 0, gp_1s, gp_1, gp_1_state, empty_init, ROT0, "Game Plan", "Family Fun!", MACHINE_MECHANICAL | MACHINE_NOT_WORKING) -GAME(1979, startrip, 0, gp_1s, gp_1, gp_1_state, empty_init, ROT0, "Game Plan", "Star Trip", MACHINE_MECHANICAL | MACHINE_NOT_WORKING) -GAME(1979, vegasgp, 0, gp_1s, gp_1, gp_1_state, empty_init, ROT0, "Game Plan", "Vegas (Game Plan)", MACHINE_MECHANICAL | MACHINE_NOT_WORKING) + +// Chimes +GAME(1978, blvelvet, gp_110, gp_1, gp_1, gp_1_state, empty_init, ROT0, "Game Plan", "Black Velvet", MACHINE_IS_SKELETON_MECHANICAL ) +GAME(1978, camlight, gp_110, gp_1, gp_1, gp_1_state, empty_init, ROT0, "Game Plan", "Camel Lights", MACHINE_IS_SKELETON_MECHANICAL ) +GAME(1978, foxylady, gp_110, gp_1, gp_1, gp_1_state, empty_init, ROT0, "Game Plan", "Foxy Lady", MACHINE_IS_SKELETON_MECHANICAL ) +GAME(1978, real, gp_110, gp_1, gp_1, gp_1_state, empty_init, ROT0, "Game Plan", "Real", MACHINE_IS_SKELETON_MECHANICAL ) +GAME(1978, rio, gp_110, gp_1, gp_1, gp_1_state, empty_init, ROT0, "Game Plan", "Rio", MACHINE_IS_SKELETON_MECHANICAL ) +GAME(1978, chucklck, gp_110, gp_1, gp_1, gp_1_state, empty_init, ROT0, "Game Plan", "Chuck-A-Luck", MACHINE_IS_SKELETON_MECHANICAL ) + +// SN76477 sound +GAME(1979, famlyfun, 0, gp_1s, gp_1, gp_1_state, empty_init, ROT0, "Game Plan", "Family Fun!", MACHINE_IS_SKELETON_MECHANICAL ) +GAME(1979, startrip, 0, gp_1s, gp_1, gp_1_state, empty_init, ROT0, "Game Plan", "Star Trip", MACHINE_IS_SKELETON_MECHANICAL ) +GAME(1979, vegasgp, 0, gp_1s, gp_1, gp_1_state, empty_init, ROT0, "Game Plan", "Vegas (Game Plan)", MACHINE_IS_SKELETON_MECHANICAL ) diff --git a/src/mame/drivers/gp_2.cpp b/src/mame/drivers/gp_2.cpp index 88ab532f6ef..543a7e68bf7 100644 --- a/src/mame/drivers/gp_2.cpp +++ b/src/mame/drivers/gp_2.cpp @@ -5,10 +5,10 @@ PINBALL Game Plan MPU-2 -When first turned on, you need to press 9 to enter the setup program, then keep -pressing 9 until 06 shows in the credits display. Press the credit button to set -the first high score at which a free credit is awarded. Then press 9 to set the -2nd high score, then 9 to set the 3rd high score. Keep pressing 9 until you exit +When first turned on, you need to press num-0 to enter the setup program, then keep +pressing num-0 until 06 shows in the credits display. Press the credit button to set +the first high score at which a free credit is awarded. Then press num-0 to set the +2nd high score, then num-0 to set the 3rd high score. Keep pressing num-0 until you exit back to normal operation. If this setup is not done, each player will get 3 free games at the start of ball 1. @@ -24,11 +24,16 @@ Andromeda/Cyclopes 6808/6802/6810 + 6821 + 1 rom + ZN428 Lady Sharpshooter 6808/6802/6810 + 2x6821 + 2xROM + 6840 + discrete (no schematics for the others) +Status: +- All games are working without sound, except: +- gwarfare stops responding to inputs after a while +- mbossy rom missing, black screen +- andromep, andromepa, cyclopes, cyclopes1 cannot be started with the credit button + + ToDo: - Sound - Inputs vary per machine -- Mechanical - ******************************************************************************************/ @@ -38,16 +43,21 @@ ToDo: #include "cpu/z80/z80.h" #include "machine/z80daisy.h" #include "machine/i8255.h" -#include "machine/timer.h" +#include "machine/clock.h" #include "machine/z80ctc.h" +//#include "sound/sn76477.h" +//#include "speaker.h" #include "gp_2.lh" +namespace { + class gp_2_state : public genpin_class { public: gp_2_state(const machine_config &mconfig, device_type type, const char *tag) : genpin_class(mconfig, type, tag) , m_maincpu(*this, "maincpu") + , m_ppi(*this, "ppi") , m_ctc(*this, "ctc") , m_io_dsw0(*this, "DSW0") , m_io_dsw1(*this, "DSW1") @@ -59,26 +69,25 @@ public: , m_io_xa(*this, "XA") , m_io_xb(*this, "XB") , m_digits(*this, "digit%u", 0U) + , m_io_outputs(*this, "out%u", 0U) { } void gp_2(machine_config &config); - void init_gp_2(); - private: - void porta_w(uint8_t data); - void portc_w(uint8_t data); - uint8_t portb_r(); - TIMER_DEVICE_CALLBACK_MEMBER(zero_timer); - void gp_2_io(address_map &map); - void gp_2_map(address_map &map); - - uint8_t m_u14; - uint8_t m_digit; - uint8_t m_segment[16]; + void porta_w(u8 data); + void portc_w(u8 data); + u8 portb_r(); + void io_map(address_map &map); + void mem_map(address_map &map); + u8 m_u14 = 0; + u8 m_digit = 0; + u8 m_segment[16]; + u8 m_last_solenoid = 15; virtual void machine_reset() override; - virtual void machine_start() override { m_digits.resolve(); } + virtual void machine_start() override; required_device m_maincpu; + required_device m_ppi; required_device m_ctc; required_ioport m_io_dsw0; required_ioport m_io_dsw1; @@ -90,22 +99,75 @@ private: required_ioport m_io_xa; required_ioport m_io_xb; output_finder<40> m_digits; + output_finder<64> m_io_outputs; // 16 solenoids + 48 lamps }; -void gp_2_state::gp_2_map(address_map &map) +void gp_2_state::mem_map(address_map &map) { - map(0x0000, 0x3fff).rom().region("roms", 0); + map(0x0000, 0x3fff).rom(); map(0x8c00, 0x8dff).ram().share("nvram"); } -void gp_2_state::gp_2_io(address_map &map) +void gp_2_state::io_map(address_map &map) { map.global_mask(0x0f); - map(0x04, 0x07).rw("ppi", FUNC(i8255_device::read), FUNC(i8255_device::write)); + map(0x04, 0x07).rw(m_ppi, FUNC(i8255_device::read), FUNC(i8255_device::write)); map(0x08, 0x0b).rw(m_ctc, FUNC(z80ctc_device::read), FUNC(z80ctc_device::write)); } +static INPUT_PORTS_START( gp_common ) + PORT_START("X7") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Accounting Reset") // This pushbutton on the MPU board is called "S33" + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START1 ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_0) PORT_NAME("Slam Tilt") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_A) PORT_NAME("INP04") + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN2 ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN3 ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN1 ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_9) PORT_NAME("Tilt") + + PORT_START("X8") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_B) PORT_NAME("INP09") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_C) PORT_NAME("INP10") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_X) PORT_NAME("Outhole") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_D) PORT_NAME("INP12") + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_E) PORT_NAME("INP13") + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_F) PORT_NAME("INP14") + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_G) PORT_NAME("INP15") + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_H) PORT_NAME("INP16") + + PORT_START("X9") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_I) PORT_NAME("INP17") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_J) PORT_NAME("INP18") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_K) PORT_NAME("INP19") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_L) PORT_NAME("INP20") + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_M) PORT_NAME("INP21") + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_N) PORT_NAME("INP22") + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_O) PORT_NAME("INP23") + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_P) PORT_NAME("INP24") + + PORT_START("XA") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_Q) PORT_NAME("INP25") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("Setup") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_R) PORT_NAME("INP27") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_S) PORT_NAME("INP28") + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_T) PORT_NAME("INP29") + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_U) PORT_NAME("INP30") + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_V) PORT_NAME("INP31") + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_W) PORT_NAME("INP32") + + PORT_START("XB") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_Y) PORT_NAME("INP33") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_Z) PORT_NAME("INP34") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_COMMA) PORT_NAME("INP35") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_STOP) PORT_NAME("INP36") + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_SLASH) PORT_NAME("INP37") + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_COLON) PORT_NAME("INP38") + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_QUOTE) PORT_NAME("INP39") + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_ENTER) PORT_NAME("INP40") +INPUT_PORTS_END + static INPUT_PORTS_START( gp_1 ) PORT_START("DSW0") PORT_DIPNAME( 0x1f, 0x02, "Coin Slot 1") @@ -249,43 +311,7 @@ static INPUT_PORTS_START( gp_1 ) PORT_DIPSETTING( 0x80, "2") PORT_DIPSETTING( 0xC0, "3") - PORT_START("X7") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE2 ) PORT_NAME("Accounting Reset") // This pushbutton on the MPU board is called "S33" - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START1 ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_TILT1 ) PORT_NAME("Slam Tilt") - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN2 ) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN3 ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN1 ) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_TILT ) - - PORT_START("X8") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("L and R Target") PORT_CODE(KEYCODE_A) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Spinner C") PORT_CODE(KEYCODE_S) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Outhole") PORT_CODE(KEYCODE_X) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Spinner B") PORT_CODE(KEYCODE_D) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("R. Slingshot") PORT_CODE(KEYCODE_F) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Special when lit") PORT_CODE(KEYCODE_G) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("L. Slingshot") PORT_CODE(KEYCODE_H) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Extra when lit") PORT_CODE(KEYCODE_J) - - PORT_START("X9") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("R. Spinner") PORT_CODE(KEYCODE_K) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("1000 and advance") PORT_CODE(KEYCODE_L) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Advance and Change") PORT_CODE(KEYCODE_Z) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("L. Bumper") PORT_CODE(KEYCODE_C) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("R. Bumper") PORT_CODE(KEYCODE_V) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("L. Spinner") PORT_CODE(KEYCODE_B) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Spinner A") PORT_CODE(KEYCODE_N) - - PORT_START("XA") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("1000 Rollover") PORT_CODE(KEYCODE_M) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE1 ) - PORT_BIT( 0xfc, IP_ACTIVE_HIGH, IPT_UNUSED ) - - PORT_START("XB") - PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_INCLUDE(gp_common) INPUT_PORTS_END static INPUT_PORTS_START( gp_2 ) @@ -427,47 +453,10 @@ static INPUT_PORTS_START( gp_2 ) PORT_DIPSETTING( 0x80, "2") PORT_DIPSETTING( 0xC0, "3") - // From here is unique per machine, not yet emulated - PORT_START("X7") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE2 ) PORT_NAME("Accounting Reset") // This pushbutton on the MPU board is called "S33" - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START1 ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_TILT1 ) PORT_NAME("Slam Tilt") - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN2 ) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN3 ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN1 ) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_TILT ) - - PORT_START("X8") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("L and R Target") PORT_CODE(KEYCODE_A) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Spinner C") PORT_CODE(KEYCODE_S) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Outhole") PORT_CODE(KEYCODE_X) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Spinner B") PORT_CODE(KEYCODE_D) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("R. Slingshot") PORT_CODE(KEYCODE_F) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Special when lit") PORT_CODE(KEYCODE_G) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("L. Slingshot") PORT_CODE(KEYCODE_H) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Extra when lit") PORT_CODE(KEYCODE_J) - - PORT_START("X9") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("R. Spinner") PORT_CODE(KEYCODE_K) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("1000 and advance") PORT_CODE(KEYCODE_L) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Advance and Change") PORT_CODE(KEYCODE_Z) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("L. Bumper") PORT_CODE(KEYCODE_C) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("R. Bumper") PORT_CODE(KEYCODE_V) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("L. Spinner") PORT_CODE(KEYCODE_B) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Spinner A") PORT_CODE(KEYCODE_N) - - PORT_START("XA") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("1000 Rollover") PORT_CODE(KEYCODE_M) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE1 ) - PORT_BIT( 0xfc, IP_ACTIVE_HIGH, IPT_UNUSED ) - - PORT_START("XB") - PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_INCLUDE(gp_common) INPUT_PORTS_END -uint8_t gp_2_state::portb_r() +u8 gp_2_state::portb_r() { switch (m_u14) { @@ -493,57 +482,24 @@ uint8_t gp_2_state::portb_r() return 0; } -void gp_2_state::porta_w(uint8_t data) +void gp_2_state::porta_w(u8 data) { m_u14 = data >> 4; - if ((data > 0x0f) && (data < 0x30)) + if (m_last_solenoid < 15) + m_io_outputs[m_last_solenoid] = 0; + + m_u14 = data >> 4; + // Solenoids are different per game, no point allocating anything specific + if ((m_u14 >= 1) && (m_u14 <= 2)) { - switch (data) - { - case 0x10: // chime c - m_samples->start(0, 3); - break; - case 0x11: // chime b - m_samples->start(0, 2); - break; - case 0x12: // knocker - m_samples->start(0, 6); - break; - case 0x13: // not used - case 0x14: // not used - break; - case 0x15: // chime a - m_samples->start(0, 1); - break; - case 0x16: // chime d - m_samples->start(0, 4); - break; - case 0x17: // outhole - case 0x18: // r sling - case 0x19: // l sling - m_samples->start(0, 5); - break; - case 0x1a: // c kickout - m_samples->start(0, 5); - break; - case 0x1b: // r bumper - m_samples->start(0, 0); - break; - case 0x1c: // a kickout - m_samples->start(0, 5); - break; - case 0x1d: // l bumper - m_samples->start(0, 0); - break; - case 0x1e: // a kickout - m_samples->start(0, 5); - break; - case 0x1f: // not used - break; - } + if ((data & 15) < 15) + m_io_outputs[data & 15] = 1; + m_last_solenoid = data & 15; } + else + m_last_solenoid = 15; - static const uint8_t patterns[16] = { 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7c,0x07,0x7f,0x67,0x58,0x4c,0x62,0x69,0x78,0 }; // 7448 + static const u8 patterns[16] = { 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7c,0x07,0x7f,0x67,0x58,0x4c,0x62,0x69,0x78,0 }; // 7448 if (m_digit == 7) m_segment[m_u14] = data & 15; else @@ -555,25 +511,42 @@ void gp_2_state::porta_w(uint8_t data) m_digits[m_digit+24] = patterns[m_segment[10]]; m_digits[m_digit+32] = patterns[m_segment[11]]; } + + // Lamps + if ((m_u14 >= 3) && (m_u14 <= 5)) + for (u8 i = 0; i < 16; i++) + m_io_outputs[(m_u14 - 3) * 16 + 16 + i] = ((data & 15) == i); } -void gp_2_state::portc_w(uint8_t data) +void gp_2_state::portc_w(u8 data) { output().set_value("led0", !BIT(data, 3)); m_digit = data & 7; } -void gp_2_state::machine_reset() +void gp_2_state::machine_start() { - m_u14 = 0; - m_digit = 0xff; + genpin_class::machine_start(); + + m_digits.resolve(); + m_io_outputs.resolve(); + + save_item(NAME(m_u14)); + save_item(NAME(m_digit)); + save_item(NAME(m_segment)); + save_item(NAME(m_last_solenoid)); } -// zero-cross detection -TIMER_DEVICE_CALLBACK_MEMBER( gp_2_state::zero_timer ) +void gp_2_state::machine_reset() { - m_ctc->trg2(0); - m_ctc->trg2(1); + genpin_class::machine_reset(); + m_u14 = 0; + m_digit = 0xff; + m_last_solenoid = 15; + for (u8 i = 0; i < std::distance(m_io_outputs.begin(), m_io_outputs.end()); i++) + m_io_outputs[i] = 0; + for (u8 i = 0; i < std::size(m_segment); i++) + m_segment[i] = 0; } static const z80_daisy_config daisy_chain[] = @@ -586,8 +559,8 @@ void gp_2_state::gp_2(machine_config &config) { /* basic machine hardware */ Z80(config, m_maincpu, 2457600); - m_maincpu->set_addrmap(AS_PROGRAM, &gp_2_state::gp_2_map); - m_maincpu->set_addrmap(AS_IO, &gp_2_state::gp_2_io); + m_maincpu->set_addrmap(AS_PROGRAM, &gp_2_state::mem_map); + m_maincpu->set_addrmap(AS_IO, &gp_2_state::io_map); m_maincpu->set_daisy_config(daisy_chain); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); @@ -599,21 +572,51 @@ void gp_2_state::gp_2(machine_config &config) genpin_audio(config); /* Devices */ - i8255_device &ppi(I8255A(config, "ppi")); - ppi.out_pa_callback().set(FUNC(gp_2_state::porta_w)); - ppi.in_pb_callback().set(FUNC(gp_2_state::portb_r)); - ppi.out_pc_callback().set(FUNC(gp_2_state::portc_w)); + I8255A(config, m_ppi); + m_ppi->out_pa_callback().set(FUNC(gp_2_state::porta_w)); + m_ppi->in_pb_callback().set(FUNC(gp_2_state::portb_r)); + m_ppi->out_pc_callback().set(FUNC(gp_2_state::portc_w)); Z80CTC(config, m_ctc, 2457600); m_ctc->intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); // Todo: absence of ints will cause a watchdog reset - TIMER(config, "gp1").configure_periodic(FUNC(gp_2_state::zero_timer), attotime::from_hz(120)); // mains freq*2 + + clock_device &cpoint_clock(CLOCK(config, "cpoint_clock", 120)); // crosspoint detector + cpoint_clock.signal_handler().set(m_ctc, FUNC(z80ctc_device::trg2)); } +/* ========== ALTERNATE ROMS ======================================================================= + +This is a list of known alternate roms. Nothing has been tested. + +Agents 777 +ROM_LOAD( "770ab", 0x0000, 0x1000, CRC(e7f901c4) SHA1(c28c472e7890aaa10a6a47d8729bd6aebd15a20e) ) + +Andromeda +ROM_LOAD( "850.c", 0x1000, 0x0800, CRC(75dc73c4) SHA1(79fadec7650a1419f47b22875dee6f678114b439) ) // used by mbossy + +Attila the Hun +ROM_LOAD( "260.a_b", 0x0000, 0x1000, CRC(0030ce7f) SHA1(44921f3c771c90f09cac3c927915aa8ff70bd782) ) + +Captain Hook +ROM_LOAD( "780a-b.13", 0x0000, 0x1000, CRC(ec757bb7) SHA1(0a10143cf7a60f2a39f36e8c40b5ce52cab04d0b) ) + +Lady Sharpshooter +ROM_LOAD( "830co.716", 0x0000, 0x1000, CRC(e3970bab) SHA1(f5be9a51c382a87dd304c39b27fc468a7f0a74f3) ) +ROM_LOAD( "830ab.732", 0x0000, 0x1000, CRC(9ca19183) SHA1(83e73e809c2484396348990bfdfae143ac371f9a) ) + +Mike Bossy +ROM_LOAD( "snd-ic9.a", 0x0000, 0x1000, CRC(b0541739) SHA1(5392fa6a405ba2e09ad4d0ec52c48675bf507532) ) + +Pinball Lizard +ROM_LOAD( "9316b.lef", 0x0000, 0x0895, CRC(c0fb2543) SHA1(8e44f513e8f2afed2a40a6a3bb8637ab18631d2b) ) // not a rom + +*/ + /*------------------------------------------------------------------- / Agents 777 (November 1984) - Model #770 /-------------------------------------------------------------------*/ ROM_START(agent777) - ROM_REGION(0x4000, "roms", 0) + ROM_REGION(0x4000, "maincpu", ROMREGION_ERASEFF) ROM_LOAD( "770a", 0x0000, 0x0800, CRC(fc4eebcd) SHA1(742a201e89c1357d2a1f24b0acf3b78ffec96c74)) ROM_LOAD( "770b", 0x0800, 0x0800, CRC(ea62aece) SHA1(32be10bc76a59e03c3fd3294daefc8d28c20386a)) ROM_LOAD( "770c", 0x1000, 0x0800, CRC(59280db7) SHA1(8f199be7bfbc01466541c07dc4c365e20055a66c)) @@ -628,7 +631,7 @@ ROM_END / Andromeda (August 1985) - Model #850 /-------------------------------------------------------------------*/ ROM_START(andromep) - ROM_REGION(0x4000, "roms", 0) + ROM_REGION(0x4000, "maincpu", ROMREGION_ERASEFF) ROM_LOAD( "850.a", 0x0000, 0x1000, CRC(67ed03ee) SHA1(efe7c495766ffb73545a77ab24f02925ac0395f1)) ROM_LOAD( "850.b", 0x1000, 0x1000, CRC(37c244e8) SHA1(5cef0a1a6f2c34f2d01bdd12ce11da40c8be4296)) @@ -639,7 +642,7 @@ ROM_START(andromep) ROM_END ROM_START(andromepa) - ROM_REGION(0x4000, "roms", 0) + ROM_REGION(0x4000, "maincpu", ROMREGION_ERASEFF) ROM_LOAD( "850.a", 0x0000, 0x1000, CRC(67ed03ee) SHA1(efe7c495766ffb73545a77ab24f02925ac0395f1)) ROM_LOAD( "850b.rom", 0x1000, 0x1000, CRC(fc1829a5) SHA1(9761543d17c0a5c08b0fec45c35648ce769a3463)) @@ -653,7 +656,7 @@ ROM_END / Attila the Hun (April 1984) - Model #260 /-------------------------------------------------------------------*/ ROM_START(attila) - ROM_REGION(0x4000, "roms", 0) + ROM_REGION(0x4000, "maincpu", ROMREGION_ERASEFF) ROM_LOAD( "260.a", 0x0000, 0x0800, CRC(b31c11d8) SHA1(d3f2ad84cc28e99acb54349b232dbf8abdf15b21)) ROM_LOAD( "260.b", 0x0800, 0x0800, CRC(e8cca86d) SHA1(ed0797175a573537be2d5119ad68b1847e49e578)) ROM_LOAD( "260.c", 0x1000, 0x0800, CRC(206605c3) SHA1(14f61a2f43c29370bcb6db29969e8dfcfe3da1ab)) @@ -668,7 +671,7 @@ ROM_END / Captain Hook (April 1985) - Model #780 /-------------------------------------------------------------------*/ ROM_START(cpthook) - ROM_REGION(0x4000, "roms", 0) + ROM_REGION(0x4000, "maincpu", ROMREGION_ERASEFF) ROM_LOAD( "780.a", 0x0000, 0x0800, CRC(6bd5a495) SHA1(8462e0c68176daee6b23dce9091f5aee99e62631)) ROM_LOAD( "780.b", 0x0800, 0x0800, CRC(3d1c5555) SHA1(ecb0d40f5e6e37acfc8589816e24b26525273393)) ROM_LOAD( "780.c", 0x1000, 0x0800, CRC(e54bc51f) SHA1(3480e0cdd43f9ac3fda8cd466b2f039210525e8b)) @@ -683,7 +686,7 @@ ROM_END / Cyclopes (November 1985) - Model #800 /-------------------------------------------------------------------*/ ROM_START(cyclopes) - ROM_REGION(0x4000, "roms", 0) + ROM_REGION(0x4000, "maincpu", ROMREGION_ERASEFF) ROM_LOAD( "800.a", 0x0000, 0x1000, CRC(3e9628e5) SHA1(4dad9e082a9f4140162bc155f2b0f0a948ba012f)) ROM_LOAD( "800.b", 0x1000, 0x1000, CRC(3f945c46) SHA1(25eb543e0b0edcd0a0dcf8e4aa1405cda55ebe2e)) ROM_LOAD( "800.c", 0x2000, 0x1000, CRC(7ea18e65) SHA1(e86d82e3ba659499dfbf14920b196252784724f7)) @@ -695,7 +698,7 @@ ROM_START(cyclopes) ROM_END ROM_START(cyclopes1) - ROM_REGION(0x4000, "roms", 0) + ROM_REGION(0x4000, "maincpu", ROMREGION_ERASEFF) ROM_LOAD( "800a.111585", 0x0000, 0x1000, CRC(13131b90) SHA1(33f6c4aaaa2511a9c78e68f8df9a6461cd92c23f)) ROM_LOAD( "800b.111585", 0x1000, 0x1000, CRC(3d515632) SHA1(2c4a7f18760b591a85331fa0304177a730540489)) ROM_LOAD( "800c.111585", 0x2000, 0x1000, CRC(2078bd3f) SHA1(fed719ffdbd71242393c0786ad6e763a9e25ff8e)) @@ -710,7 +713,7 @@ ROM_END / Global Warfare (June 1981) - Model #240 /-------------------------------------------------------------------*/ ROM_START(gwarfare) - ROM_REGION(0x4000, "roms", 0) + ROM_REGION(0x4000, "maincpu", ROMREGION_ERASEFF) ROM_LOAD( "240a.716", 0x0000, 0x0800, CRC(30206428) SHA1(7a9029e4fd4c4c00da3256ed06464c0bd8022168)) ROM_LOAD( "240b.716", 0x0800, 0x0800, CRC(a54eb15d) SHA1(b9235bd188c1251eb213789800b7686b5e3c557f)) ROM_LOAD( "240c.716", 0x1000, 0x0800, CRC(60d115a8) SHA1(e970fdd7cbbb2c81ab8c8209edfb681798c683b9)) @@ -725,7 +728,7 @@ ROM_END / Lady Sharpshooter (May 1985) - Cocktail Model #830 /-------------------------------------------------------------------*/ ROM_START(ladyshot) - ROM_REGION(0x4000, "roms", 0) + ROM_REGION(0x4000, "maincpu", ROMREGION_ERASEFF) ROM_LOAD( "830a.716", 0x0000, 0x0800, CRC(c055b993) SHA1(a9a7156e5ec0a32db1ffe36b3c6280953a2606ff)) ROM_LOAD( "830b.716", 0x0800, 0x0800, CRC(1e3308ea) SHA1(a5955a6a15b33c4cf35105ab524a8e7e03d748b6)) ROM_LOAD( "830c.716", 0x1000, 0x0800, CRC(f5e1db15) SHA1(e8168ab37ba30211045fc96b23dad5f06592b38d)) @@ -737,7 +740,7 @@ ROM_START(ladyshot) ROM_END ROM_START(ladyshota) - ROM_REGION(0x4000, "roms", 0) + ROM_REGION(0x4000, "maincpu", ROMREGION_ERASEFF) ROM_LOAD( "830a2.716", 0x0000, 0x0800, CRC(2c1f1629) SHA1(9233ce4328d779ff6548cdd5d6819cd368bef313)) ROM_LOAD( "830b2.716", 0x0800, 0x0800, CRC(2105a538) SHA1(0360d3e740d8b6f816cfe7fe1fb32ac476251b9f)) ROM_LOAD( "830c2.716", 0x1000, 0x0800, CRC(2d96bdde) SHA1(7c03a29a91f03fba9ed5e53a93335113a7cbafb3)) @@ -751,20 +754,17 @@ ROM_END /*------------------------------------------------------------------- / Loch Ness Monster (November 1985) - Model #??? (prototype only) /-------------------------------------------------------------------*/ +// 1 prototype exists. Company closed down just as game was about to go into production. /*------------------------------------------------------------------- / Mike Bossy (January 1982) - Model #??? (prototype only) /-------------------------------------------------------------------*/ -// These roms are widely available on the net, but is not complete (1800-1FFF is missing) -// ROM_LOAD( "mb_a.716", 0x0000, 0x0800, CRC(a811f936) SHA1(f44fed7acd26a621f105925d52405e985d0b5e5d) ) -// ROM_LOAD( "mb_b.716", 0x0800, 0x0800, CRC(75ec7247) SHA1(10fa1e3ac2adbd7b24744a4fb0149bcc74df6b4c) ) -// ROM_LOAD( "mb_c.716", 0x1000, 0x0800, CRC(75dc73c4) SHA1(79fadec7650a1419f47b22875dee6f678114b439) ) - ROM_START(mbossy) - ROM_REGION(0x4000, "roms", 0) - ROM_LOAD( "mb_a.716", 0x0000, 0x0800, NO_DUMP) - ROM_LOAD( "mb_b.716", 0x0800, 0x0800, NO_DUMP) - ROM_LOAD( "mb_c.716", 0x1000, 0x0800, NO_DUMP) + ROM_REGION(0x4000, "maincpu", ROMREGION_ERASEFF) + ROM_LOAD( "mb_a.716", 0x0000, 0x0800, CRC(a811f936) SHA1(f44fed7acd26a621f105925d52405e985d0b5e5d) ) + ROM_LOAD( "mb_b.716", 0x0800, 0x0800, CRC(75ec7247) SHA1(10fa1e3ac2adbd7b24744a4fb0149bcc74df6b4c) ) + ROM_LOAD( "mb_c.716", 0x1000, 0x0800, CRC(75dc73c4) SHA1(79fadec7650a1419f47b22875dee6f678114b439) ) + ROM_LOAD( "mb_d.716", 0x1800, 0x0800, NO_DUMP) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("mb.u9", 0x3800, 0x0800, CRC(dfa98db5) SHA1(65361630f530383e67837c428050bcdb15373c0b)) @@ -776,7 +776,7 @@ ROM_END / Old Coney Island! (December 1979) - Model #180 /-------------------------------------------------------------------*/ ROM_START(coneyis) - ROM_REGION(0x4000, "roms", 0) + ROM_REGION(0x4000, "maincpu", ROMREGION_ERASEFF) ROM_LOAD( "130a.716", 0x0000, 0x0800, CRC(dc402b37) SHA1(90c46391a1e5f000f3b235d580463bf96b45bd3e)) ROM_LOAD( "130b.716", 0x0800, 0x0800, CRC(19a86f5e) SHA1(bc4a87314fc9c4e74e492c3f6e44d5d6cae72939)) ROM_LOAD( "130c.716", 0x1000, 0x0800, CRC(b956f67b) SHA1(ff64383d7f59e9bbec588553e35a21fb94c7203b)) @@ -786,10 +786,10 @@ ROM_END / Pinball Lizard (June / July 1980) - Model #210 /-------------------------------------------------------------------*/ ROM_START(lizard) - ROM_REGION(0x4000, "roms", 0) - ROM_LOAD( "130a.716", 0x0000, 0x0800, CRC(dc402b37) SHA1(90c46391a1e5f000f3b235d580463bf96b45bd3e)) - ROM_LOAD( "130b.716", 0x0800, 0x0800, CRC(19a86f5e) SHA1(bc4a87314fc9c4e74e492c3f6e44d5d6cae72939)) - ROM_LOAD( "130c.716", 0x1000, 0x0800, CRC(b956f67b) SHA1(ff64383d7f59e9bbec588553e35a21fb94c7203b)) + ROM_REGION(0x4000, "maincpu", ROMREGION_ERASEFF) + ROM_LOAD( "130a.716", 0x0000, 0x0800, CRC(dc402b37) SHA1(90c46391a1e5f000f3b235d580463bf96b45bd3e)) // u12 + ROM_LOAD( "130b.716", 0x0800, 0x0800, CRC(19a86f5e) SHA1(bc4a87314fc9c4e74e492c3f6e44d5d6cae72939)) // u13 + ROM_LOAD( "130c.716", 0x1000, 0x0800, CRC(b956f67b) SHA1(ff64383d7f59e9bbec588553e35a21fb94c7203b)) // u26 ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("lizard.u9", 0x3800, 0x0800, CRC(2d121b24) SHA1(55c16951538229571165c35a353da53e22d11f81)) @@ -801,7 +801,7 @@ ROM_END / Sharp Shooter II (November 1983) - Model #730 /-------------------------------------------------------------------*/ ROM_START(sshootr2) - ROM_REGION(0x4000, "roms", 0) + ROM_REGION(0x4000, "maincpu", ROMREGION_ERASEFF) ROM_LOAD( "130a.716", 0x0000, 0x0800, CRC(dc402b37) SHA1(90c46391a1e5f000f3b235d580463bf96b45bd3e)) ROM_LOAD( "130b.716", 0x0800, 0x0800, CRC(19a86f5e) SHA1(bc4a87314fc9c4e74e492c3f6e44d5d6cae72939)) ROM_LOAD( "730c", 0x1000, 0x0800, CRC(d1af712b) SHA1(9dce2ec1c2d9630a29dd21f4685c09019e59b147)) @@ -816,7 +816,7 @@ ROM_END / Sharpshooter (May 1979) - Model #130 /-------------------------------------------------------------------*/ ROM_START(sshootep) - ROM_REGION(0x4000, "roms", 0) + ROM_REGION(0x4000, "maincpu", ROMREGION_ERASEFF) ROM_LOAD( "130a.716", 0x0000, 0x0800, CRC(dc402b37) SHA1(90c46391a1e5f000f3b235d580463bf96b45bd3e)) ROM_LOAD( "130b.716", 0x0800, 0x0800, CRC(19a86f5e) SHA1(bc4a87314fc9c4e74e492c3f6e44d5d6cae72939)) ROM_LOAD( "130c.716", 0x1000, 0x0800, CRC(b956f67b) SHA1(ff64383d7f59e9bbec588553e35a21fb94c7203b)) @@ -826,29 +826,31 @@ ROM_END / Super Nova (May 1982) - Model #150 /-------------------------------------------------------------------*/ ROM_START(suprnova) - ROM_REGION(0x4000, "roms", 0) + ROM_REGION(0x4000, "maincpu", ROMREGION_ERASEFF) ROM_LOAD( "130a.716", 0x0000, 0x0800, CRC(dc402b37) SHA1(90c46391a1e5f000f3b235d580463bf96b45bd3e)) ROM_LOAD( "150b.716", 0x0800, 0x0800, CRC(8980a8bb) SHA1(129816fe85681b760307a713c667737a750b0c04)) ROM_LOAD( "150c.716", 0x1000, 0x0800, CRC(6fe08f96) SHA1(1309619a2400674fa1d05dc9214fdb85419fd1c3)) ROM_END +} // anonymous namespace + // GP1 dips -GAME( 1979, sshootep, 0, gp_2, gp_1, gp_2_state, empty_init, ROT0, "Game Plan", "Sharpshooter (Game Plan)", MACHINE_MECHANICAL | MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) -GAME( 1979, coneyis, 0, gp_2, gp_1, gp_2_state, empty_init, ROT0, "Game Plan", "Old Coney Island!", MACHINE_MECHANICAL | MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) -GAME( 1980, lizard, 0, gp_2, gp_1, gp_2_state, empty_init, ROT0, "Game Plan", "Pinball Lizard", MACHINE_MECHANICAL | MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) -GAME( 1982, suprnova, 0, gp_2, gp_1, gp_2_state, empty_init, ROT0, "Game Plan", "Super Nova (Game Plan)", MACHINE_MECHANICAL | MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) -GAME( 1983, sshootr2, 0, gp_2, gp_1, gp_2_state, empty_init, ROT0, "Game Plan", "Sharp Shooter II", MACHINE_MECHANICAL | MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) +GAME( 1979, sshootep, 0, gp_2, gp_1, gp_2_state, empty_init, ROT0, "Game Plan", "Sharpshooter (Game Plan)", MACHINE_IS_SKELETON_MECHANICAL ) +GAME( 1979, coneyis, 0, gp_2, gp_1, gp_2_state, empty_init, ROT0, "Game Plan", "Old Coney Island!", MACHINE_IS_SKELETON_MECHANICAL ) +GAME( 1980, lizard, 0, gp_2, gp_1, gp_2_state, empty_init, ROT0, "Game Plan", "Pinball Lizard", MACHINE_IS_SKELETON_MECHANICAL ) +GAME( 1982, suprnova, 0, gp_2, gp_1, gp_2_state, empty_init, ROT0, "Game Plan", "Super Nova (Game Plan)", MACHINE_IS_SKELETON_MECHANICAL ) +GAME( 1983, sshootr2, 0, gp_2, gp_1, gp_2_state, empty_init, ROT0, "Game Plan", "Sharp Shooter II", MACHINE_IS_SKELETON_MECHANICAL ) // GP2 dips -GAME( 1981, gwarfare, 0, gp_2, gp_2, gp_2_state, empty_init, ROT0, "Game Plan", "Global Warfare", MACHINE_MECHANICAL | MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) +GAME( 1981, gwarfare, 0, gp_2, gp_2, gp_2_state, empty_init, ROT0, "Game Plan", "Global Warfare", MACHINE_IS_SKELETON_MECHANICAL ) GAME( 1982, mbossy, 0, gp_2, gp_2, gp_2_state, empty_init, ROT0, "Game Plan", "Mike Bossy", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1984, attila, 0, gp_2, gp_2, gp_2_state, empty_init, ROT0, "Game Plan", "Attila The Hun", MACHINE_MECHANICAL | MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) +GAME( 1984, attila, 0, gp_2, gp_2, gp_2_state, empty_init, ROT0, "Game Plan", "Attila The Hun", MACHINE_IS_SKELETON_MECHANICAL ) // revolving match -GAME( 1984, agent777, 0, gp_2, gp_2, gp_2_state, empty_init, ROT0, "Game Plan", "Agents 777", MACHINE_MECHANICAL | MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) -GAME( 1985, cpthook, 0, gp_2, gp_2, gp_2_state, empty_init, ROT0, "Game Plan", "Captain Hook", MACHINE_MECHANICAL | MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) -GAME( 1985, ladyshot, 0, gp_2, gp_2, gp_2_state, empty_init, ROT0, "Game Plan", "Lady Sharpshooter (set 1)", MACHINE_MECHANICAL | MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) -GAME( 1985, ladyshota, ladyshot, gp_2, gp_2, gp_2_state, empty_init, ROT0, "Game Plan", "Lady Sharpshooter (set 2)", MACHINE_MECHANICAL | MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) +GAME( 1984, agent777, 0, gp_2, gp_2, gp_2_state, empty_init, ROT0, "Game Plan", "Agents 777", MACHINE_IS_SKELETON_MECHANICAL ) +GAME( 1985, cpthook, 0, gp_2, gp_2, gp_2_state, empty_init, ROT0, "Game Plan", "Captain Hook", MACHINE_IS_SKELETON_MECHANICAL ) +GAME( 1985, ladyshot, 0, gp_2, gp_2, gp_2_state, empty_init, ROT0, "Game Plan", "Lady Sharpshooter (set 1)", MACHINE_IS_SKELETON_MECHANICAL ) +GAME( 1985, ladyshota, ladyshot, gp_2, gp_2, gp_2_state, empty_init, ROT0, "Game Plan", "Lady Sharpshooter (set 2)", MACHINE_IS_SKELETON_MECHANICAL ) // credit (start) button not working GAME( 1985, andromep, 0, gp_2, gp_2, gp_2_state, empty_init, ROT0, "Game Plan", "Andromeda (set 1)", MACHINE_IS_SKELETON_MECHANICAL) diff --git a/src/mame/drivers/gts3.cpp b/src/mame/drivers/gts3.cpp index d65077e816c..74b6ca5800a 100644 --- a/src/mame/drivers/gts3.cpp +++ b/src/mame/drivers/gts3.cpp @@ -48,6 +48,8 @@ ToDo: #include "machine/input_merger.h" #include "gts3.lh" +namespace { + class gts3_state : public genpin_class { public: @@ -626,6 +628,8 @@ ROM_START(tt_game) ROM_LOAD("yrom1.bin", 0x8000, 0x8000, NO_DUMP) ROM_END +} // anonymous namespace + GAME(1989, lca, 0, gts3, gts3, gts3_state, empty_init, ROT0, "Gottlieb", "Lights...Camera...Action!", MACHINE_IS_SKELETON_MECHANICAL) GAME(1989, lca2, lca, gts3, gts3, gts3_state, empty_init, ROT0, "Gottlieb", "Lights...Camera...Action! (rev.2)", MACHINE_IS_SKELETON_MECHANICAL) GAME(1990, silvslug, 0, gts3, gts3, gts3_state, empty_init, ROT0, "Gottlieb", "Silver Slugger", MACHINE_IS_SKELETON_MECHANICAL) diff --git a/src/mame/drivers/gts3a.cpp b/src/mame/drivers/gts3a.cpp index 5ccb2ec31c2..71624ac5503 100644 --- a/src/mame/drivers/gts3a.cpp +++ b/src/mame/drivers/gts3a.cpp @@ -29,6 +29,7 @@ ToDo: #include "emupal.h" #include "screen.h" +namespace { class gts3a_state : public genpin_class { @@ -1336,6 +1337,8 @@ ROM_START(wcsoccerd2) ROM_LOAD("yrom1.bin", 0x8000, 0x8000, CRC(8b2795b0) SHA1(b838d4e410c815421099c65b0d3b22227dae17c6)) ROM_END +} // anonymous namespace + GAME(1992, smb, 0, gts3a, gts3a, gts3a_state, init_gts3a, ROT0, "Gottlieb", "Super Mario Brothers", MACHINE_IS_SKELETON_MECHANICAL) GAME(1992, smb1, smb, gts3a, gts3a, gts3a_state, init_gts3a, ROT0, "Gottlieb", "Super Mario Brothers (rev.1)", MACHINE_IS_SKELETON_MECHANICAL) GAME(1992, smb2, smb, gts3a, gts3a, gts3a_state, init_gts3a, ROT0, "Gottlieb", "Super Mario Brothers (rev.2)", MACHINE_IS_SKELETON_MECHANICAL) -- cgit v1.2.3