- Removed strcpy_P from print_STR, not necessary as print*_Msg supports
__FlashStringHelper strings, so pass those through.
- Change RTCStamp signature, don't return String as that allocates on
the heap, require caller to allocate a buffer however they want of at
least 21 bytes in size. Updated call-sites to follow this new
convention. String output is now no longer completely uppercase.
- delete print_right(). This function doesn't quite do what it claims
to do, at least on HW5, as the font isn't monospace.
- Fix number literal types for clkcal. No need to use ULL, as the
variables in use are int32_t, and on AVR these are just L. Unsure of
how to make it more cross-platform for now.
- delete atoi32_signed, as we can just use atol() and save progmem.
- cleanup readClockOffset(), and use atol also.
- minor cleanups in initializeClockOffset that actually reduced
progmem.
- rewrote void print_Msg(const char myString[]) wrapping implementation
to reduce progmem. call print_Msg in println_Msg (not sure why it
wasn't called). This actually fixes a bug where only the first line
would wrap.
- checkButton(), rotaryDir doesn't need to be more than int8_t.
- delete large switch-case in fileBrowser, unnecessary, just index the
fileNames string directly.
- buildRom, loop size doesn't need to be more than byte as length is a
byte.
- In total, progmem usage went from 181634 bytes to 180484 (over 1KB
saved).
- Add support for simulating a long press for the serial interface by
seinding `l` or `L`. This lets someone actually run the SNES clock
calibration using the serial interface.
- 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.