- Don't use `Serial.read() - 48` to extract chars. Just treat the data
as chars. This is more legible, and actually reduced the program
storage space utilization slightly.
- Remove incomingByte global variable, mark all uses as local
variables. This leads to a tiny (yet measurable) decrease in global
variable use, and no change in sketch memory use. Of course, the
variable now resides in the stack, but only while the functions using
it exist, which isn't always.
1. Added CRC database lookup for ROM dump validation and file renaming
2. Added delays to improve successful ROM dumping. Especially helps with
2-chip ROMs
3. Fixed database mapper config for Star Trek (not a 2-chip ROM)
This was causing two symptoms/bugs:
* OSCR_LOG.txt was being spammed with random data.
* The size of OSCR_LOG.txt would get so big that copying the log would take a long time, possibly minutes. Oftentimes this caused the display to appear to hang after searching for the CRC (after "->") but before displaying the result.
If using the global log and a version of master since e61ac414d89556c941f0b8ca76e5d7d6684037f0 you should delete OSCR_LOG.txt from your SD card as it will likely be very large and continue to cause dumping to be slow.
* 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.