Further MCU progress for Shogun Warriors [David Haywood]

(NOTE:  Apologies if this ruins your previous cleaning, Aaron.  The previous machine/kaneko16.c I posted just minutes before you made the version snap didn't have the Shogun improvements).
This commit is contained in:
Scott Stone 2009-08-29 23:44:40 +00:00
parent 5df39c5473
commit d35f5fcda6

View File

@ -732,6 +732,13 @@ static UINT8 calc3_key04[64] = {
0x75,0x1c,0x72,0x3a,0x20,0xe1,0xcd,0xac,0x5d,0x8c,0x6d,0xa9,0x66,0x1d,0x41,0xca,
};
static UINT8 calc3_key12[64] = {
0xdb,0xc0,0xb2,0x8c,0x40,0x69,0xee,0xf1,0x84,0x04,0xa7,0xe7,0x01,0x35,0xe1,0x8f,
0xc1,0x8b,0xe2,0x4c,0x0d,0xda,0x19,0xfd,0xb9,0x5a,0xce,0xfa,0x2c,0x83,0x8d,0xd0,
0x31,0xa5,0x52,0xbb,0x7f,0x49,0x75,0xe6,0x09,0x4b,0x53,0x64,0x06,0xb3,0xc0,0xec,
0xbf,0x56,0x2f,0x57,0x1a,0x30,0x9d,0xd9,0xe9,0x7e,0x41,0x01,0xf2,0x9d,0xf5,0x72,
};
/* ok - shogwarr */
static UINT8 calc3_key15[64] = {
0x0C,0xEB,0x30,0x25,0xA8,0xED,0xE3,0x23,0xAC,0x2B,0x8D,0x34,0x88,0x9F,0x55,0xB5,
@ -740,6 +747,13 @@ static UINT8 calc3_key15[64] = {
0xC8,0xB6,0xCF,0x46,0x4B,0xF0,0x15,0xD7,0xB0,0xB5,0x29,0xB8,0xFD,0x43,0x5C,0xC0
};
static UINT8 calc3_key16[64] = {
0xca,0xe0,0x0d,0xfa,0x2f,0x78,0xcd,0x61,0x97,0x87,0x45,0xe8,0x4a,0x39,0xe9,0xbe,
0x43,0xd0,0x6f,0xcf,0xbc,0x47,0xb6,0x8e,0x77,0x35,0x76,0xf2,0xcc,0xf3,0xab,0xbe,
0x77,0x01,0xc1,0x06,0x1e,0xa6,0x80,0xef,0xa3,0xd7,0xb5,0xb6,0x2e,0x5a,0xa4,0xf4,
0xf8,0x2b,0x30,0x20,0xd8,0x1f,0xc6,0x55,0x8f,0xc7,0x0d,0x55,0xd2,0x97,0x4f,0xce,
};
static UINT8 calc3_key17[64] = {
0x1b,0x48,0xa4,0xdd,0x2e,0x7a,0xe3,0xd1,0x6d,0x9e,0x49,0x31,0xdb,0x13,0xe6,0x00,
0xf1,0x8f,0xcb,0x3f,0x23,0xc1,0xf3,0xb4,0x30,0x35,0xf4,0xea,0x2c,0x77,0x65,0x79,
@ -747,6 +761,8 @@ static UINT8 calc3_key15[64] = {
0xc4,0xc4,0x98,0x36,0xb3,0x75,0x16,0x33,0xf2,0x45,0x84,0xb8,0xf2,0xdb,0xc7,0x46,
};
static UINT8 calc3_key19[64] = {
0x30,0x72,0xe0,0xca,0xa4,0xe5,0x41,0x44,0xd4,0xfe,0xe6,0x82,0x3e,0x85,0x18,0x30,
0x50,0x17,0x9f,0x77,0xf8,0xcb,0xb0,0xc4,0xed,0x16,0x96,0xca,0xba,0xec,0x22,0xca,
@ -774,6 +790,20 @@ static UINT8 calc3_key31[64] = {
0x6d,0x44,0x77,0x4b,0xd7,0x26,0x2f,0xc3,0x4c,0xf8,0xee,0xb1,0xc7,0x76,0x68,0x22,
0x94,0x6a,0x35,0x82,0xe0,0x02,0xb7,0xda,0xff,0xf2,0xc7,0xcc,0x7b,0x48,0x25,0x4f,
};
static UINT8 calc3_key32[64] = {
0xe0,0xee,0x9d,0xd7,0x49,0x50,0xf9,0xd0,0xa8,0x07,0xa9,0xc1,0xd8,0xf1,0x33,0x07,
0x63,0xfe,0x5b,0xc0,0x13,0xda,0x12,0x8e,0x3a,0xcc,0x1e,0x97,0xc1,0xdd,0x8d,0xd1,
0xf2,0x3e,0xda,0x7c,0x04,0xe4,0xdc,0xef,0x69,0x75,0x72,0x98,0xd9,0x67,0xee,0x3f,
0x1d,0x66,0x44,0x8a,0x9c,0xf7,0xf2,0xc6,0xa7,0x5c,0xae,0xe4,0x83,0xb7,0xd1,0xc2,
};
// double check it
static UINT8 calc3_key36[64] = {
0xaf,0x2e,0xd9,0xfd,0x18,0xd1,0xb8,0xc2,0x9b,0x33,0x28,0x30,0x01,0xff,0x1c,0xf4,
0xc6,0xf9,0xc9,0x7c,0xa2,0x9a,0x8f,0xb9,0xd9,0xfa,0xa7,0x24,0x42,0xf3,0x8b,0xff,
0x18,0x84,0x29,0xdd,0x82,0x73,0xc7,0x64,0xe3,0x37,0xb3,0x52,0xe2,0x14,0xb2,0xbe,
0x37,0x88,0x25,0xa0,0x3b,0xe6,0xfb,0x94,0x2d,0x41,0x59,0xdb,0x44,0x8b,0x0b,0xa3,
};
static UINT8 calc3_key39[64] = {
0x7d,0xf8,0x54,0xc5,0x74,0xf6,0x54,0x1d,0x40,0xe1,0x71,0xc2,0xdd,0x03,0x72,0xdf,
@ -1129,12 +1159,16 @@ int calc3_decompress_table(running_machine* machine, int tabnum, UINT8* dstram,
if (calc3_decryption_key_byte == 0x01) key = calc3_key01;
if (calc3_decryption_key_byte == 0x04) key = calc3_key04;
if (calc3_decryption_key_byte == 0x05) key = calc3_key05;
if (calc3_decryption_key_byte == 0x12) key = calc3_key12;
if (calc3_decryption_key_byte == 0x15) key = calc3_key15;
if (calc3_decryption_key_byte == 0x16) key = calc3_key16;
if (calc3_decryption_key_byte == 0x17) key = calc3_key17;
if (calc3_decryption_key_byte == 0x19) key = calc3_key19;
if (calc3_decryption_key_byte == 0x22) key = calc3_key22;
if (calc3_decryption_key_byte == 0x24) key = calc3_key24;
if (calc3_decryption_key_byte == 0x31) key = calc3_key31;
if (calc3_decryption_key_byte == 0x32) key = calc3_key32;
if (calc3_decryption_key_byte == 0x36) key = calc3_key36;
if (calc3_decryption_key_byte == 0x39) key = calc3_key39;
if (calc3_decryption_key_byte == 0x3f) key = calc3_key3f;
if (calc3_decryption_key_byte == 0x80) key = calc3_key80;
@ -1168,7 +1202,14 @@ int calc3_decompress_table(running_machine* machine, int tabnum, UINT8* dstram,
(tabnum==0x26 && isbrap) ||
(tabnum==0x27 && isbrap) ||
(tabnum==0x2a && isbrap) ||
(tabnum==0x41 && !isbrap))
(tabnum==0x41 &&!isbrap) ||
/*(tabnum==0x10 &&!isbrap) ||
(tabnum==0x11 &&!isbrap) ||*/
(tabnum==0x33 &&!isbrap) ||
(tabnum==0x36 &&!isbrap) ||
(tabnum==0x63 &&!isbrap) ||
(tabnum==0x66 &&!isbrap)
)
{
dat -= key[i&0x3f];
@ -1431,7 +1472,7 @@ void calc3_mcu_run(running_machine *machine)
printf("writing back address %08x to %08x %08x\n", calc3_writeaddress_current, commandaddr,write);
#endif
//memory_write_byte(space,write+0x200001, data_header[0]); // maybe not.. check first boss brapboysj
memory_write_byte(space,write+0x200000, data_header[0]);
memory_write_byte(space,write+0x200001, data_header[1]);
write=commandaddr+(char)commandunk;