Previous 15994 Revisions Next

r5798 Saturday 19th September, 2009 at 09:55:05 UTC by Fabio Priuli
[SNES] fixed a small logging problem and fixed S-DD1 mirroring problems. Star Ocean graphics is now shown correctly but the game is still not playable.
[src/mess/machine]snescart.c

src/mess/machine/snescart.c
r5797r5798
415415   }
416416
417417   /* Loading data */
418   {
419418   ROM = memory_region(image->machine, "cart");
420419   length = image_fread(image, ROM, image_length(image) - offset);
421   }
422420
423421   /* FIXME: Insert crc check here */
424422
r5797r5798
524522       * These are then mirrored in banks 0x40 to 0x7f, both at address 0x0000 and at address
525523       * 0x8000, in banks 0x80 to 0xbf at address 0x8000 and in banks 0xc0 to 0xff, both at address
526524       * 0x0000 and at address 0x8000. Notice that SDD-1 games (Star Ocean and Street Fighter Zero 2)
527       * also use SNES_MODE_22, but we still don't support their bankswitch mechanism: the content
528       * of banks at 0xc0 to 0xff changes according to MMC registers $4804-$4807
525       * use SNES_MODE_22
529526       */
530527         while (read_blocks < 64 && read_blocks < total_blocks)
531528         {
532            /* Loading data */
529            /* Loading and mirroring data */
533530            memcpy(&snes_ram[0x008000 + read_blocks * 0x10000], &ROM[0x000000 + read_blocks * 0x8000], 0x8000);
534            /* Mirroring */
535            memcpy(&snes_ram[0x400000 + read_blocks * 0x10000], &snes_ram[0x8000 + read_blocks * 0x10000], 0x8000);
536            memcpy(&snes_ram[0x408000 + read_blocks * 0x10000], &snes_ram[0x8000 + read_blocks * 0x10000], 0x8000);
537            memcpy(&snes_ram[0x808000 + read_blocks * 0x10000], &snes_ram[0x8000 + read_blocks * 0x10000], 0x8000);
538            memcpy(&snes_ram[0xc00000 + read_blocks * 0x10000], &snes_ram[0x8000 + read_blocks * 0x10000], 0x8000);
539            memcpy(&snes_ram[0xc08000 + read_blocks * 0x10000], &snes_ram[0x8000 + read_blocks * 0x10000], 0x8000);
531            memcpy(&snes_ram[0x808000 + read_blocks * 0x10000], &ROM[0x000000 + read_blocks * 0x8000], 0x8000);
532            memcpy(&snes_ram[0x400000 + read_blocks * 0x10000], &ROM[0x000000 + read_blocks * 0x10000], 0x10000);
533            memcpy(&snes_ram[0xc00000 + read_blocks * 0x10000], &ROM[0x000000 + read_blocks * 0x10000], 0x10000);
540534            read_blocks++;
541535         }
542536         /* Filling banks up to 0x3f and their mirrors */
r5797r5798
560554      /* LoROM carts load data in banks 0x00 to 0x7f at address 0x8000 (actually up to 0x7d, because 0x7e and
561555       * 0x7f are overwritten by WRAM). Each block is also mirrored in banks 0x80 to 0xff (up to 0xff for real)
562556       */
563         /* SuperFX games needs a different loading routine */
557         /* SuperFX games needs this different loading routine */
564558         if(((temp_buffer[0x007fd6] >= 0x13 && temp_buffer[0x007fd6] <= 0x15) || temp_buffer[0x007fd6] == 0x1a) && (temp_buffer[0x007fd5] == 0x20))
565559         {
566560            while (read_blocks < 64 && read_blocks < total_blocks)
r5797r5798
667661         case 0x43:
668662         case 0x45:
669663            if (snes_r_bank1(space, 0x00ffd5) == 0x32)
670            {   
671664               snes_has_addon_chip = HAS_SDD1;
672               supported_type = 0;
673            }
674665            break;
675666
676667         case 0x55:
r5797r5798
769760      logerror( "===========\n\n" );
770761      logerror( "\tTotal blocks:  %d (%dmb)\n", total_blocks, total_blocks / (snes_cart.mode & 5 ? 32 : 16) );
771762      logerror( "\tROM bank size: %s (LoROM: %d , HiROM: %d, ExHiROM: %d)\n",
772                        (snes_cart.mode == SNES_MODE_20) ? "LoROM" : ((snes_cart.mode == SNES_MODE_21) ? "HiROM" : "ExHiROM"),
763                        (snes_cart.mode == SNES_MODE_20) ? "LoROM" :
764                        (snes_cart.mode == SNES_MODE_21) ? "HiROM" :
765                        (snes_cart.mode == SNES_MODE_22) ? "ExLoROM" : "ExHiROM",
773766                              valid_mode20, valid_mode21, valid_mode25);
774767      logerror( "\tCompany:       %s [%.2s]\n", companies[company], company_id );
775768      logerror( "\tROM ID:        %.4s\n\n", rom_id );

Previous 15994 Revisions Next


© 1998-2018 The MESS Team