From c8d1050110c754df84a53181d4e7cec76a7a616b Mon Sep 17 00:00:00 2001 From: AJR Date: Sun, 7 Aug 2016 21:51:38 -0400 Subject: [PATCH] New core input type: "Memory Reset" - In machines that store their settings and/or bookkeeping logs in some form of non-volatile memory, "Memory Reset" will reset them to some system-provided default. - This replaces all existing inputs named "Memory Reset" and a few simply named "Reset" which are known to do this rather than reboot the system (a confusion to be avoided, though many systems will only acknowledge this input at boot time); others should be checked. - The default key binding (F1) for this new input type is chosen partly to avoid conflicts with those used by gambling/mahjong games which are currently the only systems to use this, though broader use is envisioned. --- src/emu/inpttype.h | 1 + src/emu/ioport.h | 1 + src/mame/drivers/aristmk4.cpp | 2 +- src/mame/drivers/dblcrown.cpp | 2 +- src/mame/drivers/feversoc.cpp | 2 +- src/mame/drivers/hnayayoi.cpp | 4 ++-- src/mame/drivers/hyhoo.cpp | 4 ++-- src/mame/drivers/jangou.cpp | 2 +- src/mame/drivers/lvcards.cpp | 2 +- src/mame/drivers/sengokmj.cpp | 2 +- src/mame/drivers/toaplan2.cpp | 2 +- src/mame/drivers/vroulet.cpp | 2 +- 12 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/emu/inpttype.h b/src/emu/inpttype.h index 605abe0b024..d8258c02605 100644 --- a/src/emu/inpttype.h +++ b/src/emu/inpttype.h @@ -555,6 +555,7 @@ inline void construct_core_types_other(simple_list &typelist) INPUT_PORT_DIGITAL_TYPE( 0, OTHER, SERVICE, "Service", input_seq(KEYCODE_F2) ) INPUT_PORT_DIGITAL_TYPE( 0, OTHER, TILT, "Tilt", input_seq(KEYCODE_T) ) INPUT_PORT_DIGITAL_TYPE( 0, OTHER, INTERLOCK, "Door Interlock", input_seq() ) + INPUT_PORT_DIGITAL_TYPE( 0, OTHER, MEMORY_RESET, "Memory Reset", input_seq(KEYCODE_F1) ) INPUT_PORT_DIGITAL_TYPE( 0, OTHER, VOLUME_DOWN, "Volume Down", input_seq(KEYCODE_MINUS) ) INPUT_PORT_DIGITAL_TYPE( 0, OTHER, VOLUME_UP, "Volume Up", input_seq(KEYCODE_EQUALS) ) } diff --git a/src/emu/ioport.h b/src/emu/ioport.h index 5aba15c94dc..71368f37507 100644 --- a/src/emu/ioport.h +++ b/src/emu/ioport.h @@ -143,6 +143,7 @@ enum ioport_type IPT_SERVICE, IPT_TILT, IPT_INTERLOCK, + IPT_MEMORY_RESET, IPT_VOLUME_UP, IPT_VOLUME_DOWN, IPT_START, // use the numbered start button(s) for coin-ops diff --git a/src/mame/drivers/aristmk4.cpp b/src/mame/drivers/aristmk4.cpp index b752c6b8f9d..203680b20cd 100644 --- a/src/mame/drivers/aristmk4.cpp +++ b/src/mame/drivers/aristmk4.cpp @@ -1198,7 +1198,7 @@ static INPUT_PORTS_START(aristmk4) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_NAME("2-2 UNUSED") PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_NAME("2-3 UNUSED") PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON12 ) PORT_NAME("AUX1") PORT_CODE(KEYCODE_X) // PB5 - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON13 ) PORT_NAME("Memory Reset") PORT_CODE(KEYCODE_C) // PB4 + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_CODE(KEYCODE_C) // PB4 PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON14 ) PORT_NAME("Hopper Test") PORT_CODE(KEYCODE_V) // PB3 PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON15 ) PORT_NAME("Print Data") PORT_CODE(KEYCODE_B) // PB2 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON16 ) PORT_NAME("Clock Init") PORT_CODE(KEYCODE_N) // PB1 diff --git a/src/mame/drivers/dblcrown.cpp b/src/mame/drivers/dblcrown.cpp index d766e0c425d..a251a42dcaa 100644 --- a/src/mame/drivers/dblcrown.cpp +++ b/src/mame/drivers/dblcrown.cpp @@ -387,7 +387,7 @@ ADDRESS_MAP_END static INPUT_PORTS_START( dblcrown ) PORT_START("IN0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Memory Reset") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Credit Reset") PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) PORT_NAME("Note") diff --git a/src/mame/drivers/feversoc.cpp b/src/mame/drivers/feversoc.cpp index 9b4f1132140..e326faf7869 100644 --- a/src/mame/drivers/feversoc.cpp +++ b/src/mame/drivers/feversoc.cpp @@ -255,7 +255,7 @@ static INPUT_PORTS_START( feversoc ) PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Unknown (BTN5)") PORT_CODE(KEYCODE_J) PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Key Out (BTN6)") PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_NAME("Coin Out (BTN7)") - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Reset") + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) INPUT_PORTS_END diff --git a/src/mame/drivers/hnayayoi.cpp b/src/mame/drivers/hnayayoi.cpp index 3afc8c0def9..367484bf395 100644 --- a/src/mame/drivers/hnayayoi.cpp +++ b/src/mame/drivers/hnayayoi.cpp @@ -384,7 +384,7 @@ static INPUT_PORTS_START( hnfubuki ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Analizer") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_NAME("Memory Reset") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) /* "Note" ("Paper Money") = 10 Credits */ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) @@ -448,7 +448,7 @@ static INPUT_PORTS_START( untoucha ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Analizer") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_NAME("Memory Reset") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) /* "Note" ("Paper Money") = 5 or 8 Credits */ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) diff --git a/src/mame/drivers/hyhoo.cpp b/src/mame/drivers/hyhoo.cpp index 9def22372b7..64fcee9eda1 100644 --- a/src/mame/drivers/hyhoo.cpp +++ b/src/mame/drivers/hyhoo.cpp @@ -109,7 +109,7 @@ static INPUT_PORTS_START( hyhoo ) PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, hyhoo_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // NOT USED PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) // SERVICE - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Memory Reset") // MEMORY RESET + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // NOT USED @@ -184,7 +184,7 @@ static INPUT_PORTS_START( hyhoo2 ) PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, hyhoo_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // NOT USED PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) // SERVICE - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Memory Reset") // MEMORY RESET + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // NOT USED diff --git a/src/mame/drivers/jangou.cpp b/src/mame/drivers/jangou.cpp index 64c34ac3cf2..250db8e3d38 100644 --- a/src/mame/drivers/jangou.cpp +++ b/src/mame/drivers/jangou.cpp @@ -763,7 +763,7 @@ static INPUT_PORTS_START( roylcrdn ) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) /* Spare 2 */ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME("Note In") /* Note In */ - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_TOGGLE PORT_CODE(KEYCODE_9) PORT_NAME("Memory Reset") /* Memory Reset */ + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_TOGGLE PORT_CODE(KEYCODE_9) /* Memory Reset */ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_TOGGLE PORT_CODE(KEYCODE_0) PORT_NAME("Analyzer") /* Analyzer */ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_TOGGLE PORT_CODE(KEYCODE_F2) PORT_NAME("Test Mode") /* Test Mode */ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("Coin In") /* Coin In */ diff --git a/src/mame/drivers/lvcards.cpp b/src/mame/drivers/lvcards.cpp index 48225a4cc78..2d855815cdd 100644 --- a/src/mame/drivers/lvcards.cpp +++ b/src/mame/drivers/lvcards.cpp @@ -272,7 +272,7 @@ static INPUT_PORTS_START( lvpoker ) PORT_START("IN0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Analyzer") PORT_TOGGLE PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_MINUS) PORT_NAME("Memory Reset") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_CODE(KEYCODE_MINUS) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Clear Stats") PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_EQUALS) PORT_NAME("Hopper Reset") diff --git a/src/mame/drivers/sengokmj.cpp b/src/mame/drivers/sengokmj.cpp index 007b5fe7786..8f3666fa763 100644 --- a/src/mame/drivers/sengokmj.cpp +++ b/src/mame/drivers/sengokmj.cpp @@ -505,7 +505,7 @@ static INPUT_PORTS_START( sengokmj ) PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_GAMBLE_DOOR ) // Only used in service mode? PORT_SERVICE_NO_TOGGLE( 0x0002, IP_ACTIVE_LOW ) PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE4 ) PORT_NAME("Opt. 1st") // Only used in service mode? - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Reset") + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_NAME("Cash") // Only used in service mode? // 0x40 Hopper diff --git a/src/mame/drivers/toaplan2.cpp b/src/mame/drivers/toaplan2.cpp index 084b7236212..afcee286591 100644 --- a/src/mame/drivers/toaplan2.cpp +++ b/src/mame/drivers/toaplan2.cpp @@ -2409,7 +2409,7 @@ static INPUT_PORTS_START( pwrkick ) PORT_SERVICE( 0x02, IP_ACTIVE_HIGH ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Down Button") PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, toaplan2_state, pwrkick_hopper_status_r, nullptr) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SERVICE3 ) PORT_NAME("Memory Reset") + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_MEMORY_RESET ) PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x20, DEF_STR( On ) ) diff --git a/src/mame/drivers/vroulet.cpp b/src/mame/drivers/vroulet.cpp index dcbf7a37c29..1d7f9da46c8 100644 --- a/src/mame/drivers/vroulet.cpp +++ b/src/mame/drivers/vroulet.cpp @@ -167,7 +167,7 @@ static INPUT_PORTS_START( vroulet ) PORT_START("IN0") PORT_SERVICE( 0x01, IP_ACTIVE_LOW ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_TILT ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_F1) PORT_NAME("Memory Reset") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_NAME("Reset Machine") PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )