Commit Graph

10 Commits

Author SHA1 Message Date
Ancyker
2b01f7fc4d
Add checks for unsafe configurations
* Fixes #929
* Updated `ci.yml` to define `GITHUB_CI`
* Compilation will now error if VSELECT is enabled on hardware versions that don't support it (any version other than HW5).
  * HW4 and SERIAL might work but are untested. The error message for these versions reflects this.
* Erroring when unsafe configurations are defined can be overridden by defining `ALLOW_UNSAFE_CONFIG` which will throw a warning instead.
  * This should only be done if trying to implement or test on a currently unsupported platform.
  * If both `GITHUB_CI` and `ALLOW_UNSAFE_CONFIG` are defined an error will be thrown causing the CI tests to fail. This is just in case someone makes a commit with it defined.
2024-06-02 11:56:08 -04:00
smesgr9000
5b43a162b8 reuse common strings, remove duplicate 2024-05-30 08:00:13 +02:00
smesgr9000
d039c590cc define more commonly used string in OSCR and reuse them 2024-05-28 21:11:48 +02:00
smesgr9000
74352c6e31 define "File doesn't exist" in OSCR.cpp/h 2024-05-11 23:32:06 +02:00
smesgr9000
bb12c99fac replace FAIRCHILD, ODY2, MSX and VECTREX cart selection code with code used in NES, COLV & INTV. Define "Database not found" in OSCR.cpp 2024-05-01 09:06:23 +02:00
smesgr9000
e7e0da80b0 remove some duplicate printing code and declare more global text strings 2024-04-22 18:51:01 +02:00
Ancyker
e61ac414d8 Code optimization, cleanup, and stylization
* Reduced PROGMEM / DRAM usage slightly (Using defaults w/HW5: Before -> 214,668 bytes / 5,757 bytes; After -> 213,414 bytes / 5,751 bytes)
  * Optimized some menu options and calls
  * Added more string constants and implemented them where found.
* Fixed some stylization
  * Constants should always be uppercase.
  * Features should use the `ENABLE_<feature name>` format.
  * Options for features should use the `OPTION_<feature name>_<option name>` format.
  * Added ENUMs for more clarity and better type checking.
  * Moved some defines over to `constexpr` and `const` types. These are preferred over preprocessor constants when not intended for use with `#if` and other preprocessor language.
2024-03-02 11:26:35 -05:00
Ancyker
3468703a51 Added ability to use config file for some options.
A sample `config.txt` is in the SD folder. Currently the option is disabled by default and must be enabled.

Also:
* Eliminated the 5V spike at boot when VSELECT is installed and enabled. See discussion #906
* Fixed a warning in `MD.ino`
* Did some code cleanup, more cleanup to come.
2024-02-29 17:52:04 -05:00
sanni
63aeb335a4
Add support for DS1307 RTC module
DS1307 does not seem to have the lost lostPower function. So the time does not get set on upload and needs to be set manually as described in the [wiki](https://github.com/sanni/cartreader/wiki/Real%E2%80%90Time-Clock#setting-the-time).

In Config.h set like this:

````
#define RTC_installed
//#define DS3231
#define DS1307
````

Connect "Tiny RTC I2C module" or similar to the SDA/SCL/VCC/GND pins.
2023-07-22 15:21:02 +02:00
Ancyker
010b7e7525 Firmware Updater support, 3.3V Fix, and more
Lots of changes/additions.

Added:
* Firmware Updater support: Supports the Firmware Updater app (release to follow soon). Enabled by default, can be disabled in the config.
* 3.3V Fix (3V3FIX): Enable if you have stability issues when using 3.3V, works best with VSELECT. Disabled by default, can be enabled in the config.
* `DynamicClockSerial`: Class that extends and modifies HardwareSerial to be compatible with a dynamically changing clock speed. Used through the `ClockedSerial` object/variable.
* `OSCR.cpp` & `OSCR.h`: New files for storing globals. Only contains these new additions for now. More code cleanup to come.

Changed:
* Moved configuration flags to `Config.h` and documented them better.
* Removed `vselect()` function. Now uses `setVoltage()` with the params `VOLTS_SET_3V3` and `VOLTS_SET_5V`.

Known Issues:
* Rarely the LCD backlight turns white when using 3V3FIX. Resetting fixes it. Doesn't affect functionality/usability; it's just weird.
2023-03-29 21:05:01 -04:00