mirror of
https://github.com/holub/mame
synced 2025-05-02 20:46:41 +03:00
pgm.c: Added preliminary decryption to svgpcb. [iq132]
This commit is contained in:
parent
8400e33f10
commit
ce2c323a95
@ -4711,6 +4711,13 @@ static DRIVER_INIT( svg )
|
||||
kov2_latch_init(machine);
|
||||
}
|
||||
|
||||
static DRIVER_INIT( svgpcb )
|
||||
{
|
||||
svg_basic_init(machine);
|
||||
pgm_svgpcb_decrypt(machine);
|
||||
kov2_latch_init(machine);
|
||||
}
|
||||
|
||||
static DRIVER_INIT( killbldp )
|
||||
{
|
||||
svg_basic_init(machine);
|
||||
@ -6052,7 +6059,7 @@ GAME( 2005, killbldp, pgm, svg, sango, killbldp, ROT0, "IGS
|
||||
GAME( 2004, happy6, pgm, svg, sango, svg, ROT0, "IGS", "Happy 6-in-1 (ver. 101CN)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
|
||||
|
||||
GAME( 2005, svg, pgm, svg, sango, svg, ROT0, "IGS / Idea Factory", "S.V.G. - Spectral vs Generation (M68k label V200) (ARM label V200, ROM 10/11/05 S.V.G V201)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */ // label was 200, but it's code rev 201? // ARM time: 10:07:20
|
||||
GAME( 2005, svgpcb, svg, svg, sango, svg, ROT0, "IGS / Idea Factory", "S.V.G. - Spectral vs Generation (M68k label V100JP) (ARM label V100JP) (JAMMA PCB)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */ // different encryption?
|
||||
GAME( 2005, svgpcb, svg, svg, sango, svgpcb, ROT0, "IGS / Idea Factory", "S.V.G. - Spectral vs Generation (M68k label V100JP) (ARM label V100JP ROM 05/12/05 S.V.G V100) (JAMMA PCB)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */ // ARM time: 15:31:35
|
||||
|
||||
/* these don't use an External ARM rom, and don't have any weak internal functions which would allow the internal ROM to be read out */
|
||||
|
||||
|
@ -133,6 +133,7 @@ void pgm_oldsplus_decrypt(running_machine &machine);
|
||||
void pgm_kovshp_decrypt(running_machine &machine);
|
||||
void pgm_killbldp_decrypt(running_machine &machine);
|
||||
void pgm_svg_decrypt(running_machine &machine);
|
||||
void pgm_svgpcb_decrypt(running_machine &machine);
|
||||
void pgm_ket_decrypt(running_machine &machine);
|
||||
void pgm_espgal_decrypt(running_machine &machine);
|
||||
|
||||
|
@ -946,6 +946,52 @@ void pgm_svg_decrypt(running_machine &machine)
|
||||
}
|
||||
}
|
||||
|
||||
static const unsigned char svgpcb_tab[0x100] = { // not checked
|
||||
0x49, 0x47, 0x53, 0x30, 0x30, 0x31, 0x37, 0x52, 0x44, 0x31, 0x30, 0x35, 0x30, 0x35, 0x30, 0x34,
|
||||
0x75, 0x0B, 0xF1, 0x6B, 0x6D, 0xD7, 0xA8, 0xE7, 0x0C, 0xC5, 0x28, 0x81, 0x1F, 0xCF, 0x30, 0x15,
|
||||
0xA8, 0x0D, 0xDA, 0x76, 0xF8, 0x7D, 0xD6, 0xE1, 0x0A, 0x11, 0xE3, 0xA4, 0x23, 0xFF, 0x8E, 0x0B,
|
||||
0xA8, 0x44, 0x2F, 0x8B, 0x3F, 0x7A, 0x21, 0x32, 0x2A, 0xDC, 0x41, 0x4E, 0xE0, 0x97, 0xA9, 0x5D,
|
||||
0xED, 0x53, 0xAE, 0x35, 0x0B, 0x02, 0x18, 0x74, 0x82, 0xE8, 0xA1, 0x2A, 0xBD, 0xEB, 0xB0, 0xC6,
|
||||
0x2E, 0x1D, 0x56, 0x3E, 0x63, 0x87, 0x8A, 0x83, 0x69, 0x38, 0xA1, 0x24, 0x61, 0x8F, 0x11, 0x41,
|
||||
0x61, 0xC5, 0x67, 0xB3, 0x8E, 0xBE, 0x85, 0x79, 0x77, 0x10, 0x21, 0x66, 0xB4, 0x54, 0x7B, 0x09,
|
||||
0xBF, 0xAD, 0x5E, 0xDD, 0x12, 0x97, 0x5A, 0xB2, 0x82, 0xF3, 0x40, 0x5B, 0xDB, 0x4F, 0xDE, 0x99,
|
||||
0xBD, 0x7A, 0xFC, 0x48, 0xB6, 0x48, 0x97, 0xC8, 0xA1, 0xA2, 0x5C, 0xAE, 0x3E, 0xD2, 0x68, 0xAC,
|
||||
0x13, 0x0D, 0x3F, 0xBE, 0x82, 0x42, 0x0A, 0x97, 0x2C, 0x22, 0x16, 0x4B, 0x85, 0x70, 0x89, 0x3D,
|
||||
0xB8, 0x8B, 0x66, 0x4C, 0xBD, 0x39, 0xC4, 0x39, 0xB9, 0xB6, 0x4B, 0x5C, 0x96, 0xFC, 0xEF, 0x87,
|
||||
0xE3, 0x55, 0xF1, 0x3B, 0xED, 0x1F, 0x13, 0x0A, 0x1F, 0xDF, 0x1A, 0x4C, 0x97, 0x8A, 0x8A, 0x06,
|
||||
0x0A, 0x0F, 0x9D, 0x17, 0xDA, 0x28, 0x85, 0xA4, 0x75, 0x63, 0xE4, 0xC6, 0xF1, 0x6B, 0x88, 0x73,
|
||||
0xE6, 0x9C, 0x6B, 0xAA, 0x8B, 0xC7, 0xEA, 0xE3, 0x13, 0x42, 0x46, 0xB6, 0x4A, 0x34, 0x59, 0xCA,
|
||||
0x6C, 0x1F, 0x99, 0x01, 0x46, 0xAE, 0x52, 0xE1, 0x90, 0xC1, 0x1F, 0x46, 0x89, 0xB7, 0xAB, 0x46,
|
||||
0xD4, 0xFB, 0xA6, 0x65, 0x92, 0xD1, 0x0A, 0xFA, 0xC1, 0x63, 0x90, 0xE1, 0xD5, 0x07, 0x6D, 0x62
|
||||
};
|
||||
|
||||
void pgm_svgpcb_decrypt(running_machine &machine)
|
||||
{
|
||||
int i;
|
||||
UINT16 *src = (UINT16 *)(machine.region("user1")->base());
|
||||
|
||||
int rom_size = 0x800000;
|
||||
|
||||
for (i = 0; i < rom_size/2; i++) {
|
||||
UINT16 x = src[i];
|
||||
|
||||
// preliminary!
|
||||
if ((i & 0x040080) != 0x000080) x ^= 0x0001; // ok?
|
||||
if ((i & 0x084008) == 0x084008) x ^= 0x0002;
|
||||
if ((i & 0x080030) == 0x080010) x ^= 0x0004;
|
||||
if ((i & 0x000242) != 0x000042) x ^= 0x0008; // ok?
|
||||
if ((i & 0x048100) == 0x048000) x ^= 0x0010; //
|
||||
if ((i & 0x022004) != 0x000004) x ^= 0x0020; // ok?
|
||||
if ((i & 0x011800) != 0x010000) x ^= 0x0040;
|
||||
if ((i & 0x000820) == 0x000820) x ^= 0x0080;
|
||||
|
||||
x ^= svgpcb_tab[(i >> 1) & 0xff] << 8;
|
||||
|
||||
src[i] = x;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static const UINT8 py2k2_tab[256] = {
|
||||
0x74, 0xe8, 0xa8, 0x64, 0x26, 0x44, 0xa6, 0x9a, 0xa5, 0x69, 0xa2, 0xd3, 0x6d, 0xba, 0xff, 0xf3,
|
||||
0xeb, 0x6e, 0xe3, 0x70, 0x72, 0x58, 0x27, 0xd9, 0xe4, 0x9f, 0x50, 0xa2, 0xdd, 0xce, 0x6e, 0xf6,
|
||||
|
Loading…
Reference in New Issue
Block a user