From f7bd4878ebc37267b05c4ab84ad0bfed371cffc9 Mon Sep 17 00:00:00 2001 From: sanni Date: Mon, 11 Jun 2018 09:42:35 +0200 Subject: [PATCH] V1.1: Add support for Intel 512M29EW (64MB) N64 repro Haven't tested it myself but should work thx to BASSIX --- Cart_Reader/Cart_Reader.ino | 6 +++--- Cart_Reader/N64.ino | 27 ++++++++++++++++++++++++--- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/Cart_Reader/Cart_Reader.ino b/Cart_Reader/Cart_Reader.ino index 9e15324..4e88402 100644 --- a/Cart_Reader/Cart_Reader.ino +++ b/Cart_Reader/Cart_Reader.ino @@ -2,8 +2,8 @@ Cartridge Reader for Arduino Mega2560 Author: sanni - Date: 05-05-2018 - Version: 1.0 + Date: 11-06-2018 + Version: 1.1 SD lib: https://github.com/greiman/SdFat LCD lib: https://github.com/adafruit/Adafruit_SSD1306 @@ -35,7 +35,7 @@ infinest - help with GB Memory cart **********************************************************************************/ -char ver[5] = "1.0"; +char ver[5] = "1.1"; /****************************************** Define Starting Point diff --git a/Cart_Reader/N64.ino b/Cart_Reader/N64.ino index 1cc4a38..0f3b1cd 100644 --- a/Cart_Reader/N64.ino +++ b/Cart_Reader/N64.ino @@ -1789,8 +1789,8 @@ void writeFram(byte flashramType) { display_Update(); } else { - println_Msg("FAILED"); - print_Error(F("Flash is not blank"), true); + println_Msg("FAIL"); + display_Update(); } // Create filepath @@ -2223,6 +2223,8 @@ void flashRepro_N64() { println_Msg(F("Fujitsu MSP55LV100S")); else if ((strcmp(flashid, "227E") == 0) && (strcmp(cartID, "2301") == 0)) println_Msg(F("Fujitsu MSP55LV512")); + else if ((strcmp(flashid, "227E") == 0) && (strcmp(cartID, "3901") == 0)) + println_Msg(F("Intel 512M29EW")); // Print info print_Msg(F("ID: ")); @@ -2290,7 +2292,12 @@ void flashRepro_N64() { println_Msg(filePath); display_Update(); - if (strcmp(flashid, "227E") == 0) { + + if ((strcmp(cartID, "3901") == 0) && (strcmp(flashid, "227E") == 0)) { + // Intel 512M29EW(64MB) with 0x20000 sector size and 128 byte buffer + writeFlashBuffer_N64(0x20000, 128); + } + else if (strcmp(flashid, "227E") == 0) { // Spansion S29GL128N/S29GL256N or Fujitsu MSP55LV512 with 0x20000 sector size and 32 byte buffer writeFlashBuffer_N64(0x20000, 32); } @@ -2497,6 +2504,20 @@ void idFlashrom_N64() { resetFlashrom_N64(romBase); } + // Intel 512M29EW(64MB) with one flashrom chip + else if ((strcmp(cartID, "3901") == 0) && (strcmp(flashid, "227E") == 0)) { + cartSize = 64; + // Reset flashrom + resetFlashrom_N64(romBase); + } + + // Unknown 227E type + else if (strcmp(flashid, "227E") == 0) { + cartSize = 0; + // Reset flashrom + resetFlashrom_N64(romBase); + } + //Test for Fujitsu MSP55LV100S (64MB) else { // Send flashrom ID command