diff --git a/COPYRIGHT-NOTICE-FOR-BINARY-DISTRIBUTION.md b/COPYRIGHT-NOTICE-FOR-BINARY-DISTRIBUTION.md index ad46fa7..7d35eb4 100644 --- a/COPYRIGHT-NOTICE-FOR-BINARY-DISTRIBUTION.md +++ b/COPYRIGHT-NOTICE-FOR-BINARY-DISTRIBUTION.md @@ -72,13 +72,16 @@ limitations under the License. ## GEM **Note that the relevant code used in this project is a MODIFIED version.** -Modifications on GEM_u8g2.h of spirik/GEM@^1.4.0: +Modifications to GEM_u8g2.h in spirik/GEM@^1.4.0: Line 134: `virtual void drawMenu();` Line 141: `protected:` Modifications to GEMPage.h in spirik/GEM@^1.4.0: Line 59: `protected:` +Modifications to GEM_u8g2.cpp in spirik/GEM@^1.4.0: +Line 165: `// _u8g2.clear();` + ---------------------------------------------------------------- GEM (a.k.a. Good Enough Menu) - Arduino library for creation of graphic multi-level menu with diff --git a/include/NutEmuInterface.h b/include/NutEmuInterface.h index 8abf9d9..1e37422 100644 --- a/include/NutEmuInterface.h +++ b/include/NutEmuInterface.h @@ -95,7 +95,7 @@ class NutEmuInterface { void setUnlockSpeed(bool); // Attempt to load deep sleep restore file - bool checkRestoreFlag(); + bool readRestoreFlag(); void resetProcessor(bool = false); void deepSleepPrepare(); diff --git a/src/NutEmuInterface.cpp b/src/NutEmuInterface.cpp index d15b7bd..de71c5d 100644 --- a/src/NutEmuInterface.cpp +++ b/src/NutEmuInterface.cpp @@ -214,6 +214,7 @@ void NutEmuInterface::handleONKeySequence(uint16_t extraKeycode) { switchStateOnTick(false, INVALID_KEYCODE, [](bool){ /* Turn off first */ if (context->handleONKeySequenceExtraKeycode == 195 /*y^x on 15C*/) { + printf_log(EMU_TAG "y^x + ON detected, performing magic\n"); context->rotateXReg(); context->switchStateOnTick(true); } else { @@ -400,7 +401,6 @@ void NutEmuInterface::switchStateOnTick(bool targetState, uint16_t extraKeycode, void NutEmuInterface::rotateXReg() { uint64_t x_register; uint64_t rotated_x_register = 0; - printf_log(EMU_TAG "y^x + ON detected, performing magic\n"); nut_read_reg(nv->n, &x_register); rotated_x_register = (x_register >> 22 | x_register << (WSIZE * 4 - 22)) & ((uint64_t) -1 >> 8); @@ -454,8 +454,8 @@ bool NutEmuInterface::saveState(char *filepath) { file.write((uint8_t *) nv->ram, sizeof(reg_t) * nv->max_ram); file.write( nv->pf_addr); file.write( nv->selprf); - file.write((uint8_t *) &nv->cycle_count, sizeof(uint64_t)); // file.write((uint8_t *) nv->display_segments, sizeof(uint32_t) * MAX_DIGIT_POSITION); // Generated using RAM contents (if you call event_restore_completed tho) + file.write((uint8_t *) &nv->cycle_count, sizeof(uint64_t)); // ? file.write((uint8_t) nv->display_chip->enable); file.write((uint8_t) nv->display_chip->blink); @@ -591,7 +591,7 @@ void NutEmuInterface::setUnlockSpeed(bool unlockSpeed_) { unlockSpeed = unlockSpeed_; } -bool NutEmuInterface::checkRestoreFlag() { +bool NutEmuInterface::readRestoreFlag() { if (!LittleFS.exists(RESTORE_FLAG_FILENAME)) return false; diff --git a/src/main.cpp b/src/main.cpp index 2b9cd4a..a08651f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -61,7 +61,7 @@ void setup() { keyboardMgr.init(); // Init and start matrix keyboard scanner task nutEmuInterface.init(); - bool isRestoreFlagPresent = nutEmuInterface.checkRestoreFlag(); + bool isRestoreFlagPresent = nutEmuInterface.readRestoreFlag(); printf("Restore flag presence: %d\n", isRestoreFlagPresent); if (isRestoreFlagPresent) { nutEmuInterface.resume();