Skip to content

Commit 2a7b07a

Browse files
committed
- igs/igs_m027.cpp: dumped missing ROM for tshs [Mr. Kong, little0]
- igs/pgmcrypt.cpp: added deecryption tables for jking04 and krzykeno [IQ_132]
1 parent 0c6e600 commit 2a7b07a

File tree

4 files changed

+94
-1
lines changed

4 files changed

+94
-1
lines changed

src/mame/igs/igs_m027.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3025,7 +3025,7 @@ ROM_START( tshs ) // IGS PCB-0267. See above for PCB layout
30253025

30263026
ROM_REGION( 0x480000, "igs017_igs031:sprites", 0 )
30273027
ROM_LOAD( "igs_a3701_anim_v100.u17", 0x000000, 0x400000, CRC(bed56f35) SHA1(5a29d2a39fd997ed9ef0ec695c63629ee2303ce2) ) // FIXED BITS (xxxxxxxx0xxxxxxx)
3028-
ROM_LOAD( "u18", 0x400000, 0x080000, NO_DUMP )
3028+
ROM_LOAD( "u18", 0x400000, 0x080000, CRC(fb2e91a8) SHA1(29b2f0ce3749539cbe4cfb5c40b240cc7f6147f1) ) // FIXED BITS (xxxxxxxx0xxxxxxx)
30293029

30303030
ROM_REGION( 0x80000, "oki", 0 )
30313031
ROM_LOAD( "v102cn.u14", 0x00000, 0x80000, CRC(fc055df1) SHA1(8ed0334a3947833a6192e6d4ea9678d8facea119) )

src/mame/igs/igs_m027xa.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -913,13 +913,15 @@ void igs_m027xa_state::init_wldfruit()
913913

914914
void igs_m027xa_state::init_jking04()
915915
{
916+
jking04_decrypt(machine());
916917
pgm_create_dummy_internal_arm_region();
917918
m_igs017_igs031->sdwx_gfx_decrypt();
918919
m_igs017_igs031->tarzan_decrypt_sprites(0, 0);
919920
}
920921

