Skip to content

Commit

Permalink
dynax/ddenlovr.cpp: Fixed mjmyornt inputs, improved hgokou service in…
Browse files Browse the repository at this point in the history
…puts.
  • Loading branch information
cuavas committed Dec 1, 2024
1 parent 02c3f26 commit 31bd17e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 134 deletions.
148 changes: 16 additions & 132 deletions src/mame/dynax/ddenlovr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7718,13 +7718,13 @@ INPUT_PORTS_END
static INPUT_PORTS_START( hgokou )
PORT_START("SYSTEM")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) // pay
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) PORT_TOGGLE
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) // analyzer
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE2 ) // data clear
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // note
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test ))
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // analyzer
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // data clear
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BILL1 ) PORT_CODE(KEYCODE_6) // note
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )

PORT_START("KEY0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_A )
Expand Down Expand Up @@ -7932,53 +7932,15 @@ INPUT_PORTS_END
static INPUT_PORTS_START( mjmyornt )
PORT_START("SYSTEM")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) // pay
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
PORT_SERVICE_NO_TOGGLE(0x04, IP_ACTIVE_LOW)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) // analyzer
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE2 ) // data clear
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // note
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN)

PORT_START("KEY0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) // A
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) // E
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_I ) // I
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_M ) // M
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) // Kan
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) // Start 1

PORT_START("KEY1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_B ) // B
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_F ) // F
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_J ) // J
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_N ) // N
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) // Reach
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) // BET

PORT_START("KEY2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_C ) // C
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_G ) // G
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_K ) // K
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) // Chi
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) // Ron
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) // nothing

PORT_START("KEY3")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_D ) // D
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_H ) // H
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_L ) // L
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) // Pon
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) // nothing
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) // nothing
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // 18B
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_TOGGLE PORT_NAME(DEF_STR( Test )) // Test
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // analyzer
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // data clear
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BILL1 ) PORT_CODE(KEYCODE_6) // note
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 )

PORT_START("KEY4")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE ) // "l"
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE ) // "t"
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP ) // "w"
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_FLIP_FLOP ) // Flip Flop
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_BIG ) // "b"
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) // "s"
PORT_INCLUDE( dynax_mahjong_keys_bet )

PORT_START("DSW1")
PORT_DIPNAME( 0x0f, 0x07, "Pay Out Rate (%)" ) PORT_DIPLOCATION("SW1:1,2,3,4")
Expand Down Expand Up @@ -8221,85 +8183,7 @@ static INPUT_PORTS_START( mjflove )
PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(FUNC(ddenlovr_state::mjflove_blitter_r)) // RTC (bit 5) & blitter irq flag (bit 6)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) // blitter busy flag

PORT_START("KEY0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) // A
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) // E
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_I ) // I
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_M ) // M
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) // Kan
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) // Start 1

PORT_START("KEY1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_B ) // B
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_F ) // F
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_J ) // J
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_N ) // N
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) // Reach
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) // BET

PORT_START("KEY2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_C ) // C
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_G ) // G
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_K ) // K
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) // Chi
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) // Ron
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) // nothing

PORT_START("KEY3")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_D ) // D
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_H ) // H
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_L ) // L
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) // Pon
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) // nothing
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) // nothing

PORT_START("KEY4")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE ) // "l"
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE ) // "t"
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP ) // "w"
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_FLIP_FLOP ) // Flip Flop
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_BIG ) // "b"
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) // "s"

PORT_START("KEY5")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) PORT_PLAYER(2) // A
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) PORT_PLAYER(2) // E
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_I ) PORT_PLAYER(2) // I
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_M ) PORT_PLAYER(2) // M
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) PORT_PLAYER(2) // Kan
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) // Start 2

PORT_START("KEY6")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_B ) PORT_PLAYER(2) // B
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_F ) PORT_PLAYER(2) // F
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_J ) PORT_PLAYER(2) // J
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_N ) PORT_PLAYER(2) // N
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) PORT_PLAYER(2) // Reach
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) PORT_PLAYER(2) // BET

PORT_START("KEY7")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_C ) PORT_PLAYER(2) // C
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_G ) PORT_PLAYER(2) // G
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_K ) PORT_PLAYER(2) // K
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) PORT_PLAYER(2) // Chi
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) PORT_PLAYER(2) // Ron
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) // nothing

PORT_START("KEY8")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_D ) PORT_PLAYER(2) // D
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_H ) PORT_PLAYER(2) // H
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_L ) PORT_PLAYER(2) // L
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) PORT_PLAYER(2) // Pon
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) // nothing
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) // nothing

PORT_START("KEY9")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE ) PORT_PLAYER(2) // "l"
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE ) PORT_PLAYER(2) // "t"
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP ) PORT_PLAYER(2) // "w"
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_FLIP_FLOP ) PORT_PLAYER(2) // Flip Flop
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_BIG ) PORT_PLAYER(2) // "b"
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) PORT_PLAYER(2) // "s"
PORT_INCLUDE( dynax_mahjong_keys_bet )

PORT_START("DSW2") // IN12 - DSW2
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:1,2")
Expand Down
4 changes: 2 additions & 2 deletions src/mame/dynax/dynax.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1623,7 +1623,7 @@ INPUT_PORTS_END
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP ) // "w"

PORT_MODIFY("KEY4")
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNKNOWN )

PORT_MODIFY("KEY5")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE ) PORT_PLAYER(2) // "t"
Expand All @@ -1638,7 +1638,7 @@ INPUT_PORTS_END
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP ) PORT_PLAYER(2) // "w"

PORT_MODIFY("KEY9")
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END
#endif

Expand Down

1 comment on commit 31bd17e

@cuavas
Copy link
Member Author

@cuavas cuavas commented on 31bd17e Dec 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It’s impossible to finish a game in hgokou due to player inputs not working. The gambling control inputs aren’t mapped correctly. Bet should be KEY1 0x20, and take score/double up should be on other keys, too.

If no-one can work out all the inputs and confirm it’s possible to complete a game, including playing the double-up game, it needs to be demoted to not working,.

Please sign in to comment.