diff --git a/src/mame/igs/igs_m027.cpp b/src/mame/igs/igs_m027.cpp index 83e5730ac1b..a8b9ad19969 100644 --- a/src/mame/igs/igs_m027.cpp +++ b/src/mame/igs/igs_m027.cpp @@ -64,6 +64,7 @@ public: void init_klxyj(); void init_slqz3(); void init_fruitpar(); + void init_oceanpar(); void init_amazonia(); void init_amazoni2(); void init_qlgs(); @@ -1215,6 +1216,13 @@ void igs_m027_state::init_fruitpar() pgm_create_dummy_internal_arm_region(); } +void igs_m027_state::init_oceanpar() +{ + oceanpar_decrypt(machine()); + //sdwx_gfx_decrypt(machine()); + pgm_create_dummy_internal_arm_region(); +} + void igs_m027_state::init_amazonia() { amazonia_decrypt(machine()); @@ -1271,8 +1279,8 @@ GAME( 1999, qlgs, 0, igs_mahjong, sdwx, igs_m027_state, init_qlg GAME( 1999, amazonia, 0, igs_mahjong, amazonia, igs_m027_state, init_amazonia, ROT0, "IGS", "Amazonia King (V104BR)", MACHINE_IS_SKELETON ) GAME( 1999, amazonkp, amazonia, igs_mahjong, amazonia, igs_m027_state, init_amazonia, ROT0, "IGS", "Amazonia King Plus (V204BR)", MACHINE_IS_SKELETON ) GAME( 1999, fruitpar, 0, igs_mahjong, sdwx, igs_m027_state, init_fruitpar, ROT0, "IGS", "Fruit Paradise (V214)", MACHINE_IS_SKELETON ) -GAME( 199?, oceanpar, 0, igs_mahjong, sdwx, igs_m027_state, init_fruitpar, ROT0, "IGS", "Ocean Paradise (V105US)", MACHINE_IS_SKELETON ) -GAME( 199?, oceanpara, oceanpar, igs_mahjong, sdwx, igs_m027_state, init_fruitpar, ROT0, "IGS", "Ocean Paradise (V101US)", 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( 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( 2003, amazoni2, 0, igs_mahjong, sdwx, igs_m027_state, init_amazoni2, ROT0, "IGS", "Amazonia King II (V202BR)", MACHINE_IS_SKELETON ) GAME( 200?, sddz, 0, igs_mahjong, sdwx, igs_m027_state, init_sddz, ROT0, "IGS", "Super Dou Di Zhu", MACHINE_IS_SKELETON ) diff --git a/src/mame/igs/pgmcrypt.cpp b/src/mame/igs/pgmcrypt.cpp index f13e605c61f..b52213ff6ee 100644 --- a/src/mame/igs/pgmcrypt.cpp +++ b/src/mame/igs/pgmcrypt.cpp @@ -1607,7 +1607,52 @@ void fruitpar_decrypt(running_machine &machine) } } -static uint8_t amazonia_tab[0x100] = { +static const uint8_t oceanpar_tab[0x100] = { + 0xad, 0xe8, 0xf9, 0xf2, 0x2e, 0x20, 0x6c, 0x06, 0xfe, 0xed, 0x42, 0xaf, 0x60, 0x33, 0x7e, 0xa4, + 0x6d, 0xac, 0x09, 0x5e, 0xc0, 0x8f, 0xfb, 0xd4, 0x61, 0x61, 0x29, 0x75, 0xf4, 0x1b, 0xef, 0x67, + 0x23, 0x7d, 0x3f, 0xff, 0x48, 0xb2, 0xea, 0x81, 0x5f, 0x25, 0x2e, 0x19, 0x2c, 0xa3, 0x81, 0x19, + 0xa8, 0xb2, 0x9d, 0x75, 0xb2, 0x30, 0xcc, 0x7c, 0xf4, 0x30, 0x76, 0xd9, 0x12, 0x11, 0xe8, 0xc9, + 0x1a, 0xe0, 0x67, 0x9e, 0x28, 0xf0, 0x75, 0x75, 0x59, 0xb8, 0x62, 0x34, 0xf3, 0xed, 0x17, 0xc6, + 0xd2, 0xe0, 0x1e, 0x9a, 0x15, 0x1a, 0xf6, 0x5a, 0x0a, 0x35, 0x96, 0xe9, 0x58, 0xfd, 0x40, 0xa0, + 0x6b, 0xc8, 0x88, 0xc8, 0x25, 0x13, 0xa4, 0x5b, 0xc2, 0x5e, 0xf5, 0xf7, 0x0c, 0x49, 0xd7, 0x24, + 0xc1, 0xf0, 0xa6, 0xc7, 0x42, 0x83, 0x11, 0xe6, 0x7d, 0x2a, 0xa2, 0x9e, 0x1c, 0x18, 0x8e, 0x62, + 0xef, 0xee, 0xbb, 0x75, 0x97, 0x52, 0x10, 0xab, 0x74, 0xd0, 0x00, 0x5c, 0xd1, 0xf0, 0x59, 0xa9, + 0x4f, 0x99, 0x4a, 0xf3, 0x8f, 0xa6, 0xb4, 0x98, 0x23, 0xc6, 0xb2, 0xf0, 0xb7, 0x99, 0x6b, 0x88, + 0x7c, 0x08, 0x17, 0x9d, 0xd6, 0xe5, 0x50, 0xdc, 0x46, 0xc5, 0x9b, 0x59, 0x99, 0x19, 0x36, 0xcd, + 0x52, 0x93, 0x24, 0x15, 0x55, 0xb8, 0x77, 0xe7, 0xd6, 0xc2, 0xde, 0xd6, 0x82, 0xb8, 0x6e, 0x89, + 0xec, 0xd1, 0xb5, 0x38, 0x3a, 0x05, 0xfd, 0x68, 0x10, 0xf5, 0xdd, 0xe7, 0xbc, 0xfd, 0x06, 0x0a, + 0xa4, 0x97, 0x4c, 0x26, 0xed, 0xf3, 0xf3, 0x4d, 0x6d, 0xd4, 0x3c, 0x4a, 0xd3, 0xae, 0x30, 0xdf, + 0x15, 0xfe, 0xac, 0x3d, 0x1b, 0xe9, 0xae, 0xc5, 0xa9, 0x18, 0xdf, 0xfe, 0x92, 0xd3, 0x60, 0xd7, + 0x1b, 0x5c, 0xd9, 0x1e, 0xad, 0x8e, 0xc0, 0x40, 0xc0, 0xb7, 0xe7, 0x42, 0x04, 0xb2, 0x49, 0x00 +}; + +void oceanpar_decrypt(running_machine &machine) +{ + auto const src = reinterpret_cast(machine.root_device().memregion("user1")->base()); + + int const rom_size = 0x80000; + + // not 100% verified + for (int i = 0; i < rom_size / 2; i++) + { + uint16_t x = src[i]; + + IGS27_CRYPT1_ALT + IGS27_CRYPT2_ALT + IGS27_CRYPT3_ALT2 + IGS27_CRYPT4 + IGS27_CRYPT5_ALT + IGS27_CRYPT6 + IGS27_CRYPT7_ALT + IGS27_CRYPT8_ALT + + x ^= oceanpar_tab[(i>> 1) & 0xff] << 8; + + src[i] = x; + } +} + +static const uint8_t amazonia_tab[0x100] = { 0x86, 0x00, 0xd2, 0x6b, 0x78, 0x79, 0xbc, 0x80, 0xc6, 0x8e, 0x9b, 0xd8, 0x3a, 0x52, 0x09, 0x15, 0x05, 0x57, 0x7a, 0x1f, 0x2f, 0x08, 0x47, 0xa0, 0x44, 0x4c, 0xf7, 0xbe, 0x3d, 0x59, 0xd1, 0x18, 0xac, 0xd5, 0xa0, 0x03, 0x2c, 0x34, 0xc6, 0x06, 0x08, 0x4e, 0x84, 0x94, 0x2b, 0x3f, 0x88, 0x08, diff --git a/src/mame/igs/pgmcrypt.h b/src/mame/igs/pgmcrypt.h index 4600b0583f3..421f72eb8b6 100644 --- a/src/mame/igs/pgmcrypt.h +++ b/src/mame/igs/pgmcrypt.h @@ -38,6 +38,7 @@ void superkds_decrypt(running_machine &machine); void pgm_decrypt_pgm3in1(running_machine &machine); void slqz3_decrypt(running_machine &machine); void fruitpar_decrypt(running_machine &machine); +void oceanpar_decrypt(running_machine &machine); void amazonia_decrypt(running_machine &machine); void amazoni2_decrypt(running_machine &machine); void mgzz_decrypt(running_machine &machine);