Commit Graph

60 Commits

Author SHA1 Message Date
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
cb111077f8 replace NES defines with rgbLed function calls 2024-05-26 22:43:41 +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
e8e6d15a72 remove duplicate string literals 2024-05-03 17:12:31 +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
qufb
ac1c6db12d Fix PH3 pin typo 2023-11-16 22:27:01 +00: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
PsyK0p4T
553e86af1e
Update SMS.ino
SMS.ino rework : 
- new constants are used for adapters and systems (simplify conditions and checks)
- dropped the feature to change adapter mode between two dumps (rarely used and adds many conditions)
- added Retron 3in1 adapter for SMS dumping
- added all possible rom sizes for SMS/GG and SG-1000 carts (40/48k mapping not yet supported)
- during manual rom size selection, the offered values are adapted to selected system
- moved code (function calls, function order...)
- functions, variables, arrays renamed
- comments added/modified
More details listed in this thread : https://github.com/sanni/cartreader/discussions/742
2023-04-06 16:04:50 +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
3fcd1a808d https://github.com/sanni/cartreader/issues/574#issuecomment-1286956251 2022-10-28 05:29:20 +00:00
sanni
5357dea659 Print checksum and header CRC32 when searching database 2022-10-27 23:43:46 +02:00
PsyK0p4T
ce436e8a77
Use sg1000.txt database
Use sg1000.txt database to verify/rename SG-1000 dumps
2022-10-27 22:25:34 +02: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
07a38f30c2 V9.7: Calculate block CRC during Controller Pak read 2022-09-09 00:21:16 +02:00
PsyK0p4T
46a01069f1
Adding "Retron 3in1" support for GG
- "Retron 3in1" adapter support for GG dumping added
- 32KB GG and SMS carts are now handled same
2022-08-29 14:39:02 +02:00
sanni
f002e40aa6 Add back option to dump headerless NES ROM 2022-08-03 12:14:32 +02:00
PsyK0p4T
0fea256251
Fix 32KB GG
32KB GG carts don't use mapper.
Games sush as Columns, Woody Pop etc. are now dumped fine.
2022-07-29 00:47:37 +02:00
PsyK0p4T
77557c3f18
Update SMS.ino
Various changes to distinct GG from SMS on screen.
gg.txt is now used for GG crc checks.
2022-07-25 13:16:15 +02:00
sanni
e87de58328 V9.0 2022-07-17 14:50:59 +02:00
sanni
0a4a4d0039 Add no-intro database to NES
This is just a beta release, stuff might be broken.
2022-07-07 00:15:13 +02:00
sanni
196050257b Add filenames to N64 database 2022-06-17 23:57:29 +02:00
sanni
c9a9e5872e
Add progressbar to SMS 2022-06-16 17:57:00 +02:00
sanni
8b96d250bd Add MD database 2022-06-16 17:17:16 +02:00
sanni
0b70db4241 Add CRC32 database for SMS 2022-06-16 15:49:57 +02:00
sanni
fac6f8eab2 Copy latest log to dump dir 2022-06-16 15:15:43 +02:00
sanni
d3173ef816 Add basic support for SG-1000
For now just for cartridges with no save or mapper chip and rom size up to 32KB.
2022-03-21 01:01:35 +01:00
sanni
430f8e3952 Add option to set rom size manually for SMS 2022-03-10 15:05:20 +01:00
Kreeblah
8e155cf97b
Fixed build warnings 2022-02-24 15:59:25 -08:00
sanni
7b92953e0b Reduce ram usage by a small amount 2022-02-15 12:09:21 +01:00
scrap-a
635ad45b66 Fix for Fantasy Zone (J) (V1.0) 2021-12-09 01:21:01 +09:00
sanni
dfec64917d V7.2: LCD bugfix #2 2021-11-17 21:31:18 +01:00
sanni
21736a241a V7.2: LCD bugfix 2021-11-17 20:13:24 +01:00
sanni
5a3b311feb Fix Led and missing word wrap 2021-10-26 17:13:42 +02:00
sanni
05deb817ac V7.0: Add basic support for MKS MINI12864 V3
https://www.aliexpress.com/item/1005003098864693.html
2021-10-24 00:41:18 +02:00
sdhizumi
540542ab23 SMS: add a strange checksum from The Pro Yakyuu '91 (Game Gear). 2021-04-11 00:21:08 +09:00
jiyunomegami
1e3833fe8d retrode SMS plugin support, SMS cart size detection 2020-10-18 02:12:09 +09:00
jiyunomegami
39be20d32b SMS SRAM save data writing 2020-07-05 01:42:05 +09:00
jiyunomegami
29093b1bf3 add #ifdef enable_XXX check to each module 2020-07-05 00:07:14 +09:00
jiyunomegami
cb938a65bc SMS retrode mode toggle and SRAM save data reading 2020-07-05 00:05:06 +09:00
jiyunomegami
6d0ddda980 Make the retrode mode work after using the normal mode by accident 2020-07-04 22:33:50 +09:00
jiyunomegami
bc3dd3dd13 Retrode SMS/GG adapter support 2020-07-04 19:16:14 +09:00
sanni
7b263115a5 V4.8: Add Reset Option to sub menues 2020-04-12 11:11:10 +02:00
sanni
5da151f072 Update SMS.ino 2019-09-27 23:01:45 +02:00