New systems marked not working

------------------------------
Long Teng Hu Yue [dyq, little0, Guru]

- igs/igs_m027.cpp: preliminary decryption for lthy [IQ_132]
This commit is contained in:
Ivan Vangelista 2024-08-15 07:18:09 +02:00
parent 3a0825a374
commit 89af2ffaa9
4 changed files with 110 additions and 0 deletions

View File

@ -79,6 +79,7 @@ public:
void init_olympic5();
void init_tripfev();
void init_wldfruit();
void init_lthy();
[[maybe_unused]] void init_no_dec();
protected:
@ -859,6 +860,60 @@ ROM_START( mgzz ) // IGS PCB 0295-00 (IGS027A, M6295, IGS031, 8255, Battery)
ROM_LOAD( "sp.u14", 0x00000, 0x80000, CRC(f037952e) SHA1(0fa83e164937c9e8245861da7fd11f225525918d) )
ROM_END
/*********************************************************************************
Long Teng Hu Yue, IGS 1999
PCB Layout
----------
IGS PCB-0227-03
|-----------------------------------------|
| JAMMA |
|1 M2401.U17 |
|8 22MHz 27C4096.U9 |
|W SW1 |
|A SW2 |
|Y LM2933 |
| IGS031 PAL |
| 61256 |
| IGS027A |
| 82C55 (LABEL D6)
|1 27C4096.U10 |
|0 35256 |
|W |
|A 7805 |
|Y TDA1020 T518B BATTERY |
| VOL K668 S2402.U14 SW3|
|-----------------------------------------|
Notes:
K668 - Oki M6295 clone. Clock 1.000MHz [22/22]. Pin 7 HIGH.
SW1/2 - 8-Position DIP Switch
SW3 - Reset / NVRAM Clear
61256 - EliteMT LP61256 32kBx8-bit SRAM (SOJ28)
35256 - Sanyo LC35256 32kBx8-bit SRAM (SOP28)
T518B - Reset IC
*********************************************************************************/
ROM_START( lthy ) // appears to be a different edition of lhzb3 (GFX and sound ROM match)
ROM_REGION( 0x04000, "maincpu", 0 )
// Internal ROM of IGS027A type G ARM based MCU
ROM_LOAD( "d6_igs027a", 0x00000, 0x4000, NO_DUMP )
ROM_REGION32_LE( 0x80000, "user1", 0 ) // external ARM data / prg
ROM_LOAD( "27c4096.u10", 0x000000, 0x80000, CRC(bd04f2e9) SHA1(3d5a2101c7214a37f159e0d17f3e66a9b6ab94ff) )
ROM_REGION( 0x80000, "igs017_igs031:tilemaps", 0 )
ROM_LOAD( "27c4096.u9", 0x000000, 0x80000, CRC(a82398a9) SHA1(4d2987f57096b7f24ce6571ed3be6dcb33bce88d) )
ROM_REGION( 0x400000, "igs017_igs031:sprites", 0 )
ROM_LOAD( "m2401.u17", 0x000000, 0x400000, CRC(81428f18) SHA1(9fb19c8a79cc3443642f4b044e04735df2cb45be) ) // FIXED BITS (xxxxxxxx0xxxxxxx)
ROM_REGION( 0x100000, "oki", 0 )
ROM_LOAD( "s2402.u14", 0x000000, 0x100000, CRC(56083fe2) SHA1(62afd651809bf5e639bfda6e5579dbf4b903b664) )
ROM_END
/*
@ -1531,6 +1586,13 @@ void igs_m027_state::init_wldfruit()
pgm_create_dummy_internal_arm_region();
}
void igs_m027_state::init_lthy()
{
lthy_decrypt(machine());
//qlgs_gfx_decrypt(machine());
pgm_create_dummy_internal_arm_region();
}
} // anonymous namespace
@ -1547,6 +1609,7 @@ GAME( 1999, amazonkp, amazonia, igs_mahjong, amazonia, igs_m027_state, init_ama
GAME( 1999, fruitpar, 0, igs_mahjong, sdwx, igs_m027_state, init_fruitpar, ROT0, "IGS", "Fruit Paradise (V214)", MACHINE_IS_SKELETON )
GAME( 1999, oceanpar, 0, igs_mahjong, sdwx, igs_m027_state, init_oceanpar, ROT0, "IGS", "Ocean Paradise (V105US)", MACHINE_IS_SKELETON ) // 1999 copyright in ROM
GAME( 1999, oceanpara, oceanpar, igs_mahjong, sdwx, igs_m027_state, init_oceanpar, ROT0, "IGS", "Ocean Paradise (V101US)", MACHINE_IS_SKELETON ) // 1999 copyright in ROM
GAME( 1999, lthy, 0, igs_mahjong, sdwx, igs_m027_state, init_lthy, ROT0, "IGS", "Long Teng Hu Yue", MACHINE_IS_SKELETON )
GAME( 200?, luckycrs, 0, igs_mahjong, sdwx, igs_m027_state, init_luckycrs, ROT0, "IGS", "Lucky Cross (V106SA)", MACHINE_IS_SKELETON )
GAME( 2002, sdwx, 0, igs_mahjong, sdwx, igs_m027_state, init_sdwx, ROT0, "IGS", "Sheng Dan Wu Xian", MACHINE_IS_SKELETON ) // aka Christmas 5 Line? (or Amazonia King II, shares roms at least?)
GAME( 200?, jking02, 0, igs_mahjong, sdwx, igs_m027_state, init_jking02, ROT0, "IGS", "Jungle King 2002 (V209US)", MACHINE_IS_SKELETON )

View File

@ -2273,3 +2273,48 @@ void wldfruit_decrypt(running_machine &machine)
src[i] = x;
}
}
static const uint8_t lthy_tab[0x100] = { // IGS MAHJONG CHINA S104CN
0x08, 0xb1, 0x64, 0x36, 0x90, 0xfa, 0x88, 0xbf, 0xca, 0xd6, 0xcf, 0x87, 0x5b, 0x88, 0xf7, 0xc6,
0x32, 0xfe, 0x7d, 0xcc, 0xc2, 0x3d, 0xfb, 0x0c, 0x81, 0x0c, 0xc2, 0x6c, 0xa0, 0xe0, 0xb3, 0xcc,
0x0d, 0x08, 0x63, 0xd5, 0xa7, 0x19, 0x6f, 0x03, 0xc1, 0x9c, 0x1c, 0xf6, 0xd9, 0xf7, 0x33, 0xf5,
0x9a, 0x99, 0x1c, 0xc3, 0x0f, 0x6a, 0x3a, 0xa7, 0x29, 0x71, 0x86, 0xb6, 0x75, 0xc8, 0x6e, 0x64,
0x16, 0xbd, 0xf0, 0x4a, 0x09, 0x4a, 0xf3, 0x39, 0x9a, 0xb7, 0xe5, 0x81, 0x21, 0x8e, 0x9b, 0x7b,
0x02, 0xbf, 0x65, 0x5d, 0xe4, 0x14, 0x71, 0x3f, 0x31, 0xd8, 0x62, 0x68, 0xcf, 0xc3, 0x31, 0xdf,
0x1c, 0x2a, 0x43, 0x2e, 0x2f, 0x64, 0xcc, 0x79, 0x4e, 0x7f, 0x63, 0xc0, 0xab, 0x24, 0xe6, 0x71,
0x64, 0xc8, 0x91, 0x31, 0xba, 0x15, 0x5a, 0xec, 0x90, 0x98, 0x8f, 0x1b, 0x26, 0xab, 0xb2, 0x55,
0x17, 0xa5, 0x95, 0x19, 0x91, 0x41, 0xb2, 0xda, 0xd5, 0x4d, 0xcd, 0x4c, 0xef, 0x94, 0xcd, 0xee,
0xb6, 0x0c, 0xd6, 0xd8, 0x06, 0x44, 0xac, 0xc7, 0x3d, 0x09, 0x44, 0x66, 0xf4, 0x58, 0xac, 0xdf,
0xff, 0x88, 0x1d, 0xa2, 0xa7, 0xb8, 0x5e, 0x75, 0x27, 0x77, 0x5b, 0xbd, 0x64, 0xb3, 0x06, 0x0b,
0xf1, 0xe4, 0x6f, 0xea, 0x43, 0x79, 0x1f, 0xe8, 0x31, 0x82, 0xb9, 0xe2, 0xaf, 0xa0, 0xd4, 0x95,
0xcc, 0x2a, 0x13, 0x62, 0xe9, 0xa1, 0x86, 0x61, 0x3b, 0x56, 0x46, 0xaa, 0x84, 0x5a, 0x4b, 0xe0,
0x0d, 0xa6, 0x91, 0xfe, 0xe8, 0x8c, 0x6b, 0x66, 0x64, 0x5d, 0x27, 0x27, 0xd0, 0x5c, 0xe4, 0x8e,
0x75, 0xe3, 0xaf, 0xf1, 0xce, 0xd4, 0xe5, 0xb7, 0x0a, 0x43, 0xc5, 0xac, 0xc5, 0x61, 0x54, 0x84,
0x02, 0xac, 0x76, 0xad, 0x6c, 0x55, 0x49, 0x59, 0xce, 0xf1, 0xc5, 0xcc, 0xd0, 0x64, 0x93, 0xe3
};
void lthy_decrypt(running_machine &machine)
{
auto const src = reinterpret_cast<u16 *>(machine.root_device().memregion("user1")->base());
int const rom_size = 0x80000;
for (int i = 0; i < rom_size / 2; i++)
{
uint16_t x = src[i];
IGS27_CRYPT1
IGS27_CRYPT2_ALT // correct-85a8
IGS27_CRYPT3 // correct-85a8
IGS27_CRYPT4 // correct-85a8
IGS27_CRYPT5 // correct-125c0
IGS27_CRYPT6_ALT // correct
IGS27_CRYPT7 // ?
IGS27_CRYPT8 // correct 12c0
x ^= lthy_tab[(i>> 1) & 0xff] << 8;
src[i] = x;
}
}

View File

@ -52,3 +52,4 @@ void olympic5_decrypt(running_machine &machine);
void icescape_decrypt(running_machine &machine);
void tripfev_decrypt(running_machine &machine);
void wldfruit_decrypt(running_machine &machine);
void lthy_decrypt(running_machine &machine);

View File

@ -20229,6 +20229,7 @@ jking02 // (c) 200?
klxyj // (c) 200?
lhzb3 // (c) 200?
lhzb4 // (c) 200?
lthy // (c) 1999
luckycrs // (c) 200?
mgcs3 // (c) 200?
mgfx // (c) 200?