src/mess/drivers/genesis.c
| r2211 | r2212 | |
| 5 | 5 | Thanks to: |
| 6 | 6 | Charles Macdonald for much useful information (cgfm2.emuviews.com) |
| 7 | 7 | |
| 8 | | Long Description names mostly taken from the Good Gen database |
| 8 | Long Description names mostly taken from the GoodGen database |
| 9 | 9 | |
| 10 | 10 | ToDo: |
| 11 | 11 | |
| r2211 | r2212 | |
| 58 | 58 | static int is_redcliff = 0; |
| 59 | 59 | static int is_radica = 0; |
| 60 | 60 | static int is_kof99 = 0; |
| 61 | static int is_soulb = 0; |
| 61 | 62 | |
| 62 | 63 | static UINT8 *genesis_sram; |
| 63 | 64 | static int genesis_sram_start; |
| r2211 | r2212 | |
| 184 | 185 | unsigned char *ROM; |
| 185 | 186 | |
| 186 | 187 | genesis_sram = NULL; |
| 187 | | genesis_sram_start = genesis_sram_len = genesis_sram_active = genesis_sram_readonly = is_ssf2 = is_redcliff = is_radica = is_kof99 = 0; |
| 188 | genesis_sram_start = genesis_sram_len = genesis_sram_active = genesis_sram_readonly = is_ssf2 = is_redcliff = is_radica = is_kof99 = is_soulb = 0; |
| 188 | 189 | |
| 189 | 190 | rawROM = memory_region(REGION_CPU1); |
| 190 | 191 | ROM = rawROM /*+ 512 */; |
| r2211 | r2212 | |
| 269 | 270 | } |
| 270 | 271 | |
| 271 | 272 | } |
| 272 | | is_kof99 = 1; |
| 273 | 273 | |
| 274 | 274 | // detect the King of Fighters '99 unlicensed game |
| 275 | 275 | if (length == 0x300000) |
| r2211 | r2212 | |
| 282 | 282 | } |
| 283 | 283 | } |
| 284 | 284 | |
| 285 | // detect the Soul Blade unlicensed game |
| 286 | if (length == 0x400000) |
| 287 | { |
| 288 | static unsigned char soulbsig[] = { 0x33, 0xfc, 0x00, 0x0c, 0x00, 0xff}; // move.w #$C,($FF020A).l (what happens if check fails) |
| 289 | |
| 290 | if (!memcmp(&ROM[0x028460+relocate],&soulbsig[0],sizeof(soulbsig))) |
| 291 | { |
| 292 | is_soulb = 1; |
| 293 | } |
| 294 | } |
| 295 | |
| 285 | 296 | } |
| 286 | 297 | |
| 287 | 298 | ROM = memory_region(REGION_CPU1); /* 68000 ROM region */ |
| r2211 | r2212 | |
| 440 | 451 | } |
| 441 | 452 | } |
| 442 | 453 | |
| 454 | // Soulblade handler from HazeMD |
| 455 | READ16_HANDLER( soulb_0x400006_r ) |
| 456 | { |
| 457 | return 0xf000; |
| 458 | } |
| 459 | |
| 460 | READ16_HANDLER( soulb_0x400002_r ) |
| 461 | { |
| 462 | return 0x9800; |
| 463 | } |
| 464 | |
| 465 | READ16_HANDLER( soulb_0x400004_r ) |
| 466 | { |
| 467 | return 0xc900; |
| 468 | } |
| 469 | |
| 443 | 470 | // KOF99 handler from HazeMD |
| 444 | 471 | READ16_HANDLER( kof99_0xA13002_r ) |
| 445 | 472 | { |
| r2211 | r2212 | |
| 515 | 542 | memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0xA1303e, 0xA1303f, 0, 0, kof99_00A1303E_r ); |
| 516 | 543 | } |
| 517 | 544 | |
| 545 | if (is_soulb) { |
| 546 | memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0x400006, 0x400007, 0, 0, soulb_0x400006_r ); |
| 547 | memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0x400002, 0x400003, 0, 0, soulb_0x400002_r ); |
| 548 | memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0x400004, 0x400005, 0, 0, soulb_0x400004_r ); |
| 549 | } |
| 550 | |
| 518 | 551 | if (is_redcliff) |
| 519 | 552 | { |
| 520 | 553 | memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0x400000, 0x400001, 0, 0, redclif_prot2_r ); |