921922
void igs_m027xa_state::init_krzykeno()
922923
{
924+
krzykeno_decrypt(machine());
923925
pgm_create_dummy_internal_arm_region();
924926
m_igs017_igs031->sdwx_gfx_decrypt();
925927
m_igs017_igs031->tarzan_decrypt_sprites(0, 0);

src/mame/igs/pgmcrypt.cpp

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1938,3 +1938,92 @@ void tswxp_decrypt(running_machine &machine)
19381938
src[i] ^= x;
19391939
}
19401940
}
1941+
1942+
static const uint8_t jking04_tab[0x100] = { // IGS0117RD1031030
1943+
0x49, 0x47, 0x53, 0x30, 0x31, 0x31, 0x37, 0x52, 0x44, 0x31, 0x30, 0x33, 0x31, 0x30, 0x33, 0x30,
1944+
0xe0, 0xb2, 0xbc, 0x4a, 0x7d, 0xf4, 0xc2, 0xaf, 0x88, 0x1e, 0x23, 0xa5, 0xbf, 0x31, 0xc2, 0x4d,
1945+
0x6b, 0x4c, 0x79, 0xad, 0xc9, 0x09, 0x25, 0x2c, 0xbb, 0x1d, 0xf6, 0x4e, 0xb0, 0x2b, 0xf5, 0xb1,
1946+
0xd0, 0xe8, 0xd6, 0x49, 0x6d, 0x75, 0x00, 0xd8, 0xa6, 0xf9, 0xdb, 0xb1, 0x5d, 0x7e, 0x59, 0xad,
1947+
0x5c, 0x0e, 0xc7, 0x6e, 0xc3, 0x0f, 0xd6, 0xd3, 0xb5, 0xdb, 0xe5, 0xbc, 0x42, 0xa3, 0x91, 0xff,
1948+
0x98, 0x85, 0x7f, 0xaa, 0x66, 0xec, 0x69, 0x7c, 0x91, 0x29, 0x67, 0x9e, 0x1b, 0x4f, 0x80, 0xa6,
1949+
0x50, 0x54, 0x71, 0xce, 0x32, 0x65, 0xbc, 0x71, 0x27, 0x89, 0xf4, 0xc7, 0xe1, 0x7a, 0x48, 0xe2,
1950+
0x8e, 0xc1, 0x4f, 0xe8, 0x42, 0x10, 0x13, 0x92, 0xa1, 0xe4, 0x60, 0xe6, 0xd1, 0x5b, 0x4e, 0x30,
1951+
0x9f, 0x53, 0x0c, 0x47, 0xf0, 0xc5, 0xf0, 0xfe, 0x6a, 0x60, 0xbd, 0xe8, 0x64, 0x69, 0x33, 0x51,
1952+
0x0c, 0xd2, 0xdd, 0x7a, 0xd7, 0x9a, 0x16, 0x14, 0x2e, 0x64, 0x5d, 0xff, 0x57, 0x5b, 0xdb, 0x43,
1953+
0xa1, 0x45, 0x33, 0x4f, 0xd3, 0xe6, 0x89, 0x72, 0xd7, 0x97, 0xd5, 0x98, 0xa3, 0x27, 0x6a, 0x46,
1954+
0x68, 0xf2, 0xc1, 0xd7, 0xff, 0x40, 0x8b, 0xf8, 0x90, 0xe1, 0xf7, 0x62, 0x84, 0x06, 0x41, 0xd7,
1955+
0xae, 0x61, 0x7c, 0x60, 0xb5, 0x80, 0xa0, 0xc5, 0xc5, 0x67, 0xd6, 0x4d, 0x76, 0x6d, 0x04, 0xb7,
1956+
0xfc, 0x59, 0x94, 0x78, 0x91, 0xbc, 0x8a, 0x37, 0x1f, 0x91, 0xc6, 0x87, 0x32, 0x14, 0x95, 0xe4,
1957+
0x1e, 0xe0, 0x7f, 0xf0, 0x6d, 0x4c, 0x4c, 0xee, 0x8b, 0x07, 0x58, 0x7f, 0xb5, 0xf1, 0x19, 0x9d,
1958+
0x1f, 0x3d, 0xee, 0xd5, 0x64, 0xc6, 0x2a, 0xc9, 0x34, 0xae, 0x61, 0xe5, 0x38, 0x3d, 0xf2, 0x61
1959+
};
1960+
1961+
void jking04_decrypt(running_machine &machine)
1962+
{
1963+
auto const src = reinterpret_cast<u16 *>(machine.root_device().memregion("user1")->base());
1964+
1965+
int const rom_size = 0x80000;
1966+
1967+
for (int i = 0; i < rom_size / 2; i++)
1968+
{
1969+
uint16_t x = src[i];
1970+
1971+
IGS27_CRYPT1_ALT
1972+
IGS27_CRYPT2
1973+
IGS27_CRYPT3
1974+
IGS27_CRYPT4_ALT
1975+
IGS27_CRYPT5_ALT
1976+
IGS27_CRYPT6
1977+
IGS27_CRYPT7
1978+
IGS27_CRYPT8
1979+
1980+
x ^= jking04_tab[(i >> 1) & 0xff] << 8;
1981+
1982+
src[i] = x;
1983+
}
1984+
}
1985+
1986+
1987+
static const uint8_t krzykeno_tab[0x100] = { // IGS0269RD4060929
1988+
0x49, 0x47, 0x53, 0x30, 0x32, 0x36, 0x39, 0x52, 0x44, 0x34, 0x30, 0x36, 0x30, 0x39, 0x32, 0x39,
1989+
0x9d, 0xde, 0x68, 0x8c, 0xc9, 0x53, 0x25, 0xc7, 0xd4, 0x48, 0x3e, 0x59, 0x90, 0x33, 0x8f, 0xfb,
1990+
0x68, 0x5b, 0x97, 0x74, 0x3a, 0x62, 0x6a, 0xc6, 0x71, 0x14, 0xf3, 0x98, 0x67, 0x6e, 0x6f, 0xe3,
1991+
0xfa, 0xf2, 0x27, 0xe1, 0x6c, 0x2a, 0x6e, 0x33, 0x80, 0x7b, 0xda, 0x51, 0xd3, 0x2c, 0xc6, 0x37,
1992+
0x78, 0xb7, 0x08, 0x4e, 0xd8, 0x4f, 0xf0, 0x98, 0xc8, 0xb1, 0x81, 0x20, 0xeb, 0x30, 0xf3, 0xa1,
1993+
0x4b, 0xfb, 0x69, 0x75, 0x33, 0xb2, 0xef, 0xc1, 0x4f, 0x29, 0xb7, 0xdf, 0x07, 0x7b, 0x94, 0x0c,
1994+
0x18, 0x53, 0xb8, 0x53, 0x75, 0x77, 0xaa, 0xb9, 0x5d, 0x95, 0x8b, 0xaa, 0xbd, 0x52, 0x89, 0xa4,
1995+
0xc8, 0x91, 0xa4, 0x22, 0xd5, 0x01, 0xa1, 0xcb, 0x78, 0xe9, 0x4b, 0xdc, 0xe4, 0x38, 0xf1, 0xd2,
1996+
0x81, 0xc8, 0x1d, 0x5d, 0xc9, 0xf2, 0x91, 0x82, 0x68, 0x58, 0x88, 0x0f, 0x94, 0xef, 0x2b, 0x44,
1997+
0xaa, 0x4b, 0x51, 0xbf, 0x0a, 0x2f, 0x7b, 0xa8, 0x34, 0x54, 0x0f, 0x1e, 0x23, 0x7a, 0xd5, 0xe2,
1998+
0xea, 0xad, 0xb0, 0x42, 0x8d, 0xd9, 0x9d, 0x49, 0x22, 0x91, 0xf1, 0x25, 0x29, 0x1c, 0xcf, 0xd8,
1999+
0x28, 0xc2, 0xe8, 0x23, 0x8a, 0x55, 0x77, 0xb0, 0xba, 0x02, 0x7b, 0x7e, 0x7b, 0x59, 0x37, 0x92,
2000+
0x8b, 0x9b, 0xe8, 0xdc, 0x78, 0x44, 0xc6, 0x67, 0xc2, 0xd9, 0x3e, 0xc5, 0x32, 0xf4, 0x6d, 0xba,
2001+
0x7a, 0x8d, 0xe0, 0x28, 0x0e, 0x8a, 0x8b, 0x3b, 0x42, 0x8a, 0x07, 0xd5, 0xa5, 0xef, 0x10, 0x3c,
2002+
0x9d, 0x2a, 0x3f, 0x02, 0x43, 0x4b, 0x04, 0x35, 0x81, 0xc8, 0xe7, 0xc8, 0x69, 0x8d, 0xff, 0x41,
2003+
0xd9, 0x45, 0xb3, 0xa5, 0x4d, 0xe8, 0xb0, 0xa1, 0x05, 0x85, 0x2b, 0xf9, 0x58, 0x51, 0x58, 0x36
2004+
};
2005+
2006+
void krzykeno_decrypt(running_machine &machine)
2007+
{
2008+
auto const src = reinterpret_cast<u16 *>(machine.root_device().memregion("user1")->base());
2009+
2010+
int const rom_size = 0x200000;
2011+
2012+
for (int i = 0; i < rom_size / 2; i++)
2013+
{
2014+
uint16_t x = src[i];
2015+
2016+
IGS27_CRYPT1
2017+
IGS27_CRYPT2_ALT
2018+
IGS27_CRYPT3_ALT
2019+
IGS27_CRYPT4
2020+
IGS27_CRYPT5_ALT
2021+
IGS27_CRYPT6
2022+
IGS27_CRYPT7
2023+
IGS27_CRYPT8
2024+
2025+
x ^= krzykeno_tab[(i >> 1) & 0xff] << 8;
2026+
2027+
src[i] = x;
2028+
}
2029+
}

src/mame/igs/pgmcrypt.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,7 @@ void mxsqy_decrypt(running_machine& machine) ATTR_COLD;
6464
void qiji6_decrypt(running_machine& machine) ATTR_COLD;
6565
void mjzb_decrypt(running_machine& machine) ATTR_COLD;
6666
void tswxp_decrypt(running_machine& machine) ATTR_COLD;
67+
void jking04_decrypt(running_machine& machine) ATTR_COLD;
68+
void krzykeno_decrypt(running_machine& machine) ATTR_COLD;
6769

6870
#endif // MAME_IGS_PGMCRYPT_H

0 commit comments

Comments
 (0)