From 6a830e651d76e8d9817d1a12d46b396cca42c446 Mon Sep 17 00:00:00 2001 From: sanni Date: Thu, 13 Jan 2022 17:07:58 +0100 Subject: [PATCH] Print first 40 bytes if flashrom is unknown --- Cart_Reader/Cart_Reader.ino | 2 +- Cart_Reader/FLASH.ino | 16 +++++++++++++++- Cart_Reader/options.h | 12 ++++++++++-- 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/Cart_Reader/Cart_Reader.ino b/Cart_Reader/Cart_Reader.ino index 0ef7544..8e16d0d 100644 --- a/Cart_Reader/Cart_Reader.ino +++ b/Cart_Reader/Cart_Reader.ino @@ -4,7 +4,7 @@ This project represents a community-driven effort to provide an easy to build and easy to modify cartridge dumper. - Date: 29.11.2021 + Date: 13.01.2022 Version: 7.3 SD lib: https://github.com/greiman/SdFat diff --git a/Cart_Reader/FLASH.ino b/Cart_Reader/FLASH.ino index a632529..b5cbc16 100644 --- a/Cart_Reader/FLASH.ino +++ b/Cart_Reader/FLASH.ino @@ -580,7 +580,21 @@ idtheflash: print_Msg(F("ID Type 2: ")); println_Msg(flashid); println_Msg(" "); - print_Error(F("UNKNOWN FLASHROM"), true); + println_Msg(F("UNKNOWN FLASHROM")); + println_Msg(" "); + println_Msg(F("Press Button...")); + display_Update(); + wait(); + + // print first 40 bytes of flash + display_Clear(); + println_Msg(F("First 40 bytes:")); + println_Msg(F("")); + printFlash(40); + println_Msg(F("")); + display_Update(); + resetFlash8(); + print_Error(F("Press Button to reset"), true); } println_Msg(" "); println_Msg(F("Press Button...")); diff --git a/Cart_Reader/options.h b/Cart_Reader/options.h index 350108f..0931324 100644 --- a/Cart_Reader/options.h +++ b/Cart_Reader/options.h @@ -1,11 +1,19 @@ //****************************************** -// CHOOSE HARDWARE VERSION +// !!! CHOOSE HARDWARE VERSION !!! //****************************************** -#define HW4 +// Remove // in front of the line with your hardware version +//#define HW4 //#define HW3 //#define HW2 //#define HW1 //#define SERIAL_MONITOR +//****************************************** +// !!! CHOOSE HARDWARE VERSION !!! +//****************************************** + +#if !(defined(HW1) || defined(HW2) || defined(HW3) || defined(HW4) || defined(SERIAL_MONITOR)) +# error !!! PLEASE CHOOSE HARDWARE VERSION IN OPTIONS.H !!! +#endif #if defined(HW4) #define enable_LCD