trunk/src/mame/drivers/cps3.c
| r25483 | r25484 | |
| 445 | 445 | |
| 446 | 446 | 1. Remove the custom QFP144 CPU and replace it with a standard Hitachi HD6417095 SH-2 CPU |
| 447 | 447 | 2. Remove the 29F400 TSOP48 flashROM and re-program it with the decrypted and modified main program ROM from set |
| 448 | | 'cps3nobatt' in MAME. A 28F400 SOP44 flashROM can be used instead and mounted to the back side of the security cart |
| 448 | 'cps3boot' in MAME. A 28F400 SOP44 flashROM can be used instead and mounted to the back side of the security cart |
| 449 | 449 | PCB. Do not mount both SOP44 and TSOP48 flashROMs, use only one TSOP48 flashROM or one SOP44 flashROM. |
| 450 | 450 | 3. Power on the PCB and using the built-in cart flashROM menu re-program the SIMMs for your chosen game using the CD |
| 451 | | from set 'cps3nobatt' in MAME. |
| 451 | from set 'cps3boot' in MAME. |
| 452 | 452 | 4. That is all. Enjoy your working PCB. |
| 453 | 453 | |
| 454 | 454 | */ |
| r25483 | r25484 | |
| 712 | 712 | |
| 713 | 713 | UINT32 cps3_state::cps3_mask(UINT32 address, UINT32 key1, UINT32 key2) |
| 714 | 714 | { |
| 715 | // ignore all encryption |
| 716 | if (m_altEncryption == 2) |
| 717 | return 0; |
| 718 | |
| 715 | 719 | UINT16 val; |
| 716 | 720 | |
| 717 | 721 | address ^= key1; |
| r25483 | r25484 | |
| 760 | 764 | #endif |
| 761 | 765 | } |
| 762 | 766 | |
| 767 | void cps3_state::init_common(void) |
| 768 | { |
| 769 | /* just some NOPs for the game to execute if it crashes and starts executing unmapped addresses |
| 770 | - this prevents MAME from crashing */ |
| 771 | m_nops = auto_alloc(machine(), UINT32); |
| 772 | m_nops[0] = 0x00090009; |
| 763 | 773 | |
| 764 | | void cps3_state::init_common(UINT32 key1, UINT32 key2, int altEncryption) |
| 774 | // flash roms |
| 775 | astring tempstr; |
| 776 | for (int simmnum = 0; simmnum < 7; simmnum++) |
| 777 | for (int chipnum = 0; chipnum < 8; chipnum++) |
| 778 | m_simm[simmnum][chipnum] = machine().device<fujitsu_29f016a_device>(tempstr.format("simm%d.%d", simmnum + 1, chipnum)); |
| 779 | |
| 780 | m_eeprom = auto_alloc_array(machine(), UINT32, 0x400/4); |
| 781 | machine().device<nvram_device>("eeprom")->set_base(m_eeprom, 0x400); |
| 782 | } |
| 783 | |
| 784 | |
| 785 | void cps3_state::init_crypt(UINT32 key1, UINT32 key2, int altEncryption) |
| 765 | 786 | { |
| 766 | 787 | m_key1 = key1; |
| 767 | 788 | m_key2 = key2; |
| r25483 | r25484 | |
| 780 | 801 | cps3_decrypt_bios(); |
| 781 | 802 | m_decrypted_gamerom = auto_alloc_array(machine(), UINT32, 0x1000000/4); |
| 782 | 803 | |
| 783 | | /* just some NOPs for the game to execute if it crashes and starts executing unmapped addresses |
| 784 | | - this prevents MAME from crashing */ |
| 785 | | m_nops = auto_alloc(machine(), UINT32); |
| 786 | | m_nops[0] = 0x00090009; |
| 787 | 804 | |
| 788 | | |
| 789 | 805 | m_0xc0000000_ram_decrypted = auto_alloc_array(machine(), UINT32, 0x400/4); |
| 790 | 806 | |
| 791 | 807 | address_space &main = m_maincpu->space(AS_PROGRAM); |
| 792 | 808 | main.set_direct_update_handler(direct_update_delegate(FUNC(cps3_state::cps3_direct_handler), this)); |
| 793 | 809 | |
| 794 | | // flash roms |
| 795 | | astring tempstr; |
| 796 | | for (int simmnum = 0; simmnum < 7; simmnum++) |
| 797 | | for (int chipnum = 0; chipnum < 8; chipnum++) |
| 798 | | m_simm[simmnum][chipnum] = machine().device<fujitsu_29f016a_device>(tempstr.format("simm%d.%d", simmnum + 1, chipnum)); |
| 810 | init_common(); |
| 799 | 811 | |
| 800 | | m_eeprom = auto_alloc_array(machine(), UINT32, 0x400/4); |
| 801 | | machine().device<nvram_device>("eeprom")->set_base(m_eeprom, 0x400); |
| 802 | 812 | } |
| 803 | 813 | |
| 804 | | DRIVER_INIT_MEMBER(cps3_state,redearth) { init_common(0x9e300ab1, 0xa175b82c, 0); } |
| 805 | | DRIVER_INIT_MEMBER(cps3_state,sfiii) { init_common(0xb5fe053e, 0xfc03925a, 0); } |
| 806 | | DRIVER_INIT_MEMBER(cps3_state,sfiii2) { init_common(0x00000000, 0x00000000, 1); } |
| 807 | | DRIVER_INIT_MEMBER(cps3_state,jojo) { init_common(0x02203ee3, 0x01301972, 0); } |
| 808 | | DRIVER_INIT_MEMBER(cps3_state,sfiii3) { init_common(0xa55432b4, 0x0c129981, 0); } |
| 809 | | DRIVER_INIT_MEMBER(cps3_state,jojoba) { init_common(0x23323ee3, 0x03021972, 0); } |
| 814 | DRIVER_INIT_MEMBER(cps3_state,redearth) { init_crypt(0x9e300ab1, 0xa175b82c, 0); } |
| 815 | DRIVER_INIT_MEMBER(cps3_state,sfiii) { init_crypt(0xb5fe053e, 0xfc03925a, 0); } |
| 816 | DRIVER_INIT_MEMBER(cps3_state,sfiii2) { init_crypt(0x00000000, 0x00000000, 1); } |
| 817 | DRIVER_INIT_MEMBER(cps3_state,jojo) { init_crypt(0x02203ee3, 0x01301972, 0); } |
| 818 | DRIVER_INIT_MEMBER(cps3_state,sfiii3) { init_crypt(0xa55432b4, 0x0c129981, 0); } |
| 819 | DRIVER_INIT_MEMBER(cps3_state,jojoba) { init_crypt(0x23323ee3, 0x03021972, 0); } |
| 820 | DRIVER_INIT_MEMBER(cps3_state,cps3boot) { init_crypt(-1,-1,2); } |
| 810 | 821 | |
| 811 | 822 | |
| 812 | 823 | |
| r25483 | r25484 | |
| 2808 | 2819 | ROM_END |
| 2809 | 2820 | |
| 2810 | 2821 | |
| 2822 | |
| 2823 | |
| 2824 | |
| 2811 | 2825 | /* NO CD sets - use NO CD BIOS roms - don't require the CD image to boot */ |
| 2812 | 2826 | |
| 2813 | 2827 | ROM_START( sfiiin ) |
| r25483 | r25484 | |
| 3601 | 3615 | ROM_LOAD( "jojoba-simm5.7", 0x00000, 0x200000, CRC(8c8be520) SHA1(c461f3f76a83592b36b29afb316679a7c8972404) ) |
| 3602 | 3616 | ROM_END |
| 3603 | 3617 | |
| 3618 | /* Bootlegs for use with modified security carts */ |
| 3604 | 3619 | |
| 3620 | ROM_START( cps3boot ) |
| 3621 | ROM_REGION32_BE( 0x080000, "user1", 0 ) /* bios region */ |
| 3622 | ROM_LOAD( "no-battery_bios_29f400.u2", 0x000000, 0x080000, CRC(cb9bd5b0) SHA1(ea7ecb3deb69f5307a62d8f0d7d8e68d49013d07)) |
| 3623 | |
| 3624 | DISK_REGION( "scsi:cdrom" ) |
| 3625 | DISK_IMAGE_READONLY( "no-battery_multi-game_bootleg_cd_for_hd6417095_sh2", 0, SHA1(123f2fcb0f3dd3d6b859e82a51d0127e46763776) ) |
| 3626 | ROM_END |
| 3627 | |
| 3605 | 3628 | /***************************************************************************************** |
| 3606 | 3629 | CPS3 game region / special flag information |
| 3607 | 3630 | *****************************************************************************************/ |
| r25483 | r25484 | |
| 3815 | 3838 | GAME( 1999, jojobar1, jojoba, jojoba, cps3_jojo, cps3_state, jojoba, ROT0, "Capcom", "JoJo no Kimyou na Bouken: Mirai e no Isan (Japan 990913)", GAME_IMPERFECT_GRAPHICS ) |
| 3816 | 3839 | GAME( 1999, jojobanr1, jojoba, jojoba, cps3_jojo, cps3_state, jojoba, ROT0, "Capcom", "JoJo no Kimyou na Bouken: Mirai e no Isan (Japan 990913, NO CD)", GAME_IMPERFECT_GRAPHICS ) |
| 3817 | 3840 | GAME( 1999, jojobaner1,jojoba, jojoba, cps3_jojo, cps3_state, jojoba, ROT0, "Capcom", "JoJo's Bizarre Adventure (Euro 990913, NO CD)", GAME_IMPERFECT_GRAPHICS ) |
| 3841 | |
| 3842 | // bootleg |
| 3843 | GAME( 1999, cps3boot, 0, sfiii3, cps3_jojo, cps3_state, cps3boot, ROT0, "bootleg", "CPS3 Multi-game bootleg for HD6417095 type SH2", GAME_IMPERFECT_GRAPHICS ) // hold start 1 while booting to write a different game |
| 3844 | |