From 21736a241a28667e7081923063a189ef2a7793c6 Mon Sep 17 00:00:00 2001 From: sanni Date: Wed, 17 Nov 2021 20:13:24 +0100 Subject: [PATCH] V7.2: LCD bugfix --- Cart_Reader/MD.ino | 2 +- Cart_Reader/NES.ino | 33 +++++++++++++++++++++++++++++---- Cart_Reader/SMS.ino | 2 +- Cart_Reader/SNES.ino | 2 +- 4 files changed, 32 insertions(+), 7 deletions(-) diff --git a/Cart_Reader/MD.ino b/Cart_Reader/MD.ino index 34645ca..6e4dd3f 100644 --- a/Cart_Reader/MD.ino +++ b/Cart_Reader/MD.ino @@ -1036,7 +1036,7 @@ void getCartInfo_MD() { println_Msg(F(" ")); // Wait for user input -#ifdef enable_OLED +#if defined(enable_LCD) || defined(enable_OLED) println_Msg(F("Press Button...")); display_Update(); wait(); diff --git a/Cart_Reader/NES.ino b/Cart_Reader/NES.ino index c4cb242..722c924 100644 --- a/Cart_Reader/NES.ino +++ b/Cart_Reader/NES.ino @@ -1126,7 +1126,7 @@ unsigned char* getNES20HeaderBytesFromDatabaseRow(const char* crctest) { Config Functions *****************************************/ void setMapper() { -#ifdef enable_OLED +#if defined(enable_LCD) || defined(enable_OLED) chooseMapper: // Read stored mapper EEPROM_readAnything(7, newmapper); @@ -1152,6 +1152,7 @@ chooseMapper: display.println(""); display.println(F("Press to Change")); display.println(F("Hold to Select")); +#ifdef enable_OLED if (digit == 0) { display.drawLine(20, 30, 30, 30, WHITE); display.drawLine(40, 30, 50, 30, BLACK); @@ -1167,6 +1168,30 @@ chooseMapper: display.drawLine(40, 30, 50, 30, BLACK); display.drawLine(60, 30, 70, 30, WHITE); } +#else if enable_LCD + if (digit == 0) { + display.setDrawColor(1); + display.drawLine(20, 30, 30, 30); + display.setDrawColor(0); + display.drawLine(40, 30, 50, 30); + display.drawLine(60, 30, 70, 30); + } + else if (digit == 1) { + display.setDrawColor(0); + display.drawLine(20, 30, 30, 30); + display.setDrawColor(1); + display.drawLine(40, 30, 50, 30); + display.setDrawColor(0); + display.drawLine(60, 30, 70, 30); + } + else if (digit == 2) { + display.setDrawColor(0); + display.drawLine(20, 30, 30, 30); + display.drawLine(40, 30, 50, 30); + display.setDrawColor(1); + display.drawLine(60, 30, 70, 30); + } +#endif /* Check Button 1 click 2 doubleClick @@ -1316,7 +1341,7 @@ void checkMapperSize() { } void setPRGSize() { -#ifdef enable_OLED +#if defined(enable_LCD) || defined(enable_OLED) display_Clear(); if (prglo == prghi) newprgsize = prglo; @@ -1391,7 +1416,7 @@ setprg: } void setCHRSize() { -#ifdef enable_OLED +#if defined(enable_LCD) || defined(enable_OLED) display_Clear(); if (chrlo == chrhi) newchrsize = chrlo; @@ -1465,7 +1490,7 @@ setchr: } void setRAMSize() { -#ifdef enable_OLED +#if defined(enable_LCD) || defined(enable_OLED) display_Clear(); if (ramlo == ramhi) newramsize = ramlo; diff --git a/Cart_Reader/SMS.ino b/Cart_Reader/SMS.ino index fe585fe..6a1764f 100644 --- a/Cart_Reader/SMS.ino +++ b/Cart_Reader/SMS.ino @@ -376,7 +376,7 @@ void getCartInfo_SMS() { } // Wait for user input -#ifdef enable_OLED +#if defined(enable_LCD) || defined(enable_OLED) println_Msg(F("Press Button...")); display_Update(); wait(); diff --git a/Cart_Reader/SNES.ino b/Cart_Reader/SNES.ino index 4fc2d65..dd12a34 100644 --- a/Cart_Reader/SNES.ino +++ b/Cart_Reader/SNES.ino @@ -787,7 +787,7 @@ void getCartInfo_SNES() { display_Update(); // Wait for user input -#ifdef enable_OLED +#if defined(enable_LCD) || defined(enable_OLED) println_Msg(F(" ")); println_Msg(F(" ")); println_Msg(F("Press Button..."));