mirror of
https://github.com/holub/mame
synced 2025-06-20 19:26:42 +03:00
Merge pull request #1192 from ajrhacker/sengokmj_inputs
sengokmj: Input mappings refined based on examination of program code
This commit is contained in:
commit
d67c221ebd
@ -344,7 +344,7 @@ void sengokmj_state::machine_start()
|
||||
/* Multiplexer device for the mahjong panel */
|
||||
READ16_MEMBER(sengokmj_state::mahjong_panel_r)
|
||||
{
|
||||
const char *const mpnames[] = { "KEY0", "KEY1", "KEY2", "KEY3", "KEY4", "UNUSED" };
|
||||
const char *const mpnames[] = { "KEY0", "KEY1", "KEY2", "KEY3", "KEY4", "KEY5" };
|
||||
int i;
|
||||
UINT16 res = 0xffff;
|
||||
|
||||
@ -405,7 +405,7 @@ static ADDRESS_MAP_START( sengokmj_io_map, AS_IO, 16, sengokmj_state )
|
||||
// AM_RANGE(0x8100, 0x8101) AM_WRITENOP // always 0
|
||||
AM_RANGE(0x8180, 0x8181) AM_WRITE(out_w)
|
||||
AM_RANGE(0x8140, 0x8141) AM_WRITE(mahjong_panel_w)
|
||||
AM_RANGE(0xc000, 0xc001) AM_READ_PORT("DSW1")
|
||||
AM_RANGE(0xc000, 0xc001) AM_READ_PORT("DSW")
|
||||
AM_RANGE(0xc002, 0xc003) AM_READ(mahjong_panel_r)
|
||||
AM_RANGE(0xc004, 0xc005) AM_READ(system_r) //switches
|
||||
ADDRESS_MAP_END
|
||||
@ -414,7 +414,7 @@ ADDRESS_MAP_END
|
||||
static INPUT_PORTS_START( sengokmj )
|
||||
SEIBU_COIN_INPUTS /* coin inputs read through sound cpu */
|
||||
|
||||
PORT_START("DSW1")
|
||||
PORT_START("DSW") // Names and locations from service mode
|
||||
PORT_DIPNAME( 0x0001, 0x0000, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:1")
|
||||
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
@ -432,92 +432,84 @@ static INPUT_PORTS_START( sengokmj )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPUNUSED_DIPLOC( 0x0020, 0x0020, "SW1:6" )
|
||||
PORT_DIPNAME( 0x0040, 0x0040, "Out Sw" ) PORT_DIPLOCATION("SW1:7")
|
||||
PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) // One of these probably selects coins
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) // The other probably selects tickets
|
||||
PORT_DIPNAME( 0x0080, 0x0000, "Hopper" ) PORT_DIPLOCATION("SW1:8") //game gives hopper error with this off.
|
||||
PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_DIPUNUSED_DIPLOC( 0x0100, 0x0100, "SW2:1" )
|
||||
PORT_DIPUNUSED_DIPLOC( 0x0200, 0x0200, "SW2:2" )
|
||||
PORT_DIPUNUSED_DIPLOC( 0x0400, 0x0400, "SW2:3" )
|
||||
PORT_DIPUNUSED_DIPLOC( 0x0800, 0x0800, "SW2:4" )
|
||||
PORT_DIPUNUSED_DIPLOC( 0x1000, 0x1000, "SW2:5" )
|
||||
PORT_DIPUNUSED_DIPLOC( 0x2000, 0x2000, "SW2:6" )
|
||||
PORT_DIPUNUSED_DIPLOC( 0x4000, 0x4000, "SW2:7" )
|
||||
PORT_DIPUNUSED_DIPLOC( 0x8000, 0x8000, "SW2:8" )
|
||||
|
||||
PORT_START("KEY0")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_A )
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_E )
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_I )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_M )
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_KAN )
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START1 )
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_A ) // Internal code 0F0h
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_E ) // Internal code 0F4h
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_I ) // Internal code 0F8h
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_M ) // Internal code 0FCh
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) // Internal code 3h
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START1 ) // Internal code 0Ah
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Bet 2") PORT_CODE(KEYCODE_4) // Internal code 0FFFFh; ignored in service mode but probably does something
|
||||
PORT_BIT( 0xff80, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("KEY1")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_B )
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_F )
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_J )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_N )
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_REACH )
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_MAHJONG_BET )
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_B ) // Internal code 0F1h
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_F ) // Internal code 0F5h
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_J ) // Internal code 0F9h
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_N ) // Internal code 0FBh
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) // Internal code 0Bh
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) // Internal code 9h
|
||||
PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("KEY2")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_C )
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_G )
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_K )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_CHI )
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_RON )
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_C ) // Internal code 0F2h
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_G ) // Internal code 0F6h
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_K ) // Internal code 0FAh
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) // Internal code 1h
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) // Internal code 0Ch
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("KEY3")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_D )
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_H )
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_L )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_PON )
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_D ) // Internal code 0F3h
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_H ) // Internal code 0F7h
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_L ) // Internal code 0FBh
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) // Internal code 2h
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) // Internal code 6h; not shown in service mode and probably does nothing
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("KEY4")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE )
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE )
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP )
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE ) // Internal code 4h
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE ) // Internal code 8h
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP ) // Internal code 7h
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Show Checksum") PORT_CODE(KEYCODE_X) // Internal code 5h; not shown in service mode but certainly does something
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("KEY5")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("UNUSED")
|
||||
PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("SYSTEM")
|
||||
PORT_DIPNAME( 0x0001, 0x0001, "Door" )
|
||||
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_SERVICE( 0x0002, IP_ACTIVE_LOW )
|
||||
PORT_DIPNAME( 0x0004, 0x0004, "Opt. 1st" )
|
||||
PORT_DIPSETTING( 0x0004, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0008, 0x0008, "Reset" )
|
||||
PORT_DIPSETTING( 0x0008, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0020, 0x0020, "Cash" )
|
||||
PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
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( 0x0010, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_NAME("Cash") // Only used in service mode?
|
||||
// 0x40 Hopper
|
||||
PORT_DIPNAME( 0x0080, 0x0080, "Meter" )
|
||||
PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Meter")
|
||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user