Commit Graph

36 Commits

Author SHA1 Message Date
smesgr9000
d039c590cc define more commonly used string in OSCR and reuse them 2024-05-28 21:11:48 +02:00
smesgr9000
363d18b542 add common function to open create folder, print message and open file. Remove duplicate code 2024-05-26 22:20:47 +02:00
smesgr9000
41182a7eb0 add option to clear display and remove duplicate code 2024-05-25 14:25:35 +02:00
smesgr9000
6abe29fcd9 remove duplicate code to print saving and increment of folder id 2024-05-25 14:07:08 +02:00
smesgr9000
9f0aa09197 remove duplicate code to create folder 2024-05-12 15:37:11 +02:00
smesgr9000
990b61ca3a make cast in read function explicit and reduce duplicate read functions 2024-05-03 19:12:48 +02:00
smesgr9000
330e615b8c remove duplicate code to select mapper, rom and ram configurations 2024-05-01 21:27:45 +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
9909fdafb3 replace 5200 and ARC cart selection code with code used in NES, COLV & INTV 2024-04-29 19:09:50 +02:00
smesgr9000
06d5f28d0c port NES fast forward selection to other systems 2024-04-28 13:35:21 +02:00
smesgr9000
3441cedfd4 remove duplicate code of seeking database files for letter 2024-04-24 19:55:43 +02:00
smesgr9000
e7e0da80b0 remove some duplicate printing code and declare more global text strings 2024-04-22 18:51:01 +02:00
Ancyker
a86f140198 Follow up to/fix for e61ac414d8 2024-03-02 11:30:44 -05: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
sanni
fee5c867aa
Update INTV.ino for 12K carts (thx to skaman) 2023-07-29 12:39:21 +02:00
Ancyker
2cf7f5dbe7 Cleanup voltage requests
The `setVoltage()` function should be called even when `ENABLE_VSELECT` is disabled because `ENABLE_3V3FIX` also uses it. There is no resource cost to do this as when both options are disabled the compiler will optimize this function out. This just "future proofs" the code so if that function ever does more it doesn't need updated everywhere. This applies to `setup_FlashVoltage()` as well.

The changes to OSCR.cpp are just for code formatting and additional comments to clarify this.
2023-06-26 15:25:54 -04:00
sanni
dee54dd30e Move automatic voltage selection from menu to setup functions 2023-06-26 12:04:00 +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
Remy Starshade
aee632642d Add Voltage Selection Module 2022-11-12 14:13:22 -05:00
Vincent Pelletier
f07f6f9025 All: Replace print_Error(*, boolean) calls with print_{,Fatal}Error(*)
Also, make print_FatalError(*) independent from print_Error(*).
Also, factorise common parts of print_Error(*).

Frees 2336 bytes of program space and 5 bytes of global ram space.
2022-10-31 08:52:33 +00:00
Vincent Pelletier
264bfd5ce5 INTV.ino: Move INTV to PROGMEM.
Uses 8 bytes of program space.
Frees 6 bytes of global ram space.
2022-10-29 07:16:37 +00:00
sanni
a8a981e137 Auto format 2022-10-28 15:02:51 +02:00
Vincent Pelletier
27baa2b164 All: Factorise code seeking a file back N lines
This saves 890 bytes of program space.
2022-10-28 05:29:20 +00:00
Vincent Pelletier
0a627e5bd4 All: Use f.seekCur(x) instead of f.seekSet(f.curPosition() + x)
Saves 450 bytes of program space.
2022-10-28 05:29:20 +00:00
Vincent Pelletier
a555f2117f All: Resolve all compiler and linker warnings
No functional change intended.
2022-10-28 05:29:20 +00:00
Vincent Pelletier
3fcd1a808d https://github.com/sanni/cartreader/issues/574#issuecomment-1286956251 2022-10-28 05:29:20 +00:00
sanni
4badfff458 Move to Arduino IDE 2.0.0 (different auto formatting, no code changes) 2022-10-13 09:49:03 +02:00
sanni
0ab7a18b05 V10.1 Move HW1/2/3 to same display lib as HW4/5
... bugs are to be expected :D
2022-10-08 16:23:33 +02:00
sanni
d086b277ef Add support for NES mapper 45 (thx to skaman) 2022-09-25 11:09:54 +02:00
sanni
511902eb56 9.4: Add selecting mapping from database list for NES 2022-08-06 14:50:40 +02:00
sanni
92f76b324c Fix word wrap bug on HW5 2022-08-03 21:59:11 +02:00
sanni
0a2e1ab36d Adjust Col/Int for HW3 screen size 2022-08-03 19:59:23 +02:00
sanni
5012ca88ac Fix crash 2022-08-03 19:48:12 +02:00
sanni
b5bff8c1f0 V9.3 finish Coleco-/Intellivision database lookup code 2022-08-03 19:35:45 +02:00
sanni
f002e40aa6 Add back option to dump headerless NES ROM 2022-08-03 12:14:32 +02:00
sanni
0e56a3451a V9.2 Alpha: Adds Coleco- and Intellivision (thx to skaman) 2022-07-23 11:16:37 +02:00