Go Down

Topic: ROM-Reader for Super Nintendo / Super Famicom Game Cartridges (Read 216853 times) previous topic - next topic

Einhandr

Just finished building and testing my newest V16 cart reader pcb and can confirm that the new SA1 sram write code works perfectly.  :D














I've also designed a new SD module pcb that uses the same schematics and components as the microSD module but has a full-size sd slot.


It's so beautiful!!!

tamanegi_taro

#466
Mar 15, 2018, 12:06 pm Last Edit: Mar 15, 2018, 12:35 pm by tamanegi_taro
Hi skaman,

Games arrived.

Cyber dodge - detected as 512KB
B5326B16 CRC matched with database.

Kisoukishi Kaizard - detected as 384KB
1CAB1EE6 CRC matched with database.

By the way, about populus, I think it was just bad dump.
I never heard about hucard with RAM implemented in it.


skaman

Thanks for the confirmation on those HuCards!

Populous and Tennokoe Bank are the only ROMRAM HuCards.  Populous doesn't have a battery so nothing is saved.

tamanegi_taro

#468
Mar 15, 2018, 01:26 pm Last Edit: Mar 15, 2018, 01:38 pm by tamanegi_taro
Welcome skaman.
 Yes Populus has ram on it.
I'm not sure but maybe super system card, arcade card pro, and SF2' might have Ram in them too because card size is thicker.

I found these in mamedev source

Normally address spacebanks 00-F6 are assigned to regular HuCard ROM space. There
are a couple of special situations:
Street Fighter II:
  - address space banks 40-7F switchable by writing to 1FF0-1FF3
    1FF0 - select rom banks 40-7F
    1FF1 - select rom banks 80-BF
    1FF2 - select rom banks C0-FF
    1FF3 - select rom banks 100-13F
Populous:
  - address space banks 40-43 contains 32KB RAM
CDRom units:
  - address space banks 80-87 contains 64KB RAM
Super System Card:
  - address space banks 68-7F contains 192KB RAM

Cyber_Akuma

Just finished building and testing my newest V16 cart reader pcb and can confirm that the new SA1 sram write code works perfectly.  :D
Nice! Is there a hardware changelog BTW of what the differences between revisions are? Main difference I see is that the 3/5v selector has been put on a dedicated switch instead of being part of the power switch, but I don't know if anything else is different.

Does the new SA1 Sram writing code work on all models that support SNES cartridges?

sanni

The difference is that with V15 there was a little pcb on the Arduino Mega that did the 5V/3V supply switching and with V16 all that was integrated back into the cart reader shield pcb, which is more cost effective. The 5V/3V switch and the On/OFF switch are separate again because it's cheaper that way since you only need to order one kind of switch for the whole cart reader.

Functionally all the different cart reader versions are the same. So the new SA1 Sram writing code will work with all versions as long as you have installed the Adafruit Clock Generator.

tamanegi_taro

The difference is that with V15 there was a little pcb on the Arduino Mega that did the 5V/3V supply switching and with V16 all that was integrated back into the cart reader shield pcb, which is more cost effective. The 5V/3V switch and the On/OFF switch are separate again because it's cheaper that way since you only need to order one kind of switch for the whole cart reader.

Functionally all the different cart reader versions are the same. So the new SA1 Sram writing code will work with all versions as long as you have installed the Adafruit Clock Generator.
Hi sanni,

Sorry to bother you. Please let me explain my opinion in detail.

I think you already know well about this though. Did you supply VCC(3.3V/5V switchable) to SD card module's 3.3V LDO? If so, I think you need to change VCC to 5V constant. 3.3V LDO dropout voltage is like 1.2V. So if you supply 3.3V to 3.3V LDO to get 3.3V, you don't get 3.3V. You get 3.3V - 1.2V = 2.1V. According to SD card specification, SD card need 2.7V to operate correctly as minimum voltage. 2.1V obviously will not be enough voltage. So I think you need to change VCC pad of SD card connector to 5V constant pad.

On the other hand, few days ago, I was asking you about adding 3.3V and 5V pads to the clockgen connector and SD card connector, respectively. No need to add those extra pads if you are going to change VCC pad of SD card connector to 5V constant pad. This is because I can get both 3.3V and 5V for clockgen from SD card connector if needed.

sanni

I don't use the LDO on the sd card modules. I supply constant 3.3V to where the output of the LDO would be. The 5V/3V switchable VCC pin is currently not used for anything, I can change it to 5V constant next revision if that will be useful.


werewolfslayr925

Okay, so, if I understand tamanegi_taro correctly, there's an error in the coding for SPC7110 carts in that it isn't reading one of the banks properly. The only thing that I could find that seemed odd, was that it wants to read 0xF00000-0xFFFFFF twice:

