src/mess/drivers/genesis.c
| r2280 | r2281 | |
| 64 | 64 | static int squirrel_king_extra = 0; |
| 65 | 65 | static int is_smous = 0; |
| 66 | 66 | static int is_smb = 0; |
| 67 | static int is_elfwor = 0; |
| 67 | 68 | |
| 68 | 69 | static UINT8 *genesis_sram; |
| 69 | 70 | static int genesis_sram_start; |
| r2280 | r2281 | |
| 248 | 249 | { |
| 249 | 250 | relocate = 0x2000; |
| 250 | 251 | |
| 251 | | if (!strncmp((char *)&ROM[0x0120+relocate], "SUPER STREET FIGHTER2", 21)) |
| 252 | if (length == 0x500000 && !strncmp((char *)&ROM[0x0120+relocate], "SUPER STREET FIGHTER2", 21)) |
| 252 | 253 | { |
| 253 | 254 | is_ssf2 = 1; |
| 254 | 255 | } |
| r2280 | r2281 | |
| 337 | 338 | is_smb = 1; |
| 338 | 339 | } |
| 339 | 340 | } |
| 341 | if (length == 0x100000 && !strncmp((char *)&ROM[0x0172+relocate], "GAME : ELF WOR", 14)) |
| 342 | { |
| 343 | is_elfwor = 1; |
| 344 | } |
| 340 | 345 | |
| 341 | 346 | } |
| 342 | 347 | |
| r2280 | r2281 | |
| 603 | 608 | } |
| 604 | 609 | |
| 605 | 610 | |
| 611 | // Elf Wor handler from HazeMD |
| 612 | READ16_HANDLER( elfwor_0x400000_r ) |
| 613 | { |
| 614 | return 0x5500; |
| 615 | } |
| 616 | |
| 617 | READ16_HANDLER( elfwor_0x400002_r ) |
| 618 | { |
| 619 | return 0x0f00; |
| 620 | } |
| 621 | |
| 622 | READ16_HANDLER( elfwor_0x400004_r ) |
| 623 | { |
| 624 | return 0xc900; |
| 625 | } |
| 626 | |
| 627 | READ16_HANDLER( elfwor_0x400006_r ) |
| 628 | { |
| 629 | return 0x1800; |
| 630 | } |
| 631 | |
| 606 | 632 | static WRITE16_HANDLER( genesis_TMSS_bank_w ) |
| 607 | 633 | { |
| 608 | 634 | /* this probably should do more, like make Genesis V2 'die' if the SEGA string is not written promptly */ |
| r2280 | r2281 | |
| 667 | 693 | memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0xa13000, 0xa13001, 0, 0, smbro_prot_r ); |
| 668 | 694 | } |
| 669 | 695 | |
| 696 | |
| 697 | if (is_elfwor) |
| 698 | { |
| 699 | /* is there more to this, i can't seem to get off the first level? */ |
| 700 | /* |
| 701 | Elf Wor (Unl) - return (0×55@0×400000 OR 0xc9@0×400004) AND (0×0f@0×400002 OR 0×18@0×400006). It is probably best to add handlers for all 4 addresses. |
| 702 | */ |
| 703 | memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0x400000, 0x400001, 0, 0, elfwor_0x400000_r ); |
| 704 | memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0x400004, 0x400005, 0, 0, elfwor_0x400004_r ); |
| 705 | memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0x400002, 0x400003, 0, 0, elfwor_0x400002_r ); |
| 706 | memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0x400006, 0x400007, 0, 0, elfwor_0x400006_r ); |
| 707 | } |
| 708 | |
| 670 | 709 | /* install NOP handler for TMSS */ |
| 671 | 710 | memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0xA14000, 0xA14003, 0, 0, genesis_TMSS_bank_w); |
| 672 | 711 | |