From 84d486ecc9ce05897058999db3aca1e1d1534f85 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Sat, 25 Nov 2023 21:32:35 +0100 Subject: [PATCH] bmc/bmcpokr.cpp: identified controller selection dip for fengyunh and shendeng [dyq] --- src/mame/bmc/bmcpokr.cpp | 79 ++++++++++++++++++++++++++++++---- src/mame/galaxian/galaxian.cpp | 10 ++--- 2 files changed, 76 insertions(+), 13 deletions(-) diff --git a/src/mame/bmc/bmcpokr.cpp b/src/mame/bmc/bmcpokr.cpp index 7ca3f0e29eb..3048e31e04b 100644 --- a/src/mame/bmc/bmcpokr.cpp +++ b/src/mame/bmc/bmcpokr.cpp @@ -829,9 +829,68 @@ static INPUT_PORTS_START( mjmaglmp ) INPUT_PORTS_END static INPUT_PORTS_START( fengyunh ) - PORT_INCLUDE(mjmaglmp) + PORT_START("INPUTS") + // Joystick controls: + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSW3",0x01,EQUALS,0x00) // START + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_CONDITION("DSW3",0x01,EQUALS,0x00) // UP + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_CONDITION("DSW3",0x01,EQUALS,0x00) // DOWN + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_CONDITION("DSW3",0x01,EQUALS,0x00) // LEFT + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_CONDITION("DSW3",0x01,EQUALS,0x00) // RIGHT + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CONDITION("DSW3",0x01,EQUALS,0x00) // 1P E1 (select) - PORT_MODIFY("DSW1") + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_COIN2 ) // NOTE + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) // KEY DOWN + PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Pay Out") PORT_CODE(KEYCODE_O) // PAY + PORT_BIT( 0x0200, IP_ACTIVE_HIGH,IPT_CUSTOM ) PORT_READ_LINE_MEMBER(bmcpokr_state, hopper_r) // HOPPER + PORT_SERVICE_NO_TOGGLE( 0x0400, IP_ACTIVE_LOW ) // ACCOUNT + PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Reset") // RESET + PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // (unused) + PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION("DSW3",0x01,EQUALS,0x00) // 1P E2 (bet) + PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CONDITION("DSW3",0x01,EQUALS,0x00) // 1P E3 (select) + PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN + + PORT_START("KEY1") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) PORT_CONDITION("DSW3",0x01,EQUALS,0x01) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) PORT_CONDITION("DSW3",0x01,EQUALS,0x01) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_I ) PORT_CONDITION("DSW3",0x01,EQUALS,0x01) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_M ) PORT_CONDITION("DSW3",0x01,EQUALS,0x01) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) PORT_CONDITION("DSW3",0x01,EQUALS,0x01) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSW3",0x01,EQUALS,0x01) + + PORT_START("KEY2") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_B ) PORT_CONDITION("DSW3",0x01,EQUALS,0x01) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_F ) PORT_CONDITION("DSW3",0x01,EQUALS,0x01) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_J ) PORT_CONDITION("DSW3",0x01,EQUALS,0x01) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_N ) PORT_CONDITION("DSW3",0x01,EQUALS,0x01) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) PORT_CONDITION("DSW3",0x01,EQUALS,0x01) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) PORT_CONDITION("DSW3",0x01,EQUALS,0x01) + + PORT_START("KEY3") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_C ) PORT_CONDITION("DSW3",0x01,EQUALS,0x01) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_G ) PORT_CONDITION("DSW3",0x01,EQUALS,0x01) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_K ) PORT_CONDITION("DSW3",0x01,EQUALS,0x01) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) PORT_CONDITION("DSW3",0x01,EQUALS,0x01) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) PORT_CONDITION("DSW3",0x01,EQUALS,0x01) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW3",0x01,EQUALS,0x01) + + PORT_START("KEY4") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_D ) PORT_CONDITION("DSW3",0x01,EQUALS,0x01) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_H ) PORT_CONDITION("DSW3",0x01,EQUALS,0x01) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_L ) PORT_CONDITION("DSW3",0x01,EQUALS,0x01) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) PORT_CONDITION("DSW3",0x01,EQUALS,0x01) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW3",0x01,EQUALS,0x01) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW3",0x01,EQUALS,0x01) + + PORT_START("KEY5") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW3",0x01,EQUALS,0x01) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE ) PORT_CONDITION("DSW3",0x01,EQUALS,0x01) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP) PORT_CONDITION("DSW3",0x01,EQUALS,0x01) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW3",0x01,EQUALS,0x01) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_BIG ) PORT_CONDITION("DSW3",0x01,EQUALS,0x01) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) PORT_CONDITION("DSW3",0x01,EQUALS,0x01) + + + PORT_START("DSW1") PORT_DIPNAME( 0x01, 0x01, "Max Bet" ) PORT_DIPLOCATION("DIP4:1") // 最大押分 PORT_DIPSETTING( 0x01, "10" ) PORT_DIPSETTING( 0x00, "20" ) @@ -854,7 +913,7 @@ static INPUT_PORTS_START( fengyunh ) PORT_DIPSETTING( 0x80, "Numbers" ) // 數字 (Arabic numerals) PORT_DIPSETTING( 0x00, "Circle Tiles" ) // 筒子 (tong mahjong tiles representing digits) - PORT_MODIFY("DSW2") + PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x03, "Pay-Out Rate" ) PORT_DIPLOCATION("DIP3:1,2") // 遊戲機率 PORT_DIPSETTING( 0x02, "75" ) PORT_DIPSETTING( 0x01, "78" ) @@ -873,8 +932,10 @@ static INPUT_PORTS_START( fengyunh ) PORT_DIPSETTING( 0xc0, "2000" ) PORT_DIPSETTING( 0x00, "3000" ) - PORT_MODIFY("DSW3") - PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x01, "DIP2:1" ) // not displayed in test mode + PORT_START("DSW3") + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Controls ) ) PORT_DIPLOCATION("DIP2:1") // not displayed in test mode + PORT_DIPSETTING( 0x01, "Keyboard" ) + PORT_DIPSETTING( 0x00, DEF_STR( Joystick ) ) PORT_DIPNAME( 0x02, 0x02, "Key-In Limit" ) PORT_DIPLOCATION("DIP2:2") // 開分限制 PORT_DIPSETTING( 0x02, "1000" ) PORT_DIPSETTING( 0x00, "5000" ) @@ -893,7 +954,7 @@ static INPUT_PORTS_START( fengyunh ) PORT_DIPSETTING( 0x00, "50" ) PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DIP2:8" ) // not displayed in test mode - PORT_MODIFY("DSW4") + PORT_START("DSW4") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DIP1:1") // not displayed in test mode PORT_DIPSETTING( 0x01, DEF_STR( No ) ) PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) @@ -926,7 +987,7 @@ static INPUT_PORTS_START( fengyunh ) INPUT_PORTS_END static INPUT_PORTS_START( shendeng ) - PORT_INCLUDE(mjmaglmp) + PORT_INCLUDE(fengyunh) PORT_MODIFY("DSW1") PORT_DIPNAME( 0x01, 0x01, "Max Bet" ) PORT_DIPLOCATION("DIP4:1") // 最大押分 @@ -971,7 +1032,9 @@ static INPUT_PORTS_START( shendeng ) PORT_DIPSETTING( 0x00, "3000" ) PORT_MODIFY("DSW3") - PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x01, "DIP2:1" ) // not displayed in test mode + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Controls ) ) PORT_DIPLOCATION("DIP2:1") // not displayed in test mode + PORT_DIPSETTING( 0x01, "Keyboard" ) + PORT_DIPSETTING( 0x00, DEF_STR( Joystick ) ) PORT_DIPNAME( 0x02, 0x02, "Key-In Limit" ) PORT_DIPLOCATION("DIP2:2") // 開分限制 PORT_DIPSETTING( 0x02, "1000" ) PORT_DIPSETTING( 0x00, "5000" ) diff --git a/src/mame/galaxian/galaxian.cpp b/src/mame/galaxian/galaxian.cpp index fb91e88533e..d694cc005b3 100644 --- a/src/mame/galaxian/galaxian.cpp +++ b/src/mame/galaxian/galaxian.cpp @@ -8747,7 +8747,7 @@ void galaxian_state::init_highroll() { uint8_t x = rom[i]; - switch(i & 0x03) + switch (i & 0x03) { case 0x000: x = bitswap<8>(x, 1, 6, 7, 4, 5, 2, 3, 0); break; case 0x001: x = bitswap<8>(x, 5, 6, 3, 4, 1, 2, 7, 0); break; @@ -8762,7 +8762,7 @@ void galaxian_state::init_highroll() { uint8_t x = rom[i]; - switch(i & 0x01) + switch (i & 0x01) { case 0x000: x = bitswap<8>(x, 3, 6, 1, 4, 5, 2, 7, 0); break; case 0x001: x = bitswap<8>(x, 1, 6, 7, 4, 3, 2, 5, 0); break; @@ -9522,13 +9522,13 @@ void galaxian_state::init_crazym() { init_nolock(); - m_extend_sprite_info_ptr = extend_sprite_info_delegate(&bagmanmc_state::upper_extend_sprite_info, this); + m_extend_sprite_info_ptr = extend_sprite_info_delegate(&galaxian_state::upper_extend_sprite_info, this); uint8_t *rom = memregion("maincpu")->base(); for (int i = 0; i < 0x4000; i++) { - switch(rom[i] & 0x38) + switch (rom[i] & 0x38) { case 0x00: (i & 0x01) ? rom[i] ^= 0x30 : rom[i] ^= 0x20; break; case 0x08: (i & 0x01) ? rom[i] ^= 0x30 : rom[i] ^= 0x08; break; @@ -16328,7 +16328,7 @@ GAME( 1981, pacmanblc, puckman, pacmanbl, pacmanbl, galaxian_state, init_ GAME( 1981, pacmanblci, puckman, pacmanbl, pacmanbl, galaxian_state, init_pacmanbl, ROT270, "bootleg (Cirsa)", "Pac-Man (Cirsa, Spanish bootleg on Galaxian hardware)", MACHINE_SUPPORTS_SAVE ) GAME( 199?, komemokos, puckman, pacmanbl, pacmanbl, galaxian_state, init_pacmanbl, ROT270, "hack", "Komemokos (hack of 'Pac-Man (Cirsa, Spanish bootleg)')", MACHINE_SUPPORTS_SAVE ) GAME( 1981, pacmanblv, puckman, pacmanbl, pacmanbl, galaxian_state, init_pacmanbl, ROT270, "bootleg (Video Dens)", "Pac-Man (Video Dens, Spanish bootleg on Galaxian hardware)", MACHINE_SUPPORTS_SAVE ) -GAME( 1982, crazym, puckman, galaxian, pacmanblb, galaxian_state, init_crazym, ROT90, "bootleg (GAT)", "Crazy Mazey", MACHINE_SUPPORTS_SAVE ) +GAME( 1982, crazym, puckman, galaxian, pacmanblb, galaxian_state, init_crazym, ROT90, "bootleg (Game-A-Tron)", "Crazy Mazey", MACHINE_SUPPORTS_SAVE ) GAME( 1981, ghostmun, puckman, pacmanbl, streakng, galaxian_state, init_ghostmun, ROT90, "bootleg (Leisure and Allied)", "Ghost Muncher", MACHINE_SUPPORTS_SAVE ) GAME( 1981, phoenxp2, phoenix, pisces, phoenxp2, pisces_state, init_batman2, ROT270, "bootleg", "Phoenix Part 2", MACHINE_SUPPORTS_SAVE ) GAME( 1981, batman2, phoenix, pisces, batman2, pisces_state, init_batman2, ROT270, "bootleg", "Batman Part 2", MACHINE_SUPPORTS_SAVE ) // Similar to pisces, but with different video banking characteristics