diff options
author | 2016-10-06 15:06:00 +0200 | |
---|---|---|
committer | 2016-10-06 15:07:09 +0200 | |
commit | 38d6d6ace413ffbbc8f3ae3bf5ff8a9fc80537c7 (patch) | |
tree | 88998a68d15e51a41c2348527dc648e7a8c880aa | |
parent | d3228d98e485eae24c446d7e237e67348e64ec81 (diff) |
Added mahjong panel to mjsenpu.
This kind of arrangement is standard, imho it could be shorthanded or device-ized, pending further investigation.
-rw-r--r-- | src/mame/drivers/cischeat.cpp | 4 | ||||
-rw-r--r-- | src/mame/drivers/mjsenpu.cpp | 59 |
2 files changed, 46 insertions, 17 deletions
diff --git a/src/mame/drivers/cischeat.cpp b/src/mame/drivers/cischeat.cpp index 367fb104925..50c2a04b9bb 100644 --- a/src/mame/drivers/cischeat.cpp +++ b/src/mame/drivers/cischeat.cpp @@ -363,7 +363,7 @@ READ16_MEMBER(cischeat_state::wildplt_xy_r) return 0xffff; } -// buttons & sensors are +// buttons & sensors are muxed. bit 0 routes to coin chute (single according to test mode) READ16_MEMBER(cischeat_state::wildplt_mux_r) { UINT16 split_in = 0xffff; @@ -409,7 +409,7 @@ static ADDRESS_MAP_START( wildplt_map, AS_PROGRAM, 16, cischeat_state ) AM_RANGE(0x090000, 0x097fff) AM_RAM AM_SHARE("share2") // Sharedram with sub CPU#2 AM_RANGE(0x098000, 0x09ffff) AM_RAM AM_SHARE("share1") // Sharedram with sub CPU#1 - + /* Only writes to the first 0x40000 bytes affect the tilemaps: */ /* either these games support larger tilemaps or have more ram than needed */ AM_RANGE(0x0a0000, 0x0a7fff) AM_RAM_DEVWRITE("scroll0", megasys1_tilemap_device, write) AM_SHARE("scroll0") // Scroll ram 0 diff --git a/src/mame/drivers/mjsenpu.cpp b/src/mame/drivers/mjsenpu.cpp index da8c82d1125..1aa9d03af34 100644 --- a/src/mame/drivers/mjsenpu.cpp +++ b/src/mame/drivers/mjsenpu.cpp @@ -234,28 +234,56 @@ ADDRESS_MAP_END static INPUT_PORTS_START( mjsenpu ) PORT_START("MUX_8F") // in joystick mode? - PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_START1 ) // or button1? seems to have multiple uses - PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) - PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) - PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) - PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) - PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x00000080, IP_ACTIVE_LOW, IPT_BUTTON3 ) + PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSW3",0x08,EQUALS,0x00) + PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_CONDITION("DSW3",0x08,EQUALS,0x00) + PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_CONDITION("DSW3",0x08,EQUALS,0x00) + PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_CONDITION("DSW3",0x08,EQUALS,0x00) + PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_CONDITION("DSW3",0x08,EQUALS,0x00) + PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CONDITION("DSW3",0x08,EQUALS,0x00) + PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION("DSW3",0x08,EQUALS,0x00) + PORT_BIT( 0x00000080, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CONDITION("DSW3",0x08,EQUALS,0x00) + PORT_BIT( 0x000000ff, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08) PORT_BIT( 0xffffff00, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("MUX_9E") - PORT_BIT( 0xffffffff, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_I ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_M ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08) + PORT_BIT( 0x0000003f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW3",0x08,EQUALS,0x00) + PORT_BIT( 0xffffffc0, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("MUX_9D") - PORT_BIT( 0xffffffff, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_B ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_F ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_J ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_N ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08) + PORT_BIT( 0x0000003f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW3",0x08,EQUALS,0x00) + PORT_BIT( 0xffffffc0, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("MUX_9B") - PORT_BIT( 0xffffffff, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_C ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_G ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_K ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08) + PORT_BIT( 0x0000003f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW3",0x08,EQUALS,0x00) + PORT_BIT( 0xffffffc0, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("MUX_97") - PORT_BIT( 0xffffffff, IP_ACTIVE_LOW, IPT_UNKNOWN ) - + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_D ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_H ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_L ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW3",0x08,EQUALS,0x08) + PORT_BIT( 0x0000003f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW3",0x08,EQUALS,0x00) + PORT_BIT( 0xffffffc0, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN1") PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_COIN1 ) // or maybe service? @@ -272,7 +300,8 @@ static INPUT_PORTS_START( mjsenpu ) PORT_DIPNAME( 0x00000020, 0x00000020, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x00000020, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) // not on the mahjong panel? used when in Joystick mode + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) PORT_CONDITION("DSW3", 0x08,EQUALS,0x00) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW3", 0x08, EQUALS, 0x08) PORT_DIPNAME( 0x00000080, 0x00000080, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x00000080, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) @@ -337,7 +366,7 @@ static INPUT_PORTS_START( mjsenpu ) PORT_DIPNAME( 0x00000004, 0x00000004, "Symbol 3" ) PORT_DIPSETTING( 0x00000004, "0" ) PORT_DIPSETTING( 0x00000000, "1" ) - PORT_DIPNAME( 0x00000008, 0x00000000, "Control Type" ) + PORT_DIPNAME( 0x00000008, 0x00000008, "Control Type" ) PORT_DIPSETTING( 0x00000008, "Mahjong Panel" ) PORT_DIPSETTING( 0x00000000, "Joystick" ) PORT_DIPNAME( 0x00000010, 0x00000010, "Symbol 5" ) |