From 0081ad7b2f6f838d480de3e31c2ede086c102315 Mon Sep 17 00:00:00 2001 From: sanni Date: Wed, 19 Jan 2022 13:15:59 +0100 Subject: [PATCH] flash ID bugfix --- Cart_Reader/Cart_Reader.ino | 8 ++++---- Cart_Reader/FLASH.ino | 20 ++++++++++++-------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/Cart_Reader/Cart_Reader.ino b/Cart_Reader/Cart_Reader.ino index 5efec42..108bc1e 100644 --- a/Cart_Reader/Cart_Reader.ino +++ b/Cart_Reader/Cart_Reader.ino @@ -4,8 +4,8 @@ This project represents a community-driven effort to provide an easy to build and easy to modify cartridge dumper. - Date: 13.01.2022 - Version: 7.3 + Date: 19.01.2022 + Version: 7.4 SD lib: https://github.com/greiman/SdFat OLED lib: https://github.com/adafruit/Adafruit_SSD1306 @@ -45,7 +45,7 @@ **********************************************************************************/ -char ver[5] = "7.3"; +char ver[5] = "7.4"; /****************************************** Libraries @@ -604,7 +604,7 @@ void aboutScreen() { display_Clear(); println_Msg(F("Cartridge Reader")); println_Msg(F("github.com/sanni")); - print_Msg(F("2021 Version ")); + print_Msg(F("2022 Version ")); println_Msg(ver); println_Msg(F("")); println_Msg(F("")); diff --git a/Cart_Reader/FLASH.ino b/Cart_Reader/FLASH.ino index b5cbc16..190d3db 100644 --- a/Cart_Reader/FLASH.ino +++ b/Cart_Reader/FLASH.ino @@ -189,6 +189,7 @@ void flashromMenu8() { case 4: time = 0; display_Clear(); + resetFlash8(); println_Msg(F("ID Flashrom")); switch (flashromType) { case 1: idFlash29F032(); break; @@ -399,8 +400,8 @@ void epromMenu() { Flash IDs *****************************************/ void id_Flash8() { - // ID flash - idFlash29F032(); + // Test if 28FXXX series flash (type 2 flashrom) + idFlash28FXXX(); // Print start screen idtheflash: @@ -557,16 +558,19 @@ idtheflash: flashromType = 3; } else if (secondID == 1) { - // Backup first ID read-out - strncpy(vendorID, flashid, 5); - // Read ID a second time using a different command - idFlash29F1610(); + // Read ID a second time using a different command (type 1 flashrom) + resetFlash8(); + idFlash29F032(); secondID = 2; goto idtheflash; } else if (secondID == 2) { - // test if 28FXXX series flash - idFlash28FXXX(); + // Backup first ID read-out + strncpy(vendorID, flashid, 5); + + // Read ID a third time using a different command (type 2 flashrom) + resetFlash8(); + idFlash29F1610(); secondID = 0; goto idtheflash; }