summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-02-03 00:53:25 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-02-03 00:53:25 +0000
commit5861f9d3add8ecaef5a61587bb110123658f52b4 (patch)
tree4804c6bbbf337ebdc81d029a970f11936e5b5931
parent2409522389ddf8ca228c2f213ae76141eac855bb (diff)
From: roberto zandonà [mailto:robiza71@tin.it]
Subject: more opcode (Risky Challenge opcodes)
-rw-r--r--src/mame/machine/irem_cpu.c179
1 files changed, 91 insertions, 88 deletions
diff --git a/src/mame/machine/irem_cpu.c b/src/mame/machine/irem_cpu.c
index 59d4d6760a5..7cfcf5930df 100644
--- a/src/mame/machine/irem_cpu.c
+++ b/src/mame/machine/irem_cpu.c
@@ -298,92 +298,111 @@ const UINT8 inthunt_decryption_table[256] = {
// 0x77 (0x18) opcode is right but arguments could be swapped
// 0xb8 (0x2b) not sure, could be 0x1b
-
const UINT8 gussun_decryption_table[256] = {
- 0xcd,xxxx,xxxx,0x36,xxxx,0x52,0xb1,0x5b, 0x68,0xcd,xxxx,xxxx,xxxx,0x20,xxxx,xxxx, /* 00 */
-// !!!! ^^^^ !!!! !!!!
- xxxx,xxxx,0x75,0x24,0x08,0x83,0x32,0xe9, xxxx,0x79,xxxx,0x8f,0x22,xxxx,0xac,xxxx, /* 10 */
-// !!!! ???? ^^^^ pppp gggg !!!! ^^^^
- 0x5d,0xa5,0x11,0x51,0x0a,xxxx,0x19,xxxx ,0xf8,0x98,0x91,0x40,0x28,0x10,0x03,0x5f, /* 20 */
-// pppp !!!! ???? ^^^^ pppp ^^^^ gggg gggg pppp
- 0x26,xxxx,xxxx,0x8b,xxxx,0x02,xxxx,xxxx, 0x8e,0xab,xxxx,xxxx,0xbc,0xf1,0xb3,xxxx, /* 30 */
-//
- xxxx,0x01,0xc6,xxxx,xxxx,0x3a,0x29,xxxx, xxxx,0x74,0x61,xxxx,0x33,xxxx,0x29,xxxx, /* 40 */
-// ???? ???? !!!! ????
- xxxx,0x53,0xa0,0xc0,0xc3,0x41,0xfc,0xe7, xxxx,0x2c,0x76,0x2b,xxxx,xxxx,0xba,0x2a, /* 50 */
-// !!!! ^^^^ ^^^^ gggg ???? !!!! !!!!
- 0xb0,xxxx,0x28,0x7d,xxxx,xxxx,0xb5,0x07, 0xb9,xxxx,0x27,0x46,0xf9,xxxx,xxxx,xxxx, /* 60 */
-// ???? gggg !!!! ^^^^
+ 0xcd,xxxx,xxxx,0x36,xxxx,0x52,0xb1,0x5b, 0x68,0xcd,xxxx,xxxx,xxxx,0xa8,xxxx,xxxx, /* 00 */
+// 0x63 gggg gggg gggg
+ xxxx,xxxx,0x75,0x24,0x08,0x83,0x32,0xe9, xxxx,0x7d,xxxx,0x8f,0x22,xxxx,0xac,xxxx, /* 10 */
+// ???? pppp gggg
+ 0x5d,0xa5,0x11,0x51,0x0a,0x29,0x01,xxxx ,0xf8,0x98,0x91,0x40,0x28,0x00,0x03,0x5f, /* 20 */
+// gggg pppp ???? gggg gggg gggg gggg pppp
+ 0x26,xxxx,xxxx,0x8b,0x2f,0x02,xxxx,xxxx, 0x8e,0xab,xxxx,xxxx,0xbc,0xf1,0xb3,xxxx, /* 30 */
+// gggg 0x90
+ xxxx,0x19,0xc6,xxxx,xxxx,0x3a,0x01,xxxx, xxxx,0x74,0x61,xxxx,0x33,xxxx,0x01,xxxx, /* 40 */
+// ???? ???? ????
+ xxxx,0x53,0xa0,0xc0,0xc3,0x41,0xfc,0xe7, xxxx,0x2c,0x7e,0x2b,xxxx,xxxx,0xba,0x2a, /* 50 */
+// gggg ???? gggg pppp gggg
+ 0xb0,xxxx,0x28,0x79,xxxx,xxxx,0xb5,0x07, 0xb9,xxxx,0x27,0x46,0xf9,xxxx,xxxx,xxxx, /* 60 */
+// ???? pppp gggg gggg
xxxx,0xea,0x72,0x73,0xad,0xd1,0x3b,0x5e, 0xe5,0x57,xxxx,0x0d,xxxx,xxxx,xxxx,0x3c, /* 70 */
-// ^^^^
- xxxx,0x86,xxxx,0xb5,0x30,0x25,0x2d,xxxx, 0x9a,0xeb,0x04,0x0b,0xa2,0xb8,0xf6,xxxx, /* 80 */
-// ???? ???? ^^^^ !!!! !!!!
- xxxx,xxxx,0x9d,xxxx,0xbb,xxxx,xxxx,0xcb, 0xa9,0xcf,xxxx,0x60,0x43,0x56,xxxx,0x01, /* 90 */
-// !!!! ^^^^ !!!! ^^^^ !!!! ????
- xxxx,0xa3,xxxx,xxxx,xxxx,xxxx,0xfa,0xb4, xxxx,0x81,0xe6,0x41,0x80,0x8c,0xd4,xxxx, /* a0 */
-// gggg ???? gggg !!!!
- xxxx,0x19,0x20,0x19,0x77,0x3d,0x3e,xxxx, xxxx,xxxx,0x4b,xxxx,xxxx,xxxx,xxxx,xxxx, /* b0 */
-// ???? ???? ???? gggg pppp
+// gggg ????
+ xxxx,0x86,0x76,0x7f,0x08,0x25,0x2d,xxxx, 0x9a,0xeb,0x04,0x0b,0xa2,0xb8,0xf6,xxxx, /* 80 */
+// ???? pppp ???? ???? gggg
+ xxxx,xxxx,0x9d,xxxx,0xbb,xxxx,xxxx,0xcb, 0xa9,0xcf,xxxx,0x60,0x43,0x56,xxxx,0x19, /* 90 */
+// ???? gggg ????
+ xxxx,0xa3,xxxx,xxxx,xxxx,xxxx,0xfa,0xb4, xxxx,0x81,0xe6,0x48,0x80,0x8c,0xd4,xxxx, /* a0 */
+// gggg ???? gggg gggg
+ xxxx,0x19,0x00,0x19,0x77,0x3d,0x3e,xxxx, xxxx,0xb6,0x4b,xxxx,xxxx,xxxx,xxxx,xxxx, /* b0 */
+// ???? ???? ???? gggg ???? ???? pppp
xxxx,0xff,0x47,xxxx,0x55,0x1e,xxxx,0x59, 0x93,xxxx,xxxx,xxxx,0x88,0xc1,0x01,0xb2, /* c0 */
-// ^^^^ ^^^^ ^^^^ ????
- xxxx,0x2e,0x06,0xc7,0x05,xxxx,0x8a,0x5a, 0x58,0xbe,xxxx,xxxx,xxxx,0x1f,0x23,xxxx, /* d0 */
-// ^^^^ ????
- 0xe8,xxxx,0x89,0xa1,0xd0,xxxx,0x19,0xe2, 0x38,0xfe,0x50,0x9c,xxxx,xxxx,xxxx,0x49, /* e0 */
-// ???? !!!! !!!!
- 0xfb,xxxx,0xf3,xxxx,xxxx,0x0f,xxxx,xxxx, xxxx,0x7c,0xf7,0xbd,0x39,0x7f,0xbf,xxxx, /* f0 */
-// !!!! ???? !!!! gggg
+// ???? pppp
+ xxxx,0x2e,0x06,0xc7,0x05,xxxx,0x8a,0x5a, 0x58,0xbe,xxxx,0x4a,xxxx,0x1f,0x23,xxxx, /* d0 */
+// ????
+ 0xe8,xxxx,0x89,0xa1,0xd0,xxxx,0x11,0xe2, 0x38,0xfe,0x50,0x9c,xxxx,xxxx,xxxx,0x49, /* e0 */
+// ???? ???? gggg
+ 0xfb,xxxx,0xf3,xxxx,xxxx,0x0f,xxxx,xxxx, xxxx,0x7d,0xf7,0xbd,0x39,0x71,0xbf,xxxx, /* f0 */
+// pppp gggg pppp
};
-
/*
missing opcode:
-N**14 -> 08? (2097b 20980 - routine from 2097a) (00 01 08 09 30 31) probably 08 - after the start and before the menu
- - to handle the player number
-N++26 -> 29? (14ed_ , 198e_
-N--41 -> 19?
-N//46 -> 10? (1461b
-N--4e -> 19? (208ac -
-Y//5a -> 76? (195eb - (222fc - routine from 222ed to ) (7x j...) no 70,71,77,79,7a,7b,7d,7f - ok 76 78 7c 7e
-1//62 -> 28? (1cf86 1cfa3 - routine from 1cf61 to 1cff4) (water in level 1)
-1--83 -> b7? (194cd - routine from) no b7,b3,b4 ok b6,b5
-0**84 -> 18? (1d8f1 - routine from 1d8c7 to 1d8fc) - three bytes (00,08,18,20,28,30)
----9f -> 19? (
-///ab -> 42?
----b1 -> 19?
----b2 -> 20. (20a8b - 20acc probably 20 - after the start and before the menu - to handle the player number
-///b3 -> 19? (216b6 - 216cf
-01+ce -> 01? (10236 - routine from 1017e to 10254) (01, 09, 19, 21, 29, 31) -> probably 01
-///db -> (16992
-///eb ->
-///f9 -> 7c? (16598 - 165a1 - 18de7 - routine from 18dc4 to ) no 71,72,76,78 ok 70,73,77,79,7a
+
+" " -> checked against hasamu (i.e. you can compare gussun from 2002a and hasamu from 54a0)
+"gggg" -> very probably
+"pppp" -> probably
+"????" -> missing
+"0xHH" -> right code (not supported)
+
+14 -> 08 (2097b 20980 - routine from 2097a) (00 01 08 09 30 31) probably 08 - after the start and before the menu
+ - to handle the player number
+j19 -> 79 (1df45 routine from 1df27 / 2282f - routine from 2281f to 22871) no 70,71,76,77,78,7a,7b,7c,7e,7f(ok) ok 79,7d
+.26 -> 29 (14ed_ , 198e_
+.41 -> 19
+.46 -> 10 (1461b
+.4e -> 19 (208ac -
+j5a -> 7e (195eb - (222fc - routine from 222ed to ) (7x j...) no 70,71(ok),77,79,7a,7b,7d,7f ok 76,78,7c,7e
+.62 -> 28 (1cf86 1cfa3 - routine from 1cf61 to 1cff4) (water in level 1) (01 11 19 29)
+j63 -> 78 (1df7f, 1df8c, 1df95, 21f08 - routine from 1df27 to ) no 71(ok),77(ok),7f(ok) ok 70,76,78,79 7a,7b,7c,7d,7e
+j82 -> 76 (76,78,7c,7e) ->
+.84 -> 18 (1d8f1 - routine from 1d8c7 to 1d8fc) - three bytes (00,08,18,28,30) (sprite animation)
+.9f -> 19 (
+ab -> 42
+.b1 -> 19
+.b2 -> 20 (20a8b - 20acc probably 20 - after the start and before the menu - to handle the player number
+.b3 -> 19 (216b6 - 216cf
+b9 -> b5 (21210 - ) 2 bytes -
+db -> (16992
+jf9 -> 7c (16d02(f 16cfa)-16598-165a1-18de7(f 18dc4) no 71,77(ok),(icons? 70,76,78,7a,7c,7e),7f maybe 79,7b,7d
rz probably:
-19 -> 79 (1df45 routine from 1df27 / 2282f - routine from 2281f to 22871) ok 79,7d,7f -> 79
-22 -> 11 (1deff - routine from 1dee8 to 1df26) -> 11 - to handle sprite animation
-2d -> 10 (1df1d - routine from 1dee8 to 1df26) -> 10 - to handle sprite animation
-29 -> 98 (1df22 - routine from 1dee8 to 1df26) -> 98 - to handle sprite animation
+2d -> 00 (1df1d - routine from 1dee8 to 1df26) -> 00 - to handle sprite animation
+83 -> 7f (194cd - routine from) no 70,71,76,78,79,7a,7c,7d,7e ok 77(no),7b(white rocks) ok 7f
+b4 -> 77 (1d03a, 1d57a - routine from 1d4df ) no 70,71,76,78,79,7a,7b,7c,7d,7e,7f ok 77
ba -> 4b (1094d, 10b28 - routine from 10948 to 10b73) one byte -> probably 4b
+c2 -> 47 (22881, 220ff - routine from 22872 to 22885) (4f?)
+ce -> 01 (10236 - routine from 1017e to 10254) (01, 09, 19, 21, 29, 31) -> probably 01
+fd -> 71 (1d659 - routine from 1d63c to 1d65e) no 70,76,77,78,79,7a,7b,7c,7d,7e,7f ok 71
rz guess:
-2b -> 40 (1d4d2 1db81 1dba9 - routine from 1d4b2 to 1d4de) (ok 40,48,96) -> 40
- (no 0e,16,17,27,2f,37,3f,41,42,44,45,4a,4b,4c,4d,4e,4f,54,5c,6c,6d,92,94,95,97)
-2c -> 28 (20333 - routine from 2032a to 20366)
-59 -> 2c (220cf - 2037f - routine from 2202f to ) 2bytes (2c,
-63 -> 7d (1df7f, 1df8c, 1df95,21f08 - routine from 1df1d to ) - two bytes j..
+06 -> b1 (22872 - routine from 22872 to 2289d)
+09 -> cd (22a17 - routine from 229ed to 22a1a)
+0d -> a8 (
1b -> 8f (1d8f9 - routine from 1d8c7 to 1d8fc) - three bytes (pop instruction for the push in 1d8e6)
+22 -> 11 (1deff - routine from 1dee8 to 1df26) -> 11 - to handle sprite animation
+25 -> 29 (195a0 - routine from 194e1 to ) (19,29)
+28 -> f8 (
+29 -> 98 (1df22 - routine from 1dee8 to 1df26) -> 98 - to handle sprite animation
+2b -> 40 (1d4d2 1db81 1dba9 - routine from 1d4b2 to 1d4de) -> 40
+2c -> 28 (20333 - routine from 2032a to 20366)
+34 -> 2f (20381 - routine from 2037b to 20391) - used to handle number of lives and game over
+52 -> a0
+59 -> 2c (220cf - 2037f - routine from 2202f to ) 2bytes (2c,
+5b -> 2b (used in "Service Mode" / "CHARACTER menu")
+66 -> b5 (1daaf - routine from 1da61 to 1daca) - two bytes (colors effect)
+6a -> 27 (20368 - routine from 20368 to 2037a) - used to limit the max lives number
+73 -> 73 (1d4f7 - routine from 1d4df to 1d539) -> (no 70,71,72,74,75,76,77,78,79,7a,7b,7c,7d,7e,7f) - ok 73
+88 -> 9a
+97 -> cb
a7 -> b4 (2029a - routine from 20290 to
-ad -> 8c (1d559, 1d8d4 - routine from 1d547 - ; routine from 1d8b8 to 1d8fc)
-b4 -> 77 (1d03a, 1d57a - routine from 1d4df ) 7f,7d,7b - 79 - "77"
-fd -> 7f (1d659 - routine from 1d63c to 1d65e) 77,7f
+ad -> 8c (1d559, 1d8d4 - routine from 1d547 - ; routine from 1d8b8 to 1d8fc) ..............................
+ae -> d4 (20215 - ) used when you insert a coin to handle the "coin number" in decimal
+ef -> 49 (dec CW) (used in "Service Mode" / "CHARACTER menu")
+fb -> bd
missing V35+ core:
00 -> 63 not supported (229e2 - routine from 229da to 229ec) (for now we use cd instruction + hack)
0f 92 -> of 92 not supported (1011d before of STI instruction) (for now no effects)
-above - c8 (inc aw) guess from stos code
-0xc5 -> 1e (push ds) guess (pop ds soon after) right?
-0xa9 -> 81 (not 0x82 PRE) guess from 237df
-0xcd -> c1 total guess (wrong but 3 bytes)
+-------------------------------------------------------------------------------------------------------------
AS notes:
0x1e is lodsb not lds,noted from 2344f
@@ -395,26 +414,10 @@ AS notes:
0x19 guess (0x82 PRE)
0xc2 guess,it could be dec iy...
-RZ notes
-0xef -> 49 (dec CW) (used in "Service Mode" / "CHARACTER menu")
-0x24 -> (0a, 12) probably 0a (OR) (used in "Service Mode" / "CHARACTER menu")
-0x5b -> 2b (used in "Service Mode" / "CHARACTER menu")
-0x21 -> a5 (used in "Service Mode" / "CHARACTER menu")
-
-checked against "hasamu" code: hasamu and gussun share code (i.e. you can compare gussun from 2002a and hasamu from 54a0)
-0x09 -> cd (22a17 - routine from 229ed to 22a1a) - two bytes
-0x13 -> 24 (interrupt routine)
-0x1c -> 22 (interrupt routine)
-0x34 -> 2f (20381 - routine from 2037b to 20391) - used to handle number of lives and game over
-0x4a -> 61 (interrupt routine)
-0x66 -> b5 (1daaf - routine from 1da61 to 1daca) - two bytes (colors effect)
-0x6a -> 27 (20368 - routine from 20368 to 2037a) - used to limit the max lives number
-0x73 -> 73 (1d4f7 - routine from 1d4df to 1d539) -> (no 70,71,72,74,75,76,77,78,79,7a,7b,7c,7d,7e,7f) - ok 73
-0x8c -> a2 (interrupt routine)
-0x8e -> f6 (interrupt routine)
-0x9b -> 60 (interrupt routine)
-0xf0 -> fb guess (interrupt)
-0xae -> d4 (20215 - ) used when you insert a coin to handle the "coin number" in decimal
+above - c8 (inc aw) guess from stos code
+0xc5 -> 1e (push ds) guess (pop ds soon after) right?
+0xa9 -> 81 (not 0x82 PRE) guess from 237df
+0xcd -> c1 total guess (wrong but 3 bytes)
*/
/*
@@ -781,7 +784,7 @@ void irem_cpu_decrypt(int cpu,const UINT8 *decryption_table)
for (A = 0;A < size; A++)
irem_cpu_decrypted[A] = decryption_table[rom[A]];
- // Roberto Zandon? note:
+ // robiza note:
// for "gussun" and "riskchal" is necessary an hack to not decrypt not encrypted routines
// we need a real nec v25+/35+ core to support 0x63 (brkn for "break native") instruction
// for now we use "cd" (int) instruction + hack