Code: [Select]
// Dump SPC7110 High-type ROM
  else if ((romType == HI) && ((romChips == 245) || (romChips == 249))) {
    println_Msg(F("Dumping SPC7110 HiRom"));
    display_Update();

    // 0xC00000-0xDFFFFF
    print_Msg(F(" Part 1"));
    display_Update();
    readHiRomBanks( 192, 224, &myFile );

    if (numBanks > 32) {
      dataOut();
      controlOut_SNES();
      // Set 0x4834 to 0xFF
      writeBank_SNES( 0, 0x4834, 0xFF );

      dataIn();
      controlIn_SNES();

      // 0xE00000-0xEFFFFF
      print_Msg(F(" 2"));
      display_Update();
      readHiRomBanks( 224, 240, &myFile );

//first here
      if (numBanks > 48) {
        // 0xF00000-0xFFFFFF
        print_Msg(F(" 3"));
        display_Update();
        readHiRomBanks( 240, 256, &myFile );

        dataOut();
        controlOut_SNES();

        // Set 0x4833 to 3
        writeBank_SNES( 0, 0x4833, 3 );

        dataIn();
        controlIn_SNES();

//then here
        // 0xF00000-0xFFFFFF
        println_Msg(F(" 4"));
        display_Update();
        readHiRomBanks( 240, 256, &myFile );
      }

      // Return mapping registers to initial settings...
      dataOut();
      controlOut_SNES();

      writeBank_SNES( 0, 0x4833, 2 );
      writeBank_SNES( 0, 0x4834, 0 );

      dataIn();
      controlIn_SNES();
    }
  }

  // Close the file:
  myFile.close();
}


Is it supposed to do that? Could that be what's causing the problem? Should I erase one of the  0xF00000-0xFFFFFF readings or replace it with something else?

tamanegi_taro

Maybe code is for other game? Not sure why it's reading it twice.
Did you see "Dumping SPC7110 HiRom" and 1, 2, 3, and 4 on screen when you dump the cart?
Try removing first F00000 read.

skaman

SPC7110 uses registers 0x4831-0x4834 to map the ROM.

Reading 0xF0-0xFF twice is correct with the current register settings.

The second read of 0xF0-0xFF is preceded by writing to register 0x4833 which maps in the final bank.

werewolfslayr925

#477
Mar 18, 2018, 09:15 pm Last Edit: Mar 18, 2018, 09:26 pm by werewolfslayr925 Reason: Convenience
SPC7110 uses registers 0x4831-0x4834 to map the ROM.

Reading 0xF0-0xFF twice is correct with the current register settings.

The second read of 0xF0-0xFF is preceded by writing to register 0x4833 which maps in the final bank.
Thanks for the input, skaman. When comparing the dump I get from the ROM dumper with a clean dump, here's what I get:

1. In the hex code for my dump of Tengai Makyou ZERO, everything from 00100000 to 002FFFFF is blank (i.e. all 00s).

2. In the hex code for my dump of Tengai Makyou ZERO, everything from 00400000 to 004FFFFF is blank (i.e. all 00s).

3. When comparing my dump to a clean dump, the information from 00300000 through 003FFFFF in my dump seems to be identical to the information from 00100000 through 001FFFFF in the clean dump.

4. When comparing my dump to a clean dump, both files are the same size.

The dumper itself seems to go through the whole thing just fine:

1. It properly identifies the cartridge, both in name and in specs

2. it does go through all four steps of the dumping process (i.e. "1", "2", "3", and "4" all show up when it is supposedly dumping the cart).

Apparently, the dumper isn't reading certain things that it should be, though, and it is placing certain things that it is reading into the wrong places in my dump of the game. What exactly is incorrect in the code? What do I need to change in the code to make it dump properly and how do I go about doing that?


Edit: For quick and easy reference, here's my code for SPC7110 carts:

Code: [Select]
  // Dump SPC7110 High-type ROM
  else if ((romType == HI) && ((romChips == 245) || (romChips == 249))) {
    println_Msg(F("Dumping SPC7110 HiRom"));
    display_Update();

    // 0xC00000-0xDFFFFF
    print_Msg(F(" Part 1"));
    display_Update();
    readHiRomBanks( 192, 224, &myFile );

    if (numBanks > 32) {
      dataOut();
      controlOut_SNES();
      // Set 0x4834 to 0xFF
      writeBank_SNES( 0, 0x4834, 0xFF );

      dataIn();
      controlIn_SNES();

      // 0xE00000-0xEFFFFF
      print_Msg(F(" 2"));
      display_Update();
      readHiRomBanks( 224, 240, &myFile );

      if (numBanks > 48) {
        // 0xF00000-0xFFFFFF
        print_Msg(F(" 3"));
        display_Update();
        readHiRomBanks( 240, 256, &myFile );

        dataOut();
        controlOut_SNES();

        // Set 0x4833 to 3
        writeBank_SNES( 0, 0x4833, 3 );

        dataIn();
        controlIn_SNES();

        // 0xF00000-0xFFFFFF
        println_Msg(F(" 4"));
        display_Update();
        readHiRomBanks( 240, 256, &myFile );
      }

      // Return mapping registers to initial settings...
      dataOut();
      controlOut_SNES();

      writeBank_SNES( 0, 0x4833, 2 );
      writeBank_SNES( 0, 0x4834, 0 );

      dataIn();
      controlIn_SNES();
    }
  }

  // Close the file:
  myFile.close();
}

skaman

What reader are you using?  If you built the reader yourself, double-check all of your address lines.  It looks like the address lines are mixed up.

werewolfslayr925

What reader are you using?  If you built the reader yourself, double-check all of your address lines.  It looks like the address lines are mixed up.
I built this ROM dumper and used this code found on this page of the cart reader wiki.

What do you mean by "the address lines are mixed up" and how do I make them not "mixed up"?

Go Up