From 512dbbc2d53c70f12f47553562f2524045b0f421 Mon Sep 17 00:00:00 2001 From: Robbbert Date: Thu, 23 Dec 2021 20:27:26 +1100 Subject: [PATCH] flicker: Fixed a couple of mistakes. --- src/mame/drivers/by6803.cpp | 4 +- src/mame/drivers/flicker.cpp | 168 +++++++++++++++++++---------------- src/mame/layout/flicker.lay | 8 +- 3 files changed, 95 insertions(+), 85 deletions(-) diff --git a/src/mame/drivers/by6803.cpp b/src/mame/drivers/by6803.cpp index 52c14afcae6..d4bc1ead0bb 100644 --- a/src/mame/drivers/by6803.cpp +++ b/src/mame/drivers/by6803.cpp @@ -112,8 +112,8 @@ void by6803_state::by6803_map(address_map &map) static INPUT_PORTS_START( by6803 ) PORT_START("TEST") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Self Test") PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, by6803_state, self_test, 0) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Activity") PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, by6803_state, activity_test, 0) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("Self Test") PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, by6803_state, self_test, 0) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("Activity") PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, by6803_state, activity_test, 0) PORT_START("X0") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_A) PORT_NAME("INP01") diff --git a/src/mame/drivers/flicker.cpp b/src/mame/drivers/flicker.cpp index c323f210f87..197f0e024ab 100644 --- a/src/mame/drivers/flicker.cpp +++ b/src/mame/drivers/flicker.cpp @@ -2,39 +2,40 @@ // copyright-holders:Robbbert, Vas Crabb /************************************************************************* - PINBALL - Flicker was originally an electromechanical machine, and Bally asked - Nutting Associates to create a solid-state prototype. +PINBALL +Flicker was originally an electromechanical machine, and Bally asked + Nutting Associates to create a solid-state prototype. - Seems to be the first ever microprocessor-controlled pinball machine. +Seems to be the first ever microprocessor-controlled pinball machine. - Inputs from US Patent 4093232 - Some clues from PinMAME +Inputs from US Patent 4093232 +Some clues from PinMAME - Note: If F3 pressed, it will remember any credits from last time. - However, you still need to insert a coin before the start button - will work. +Note: If F3 pressed, it will remember any credits from last time. + However, you still need to insert a coin before the start button + will work. - The input/output multiplexing on this machine is quite clever. RAM0 - output connected to two 1-of-16 decoders. These are strobed using - CM-RAM1 and CM-RAM2. There is no RAM or I/O mapped there - the - additional chip select lines are just used to strobe the decoders. +The input/output multiplexing on this machine is quite clever. RAM0 + output connected to two 1-of-16 decoders. These are strobed using + CM-RAM1 and CM-RAM2. There is no RAM or I/O mapped there - the + additional chip select lines are just used to strobe the decoders. - The programming seems to be incomplete with some bugs and omissions. - - If you score 10 then 1000 at start, the hundreds digit will be blank. - It will fix itself during the natural course of play. - - If you enable the Match digit, and it doesn't match, the knocker - will continually bang away. Works correctly if the match succeeds. - - The 15k to 110k switches are presumed to be the score at which a free - game is granted, but none of that works. - - Setting 45K and 50K can award credits - - Setting 65K and 70K does something - - The "Add-a-ball, Replay, Straight" switches have unknown function, - and don't seem to do anything. - - If you press some keys before starting a game, you'll be awarded the - points when the game starts. - - So, the only settings that are known to work are the games per coin, - and the 3/5 balls per game. +The programming seems to be incomplete with some bugs and omissions. +- If you score 10 then 1000 at start, the hundreds digit will be blank. + It will fix itself during the natural course of play. +- If you enable the Match digit, and it doesn't match, the knocker + will continually bang away. Works correctly if the match succeeds. +- The 15k to 110k switches are presumed to be the score at which a free + game is granted, but none of that works. + - Setting 45K and 50K can award credits + - Setting 65K and 70K does something +- The "Add-a-ball, Replay, Straight" switches have unknown function, + and don't seem to do anything. +- If you press some keys before starting a game, you'll be awarded the + points when the game starts. +- So, the only settings that are known to work are the games per coin, + and the 3/5 balls per game. +- Test button not working. *************************************************************************/ @@ -53,8 +54,9 @@ public: , m_maincpu(*this, "maincpu") , m_testport(*this, "TEST") , m_coinport(*this, "COIN") - , m_switch(*this, "SWITCH.%X", 0U) - , m_digits(*this, "digit%u", 0U) + , m_switch(*this, "X%d", 0U) + , m_digits(*this, "digit%d", 0U) + , m_io_outputs(*this, "out%d", 0U) { } @@ -86,6 +88,7 @@ private: required_ioport m_coinport; required_ioport_array<16> m_switch; output_finder<16> m_digits; + output_finder<80> m_io_outputs; // 16 solenoids + 64 lamps bool m_cm_ram1 = false, m_cm_ram2 = false; u8 m_ram0_output = 0U, m_rom0_output = 0U, m_rom1_output = 0U; @@ -123,13 +126,13 @@ void flicker_state::flicker_ram_ports(address_map &map) static INPUT_PORTS_START( flicker ) PORT_START("TEST") PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_UNUSED) - PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Door Slam") PORT_CODE(KEYCODE_HOME) PORT_CHANGED_MEMBER(DEVICE_SELF, flicker_state, test_changed, 0) + PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Door Slam") PORT_CODE(KEYCODE_0) PORT_CHANGED_MEMBER(DEVICE_SELF, flicker_state, test_changed, 0) PORT_BIT(0x001c, IP_ACTIVE_HIGH, IPT_UNKNOWN) // called "two coins", "three coins", "four coins" in patent, purpose unknown PORT_BIT(0x07e0, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(flicker_state, coins_in) - PORT_BIT(0x0800, IP_ACTIVE_HIGH, IPT_TILT) + PORT_BIT(0x0800, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Tilt") PORT_CODE(KEYCODE_9) PORT_BIT(0x1000, IP_ACTIVE_HIGH, IPT_START) PORT_NAME("Credit Button") PORT_CHANGED_MEMBER(DEVICE_SELF, flicker_state, test_changed, 0) PORT_BIT(0x6000, IP_ACTIVE_HIGH, IPT_UNUSED) - PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_SERVICE1) PORT_NAME("Test") PORT_CHANGED_MEMBER(DEVICE_SELF, flicker_state, test_changed, 0) + PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Test") PORT_CODE(KEYCODE_0_PAD) PORT_CHANGED_MEMBER(DEVICE_SELF, flicker_state, test_changed, 0) // The coin slot would be connected to one of the lines via a wire jumper on a terminal strip PORT_START("COIN") @@ -142,59 +145,57 @@ static INPUT_PORTS_START( flicker ) PORT_CONFSETTING( 0x20, DEF_STR(1C_6C)) PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_COIN1) PORT_CHANGED_MEMBER(DEVICE_SELF, flicker_state, test_changed, 0) - PORT_START("SWITCH.0") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Left Lane Target") PORT_CODE(KEYCODE_W) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("\"/B\" Target") PORT_CODE(KEYCODE_E) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Left Lane 1000") PORT_CODE(KEYCODE_R) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("\"/A\" Target") PORT_CODE(KEYCODE_Y) + PORT_START("X0") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Left Lane Target") PORT_CODE(KEYCODE_A) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("\"/B\" Target") PORT_CODE(KEYCODE_B) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Left Lane 1000") PORT_CODE(KEYCODE_C) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("\"/A\" Target") PORT_CODE(KEYCODE_D) - PORT_START("SWITCH.1") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Right Lane Target") PORT_CODE(KEYCODE_U) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("\"/C\" Target") PORT_CODE(KEYCODE_I) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Right Lane 1000") PORT_CODE(KEYCODE_O) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("\"/D\" Target") PORT_CODE(KEYCODE_A) + PORT_START("X1") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Right Lane Target") PORT_CODE(KEYCODE_E) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("\"/C\" Target") PORT_CODE(KEYCODE_F) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Right Lane 1000") PORT_CODE(KEYCODE_G) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("\"/D\" Target") PORT_CODE(KEYCODE_H) - PORT_START("SWITCH.2") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Spinner") PORT_CODE(KEYCODE_S) + PORT_START("X2") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Spinner") PORT_CODE(KEYCODE_I) PORT_BIT(0x0e, IP_ACTIVE_HIGH, IPT_UNUSED) - PORT_START("SWITCH.3") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("10's Target") PORT_CODE(KEYCODE_D) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("100's Target") PORT_CODE(KEYCODE_F) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Pot Bumper") PORT_CODE(KEYCODE_G) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("3000 Hole") PORT_CODE(KEYCODE_H) + PORT_START("X3") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("10's Target") PORT_CODE(KEYCODE_J) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("100's Target") PORT_CODE(KEYCODE_K) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Pot Bumper") PORT_CODE(KEYCODE_L) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("3000 Hole") PORT_CODE(KEYCODE_M) - PORT_START("SWITCH.4") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("1000 Bonus") PORT_CODE(KEYCODE_J) + PORT_START("X4") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("1000 Bonus") PORT_CODE(KEYCODE_N) PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_UNUSED) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("500 Targets") PORT_CODE(KEYCODE_K) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Out Hole") PORT_CODE(KEYCODE_X) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("500 Targets") PORT_CODE(KEYCODE_O) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Out Hole") PORT_CODE(KEYCODE_X) - PORT_START("SWITCH.5") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Left 500 Out") PORT_CODE(KEYCODE_L) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Left Bumper") PORT_CODE(KEYCODE_Z) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Right 500 Out") PORT_CODE(KEYCODE_C) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Right Bumper") PORT_CODE(KEYCODE_V) + PORT_START("X5") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Left 500 Out") PORT_CODE(KEYCODE_P) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Left Sling") PORT_CODE(KEYCODE_Q) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Right 500 Out") PORT_CODE(KEYCODE_R) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Right Sling") PORT_CODE(KEYCODE_S) - PORT_START("SWITCH.6") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("\"A\" Target") PORT_CODE(KEYCODE_B) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("\"B\" Target") PORT_CODE(KEYCODE_N) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("\"C\" Target") PORT_CODE(KEYCODE_M) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("\"D\" Target") PORT_CODE(KEYCODE_COMMA) + PORT_START("X6") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("\"A\" Target") PORT_CODE(KEYCODE_T) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("\"B\" Target") PORT_CODE(KEYCODE_U) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("\"C\" Target") PORT_CODE(KEYCODE_V) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("\"D\" Target") PORT_CODE(KEYCODE_W) - PORT_START("SWITCH.7") - PORT_BIT(0x0f, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_START("X7") - PORT_START("SWITCH.8") - PORT_BIT(0x0f, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_START("X8") - PORT_START("SWITCH.9") + PORT_START("X9") PORT_CONFNAME(0x01, 0x00, "Balls") PORT_CONFSETTING( 0x00, "3") PORT_CONFSETTING( 0x01, "5") PORT_BIT(0x0e, IP_ACTIVE_HIGH, IPT_UNUSED) - PORT_START("SWITCH.A") + PORT_START("X10") PORT_CONFNAME(0x01, 0x00, "Straight") PORT_CONFSETTING( 0x00, DEF_STR(Off)) PORT_CONFSETTING( 0x01, DEF_STR(On)) @@ -208,7 +209,7 @@ static INPUT_PORTS_START( flicker ) PORT_CONFSETTING( 0x00, DEF_STR(Off)) PORT_CONFSETTING( 0x08, DEF_STR(On)) - PORT_START("SWITCH.B") + PORT_START("X11") PORT_CONFNAME(0x01, 0x00, "15K") PORT_CONFSETTING( 0x00, DEF_STR(Off)) PORT_CONFSETTING( 0x01, DEF_STR(On)) @@ -222,7 +223,7 @@ static INPUT_PORTS_START( flicker ) PORT_CONFSETTING( 0x00, DEF_STR(Off)) PORT_CONFSETTING( 0x08, DEF_STR(On)) - PORT_START("SWITCH.C") + PORT_START("X12") PORT_CONFNAME(0x01, 0x00, "35K") PORT_CONFSETTING( 0x00, DEF_STR(Off)) PORT_CONFSETTING( 0x01, DEF_STR(On)) @@ -236,7 +237,7 @@ static INPUT_PORTS_START( flicker ) PORT_CONFSETTING( 0x00, DEF_STR(Off)) PORT_CONFSETTING( 0x08, DEF_STR(On)) - PORT_START("SWITCH.D") + PORT_START("X13") PORT_CONFNAME(0x01, 0x00, "55K") PORT_CONFSETTING( 0x00, DEF_STR(Off)) PORT_CONFSETTING( 0x01, DEF_STR(On)) @@ -250,7 +251,7 @@ static INPUT_PORTS_START( flicker ) PORT_CONFSETTING( 0x00, DEF_STR(Off)) PORT_CONFSETTING( 0x08, DEF_STR(On)) - PORT_START("SWITCH.E") + PORT_START("X14") PORT_CONFNAME(0x01, 0x00, "75K") PORT_CONFSETTING( 0x00, DEF_STR(Off)) PORT_CONFSETTING( 0x01, DEF_STR(On)) @@ -264,7 +265,7 @@ static INPUT_PORTS_START( flicker ) PORT_CONFSETTING( 0x00, DEF_STR(Off)) PORT_CONFSETTING( 0x08, DEF_STR(On)) - PORT_START("SWITCH.F") + PORT_START("X15") PORT_CONFNAME(0x01, 0x00, "95K") PORT_CONFSETTING( 0x00, DEF_STR(Off)) PORT_CONFSETTING( 0x01, DEF_STR(On)) @@ -299,6 +300,7 @@ WRITE_LINE_MEMBER(flicker_state::cm_ram1_w) { "lamp_800", "lamp_900", nullptr, nullptr }, { "lamp_point_00", "lamp_1000", "lamp_2000", "lamp_3000" }, { "lamp_4000", "lamp_5000", "lamp_6000", "lamp_7000" }, + { "lamp_8000", "lamp_9000", "lamp_10000", nullptr }, { "lamp_dummy_zero", "lamp_game_over", "lamp_tilt", "lamp_same_player_shoots" }, { "lamp_1_up", "lamp_2_up", "lamp_one_player", "lamp_two_player" } }; @@ -316,6 +318,8 @@ WRITE_LINE_MEMBER(flicker_state::cm_ram1_w) output().set_value(lamp_matrix[m_mux_col][2], BIT(m_rom1_output, 2)); if (lamp_matrix[m_mux_col][3]) output().set_value(lamp_matrix[m_mux_col][3], BIT(m_rom1_output, 3)); + for (u8 i = 0; i < 4; i++) + m_io_outputs[16U+m_mux_col*4U+i] = BIT(m_rom1_output, i); } if (0x0c == m_mux_col) { @@ -331,20 +335,25 @@ WRITE_LINE_MEMBER(flicker_state::cm_ram2_w) { if (!m_cm_ram2 && !state && (m_relay_drive != m_ram0_output)) { + for (u8 i = 0; i < 16; i++) + m_io_outputs[i] = (i == m_ram0_output); + // The coin outputs (A and B) aren't used switch (m_relay_drive = m_ram0_output) { case 0x01: // 10 chime - m_samples->start(1, 1); + m_samples->start(3, 3); break; case 0x02: // 100 chime m_samples->start(2, 2); break; case 0x03: // 1000 chime - m_samples->start(3, 3); + m_samples->start(1, 1); + break; + case 0x04: // left sling + case 0x05: // right sling + m_samples->start(0, 7); break; - case 0x04: // left bumper - case 0x05: // right bumper case 0x06: // pot bumper m_samples->start(0, 0); break; @@ -385,6 +394,7 @@ INPUT_CHANGED_MEMBER(flicker_state::test_changed) void flicker_state::driver_start() { m_digits.resolve(); + m_io_outputs.resolve(); save_item(NAME(m_cm_ram1)); save_item(NAME(m_cm_ram2)); diff --git a/src/mame/layout/flicker.lay b/src/mame/layout/flicker.lay index 167270732dd..9b9513e0bc3 100644 --- a/src/mame/layout/flicker.lay +++ b/src/mame/layout/flicker.lay @@ -14,8 +14,8 @@ copyright-holders:Robbbert - - + + @@ -72,7 +72,7 @@ copyright-holders:Robbbert - - + +