From d10f5a71492a7be4a526f85d1dfd230aa7c6754e Mon Sep 17 00:00:00 2001 From: Roberto Fresca Date: Tue, 12 Sep 2023 00:04:25 +0200 Subject: DoraNeko BanBan improvements: - Improved inputs. - Hits microswitches by arm. - Coinage DIP switch. - Test Mode DIP switch. - Proper door, coin-in, & service coin inputs. --- src/mame/misc/katosmedz80.cpp | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/src/mame/misc/katosmedz80.cpp b/src/mame/misc/katosmedz80.cpp index 24478242684..6570b92f498 100644 --- a/src/mame/misc/katosmedz80.cpp +++ b/src/mame/misc/katosmedz80.cpp @@ -166,35 +166,34 @@ void katosmedz80_state::ppi1_c_w(uint8_t data) static INPUT_PORTS_START( dnbanban ) PORT_START("IN0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_1) PORT_NAME("IN0-1") // Arm 1? (related error E1) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_2) PORT_NAME("IN0-2") - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_3) PORT_NAME("IN0-3") // Arm 2? (related error E2) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_4) PORT_NAME("IN0-4") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_5) PORT_NAME("IN0-5") // Arm 3? (related error E3) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_6) PORT_NAME("IN0-6") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_7) PORT_NAME("IN0-7") // Arm 4? (related error E4) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_8) PORT_NAME("IN0-8") + PORT_BIT( 0x55, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // seems the arms sensors... + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD1) PORT_NAME("Hit Arm 1") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD2) PORT_NAME("Hit Arm 2") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_POKER_HOLD3) PORT_NAME("Hit Arm 3") + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_POKER_HOLD4) PORT_NAME("Hit Arm 4") PORT_START("IN1") - // attract/demo sounds are triggered after 40d0-40d1 16bit counter decrements to 0. - // reg at 40d4 stores the triggered sample number. - // turning off, the counter and sample enumerator dissappear. + // Attract/demo sounds are triggered after 40d0-40d1 16bit counter decrements to 0. + // Reg at 40d4 stores the triggered sample counter (4 bits). + // Turning the switch ON (sounds off), both counters dissappear. + PORT_DIPNAME( 0x01, 0x01, "Attract / Demo Sounds" ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x01, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x02, "Test Sounds" ) // LOW = Sound Test + PORT_DIPNAME( 0x02, 0x02, "Test Mode" ) PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) // LOW = 2 Coins - HIGH = 1 Coin - PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x04, 0x04, DEF_STR( Coinage ) ) + PORT_DIPSETTING( 0x04, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) ) // not accessed in game code PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_T) PORT_NAME("Coin In") // COIN IN (related error E5) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Y) PORT_NAME("Service Coin") // Service COIN (related error E6) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_U) PORT_NAME("Door") // DOOR (related error E7) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_I) PORT_NAME("IN1-8") + + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1) PORT_NAME("Coin In") // COIN IN (related error E5) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Service Coin") // Service COIN (related error E6) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_GAMBLE_DOOR ) PORT_NAME("Door Switch") // DOOR (related error E7) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_I) PORT_NAME("IN1-8") // to figure out... INPUT_PORTS_END -- cgit v1.2.3