Previous 15994 Revisions Next

r2281 Saturday 5th April, 2008 at 20:49:08 UTC by Cowering
[Genesis] Add handler for 'Elf Wor' (someone please test it past level one!)
[src/mess/drivers]genesis.c

src/mess/drivers/genesis.c
r2280r2281
6464static int squirrel_king_extra = 0;
6565static int is_smous = 0;
6666static int is_smb = 0;
67static int is_elfwor = 0;
6768
6869static UINT8 *genesis_sram;
6970static int genesis_sram_start;
r2280r2281
248249   {
249250      relocate = 0x2000;
250251
251      if (!strncmp((char *)&ROM[0x0120+relocate], "SUPER STREET FIGHTER2", 21))
252      if (length == 0x500000 && !strncmp((char *)&ROM[0x0120+relocate], "SUPER STREET FIGHTER2", 21))
252253      {
253254         is_ssf2 = 1;
254255      }
r2280r2281
337338            is_smb = 1;
338339         }
339340      }
341      if (length == 0x100000 && !strncmp((char *)&ROM[0x0172+relocate], "GAME : ELF WOR", 14))
342      {
343         is_elfwor = 1;
344      }
340345
341346   }
342347
r2280r2281
603608}
604609
605610
611// Elf Wor handler from HazeMD
612READ16_HANDLER( elfwor_0x400000_r )
613{
614   return 0x5500;
615}
616
617READ16_HANDLER( elfwor_0x400002_r )
618{
619   return 0x0f00;
620}
621
622READ16_HANDLER( elfwor_0x400004_r )
623{
624   return 0xc900;
625}
626
627READ16_HANDLER( elfwor_0x400006_r )
628{
629   return 0x1800;
630}
631
606632static WRITE16_HANDLER( genesis_TMSS_bank_w )
607633{
608634   /* this probably should do more, like make Genesis V2 'die' if the SEGA string is not written promptly */
r2280r2281
667693      memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0xa13000, 0xa13001, 0, 0, smbro_prot_r );
668694   }
669695
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
670709   /* install NOP handler for TMSS */
671710   memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0xA14000, 0xA14003, 0, 0, genesis_TMSS_bank_w);
672711

Previous 15994 Revisions Next


© 1998-2018 The MESS Team