summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/igspoker.cpp
diff options
context:
space:
mode:
author Roberto Fresca <robbie@robertofresca.com>2019-09-21 02:15:35 +0200
committer Roberto Fresca <robbie@robertofresca.com>2019-09-21 02:15:35 +0200
commit0137b5f0b913d0bc6e84de7d4a596c5880bef5f1 (patch)
tree9b406bb83dbefba7f75dfbadddf06956ddc59aaa /src/mame/drivers/igspoker.cpp
parent55ef735fb7417af50a77ea18703102278c404c93 (diff)
igspoker.cpp: Workaround to fix the random locks for protection
in the sets cpoker101, cpoker201f and cpoker210ks. [Roberto Fresca] Clones promoted to working -------------------------- Champion Poker (v101) [Roberto Fresca]
Diffstat (limited to 'src/mame/drivers/igspoker.cpp')
-rw-r--r--src/mame/drivers/igspoker.cpp34
1 files changed, 28 insertions, 6 deletions
diff --git a/src/mame/drivers/igspoker.cpp b/src/mame/drivers/igspoker.cpp
index 92a9f1fe0bd..29948e27ee6 100644
--- a/src/mame/drivers/igspoker.cpp
+++ b/src/mame/drivers/igspoker.cpp
@@ -65,7 +65,8 @@ FIX: PK Tetris have an input named AMUSE which I couldn't map. Maybe it is
TODO:
- Sets cpoker & cpokert spit 660K of whatever they have in the hopper when keyout...
-- Check if the cpoker sets lock randomly due to protection.
+- Check if the cpoker sets still lock at some point due to protection.
+- Fix lamps to cpoker101.
*****************************************************************************/
@@ -2141,7 +2142,7 @@ void igspoker_state::init_cpoker300us()
}
}
-void igspoker_state::init_cpokert() // same decryption as cpokert
+void igspoker_state::init_cpokert()
{
uint8_t *rom = memregion("maincpu")->base();
/* decrypt the program ROM */
@@ -2211,6 +2212,27 @@ void igspoker_state::init_cpoker101() // same decryption as cpokert
rom[i] ^= 0x02;
}
}
+
+/* Patch to avoid traps at $0ec5 (cpoker101),
+ $0ef0 (cpoker201f), $0f20 (cpoker210ks) and
+ $206e (cpoker101, cpoker201f & cpoker210ks),
+ that run subs in RAM, operate registers,
+ and finally lock the game at $732e (cpoker101),
+ $72c2 (cpoker201f) & $72c6 (cpoker210ks).
+
+ All these are triggered if RAM contents of $ff18
+ matches the $ff19 (normally 0x20 due to an AND
+ against the $ff1b contents)
+*/
+// this NOP the $0ec5 call...
+ rom[0x214a] = 0x00;
+ rom[0x214b] = 0x00;
+ rom[0x214c] = 0x00;
+
+// this NOP the conditional jump to $206e
+ rom[0x214d] = 0x00;
+ rom[0x214e] = 0x00;
+ rom[0x214f] = 0x00;
}
void igspoker_state::init_cska()
@@ -3003,10 +3025,10 @@ void igspoker_state::init_kungfu()
GAMEL( 1993?,cpoker, 0, igspoker, cpoker, igspoker_state, init_cpoker, ROT0, "IGS", "Champion Poker (v220I)", 0, layout_igspoker )
GAMEL( 1993?,cpokert, cpoker, igspoker, cpoker, igspoker_state, init_cpokert, ROT0, "IGS (Tuning license)", "Champion Poker (v200G)", 0, layout_igspoker )
GAMEL( 1993, cpokerx, cpoker, igspoker, cpokerx, igspoker_state, init_cpokert, ROT0, "IGS", "Champion Poker (v100)", 0, layout_igspoker )
-GAMEL( 1993, cpoker101, cpoker, igspoker, cpokerx, igspoker_state, init_cpoker101, ROT0, "IGS", "Champion Poker (v101)", MACHINE_NOT_WORKING, layout_igspoker ) // need to verify protection handling and inputs/outputs
-GAMEL( 1993, cpoker201f, cpoker, igspoker, cpokerx, igspoker_state, init_cpoker101, ROT0, "IGS", "Champion Poker (v201F)", MACHINE_NOT_WORKING, layout_igspoker ) // "
-GAMEL( 1993, cpoker210ks, cpoker, igspoker, cpokerx, igspoker_state, init_cpoker101, ROT0, "IGS", "Champion Poker (v210KS)", MACHINE_NOT_WORKING, layout_igspoker ) // "
-GAMEL( 1993, cpoker300us, cpoker, igspoker, cpoker, igspoker_state, init_cpoker300us, ROT0, "IGS", "Champion Poker (v300US)", MACHINE_NOT_WORKING, layout_igspoker ) // "
+GAMEL( 1993, cpoker101, cpoker, igspoker, cpokerx, igspoker_state, init_cpoker101, ROT0, "IGS", "Champion Poker (v101)", 0, layout_igspoker ) // need to fix lamps/layout
+GAMEL( 1993, cpoker201f, cpoker, igspoker, cpokerx, igspoker_state, init_cpoker101, ROT0, "IGS", "Champion Poker (v201F)", MACHINE_NOT_WORKING, layout_igspoker ) // need to verify protection handling and inputs/outputs
+GAMEL( 1993, cpoker210ks, cpoker, igspoker, cpokerx, igspoker_state, init_cpoker101, ROT0, "IGS", "Champion Poker (v210KS)", MACHINE_NOT_WORKING, layout_igspoker ) // need to verify protection handling and inputs/outputs
+GAMEL( 1993, cpoker300us, cpoker, igspoker, cpoker, igspoker_state, init_cpoker300us, ROT0, "IGS", "Champion Poker (v300US)", MACHINE_NOT_WORKING, layout_igspoker ) // need to verify protection handling and inputs/outputs
GAMEL( 2000, chleague, 0, igspoker, chleague, igspoker_state, init_chleague, ROT0, "IGS", "Champion League (v220I, Poker)", 0, layout_igspoker )
GAMEL( 2000, chleagul, chleague, igspoker, chleague, igspoker_state, init_chleague, ROT0, "IGS", "Champion League (v220I, Lattine)", 0, layout_igspoker )