diff --git a/src/mame/drivers/m92.c b/src/mame/drivers/m92.c index 7d817717fcf..35aca2d1672 100644 --- a/src/mame/drivers/m92.c +++ b/src/mame/drivers/m92.c @@ -2222,7 +2222,7 @@ GAME( 1992, uccopsar, uccops, uccops, uccops, uccops, ROT0, "Irem GAME( 1992, uccopsj, uccops, uccops, uccops, uccops, ROT0, "Irem", "Undercover Cops (Japan)", 0 ) GAME( 1992, mysticri, 0, mysticri, mysticri, mysticri, ROT0, "Irem", "Mystic Riders (World)", 0 ) GAME( 1992, gunhohki, mysticri, mysticri, mysticri, mysticri, ROT0, "Irem", "Gun Hohki (Japan)", 0 ) -// cheaply produced Korean board, has original chips, but lacks any proper labels - uses older revision sound program that doesn't work in MAME right now +// cheaply produced Korean board, has original chips, but lacks any proper labels // main code is also significantly different to the supported original set, so it might just be a legitimate early revision on a cheap board GAME( 1992, mysticrib,mysticri, mysticri, mysticri, mysticri, ROT0, "Irem", "Mystic Riders (bootleg?)", 0) GAME( 1992, majtitl2, 0, majtitl2, majtitl2, majtitl2, ROT0, "Irem", "Major Title 2 (World)", 0 ) diff --git a/src/mame/machine/irem_cpu.c b/src/mame/machine/irem_cpu.c index eb4511affbd..b94bd120c27 100644 --- a/src/mame/machine/irem_cpu.c +++ b/src/mame/machine/irem_cpu.c @@ -1,10 +1,10 @@ /***************************************************************************** - Irem Custom V35+ CPU + Irem Custom V35 Software Guard CPU -- has internal 256 byte lookup table, handled in realtime. Bomberman - World runs encrypted code from RAM, Risky Challenge expects to be able - to run code in emulation (non-encrypted) mode for some subroutines.. + World runs encrypted code from RAM, Risky Challenge and QuizF1 expects + to be able to run code in emulation (non-encrypted) mode for some subroutines.. Hasamu Nanao 08J27261A1 011 9102KK700 Gunforce Nanao 08J27261A1 011 9106KK701 @@ -51,8 +51,9 @@ //double check 0x00 0x22 0x28 0x4a 0x34 in these tables -#define xxxx 0x90/* Unknown */ +#define xxxx 0x90 /* Unknown */ +// gunforce, kengo, hasamu const UINT8 gunforce_decryption_table[256] = { 0xff,xxxx,xxxx,0x2c,xxxx,xxxx,0x43,0x88, xxxx,0x13,0x0a,0xbd,0xba,0x60,0xea,xxxx, /* 00 */ xxxx,xxxx,0xf2,0x29,0xb3,0x22,xxxx,0x0c, 0xa9,0x5f,0x9d,0x07,xxxx,xxxx,0x0b,0xbb, /* 10 */ @@ -87,6 +88,7 @@ const UINT8 gunforce_decryption_table[256] = { // 0x00 is NOT 0x20 (no context in bomberman) +// bmaster, bomberman const UINT8 bomberman_decryption_table[256] = { xxxx,xxxx,0x79,xxxx,0x9d,0x48,xxxx,xxxx, xxxx,xxxx,0x2e,xxxx,xxxx,0xa5,0x72,xxxx, /* 00 */ 0x46,0x5b,0xb1,0x3a,0xc3,xxxx,0x35,xxxx, xxxx,0x23,xxxx,0x99,xxxx,0x05,xxxx,0x3c, /* 10 */ @@ -107,21 +109,22 @@ const UINT8 bomberman_decryption_table[256] = { }; // 49 -> 4a (verified in a bombrman PCB) +// lethalth, gunforc2, quizf1 const UINT8 lethalth_decryption_table[256] = { 0x7f,0x26,0x5d,xxxx,0xba,xxxx,0x1e,0x5e, 0xb8,xxxx,0xbc,0xe8,0x01,xxxx,0x4a,0x25, /* 00 */ // ssss !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! - xxxx,0xbd,xxxx,0x22,0x10,xxxx,0x02,0x57, 0x70,xxxx,0x7e,xxxx,0xe7,0x52,xxxx,0xa9, /* 10 */ + xxxx,0xbd,xxxx,0x22,0x10,xxxx,0x02,0x57, 0x70,xxxx,0x7c,xxxx,0xe7,0x52,xxxx,0xa9, /* 10 */ // !!!! !!!! !!!! ???? !!!! !!!! gggg xxxx,xxxx,0xc6,0x06,0xa0,0xfe,0xcf,0x8e, 0x43,0x8f,0x2d,xxxx,0xd4,0x85,0x75,0xa2, /* 20 */ // !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! - 0x3d,xxxx,xxxx,0x38,0x7c,0x89,0xd1,0x80, 0x3b,0x72,0x07,xxxx,0x42,0x37,0x0a,0x18, /* 30 */ + 0x3d,xxxx,xxxx,0x38,0x7e,0x89,0xd1,0x80, 0x3b,0x72,0x07,xxxx,0x42,0x37,0x0a,0x18, /* 30 */ // gggg !!!! ???? !!!! !!!! !!!! !!!! !!!! !!!! ssss !!!! 0x88,0xb4,0x98,0x8b,0xb9,0x9c,0xad,0x0e, 0x2b,xxxx,0xbf,xxxx,0x55,xxxx,0x56,0xb0, /* 40 */ // !!!! pppp !!!! !!!! !!!! !!!! gggg !!!! !!!! !!!! !!!! 0x93,0x91,xxxx,0xeb,xxxx,0x50,0x41,0x29, 0x47,xxxx,xxxx,0x60,xxxx,0xab,xxxx,xxxx, /* 50 */ // pppp !!!! !!!! !!!! !!!! !!!! !!!! !!!! - 0xc3,0xe2,0xd0,0xb2,0x11,0x79,xxxx,0x08, xxxx,0xfb,xxxx,0x2c,0x23,xxxx,0x28,0x0d, /* 60 */ -// !!!! !!!! !!!! !!!! ???? !!!! !!!! + 0xc3,0xe2,0xd0,0xb2,0x11,0x79,xxxx,0x08, 0x82,0xfb,xxxx,0x2c,0x23,xxxx,0x28,0x0d, /* 60 */ +// !!!! !!!! !!!! !!!! gggg ???? !!!! !!!! xxxx,xxxx,xxxx,0x83,0x3c,xxxx,0x1b,0x34, 0x5b,xxxx,0x40,xxxx,xxxx,0x04,0xfc,0xcd, /* 70 */ // !!!! !!!! !!!! !!!! !!!! ssss 0xb1,0xf3,0x8a,xxxx,xxxx,0x87,xxxx,xxxx, xxxx,xxxx,xxxx,xxxx,0xbe,0x84,0x1f,0xe6, /* 80 */ @@ -130,20 +133,31 @@ const UINT8 lethalth_decryption_table[256] = { // !!!! !!!! !!!! 0xa5,xxxx,xxxx,0xc7,xxxx,0x27,0x0b,xxxx, 0x20,xxxx,xxxx,xxxx,xxxx,xxxx,0x61,0x7d, /* A0 */ // !!!! !!!! !!!! !!!! ???? - xxxx,xxxx,0x86,0x0f,xxxx,0xb7,xxxx,0x4f, xxxx,xxxx,0xc0,0xfd,xxxx,0x39,xxxx,0x77, /* B0 */ -// !!!! !!!! !!!! !!!! !!!! - 0x05,0x3a,xxxx,0x48,0x92,0x76,0x3e,0x03, xxxx,0xf8,xxxx,0x59,0xa8,0x5f,0xf9,0xbb, /* C0 */ -// !!!! !!!! pppp !!!! !!!! !!!! !!!! !!!! + 0x63,xxxx,0x86,0x0f,xxxx,0xb7,xxxx,0x4f, 0x13,xxxx,0xc0,0xfd,xxxx,0x39,xxxx,0x77, /* B0 */ +// ssss !!!! !!!! ???? !!!! !!!! !!!! + 0x05,0x3a,xxxx,0x48,0x92,0x71,0x3e,0x03, xxxx,0xf8,xxxx,0x59,0xa8,0x5f,0xf9,0xbb, /* C0 */ +// !!!! !!!! ???? !!!! !!!! !!!! !!!! !!!! 0x81,0xfa,0x9d,0xe9,0x2e,0xa1,0xc1,0x33, xxxx,0x78,xxxx,0x0c,xxxx,0x24,0xaa,0xac, /* D0 */ -// !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! ???? !!!! !!!! +// !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! gggg !!!! !!!! xxxx,0xb6,xxxx,0xea,xxxx,0x73,0xe5,0x58, 0x00,0xf7,xxxx,0x74,xxxx,0x76,xxxx,0xa3, /* E0 */ // !!!! gggg !!!! !!!! !!!! !!!! ???? !!!! - xxxx,0x5a,0xf6,0x32,0x46,0x2a,xxxx,xxxx, 0x53,0x4b,0x90,0x0d,0x51,0x68,0x99,0x13, /* F0 */ -// !!!! !!!! !!!! !!!! !!!! !!!! !!!! ???? !!!! !!!! + xxxx,0x5a,0xf6,0x32,0x46,0x2a,xxxx,xxxx, 0x53,0x4b,0x90,0x35,0x51,0x68,0x99,0x13, /* F0 */ +// !!!! !!!! !!!! !!!! !!!! !!!! ???? !!!! !!!! }; /* missing opcode: +1cedd : 68 c0 03 +17cb4 : b8 f0 +11bb9 : 2b d8 +11bda : 09 ... +1a -> (7c,7e) -> +34 -> (7c,7e) -> +c5 -> (18d56 - from 1844f) (71,76,7a,7d,7e) -> to handle level number (a008d=00-0f) -> +af -> (7d) (strange 71) -> +ed -> (p76,7c,7e) -> +fb -> + "!!!!" -> checked against gussun "gggg" -> very probably "pppp" -> probably @@ -151,19 +165,12 @@ missing opcode: "????" -> missing -1a -> (78,7c,7e) -> -34 -> (78,7c,7e) -> 78 -65 -> (79, -af -> (79,7d) (strange 71) -> -d9 -> (11e07 from 11de6) (70,78 -> to handle a01ce=000-7d0 -> 0x78 -ed -> (p76,78,7c,7e) -> -fb -> probably: 42 -> 0x98 (083a3) 50 -> 0x93 (083a7) -c5 -> (18d56 - from 1844f) (71,73,76,79,7a,7d,7e) -> to handle level number (a008d=00-0f) -> 0x76 + very probably: 48 -> 0x2b @@ -173,7 +180,7 @@ sure: 00 -> 0x7f 3d -> 0x37 7f -> 0xcd (little machine in the game - 16058) - +b0 -> 0x63 (11479) */ // 0x2c (0xd4) complete guess // 0x2d (0x85) complete guess @@ -188,15 +195,13 @@ sure: // 0xbd (0x39) guess - risky challenge use same code // 0xc3 (0x48) guess // and our collection of conditional branches: -// 0xbf (0x7d) >= (monitor test) -// 0x34 (0x7c) < or <= (seems more like <) | these two are used toghether -// 0xaf (0x7f) > or >= (seems more like >) | -// 0xed (0x7e) <= or < (seems more like <=) -// 0x00 (0x7f) > ? | these two are used toghether +// 0x34 (0x7e) < or <= (seems more like <) | these two are used toghether +// 0xaf (0x7d) > or >= +// 0xed (0x76) <= or < (seems more like <=) // 0x1a (0x7c) < ? | (rowscroll on pink screen on startup) // 0xc5 (0x7a) completely in the dark (game start after car seelction) - +// uccops, dynablaster const UINT8 dynablaster_decryption_table[256] = { 0x1f,0x51,0x84,xxxx,0x3d,0x09,0x0d,xxxx, xxxx,0x57,xxxx,xxxx,xxxx,0x32,0x11,xxxx, /* 00 */ xxxx,0x9c,xxxx,xxxx,0x4b,xxxx,xxxx,0x03, xxxx,xxxx,xxxx,0x89,0xb0,xxxx,xxxx,xxxx, /* 10 */ @@ -231,6 +236,7 @@ const UINT8 dynablaster_decryption_table[256] = { // NS010718 0xa0 was 0x00 (ADDB), verified to be 0x22 (ANDB) /* note: mysticrib sound is identical revision to bbmanw sound code */ +// mysticri const UINT8 mysticri_decryption_table[256] = { xxxx,0x57,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, 0xbf,0x43,xxxx,xxxx,0xb3,xxxx,0xfc,xxxx, /* 00 */ /*r*/ @@ -257,8 +263,8 @@ const UINT8 mysticri_decryption_table[256] = { // 0xd5 (0x18) opcode is right but arguments could be swapped // 0x4e (0x2b) not sure, could be 0x1b // 0x8b (0xb3) needed by mysticrib -// 0xb9 -> 4b (dec bw, PC=0x134e) in mysticrib, needed by reading Irem GA20 status after it +// majtitl2 const UINT8 majtitl2_decryption_table[256] = { 0x87,xxxx,0x78,0xaa,xxxx,xxxx,xxxx,0x2c, 0x32,0x0a,0x0f,xxxx,0x5e,xxxx,0xc6,0x8a, /* 00 */ 0x33,xxxx,xxxx,xxxx,xxxx,0xea,xxxx,0x72, xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,0x24,0x55, /* 10 */ @@ -280,7 +286,7 @@ const UINT8 majtitl2_decryption_table[256] = { // 0x7c (0x18) opcode is right but arguments could be swapped // 0x70 (0x2b) not sure, could be 0x1b - +// hook const UINT8 hook_decryption_table[256] = { 0xb6,0x20,0x22,xxxx,0x0f,0x57,0x59,0xc6, 0xeb,xxxx,0xb0,0xbb,0x3b,xxxx,xxxx,xxxx, /* 00 */ 0x36,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, xxxx,0xfe,xxxx,xxxx,xxxx,xxxx,xxxx,0xa0, /* 10 */ @@ -302,7 +308,7 @@ const UINT8 hook_decryption_table[256] = { // 0x87 (0x18) opcode is right but arguments could be swapped // 0xbb (0x2b) not sure, could be 0x1b - +// rtypeleo const UINT8 rtypeleo_decryption_table[256] = { 0x5d,xxxx,0xc6,xxxx,xxxx,xxxx,0x2a,0x3a,xxxx,xxxx,xxxx,0x86,xxxx,0x22,xxxx,0xf3, /* 00 */ xxxx,xxxx,xxxx,xxxx,xxxx,0x38,0xf7,0x42,0x04,xxxx,xxxx,0x1f,0x4b,xxxx,xxxx,0x58, /* 10 */ @@ -320,14 +326,14 @@ const UINT8 rtypeleo_decryption_table[256] = { xxxx,xxxx,xxxx,xxxx,0x81,xxxx,0x79,xxxx,xxxx,0x24,0x23,xxxx,xxxx,0xb0,0x07,0xff, /* D0 */ xxxx,0xba,0xf6,0x51,xxxx,xxxx,xxxx,0xfe,xxxx,0x92,xxxx,xxxx,xxxx,xxxx,0xe9,xxxx, /* E0 */ xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,0xe8,0xd2,xxxx,0x18,xxxx,xxxx,xxxx,0xd1,xxxx,xxxx, /* F0 */ -// ^^^^ +// ^^^^ }; // 0xf9 (0x18) opcode is right but arguments could be swapped // 0x80 (0x2b) not sure, could be 0x1b -// 0x16 (0x01) guess (wrong?) // fixed 0x16 = 0xf7 mapping // 3d = correct +// inthunt const UINT8 inthunt_decryption_table[256] = { 0x1f,xxxx,0xbb,0x50,xxxx,0x58,0x42,0x57, xxxx,xxxx,0xe9,xxxx,xxxx,xxxx,xxxx,0x0b, /* 00 */ xxxx,xxxx,0x9d,0x9c,xxxx,xxxx,0x1e,xxxx, xxxx,0xb4,0x5b,xxxx,xxxx,xxxx,xxxx,xxxx, /* 10 */ @@ -349,6 +355,7 @@ const UINT8 inthunt_decryption_table[256] = { // 0x77 (0x18) opcode is right but arguments could be swapped // 0xb8 (0x2b) not sure, could be 0x1b +// gussun const UINT8 gussun_decryption_table[256] = { 0x63,xxxx,xxxx,0x36,xxxx,0x52,0xb1,0x5b, 0x68,0xcd,xxxx,xxxx,xxxx,0xa8,xxxx,xxxx, /* 00 */ // gggg gggg gggg gggg @@ -455,9 +462,6 @@ f9 -> 76 (16d02(f 16cfa)-16598-165a1-18de7(f 18dc4) no 71(no),77(no),(icons? 70, fb -> bd fd -> 7e (1d659 - routine from 1d63c to 1d65e) no 70,76,77,78,79,7a,7b, 7c,7d,7e,7f ok 7e -V35 core: -0f 92 - ------------------------------------------------------------------------------------------------------------- AS notes: @@ -498,6 +502,7 @@ clc ret */ +// leagueman const UINT8 leagueman_decryption_table[256] = { xxxx,xxxx,xxxx,0x55,0xbb,xxxx,0x23,0x79, xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,0x38,xxxx, /* 00 */ 0x01,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, 0x3d,xxxx,xxxx,xxxx,0xba,xxxx,0x1e,xxxx, /* 10 */ @@ -519,7 +524,7 @@ const UINT8 leagueman_decryption_table[256] = { // 0x25 (0x4b) guess // 0x10 (0x01) guess (wrong?) - +// psoldier const UINT8 psoldier_decryption_table[256] = { xxxx,xxxx,xxxx,0x8a,xxxx,0xaa,xxxx,xxxx, xxxx,0x20,0x23,0x55,xxxx,0xb5,0x0a,xxxx, /* 00 */ xxxx,0x46,xxxx,0xb6,xxxx,0x74,0x8b,xxxx, xxxx,0xba,0x01,xxxx,xxxx,0x5a,0x86,0xfb, /* 10 */ @@ -541,7 +546,7 @@ const UINT8 psoldier_decryption_table[256] = { // 0x9e (0x4b) guess // 0x1a (0x01) guess (wrong?) - +// dsoccr94 const UINT8 dsoccr94_decryption_table[256] = { xxxx,0xd1,xxxx,xxxx,xxxx,0x79,0x2e,xxxx, xxxx,xxxx,0x5a,0x0f,xxxx,xxxx,0x43,xxxx, /* 00 */ xxxx,xxxx,0xe8,0x50,xxxx,xxxx,xxxx,0xa0, 0x5d,0x22,xxxx,xxxx,0xb2,0x3a,xxxx,xxxx, /* 10 */ @@ -567,6 +572,7 @@ const UINT8 dsoccr94_decryption_table[256] = { /* preliminary table by Pierpaolo Prazzoli */ +// matchit2 const UINT8 matchit2_decryption_table[256] = { xxxx,0x86,0x0a,xxxx,0x32,0x01,0x81,0xbe, 0xea,xxxx,0xbb,xxxx,xxxx,xxxx,0xa5,0xf6, /* 00 */ // new new new new new new new new new