toaplan2: added opcodes for kbash, dogyuun and vfive

This commit is contained in:
Roberto Zandona 2011-01-18 22:07:46 +00:00
parent bd64bafb9b
commit adce78fbe2

View File

@ -3469,38 +3469,55 @@ ts002mach for dogyuun, ts004dash for kbash and ts007spy for vfive */
static const UINT8 ts002mach_decryption_table[256] = {
0x00,0x56,0x75,0x88,0x8c,0x06,0x58,0x72, 0x83,0x86,0x36,0x0b,0x5f,0xd3,0x8c,0xe9, /* 00 */
/*r*//*r*//*r*//*r*//*r*//*a*//*r*/ /*a*//*a*//*x*/ /*a*//*a*//*r*//*r*/
0x10,0x0f,0x03,0x13,0xeb,0x15,0x16,0x0f, 0xa4,0xbd,0x75,0xf3,0x4f,0x1d,0x8e,0xfe, /* 10 */
/*W*//*r*/ /*r*/ /*r*/ /*r*//*a*//*r*//*r*//*r*/ /*x*//*r*/
0x10,0x0f,0x03,0x13,0xeb,0x15,0x16,0x0f, 0xa4,0xbd,0x75,0xf3,0x4f,0x53,0x8e,0xfe, /* 10 */
/*W*//*r*/ /*r*/ /*r*/ /*r*//*a*//*r*//*r*//*r*//*W*//*x*//*r*/
0x87,0xe8,0xb1,0x8d,0x36,0xb5,0x43,0x73, 0x28,0x5b,0x2a,0x02,0x24,0x8a,0x03,0x80, /* 20 */
/*a*//*r*//*r*//*r*//*x*//*r*//*r*//*r*/ /*r*/ /*W*//*a*//*r*//*a*//*r*/
0x86,0x8b,0xd1,0x3e,0x8d,0x3e,0x58,0xfb, 0xc3,0x79,0xbd,0x3b,0x8a,0xe8,0x0f,0x81, /* 30 */
/*a*//*a*//*a*//*a*//*r*//*r*//*a*//*r*/ /*r*//*a*//*a*/ /*r*//*r*//*r*//*r*/
0x86,0x8b,0xd1,0x3e,0x8d,0x3e,0x58,0xfb, 0xc3,0x79,0xbd,0xb7,0x8a,0xe8,0x0f,0x81, /* 30 */
/*a*//*a*//*a*//*a*//*r*//*r*//*a*//*r*/ /*r*//*a*//*a*//*W*//*r*//*r*//*r*//*r*/
0x40,0xd0,0x8b,0xeb,0xff,0xb8,0x46,0x8b, 0x5e,0xa2,0x4a,0x4b,0xab,0xb4,0x80,0x59, /* 40 */
/*r*//*a*//*r*//*a*//*x*/ /*a*/ /*W*//*a*/ /*r*//*W*//*r*//*a*/
0x87,0x72,0xb5,0xbd,0xb0,0x88,0x50,0x0f, 0xfe,0x59,0xc3,0x5b,0x8a,0x5d,0x5e,0x75, /* 50 */
/*W*//*a*//*a*//*r*//*r*//*a*//*a*//*a*/ /*r*/ /*r*/ /*r*/ /*r*/
0x60,0xb3,0x74,0x0a,0x68,0x24,0xbb,0x67, 0x75,0x47,0xfe,0x6b,0xbe,0xc3,0x88,0xd2, /* 60 */
/*r*//*a*//*r*//*a*//*a*//*W*/ /*r*//*a*//*r*/ /*W*//*a*//*r*//*a*/
0x3e,0x71,0x8c,0x33,0x0f,0x75,0x8b,0x77, 0xb9,0x1e,0xff,0xa2,0x3e,0x7d,0xbe,0x57, /* 70 */
/*r*/ /*r*//*r*//*a*/ /*a*/ /*r*//*r*//*a*//*r*//*a*/ /*r*//*a*/
/*r*//*a*//*r*//*a*//*x*/ /*a*/ /*W*//*W*/ /*r*//*W*//*r*//*a*/
0x87,0x72,0xb5,0xbd,0xb0,0x88,0x50,0x0f, 0xfe,0xd2,0xc3,0x5b,0x8a,0x5d,0x5e,0x75, /* 50 */
/*W*//*a*//*a*//*r*//*r*//*a*//*a*//*a*/ /*r*//*W*//*r*/ /*r*/ /*r*/
0x60,0xb3,0x74,0x0a,0x68,0x24,0xbb,0x67, 0x75,0x47,0xfe,0x2c,0xbe,0xc3,0x88,0xd2, /* 60 */
/*r*//*a*//*r*//*a*//*a*//*W*/ /*r*//*a*//*r*//*W*//*W*//*a*//*r*//*a*/
0x3e,0xc1,0x8c,0x33,0x0f,0x75,0x8b,0x77, 0xb9,0x1e,0xff,0xa2,0x3e,0x7d,0xbe,0x57, /* 70 */
/*r*//*W*//*r*//*r*//*a*/ /*a*/ /*r*//*r*//*a*//*r*//*a*/ /*r*//*a*/
0x81,0x3a,0xf6,0x88,0xeb,0xb1,0x89,0x8a, 0x32,0x80,0x0f,0xb1,0x48,0xc3,0x68,0x72, /* 80 */
/*r*//*r*//*r*//*r*//*a*//*W*//*a*//*r*/ /*r*//*r*//*r*//*a*//*x*//*a*//*a*//*r*/
0x53,0x02,0xc0,0x02,0xe8,0xb4,0x74,0xbc, 0x98,0x58,0x0a,0xf3,0x75,0xc6,0x9e,0xe8, /* 90 */
/*a*//*W*//*r*//*W*//*r*//*r*//*r*//*x*/ /*a*//*r*//*r*//*r*//*x*/ /*r*/
0x26,0x50,0xfc,0x8c,0xa4,0xb1,0xc3,0xa7, 0xeb,0x83,0xa4,0xbf,0x26,0xad,0x46,0xfe, /* a0 */
/*r*//*a*//*a*//*r*/ /*a*//*r*/ /*a*//*r*//*r*//*r*//*r*/ /*a*//*r*/
0xe2,0x89,0xb2,0x88,0x03,0x56,0x0f,0x38, 0xbb,0x24,0xba,0x0f,0x07,0x8a,0x8a,0x33, /* b0 */
/*r*//*a*/ /*r*//*a*//*W*//*r*//*W*/ /*W*//*?*/ /*a*//*r*//*r*//*r*//*x*/
0xfe,0xc1,0xb1,0xa0,0x45,0x36,0xc6,0x5e, 0x8a,0xbe,0xc6,0xea,0x3c,0xcd,0x1e,0xe8, /* c0 */
/*r*/ /*r*//*r*//*r*//*r*/ /*r*/ /*r*//*W*//*x*//*x*//*r*/ /*r*//*r*/
0xd0,0xeb,0x55,0xf6,0x8a,0xb0,0x5d,0xd7, 0xbb,0x8d,0xf6,0xd0,0xd1,0x88,0x4d,0xdf, /* d0 */
/*a*//*r*//*r*//*a*//*a*//*r*/ /*x*//*r*//*r*//*a*//*W*//*r*//*W*/
0x26,0x50,0xfc,0x8c,0xa4,0xb1,0xc3,0xd1, 0xeb,0x83,0xa4,0xbf,0x26,0xad,0x46,0xfe, /* a0 */
/*r*//*a*//*a*//*r*/ /*a*//*r*//*W*/ /*a*//*r*//*r*//*r*//*r*/ /*a*//*r*/
0xe2,0x89,0xb3,0x88,0x03,0x56,0x0f,0x38, 0xbb,0x24,0xba,0x0f,0x07,0x8a,0x8a,0x33, /* b0 */
/*r*//*a*//*W*//*r*//*a*//*W*//*r*//*W*/ /*W*//*?*/ /*a*//*r*//*r*//*r*//*x*/
0xfe,0xc1,0xb1,0xa0,0x45,0x36,0xc6,0x5e, 0x8a,0xbe,0xc6,0xea,0x3c,0xb6,0x1e,0xe8, /* c0 */
/*r*/ /*r*//*r*//*r*//*r*/ /*r*/ /*r*//*W*//*x*//*x*//*r*//*?*//*r*//*r*/
0xd0,0xeb,0x55,0xf6,0x8a,0xb0,0x5d,0xc0, 0xbb,0x8d,0xf6,0xd0,0xd1,0x88,0x4d,0xdf, /* d0 */
/*a*//*r*//*r*//*a*//*a*//*r*//*W*/ /*x*//*r*//*r*//*a*//*W*//*r*//*W*/
0x51,0x51,0x74,0xbd,0x32,0xd1,0xe6,0xd2, 0x53,0xc7,0xab,0x36,0x50,0xe9,0x33,0xef, /* e0 */
/*r*//*a*//*r*//*r*//*r*//*W*/ /*a*/ /*r*//*x*//*r*//*r*//*W*//*a*//*r*/
0x2e,0xf1,0x88,0x59,0x74,0x74,0xf6,0x8e, 0x8a,0x8a,0x36,0x08,0x0f,0x45,0xfe,0x2e, /* f0 */
/*r*/ /*r*//*r*//*a*//*a*/ /*x*/ /*r*//*r*//*x*//*a*//*r*//*a*/ /*r*/
0x2e,0x05,0x88,0x59,0x74,0x74,0xf6,0x8e, 0x8a,0x8a,0x36,0x08,0x0f,0x45,0xfe,0x2e, /* f0 */
/*r*//*W*//*r*//*r*//*a*//*a*/ /*x*/ /*r*//*r*//*x*//*a*//*r*//*a*/ /*r*/
};
/*
dogyuun
a5272 cd
a011e b9
a0129 b9
kbash
a011e b9
a0129 b9
vfive
a4849 cd
a011e b9
a0129 b9
*/
static const nec_config ts002mach_config ={ ts002mach_decryption_table, };
static MACHINE_CONFIG_START( dogyuun, toaplan2_state )
@ -3556,48 +3573,6 @@ static MACHINE_CONFIG_START( dogyuun, toaplan2_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
/* x = modified to match batsugun 'unencrypted' code - '?' likewise, but not so sure about them
'!' = code stops being the same as batsugun at this point, might be wrong
- they seem to have mostly mapped extra opcodes for common ones, eg. mov
*/
static const UINT8 ts004dash_decryption_table[256] = {
0x00,0x56,0x75,0x88,0x8c,0x06,0x58,0x72, 0x83,0x86,0x36,0x0b,0x5f,0xd3,0x8c,0xe9, /* 00 */
/*r*//*r*//*r*//*r*//*r*//*a*//*r*/ /*a*//*a*//*x*/ /*a*//*a*//*r*//*r*/
0x10,0x11,0x03,0x13,0xeb,0x15,0x16,0x0f, 0xa4,0xbd,0x75,0xf3,0x4f,0x1d,0x8e,0xfe, /* 10 */
/*r*/ /*r*/ /*r*/ /*r*//*a*//*r*//*r*//*r*/ /*x*//*r*/
0x87,0xe8,0xb1,0x8d,0x36,0xb5,0x43,0x73, 0x28,0x5b,0x2a,0x2b,0x24,0x8a,0x03,0x80, /* 20 */
/*a*//*r*//*r*//*r*//*x*//*r*//*r*//*r*/ /*r*/ /*a*//*r*//*a*//*r*/
0x86,0x8b,0xd1,0x3e,0x8d,0x3e,0x58,0xfb, 0xc3,0x79,0xbd,0x3b,0x8a,0xe8,0x0f,0x81, /* 30 */
/*a*//*a*//*a*//*a*//*r*//*r*//*a*//*r*/ /*r*//*a*//*a*/ /*r*//*r*//*r*//*r*/
0x40,0xd0,0x8b,0xeb,0xff,0xb8,0x46,0x8b, 0x48,0xa2,0x4a,0x4b,0xab,0x4d,0x80,0x59, /* 40 */
/*r*//*a*//*r*//*a*//*x*/ /*a*/ /*a*/ /*r*/ /*r*//*a*/
0x50,0x72,0xb5,0xbd,0xb0,0x88,0x50,0x0f, 0xfe,0x59,0xc3,0x5b,0x8a,0x5d,0x5e,0x75, /* 50 */
/*a*//*a*//*r*//*r*//*a*//*a*//*a*/ /*r*/ /*r*/ /*r*/ /*r*/
0x60,0xb3,0x74,0x0a,0x68,0x24,0x66,0x67, 0x75,0x47,0xfe,0x6b,0x6c,0xc3,0x88,0xd2, /* 60 */
/*r*//*a*//*r*//*a*//*a*/ /*r*//*a*//*r*/ /*a*//*r*//*a*/
0x3e,0x71,0x8c,0x33,0x0f,0x75,0x8b,0x77, 0xb9,0x1e,0xff,0xa2,0x3e,0x7d,0xbe,0x57, /* 70 */
/*r*/ /*r*//*r*//*a*/ /*a*/ /*r*//*r*//*a*//*r*//*a*/ /*r*//*a*/
0x81,0x3a,0xf6,0x88,0xeb,0x85,0x89,0x8a, 0x32,0x80,0x0f,0xb1,0x48,0xc3,0x68,0x72, /* 80 */
/*r*//*r*//*r*//*r*//*a*/ /*a*//*r*/ /*r*//*r*//*r*//*a*//*x*//*a*//*a*//*r*/
0x53,0x91,0xc0,0x93,0xe8,0xb4,0x74,0xbc, 0x98,0x58,0x0a,0xf3,0x75,0xc6,0x9e,0xe8, /* 90 */
/*a*/ /*r*/ /*r*//*r*//*r*//*x*/ /*a*//*r*//*r*//*r*//*x*/ /*r*/
0x26,0x50,0xfc,0x8c,0xa4,0xb1,0xc3,0xa7, 0xeb,0x83,0xa4,0xbf,0x26,0xad,0x46,0xfe, /* a0 */
/*r*//*a*//*a*//*r*/ /*a*//*r*/ /*a*//*r*//*r*//*r*//*r*/ /*a*//*r*/
0xe2,0x89,0xb2,0x88,0x03,0xb5,0x0f,0xb7, 0xb8,0x04,0xba,0x0f,0x07,0x8a,0x8a,0x33, /* b0 */
/*r*//*a*/ /*r*//*a*/ /*r*/ /*?*/ /*a*//*r*//*r*//*r*//*x*/
0xfe,0xc1,0xb1,0xa0,0x45,0x36,0xc6,0x5e, 0x8a,0xc9,0xc6,0xea,0x3c,0xcd,0x1e,0xe8, /* c0 */
/*r*/ /*r*//*r*//*r*//*r*/ /*r*/ /*r*/ /*x*//*x*//*r*/ /*r*//*r*/
0xd0,0xeb,0x55,0xf6,0x8a,0xb0,0x5d,0xd7, 0xbb,0x8d,0xf6,0xd0,0xdc,0x88,0xde,0xdf, /* d0 */
/*a*//*r*//*r*//*a*//*a*//*r*/ /*x*//*r*//*r*//*a*/ /*r*/
0x51,0x51,0x74,0xbd,0x32,0xe5,0xe6,0xd2, 0x53,0xc7,0xab,0x36,0xec,0xe9,0x33,0xef, /* e0 */
/*r*//*a*//*r*//*r*//*r*/ /*a*/ /*r*//*x*//*r*//*r*/ /*a*//*r*/
0x2e,0xf1,0x88,0x59,0x74,0x74,0xf6,0x8e, 0x8a,0x8a,0x36,0x08,0x0f,0x45,0xfe,0x2e, /* f0 */
/*r*/ /*r*//*r*//*a*//*a*/ /*x*/ /*r*//*r*//*x*//*a*//*r*//*a*/ /*r*/
};
static const nec_config ts004dash_config ={ ts004dash_decryption_table, };
static MACHINE_CONFIG_START( kbash, toaplan2_state )
/* basic machine hardware */
@ -3609,7 +3584,6 @@ static MACHINE_CONFIG_START( kbash, toaplan2_state )
MCFG_CPU_ADD("audiocpu", V25, XTAL_16MHz) /* NEC V25 type Toaplan marked CPU ??? */
MCFG_CPU_PROGRAM_MAP(V25_kbash_mem)
MCFG_CPU_IO_MAP(V25_port)
// MCFG_CPU_CONFIG(ts004dash_config)
MCFG_CPU_CONFIG(ts002mach_config)
/* video hardware */
@ -3959,47 +3933,6 @@ static MACHINE_CONFIG_START( fixeighb, toaplan2_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
/* according to the comments this chip has the same markings as the Batsugun chip.
Batsugun runs the V25 in unencrypted mode, which would have allowed Toaplan
to use leftover V25s from any of their games in Batsugun boards. */
static const UINT8 ts007spy_vfive_decryption_table[256] = {
0x00,0x56,0x75,0x88,0x8c,0x06,0x58,0x72, 0x83,0x86,0x36,0x0b,0x5f,0xd3,0x8c,0xe9, /* 00 */
/*r*//*r*//*r*//*r*//*r*//*a*//*r*/ /*a*//*a*//*x*/ /*a*//*a*//*r*//*r*/
0x10,0x11,0x03,0x13,0xeb,0x15,0x16,0x0f, 0xa4,0xbd,0x75,0xf3,0x4f,0x1d,0x8e,0xfe, /* 10 */
/*r*/ /*r*/ /*r*/ /*r*//*a*//*r*//*r*//*r*/ /*x*//*r*/
0x87,0xe8,0xb1,0x8d,0x36,0xb5,0x43,0x73, 0x28,0x5b,0x2a,0x2b,0x24,0x8a,0x03,0x80, /* 20 */
/*a*//*r*//*r*//*r*//*x*//*r*//*r*//*r*/ /*r*/ /*a*//*r*//*a*//*r*/
0x86,0x8b,0xd1,0x3e,0x8d,0x3e,0x58,0xfb, 0xc3,0x79,0xbd,0x3b,0x8a,0xe8,0x0f,0x81, /* 30 */
/*a*//*a*//*a*//*a*//*r*//*r*//*a*//*r*/ /*r*//*a*//*a*/ /*r*//*r*//*r*//*r*/
0x40,0xd0,0x8b,0xeb,0xff,0xb8,0x46,0x8b, 0x48,0xa2,0x4a,0x4b,0xab,0x4d,0x80,0x59, /* 40 */
/*r*//*a*//*r*//*a*//*x*/ /*a*/ /*a*/ /*r*/ /*r*//*a*/
0x50,0x72,0xb5,0xbd,0xb0,0x88,0x50,0x0f, 0xfe,0x59,0xc3,0x5b,0x8a,0x5d,0x5e,0x75, /* 50 */
/*a*//*a*//*r*//*r*//*a*//*a*//*a*/ /*r*/ /*r*/ /*r*/ /*r*/
0x60,0xb3,0x74,0x0a,0x68,0x24,0xbb,0x67, 0x75,0x47,0xfe,0x6b,0x6c,0xc3,0x88,0xd2, /* 60 */
/*r*//*a*//*r*//*a*//*a*//*W*/ /*r*//*a*//*r*/ /*a*//*r*//*a*/
0x3e,0x71,0x8c,0x33,0x0f,0x75,0x8b,0x77, 0xb9,0x1e,0xff,0xa2,0x3e,0x7d,0xbe,0x57, /* 70 */
/*r*/ /*r*//*r*//*a*/ /*a*/ /*r*//*r*//*a*//*r*//*a*/ /*r*//*a*/
0x81,0x3a,0xf6,0x88,0xeb,0x85,0x89,0x8a, 0x32,0x80,0x0f,0xb1,0x48,0xc3,0x68,0x72, /* 80 */
/*r*//*r*//*r*//*r*//*a*/ /*a*//*r*/ /*r*//*r*//*r*//*a*//*x*//*a*//*a*//*r*/
0x53,0x91,0xc0,0x93,0xe8,0xb4,0x74,0xbc, 0x98,0x58,0x0a,0xf3,0x75,0xc6,0x9e,0xe8, /* 90 */
/*a*/ /*r*/ /*r*//*r*//*r*//*x*/ /*a*//*r*//*r*//*r*//*x*/ /*r*/
0x26,0x50,0xfc,0x8c,0xa4,0xb1,0xc3,0xa7, 0xeb,0x83,0xa4,0xbf,0x26,0xad,0x46,0xfe, /* a0 */
/*r*//*a*//*a*//*r*/ /*a*//*r*/ /*a*//*r*//*r*//*r*//*r*/ /*a*//*r*/
0xe2,0x89,0xb2,0x88,0x03,0xb5,0x0f,0xb7, 0xbb,0x04,0xba,0x0f,0x07,0x8a,0x8a,0x33, /* b0 */
/*r*//*a*/ /*r*//*a*/ /*r*/ /*W*//*?*/ /*a*//*r*//*r*//*r*//*x*/
0xfe,0xc1,0xb1,0xa0,0x45,0x36,0xc6,0x5e, 0x8a,0xc9,0xc6,0xea,0x3c,0xcd,0x1e,0xe8, /* c0 */
/*r*/ /*r*//*r*//*r*//*r*/ /*r*/ /*r*/ /*x*//*x*//*r*/ /*r*//*r*/
0xd0,0xeb,0x55,0xf6,0x8a,0xb0,0x5d,0xd7, 0xbb,0x8d,0xf6,0xd0,0xdc,0x88,0xde,0xdf, /* d0 */
/*a*//*r*//*r*//*a*//*a*//*r*/ /*x*//*r*//*r*//*a*/ /*r*/
0x51,0x51,0x74,0xbd,0x32,0xe5,0xe6,0xd2, 0x53,0xc7,0xab,0x36,0xec,0xe9,0x33,0xef, /* e0 */
/*r*//*a*//*r*//*r*//*r*/ /*a*/ /*r*//*x*//*r*//*r*/ /*a*//*r*/
0x2e,0xf1,0x88,0x59,0x74,0x74,0xf6,0x8e, 0x8a,0x8a,0x36,0x08,0x0f,0x45,0xfe,0x2e, /* f0 */
/*r*/ /*r*//*r*//*a*//*a*/ /*x*/ /*r*//*r*//*x*//*a*//*r*//*a*/ /*r*/
};
static const nec_config ts007spy_vfive_config ={ ts007spy_vfive_decryption_table, };
static MACHINE_CONFIG_START( vfive, toaplan2_state )
/* basic machine hardware */
@ -4009,7 +3942,6 @@ static MACHINE_CONFIG_START( vfive, toaplan2_state )
MCFG_CPU_ADD("audiocpu", V25, XTAL_20MHz/2) /* Verified on pcb, NEC V25 type Toaplan mark scratched out */
MCFG_CPU_PROGRAM_MAP(V25_rambased_nooki_mem)
// MCFG_CPU_CONFIG(ts007spy_vfive_config)
MCFG_CPU_CONFIG(ts002mach_config)
MCFG_MACHINE_RESET(vfive)