public static void PringFlashInfo(FamicomDumperConnection dumper) { Program.Reset(dumper); dumper.WriteCpu(0x5007, 0x04); // enable PRG write dumper.WriteCpu(0x5002, 0xFE); // mask = 32K var cfi = FlashHelper.GetCFIInfo(dumper); FlashHelper.PrintCFIInfo(cfi); FlashHelper.LockBitsCheckPrint(dumper); FlashHelper.PPBLockBitCheckPrint(dumper); }
public static void PrintFlashInfo(FamicomDumperConnection dumper) { Program.Reset(dumper); var version = DetectVersion(dumper); var CoolboyReg = (UInt16)(version == 2 ? 0x5000 : 0x6000); int bank = 0; byte r0 = (byte)(((bank >> 3) & 0x07) // 5, 4, 3 bits | (((bank >> 9) & 0x03) << 4) // 10, 9 bits | (1 << 6)); // resets 4th mask bit byte r1 = (byte)((((bank >> 7) & 0x03) << 2) // 8, 7 | (((bank >> 6) & 1) << 4) // 6 | (1 << 7)); // resets 5th mask bit byte r2 = 0; byte r3 = (byte)((1 << 4) // NROM mode | ((bank & 7) << 1)); // 2, 1, 0 bits dumper.WriteCpu(CoolboyReg, r0, r1, r2, r3); var cfi = FlashHelper.GetCFIInfo(dumper); FlashHelper.PrintCFIInfo(cfi); FlashHelper.LockBitsCheckPrint(dumper); FlashHelper.PPBLockBitCheckPrint(dumper); }