src/mess/machine/genesis.c
| r3306 | r3307 | |
| 45 | 45 | SKINGKONG, /* Super King Kong 99 */ |
| 46 | 46 | SDK99, /* Super Donkey Kong 99 */ |
| 47 | 47 | REDCLIFF, /* Romance of the Three Kingdoms - Battle of Red Cliffs, already decoded from .mdx format */ |
| 48 | REDCL_EN, /* The encoded version... */ |
| 48 | 49 | RADICA, /* Radica TV games.. these probably should be a seperate driver since they are a seperate 'console' */ |
| 49 | 50 | KOF99, /* King of Fighters '99 */ |
| 50 | 51 | SOULBLAD, /* Soul Blade */ |
| r3306 | r3307 | |
| 649 | 650 | memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x400004, 0x400005, 0, 0, redclif_prot_r); |
| 650 | 651 | } |
| 651 | 652 | |
| 653 | if (cart_type == REDCL_EN) |
| 654 | { |
| 655 | int x; |
| 656 | |
| 657 | for (x = VIRGIN_COPY_GEN; x < VIRGIN_COPY_GEN + 0x200005; x++) |
| 658 | { |
| 659 | ROM[x] ^= 0x40; |
| 660 | } |
| 661 | |
| 662 | memcpy(&ROM[0x000000], &ROM[VIRGIN_COPY_GEN + 4], 0x200000); /* default rom */ |
| 663 | |
| 664 | memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x400000, 0x400001, 0, 0, redclif_prot2_r); |
| 665 | memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x400004, 0x400005, 0, 0, redclif_prot_r); |
| 666 | } |
| 667 | |
| 652 | 668 | if (cart_type == RADICA) |
| 653 | 669 | { |
| 654 | 670 | memcpy(&ROM[0x400000], &ROM[VIRGIN_COPY_GEN], 0x400000); // keep a copy for later banking.. making use of huge ROM_REGION allocated to genesis driver |
| r3306 | r3307 | |
| 1077 | 1093 | lk3_sig[] = { 0x0c, 0x01, 0x00, 0x30, 0x66, 0xe4 }, |
| 1078 | 1094 | sdk_sig[] = { 0x48, 0xe7, 0xff, 0xfe, 0x52, 0x79 }, |
| 1079 | 1095 | redcliff_sig[] = { 0x10, 0x39, 0x00, 0x40, 0x00, 0x04 }, // move.b ($400004).l,d0 |
| 1096 | redcl_en_sig[] = { 0x50, 0x79, 0x40, 0x00, 0x40, 0x44 }, // move.b ($400004).l,d0 |
| 1080 | 1097 | smb_sig[] = { 0x20, 0x4d, 0x41, 0x52, 0x49, 0x4f }, |
| 1081 | 1098 | smb2_sig[] = { 0x4e, 0xb9, 0x00, 0x0f, 0x25, 0x84 }, |
| 1082 | 1099 | kaiju_sig[] = { 0x19, 0x7c, 0x00, 0x01, 0x00, 0x00 }, |
| r3306 | r3307 | |
| 1089 | 1106 | radica_sig[] = { 0x4e, 0xd0, 0x30, 0x39, 0x00, 0xa1 }, // jmp (a0) move.w ($a130xx),d0 |
| 1090 | 1107 | soulb_sig[] = { 0x33, 0xfc, 0x00, 0x0c, 0x00, 0xff }, // move.w #$C,($FF020A).l (what happens if check fails) |
| 1091 | 1108 | s19in1_sig[] = { 0x13, 0xc0, 0x00, 0xa1, 0x30, 0x38 }; |
| 1092 | | |
| 1109 | |
| 1093 | 1110 | switch (genesis_last_loaded_image_length) |
| 1094 | 1111 | { |
| 1095 | 1112 | case 0x80000: |
| r3306 | r3307 | |
| 1154 | 1171 | cart_type = SUP15IN1; |
| 1155 | 1172 | break; |
| 1156 | 1173 | |
| 1174 | case 0x200005: |
| 1175 | if (!allendianmemcmp(&ROM[0xce564], &redcl_en_sig[0], sizeof(redcliff_sig))) |
| 1176 | cart_type = REDCL_EN; |
| 1177 | break; |
| 1178 | |
| 1157 | 1179 | case 0x300000: |
| 1158 | 1180 | if (!allendianmemcmp(&ROM[0x220], &sdk_sig[0], sizeof(sdk_sig))) |
| 1159 | 1181 | cart_type = SDK99; |