trunk/src/mame/drivers/cclimber.c
| r249181 | r249182 | |
| 375 | 375 | AM_RANGE(0xba00, 0xba00) AM_READ_PORT("START") /* maybe a mirror of b800 */ |
| 376 | 376 | ADDRESS_MAP_END |
| 377 | 377 | |
| 378 | static ADDRESS_MAP_START( yamato_decrypted_opcodes_map, AS_DECRYPTED_OPCODES, 8, cclimber_state ) |
| 379 | AM_RANGE(0x0000, 0x7fff) AM_ROM AM_SHARE("decrypted_opcodes") |
| 380 | ADDRESS_MAP_END |
| 381 | |
| 378 | 382 | static ADDRESS_MAP_START( toprollr_map, AS_PROGRAM, 8, cclimber_state ) |
| 379 | 383 | AM_RANGE(0x0000, 0x5fff) AM_ROMBANK("bank1") |
| 380 | 384 | AM_RANGE(0x6000, 0x6bff) AM_RAM AM_SHARE("ram") |
| r249181 | r249182 | |
| 1056 | 1060 | MCFG_CPU_MODIFY("maincpu") |
| 1057 | 1061 | MCFG_CPU_PROGRAM_MAP(yamato_map) |
| 1058 | 1062 | MCFG_CPU_IO_MAP(yamato_portmap) |
| 1059 | | MCFG_CPU_DECRYPTED_OPCODES_MAP(decrypted_opcodes_map) |
| 1063 | MCFG_CPU_DECRYPTED_OPCODES_MAP(yamato_decrypted_opcodes_map) |
| 1060 | 1064 | |
| 1061 | 1065 | MCFG_CPU_ADD("audiocpu", Z80, 3072000) /* 3.072 MHz ? */ |
| 1062 | 1066 | MCFG_CPU_PROGRAM_MAP(yamato_audio_map) |
| r249181 | r249182 | |
| 2415 | 2419 | { 0x20,0xa0,0x28,0xa8 }, { 0x00,0x08,0x20,0x28 } /* ...1...1...1...1 */ |
| 2416 | 2420 | }; |
| 2417 | 2421 | |
| 2418 | | sega_decode(memregion("maincpu")->base(), m_decrypted_opcodes, 0x6000, convtable); |
| 2422 | sega_decode(memregion("maincpu")->base(), m_decrypted_opcodes, 0x8000, convtable); |
| 2419 | 2423 | |
| 2420 | 2424 | save_item(NAME(m_yamato_p0)); |
| 2421 | 2425 | save_item(NAME(m_yamato_p1)); |
trunk/src/mame/drivers/igs_m027.c
| r249181 | r249182 | |
| 69 | 69 | DECLARE_DRIVER_INIT(slqz3); |
| 70 | 70 | DECLARE_DRIVER_INIT(fruitpar); |
| 71 | 71 | DECLARE_DRIVER_INIT(amazonia); |
| 72 | DECLARE_DRIVER_INIT(amazoni2); |
| 72 | 73 | TILE_GET_INFO_MEMBER(get_tx_tilemap_tile_info); |
| 73 | 74 | TILE_GET_INFO_MEMBER(get_bg_tilemap_tile_info); |
| 74 | 75 | virtual void video_start(); |
| r249181 | r249182 | |
| 585 | 586 | ROM_REGION( 0x200000, "gfx2", 0 ) |
| 586 | 587 | ROM_LOAD( "cg.u25", 0x000000, 0x200000, CRC(709b9a42) SHA1(18c4b8e159b29c168f5cafb437fe6eb123672471) ) |
| 587 | 588 | |
| 588 | | ROM_REGION( 0x80000, "unknown", 0 ) |
| 589 | ROM_REGION( 0x80000, "oki", 0 ) // m6295 samples |
| 589 | 590 | ROM_LOAD( "sp.u2", 0x00000, 0x80000, CRC(216b5418) SHA1(b7bc24ced0ccb5476c974420aa506c13b971fc9f) ) |
| 590 | 591 | ROM_END |
| 591 | 592 | |
| 593 | /* |
| 594 | Amazonia King II by IGS 2004 ( International Game System ) |
| 595 | Patented by EAGO. |
| 592 | 596 | |
| 597 | U12 is a 27c240 labeled ( AKII TEXT ) ( text ) |
| 598 | U13 is a 27c160 labeled ( AKII CG ) ( Grafics) |
| 599 | U23 is a 27c4096 labeled ( AKII_V-202br ) ( Program version Brazil ) |
| 600 | U28 is a 29F4000 labeled (AKII SP) ( Sound Program ) |
| 601 | U17 is a ATF16V8B-15P labeled ( FG-1 ) (read protected) |
| 602 | U10 is a IGS 003c Dip 40 pin ( Maybe 8255 ? ) |
| 603 | U24 is a IGS031 QFP with 208 pin |
| 604 | U32 is a IGS027a QFP with 120 pin ( Encrypted ARM, internal code, stamped P9 A/K II ) |
| 605 | Crystal Frequency = 22.000 Mhz |
| 606 | Sound Processor ( U6295 ) |
| 607 | */ |
| 593 | 608 | |
| 609 | ROM_START( amazoni2 ) |
| 610 | ROM_REGION( 0x04000, "maincpu", 0 ) |
| 611 | /* Internal rom of IGS027A ARM based MCU */ |
| 612 | ROM_LOAD( "sdwx_igs027a", 0x00000, 0x4000, NO_DUMP ) |
| 594 | 613 | |
| 614 | ROM_REGION( 0x80000, "user1", 0 ) // external ARM data / prg |
| 615 | ROM_LOAD( "U23_27c4096_AKII_V-202br.bin", 0x000000, 0x80000, CRC(7147b43c) SHA1(29a4a20867595650918c4ab892ddb71440bd3f4b) ) |
| 616 | |
| 617 | ROM_REGION( 0x80000, "gfx1", 0 ) |
| 618 | ROM_LOAD( "akii_text.u24", 0x000000, 0x80000, CRC(60b415ac) SHA1(b4475b0ba1e70504cac9ac05078873df0b16495b) ) |
| 619 | |
| 620 | ROM_REGION( 0x200000, "gfx2", 0 ) |
| 621 | ROM_LOAD( "U13_27c160_AKII_CG.bin", 0x000000, 0x200000, CRC(254bd84f) SHA1(091ecda792c4c4a7bb039b2c708788ef87fdaf86) ) // FIXED BITS (xxxxxxx0xxxxxxxx) |
| 622 | |
| 623 | ROM_REGION( 0x80000, "oki", 0 ) // m6295 samples |
| 624 | ROM_LOAD( "akii_sp.u28", 0x00000, 0x80000, CRC(216b5418) SHA1(b7bc24ced0ccb5476c974420aa506c13b971fc9f) ) |
| 625 | ROM_END |
| 626 | |
| 627 | |
| 595 | 628 | ROM_START( sddz ) |
| 596 | 629 | ROM_REGION( 0x04000, "maincpu", 0 ) |
| 597 | 630 | /* Internal rom of IGS027A ARM based MCU */ |
| r249181 | r249182 | |
| 1103 | 1136 | pgm_create_dummy_internal_arm_region(); |
| 1104 | 1137 | } |
| 1105 | 1138 | |
| 1139 | DRIVER_INIT_MEMBER(igs_m027_state,amazoni2) |
| 1140 | { |
| 1141 | amazoni2_decrypt(machine()); |
| 1142 | //sdwx_gfx_decrypt(machine()); |
| 1143 | pgm_create_dummy_internal_arm_region(); |
| 1144 | } |
| 1145 | |
| 1106 | 1146 | /*************************************************************************** |
| 1107 | 1147 | |
| 1108 | 1148 | Game Drivers |
| r249181 | r249182 | |
| 1112 | 1152 | GAME( 1999, slqz3, 0, igs_majhong, sdwx, igs_m027_state, slqz3, ROT0, "IGS", "Mahjong Shuang Long Qiang Zhu 3 (China, VS107C)", MACHINE_IS_SKELETON ) |
| 1113 | 1153 | GAME( 1999, amazonia, 0, igs_majhong, sdwx, igs_m027_state, amazonia, ROT0, "IGS", "Amazonia King (V104BR)", MACHINE_IS_SKELETON ) |
| 1114 | 1154 | GAME( 200?, fruitpar, 0, igs_majhong, sdwx, igs_m027_state, fruitpar, ROT0, "IGS", "Fruit Paradise (V214)", MACHINE_IS_SKELETON ) |
| 1115 | | GAME( 2002, sdwx, 0, igs_majhong, sdwx, igs_m027_state, sdwx, ROT0, "IGS", "Sheng Dan Wu Xian", MACHINE_IS_SKELETON ) // aka Christmas 5 Line? |
| 1155 | GAME( 2002, sdwx, 0, igs_majhong, sdwx, igs_m027_state, sdwx, ROT0, "IGS", "Sheng Dan Wu Xian", MACHINE_IS_SKELETON ) // aka Christmas 5 Line? (or Amazonia King II, shares roms at least?) |
| 1156 | GAME( 2002, amazoni2, 0, igs_majhong, sdwx, igs_m027_state, amazoni2, ROT0, "IGS", "Amazonia King II (V202BR)", MACHINE_IS_SKELETON ) |
| 1116 | 1157 | GAME( 200?, sddz, 0, igs_majhong, sdwx, igs_m027_state, sddz, ROT0, "IGS", "Super Dou Di Zhu", MACHINE_IS_SKELETON ) |
| 1117 | 1158 | GAME( 2000, zhongguo, 0, igs_majhong, sdwx, igs_m027_state, zhongguo, ROT0, "IGS", "Zhong Guo Chu Da D", MACHINE_IS_SKELETON ) |
| 1118 | 1159 | GAME( 200?, lhzb3, 0, igs_majhong, sdwx, igs_m027_state, lhzb3, ROT0, "IGS", "Long Hu Zheng Ba 3", MACHINE_IS_SKELETON ) |
trunk/src/mame/machine/pgmcrypt.c
| r249181 | r249182 | |
| 1618 | 1618 | src[i] = x; |
| 1619 | 1619 | } |
| 1620 | 1620 | } |
| 1621 | |
| 1622 | |
| 1623 | /*FIXME: This is incorrect. Was simply copied from fruitpar as an initial boilerplate code: */ |
| 1624 | static const UINT8 amazoni2_tab[0x100] = { |
| 1625 | 0xe9, 0x0b, 0x95, 0x7e, 0x0d, 0x7d, 0x5c, 0x1e, 0x81, 0x0e, 0xa6, 0xd4, 0x8e, 0x90, 0xd8, 0x54, |
| 1626 | 0x27, 0x65, 0x51, 0x08, 0x1c, 0xa0, 0x3b, 0x51, 0x83, 0x60, 0x93, 0x02, 0x64, 0x69, 0x77, 0x1a, |
| 1627 | 0xa4, 0x03, 0xb0, 0xc2, 0x34, 0x18, 0x80, 0x87, 0x7a, 0x88, 0xad, 0xd9, 0xff, 0xd0, 0xce, 0xc4, |
| 1628 | 0x5b, 0xdc, 0xd5, 0xed, 0x5e, 0x29, 0xdd, 0xcf, 0x80, 0x1f, 0x36, 0x38, 0x8b, 0xae, 0xae, 0xfe, |
| 1629 | 0x87, 0x27, 0x22, 0x07, 0xe6, 0x5d, 0x46, 0x79, 0xf1, 0xfc, 0xb1, 0x3d, 0x72, 0x29, 0x2c, 0xba, |
| 1630 | 0xa3, 0x5b, 0x3c, 0xcf, 0x57, 0x79, 0xed, 0x12, 0x67, 0x34, 0xe1, 0x48, 0x5f, 0xa7, 0x9a, 0x24, |
| 1631 | 0x6a, 0x2e, 0x04, 0x44, 0x7b, 0x84, 0x46, 0x6a, 0xbd, 0x20, 0xca, 0xf7, 0x3e, 0xd1, 0x8b, 0xad, |
| 1632 | 0xd7, 0x98, 0x9e, 0xa6, 0x5e, 0xc6, 0x04, 0x90, 0x0f, 0x57, 0xae, 0x2b, 0x38, 0x8d, 0xd2, 0x0c, |
| 1633 | 0x25, 0xd1, 0x6d, 0x73, 0x4b, 0xc6, 0x19, 0xd3, 0xb8, 0xae, 0x11, 0x01, 0xba, 0x02, 0x82, 0x17, |
| 1634 | 0xcf, 0x4d, 0x14, 0x6a, 0xcd, 0x4a, 0xb9, 0xc1, 0x52, 0x3e, 0xb5, 0xd8, 0x6f, 0x98, 0xee, 0x16, |
| 1635 | 0x90, 0xc6, 0x76, 0x8a, 0xaf, 0x5a, 0x56, 0x2b, 0xb9, 0x5e, 0x9e, 0x51, 0x40, 0xf4, 0xaa, 0x6e, |
| 1636 | 0x63, 0x32, 0xb6, 0x12, 0xfb, 0x3c, 0xa5, 0x1f, 0x07, 0xa3, 0x0d, 0x49, 0x5a, 0xfe, 0x88, 0xd1, |
| 1637 | 0x83, 0xc7, 0x37, 0x82, 0xfd, 0x78, 0x97, 0xec, 0x98, 0xe6, 0x88, 0xe0, 0x27, 0xde, 0x9a, 0x2c, |
| 1638 | 0x6b, 0xfd, 0x9b, 0x98, 0x40, 0xd5, 0x5f, 0x20, 0x06, 0x3e, 0xcf, 0x74, 0x52, 0xf9, 0x35, 0xae, |
| 1639 | 0xd6, 0x8c, 0xc7, 0x53, 0x8e, 0x59, 0x71, 0x8c, 0x2d, 0x00, 0xe7, 0xa5, 0xc7, 0xf8, 0xeb, 0xc7, |
| 1640 | 0xbf, 0x68, 0xdc, 0xf2, 0xf4, 0x4c, 0x80, 0x3e, 0x27, 0xc5, 0x13, 0x52, 0xb0, 0xc0, 0x90, 0x2d |
| 1641 | }; |
| 1642 | |
| 1643 | void amazoni2_decrypt(running_machine &machine) |
| 1644 | { |
| 1645 | int i; |
| 1646 | UINT16 *src = (UINT16 *) machine.root_device().memregion("user1")->base(); |
| 1647 | |
| 1648 | int rom_size = 0x80000; |
| 1649 | |
| 1650 | // not 100% verified |
| 1651 | for(i=0; i<rom_size/2; i++) |
| 1652 | { |
| 1653 | UINT16 x = src[i]; |
| 1654 | |
| 1655 | IGS27_CRYPT1 |
| 1656 | // IGS27_CRYPT2 |
| 1657 | // IGS27_CRYPT3 |
| 1658 | IGS27_CRYPT4_ALT |
| 1659 | IGS27_CRYPT5 |
| 1660 | IGS27_CRYPT6_ALT |
| 1661 | IGS27_CRYPT7 |
| 1662 | IGS27_CRYPT8 |
| 1663 | |
| 1664 | x ^= amazoni2_tab[(i>> 1) & 0xff] << 8; |
| 1665 | |
| 1666 | src[i] = x; |
| 1667 | } |
| 1668 | } |
| 1669 | |