summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2025-08-22 05:28:47 +1000
committer Vas Crabb <vas@vastheman.com>2025-08-22 05:28:47 +1000
commita03e2a862af61533fa640c1a8d64874845d10f5d (patch)
treec897428f0e5bafbaeae5140ae8a6b1140d71c897
parentaa4fc93b6634d81ae91dffe85f9961d62c215d17 (diff)
igs/igs_m027.cpp: Better I/O for cjsxp.
* Added key-in/key-out inputs and counters used in fruit machine mode. * Identified some more DIP switches.
-rw-r--r--src/mame/igs/igs_m027.cpp57
1 files changed, 33 insertions, 24 deletions
diff --git a/src/mame/igs/igs_m027.cpp b/src/mame/igs/igs_m027.cpp
index feb202a4a57..71fc8946fa1 100644
--- a/src/mame/igs/igs_m027.cpp
+++ b/src/mame/igs/igs_m027.cpp
@@ -1896,7 +1896,6 @@ INPUT_PORTS_END
INPUT_PORTS_START( cjsxp )
// preliminary
// input test and settings display are not working so everything is guessed
- // DIP switch locations may be completely wrong
PORT_START("PORTB")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -1905,24 +1904,26 @@ INPUT_PORTS_START( cjsxp )
PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01) PORT_NAME("Hold 1 / Show Odds")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) PORT_CONDITION("DSW2", 0x01, EQUALS, 0x01)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x00) PORT_NAME("Small")
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x00)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x00)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x00)
PORT_START("PORTC")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01) PORT_NAME("Small / Double Up (half)")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01) PORT_NAME("Low / Double Up (half)")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x00)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01) PORT_NAME("Bet / Double Up")
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01) PORT_NAME("Hold 5 / Big / Double Up (double)")
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01) PORT_NAME("Hold 5 / High / Double Up (double)")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01) PORT_NAME("Start / Take Score")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x00) PORT_NAME("Start / Take Score")
PORT_BIT( 0x18, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x00)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(hopper_device::line_r))
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x00)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x00)
PORT_START("PLAYER")
@@ -1937,7 +1938,7 @@ INPUT_PORTS_START( cjsxp )
PORT_START("PPIC")
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x00)
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x00) PORT_NAME("Big")
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x00)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x00)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x00) PORT_NAME("Hold 1 / Double Up (half) / Show Odds")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x00)
@@ -1949,42 +1950,50 @@ INPUT_PORTS_START( cjsxp )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_TOGGLE
PORT_START("PPIB")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01) PORT_WRITE_LINE_MEMBER(FUNC(igs_m027_state::counter_w<0>)) // coin
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01) PORT_WRITE_LINE_MEMBER(FUNC(igs_m027_state::counter_w<0>)) // coin/key-in
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01) PORT_WRITE_LINE_DEVICE_MEMBER("hopper", FUNC(hopper_device::motor_w))
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01) PORT_WRITE_LINE_MEMBER(FUNC(igs_m027_state::counter_w<1>)) // payout
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01) PORT_WRITE_LINE_MEMBER(FUNC(igs_m027_state::counter_w<2>)) // payout/key-out
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x00) PORT_WRITE_LINE_MEMBER(FUNC(igs_m027_state::counter_w<1>)) // payout
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x00) PORT_WRITE_LINE_MEMBER(FUNC(igs_m027_state::counter_w<1>)) // key-in
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x00) PORT_WRITE_LINE_MEMBER(FUNC(igs_m027_state::counter_w<2>)) // payout
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x00) PORT_WRITE_LINE_MEMBER(FUNC(igs_m027_state::counter_w<0>)) // coin
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x00) PORT_WRITE_LINE_MEMBER(FUNC(igs_m027_state::counter_w<3>)) // key-out
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x00) PORT_WRITE_LINE_DEVICE_MEMBER("hopper", FUNC(hopper_device::motor_w))
PORT_START("DSW1")
- PORT_DIPNAME( 0x01, 0x01, "Operation Mode" ) PORT_DIPLOCATION("SW1:1")
- PORT_DIPSETTING( 0x01, "Amusement" )
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR(Controls) ) PORT_DIPLOCATION("SW1:1") // 操作面版
+ PORT_DIPSETTING( 0x01, "Amusement" ) // 娱乐
PORT_DIPSETTING( 0x00, "Fruit Machine" )
PORT_DIPNAME( 0x02, 0x02, "Playing Card Display" ) PORT_DIPLOCATION("SW1:2")
PORT_DIPSETTING( 0x02, "Soccer Balls" ) PORT_CONDITION("DSW1", 0x04, EQUALS, 0x04)
PORT_DIPSETTING( 0x00, "Soccer Jerseys" ) PORT_CONDITION("DSW1", 0x04, EQUALS, 0x04)
PORT_DIPSETTING( 0x02, "Playing Cards" ) PORT_CONDITION("DSW1", 0x04, EQUALS, 0x00)
- PORT_DIPSETTING( 0x00, "Numbered Tiles" ) PORT_CONDITION("DSW1", 0x04, EQUALS, 0x00)
+ PORT_DIPSETTING( 0x00, "Tiles" ) PORT_CONDITION("DSW1", 0x04, EQUALS, 0x00)
PORT_DIPNAME( 0x04, 0x04, "Game Title" ) PORT_DIPLOCATION("SW1:3")
PORT_DIPSETTING( 0x04, "Huangpai Zuqiu Plus" ) // 皇牌足球 PLUS (Huángpái Zúqiú Plus) - soccer theme
PORT_DIPSETTING( 0x00, "Chaoji Shuangxing Plus" ) // 超级双星 PLUS (Chāojí Shuāngxīng Plus) - casino theme
- PORT_DIPNAME( 0x08, 0x08, "Double Up Game" ) PORT_DIPLOCATION("SW1:4")
+ PORT_DIPNAME( 0x08, 0x08, "Double Up Game" ) PORT_DIPLOCATION("SW1:4") // 比倍游戏
PORT_DIPSETTING( 0x00, DEF_STR(Off) )
- PORT_DIPSETTING( 0x08, DEF_STR(On) )
- PORT_DIPNAME( 0x10, 0x10, "Double Up Game Name" ) PORT_DIPLOCATION("SW1:5")
+ PORT_DIPSETTING( 0x08, DEF_STR(On) ) // 有
+ PORT_DIPNAME( 0x10, 0x10, "Double Up Game Name" ) PORT_DIPLOCATION("SW1:5") // 比倍续玩
PORT_DIPSETTING( 0x10, "Double Up" ) // 比倍
PORT_DIPSETTING( 0x00, "Continue Play" ) // 续玩
- PORT_DIPNAME( 0x20, 0x20, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("SW1:6")
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("SW1:6") // 示范音乐
PORT_DIPSETTING( 0x00, DEF_STR(Off) )
- PORT_DIPSETTING( 0x20, DEF_STR(On) )
- PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "SW1:7" )
- PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "SW1:8" )
+ PORT_DIPSETTING( 0x20, DEF_STR(On) ) // 有
+ PORT_DIPNAME( 0x40, 0x40, "Face Card Display" ) PORT_DIPLOCATION("SW1:7") // 扑克牌面 (affects balls, jerseys and tiles, but not playing cards)
+ PORT_DIPSETTING( 0x40, "Numbers" ) // 数字 (11, 12, 13, 1)
+ PORT_DIPSETTING( 0x00, "Letters" ) // (J, Q, K, A)
+ PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "SW1:8" ) // 系统破台 (what does this actually do?)
PORT_START("DSW2")
- PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x01, "SW2:1" )
- PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x02, "SW2:2" )
- PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x04, "SW2:3" )
+ PORT_DIPNAME( 0x01, 0x01, "Credit Mode" ) PORT_DIPLOCATION("SW2:1") // 进分方式 (sets coin input function in amusement mode)
+ PORT_DIPSETTING( 0x01, "Coin Acceptor" ) // 投币 (ignores key-in in fruit machine mode)
+ PORT_DIPSETTING( 0x00, "Key-In" ) // 开分 (ignores coin input in fruit machine mode)
+ PORT_DIPNAME( 0x02, 0x02, "Payout Mode" ) PORT_DIPLOCATION("SW2:2") // 退分方式 (sets payout button function in amusement mode)
+ PORT_DIPSETTING( 0x02, "Return Coins" ) // 退币 (uses hopper to pay out credits, ignores key-out in fruit machine mode)
+ PORT_DIPSETTING( 0x00, "Key-Out" ) // 洗分 (just clears credits)
+ PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x04, "SW2:3" ) // remaining DIP switches not shown in test mode
PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "SW2:4" )
PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "SW2:5" )
PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "SW2:6" )
@@ -4505,7 +4514,7 @@ GAME( 2005, cjtljp, 0, xypdk, lhzb4, igs_m027_stat
GAME( 2005, xypdk, 0, xypdk, lhzb4, igs_m027_state, init_xypdk, ROT0, "IGS", "Xingyun Pao De Kuai (V106CN)", 0 )
GAMEL( 2007, tripslot, 0, tripslot, tripslot, igs_m027_state, init_tripslot, ROT0, "IGS", "Triple Slot (V200VE)", 0, layout_tripslot ) // 2007 date in internal ROM at least, could be later, default settings password is all 'start 1'
GAMEL( 2005, ccly, crzybugs, ccly, ccly, igs_m027_state, init_ccly, ROT0, "IGS", "Chong Chong Leyuan (V100CN)", MACHINE_NOT_WORKING, layout_ccly )
-GAME( 2001, cjsxp, 0, cjsxp, cjsxp, igs_m027_state, init_klxyj, ROT0, "IGS", "Huangpai Zuqiu Plus / Chaoji Shuangxing Plus (V103CN)", MACHINE_NOT_WORKING ) // DIP switches, possible additional wiring options
+GAME( 2001, cjsxp, 0, cjsxp, cjsxp, igs_m027_state, init_klxyj, ROT0, "IGS", "Huangpai Zuqiu Plus / Chaoji Shuangxing Plus (V103CN)", MACHINE_NOT_WORKING )
GAME( 2000, tshs, 0, zhongguo, tshs, igs_m027_state, init_slqz3, ROT0, "IGS", "Tiansheng Haoshou (V201CN)", 0 )
GAME( 2000, tshs101, tshs, tshs101, tshs101, igs_m027_state, init_slqz3, ROT0, "IGS", "Tiansheng Haoshou (V101CN)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) // unemulated sound chips
GAME( 2006, tswxp, 0, tct2p, tswxp, igs_m027_state, init_tswxp, ROT0, "IGS", "Taishan Wuxian Jiaqiang Ban (V101CN)", 0 )