Happy anniversary of the first lunar landing! 🌙🚀
This is simply a bugfix and optimization release. Most of the fixes, including the severe-sounding "crash"es, are really edge cases that we aren't aware of anyone ever running into; but some have affected real users (like rgbgfx -p/--palette generation, or SECTION UNION alignment, or faster .asm parsing).
RGBASM:
- Modulo
$8000_0000 % -1warns with-Wdiv, like$8000_0000 / -1already did - Fix negative macro arguments (e.g.
\<-1>) whenSHIFTed by some amount - Improve some error messages, e.g. for invalid command-line options and for section creation errors
Minor fixes
- Fix some invalid parsing of fixed-point numeric literals (e.g.
42.is valid, and0.5q264is invalid) - Fix invalid minus sign before symbol name in bracketed macro arguments (e.g.
\<-idx>) to error instead of ignoring the- - Prevent incomplete interpolations (e.g.
{namewithout a closing}brace) from expanding anyway - Fix parsing of invalid characters in bracketed macro arguments (e.g.
\<idxwithout a closing>bracket) - Fix a parsing inconsistency involving line continuations inside untaken
IF/ELIF/ELSEblocks - Fix a parsing inconsistency involving (invalid) local labels after
ENDC/ENDR/ENDMkeywords - Fix
-s/--state, if passed more than once, to use the last option's value - Ignore the
SOURCE_DATE_EPOCHenvironment variable if it is not in base 10 - Optimize parsing of charmaps, identifiers/keywords, conditional/loop/macro blocks, and piped input files, for faster assembling
RGBLINK:
- Add
-Wlarge-constantwarning (about numbers in linker scripts) that's enabled by default (the same as RGBASM) - Modulo
$8000_0000 % -1warns with-Wdiv, like$8000_0000 / -1already did, and does not potentially crash SECTION UNIONalignment could be incorrect or fail to build depending on the order ofUNIONs from multiple object files (thanks to @vulcandth for the fix!)- Parse numeric literals in linker scripts the same way as RGBASM (handling hex/octal/binary base prefixes, and
_digit separators)
Minor fixes
- Fix off-by-one error with line numbers in error messages from
INCLUDEd linker scripts - Fix parsing of linker scripts without a newline at the end of the file (whether
INCLUDEd or not) - Fix large
dsin linker script overflowing the bank's address - Fix potential error (undefined behavior) if both .sym and .map file are written to standard output "
-" - Fix
-S/--scramblealgorithm to work for scrambling SRAM sections too - Fix potential out-of-memory error for too-small
-O/--overlayfiles in-t/--tinymode - Validate
DefandReflines in SDAS object input to avoid a potential crash when linking them - Add more fail-safe checks for invalid object files (e.g. invalid RPN commands, section banks, or patch offsets)
RGBGFX:
- Fix
-p/--palettegeneration being inconsistent and potentially failing depending on whether-Z/--columnswas passed (thanks to @ElectroDeoxys for reporting this and to @vulcandth for help fixing it!) - Report CGB colors in error/verbose messages formatted as
GB:rr,gg,bb, not$xxxx
Minor fixes
- Fix crash on fully-transparent input image
- Fix crash when deduplicating tiles where a tile is fully transparent
- Fix crash when trimming more tiles than exist after deduplication
- Fix non-deduplicated input image to ignore
-Bbackground tiles when counting whether there are too many tiles - Fix crash on non-deduplicated image that completely fills tile banks 0 and 1
- Fix reverse mode to work even when nonzero
-b/--base-tilesor-l/--base-paletteIDs wrapped around to 0 - Fix reverse mode with
-s/--palette-sizetoo small for the tile data (error message, not crash) - Fix reverse mode with invalid
-q/--palette-mapindexes (error message, not crash) - Add more fail-safe checks for invalid
-r/--reverseimage output (e.g. invalid palette IDs in attribute maps)
Build/Test:
- Rename
test/fetch-test-deps.shtotest/external/fetch-repos.sh - Refactor and tidy up the CTest-based testing system to use
LABELSinstead of ad-hoc-Ddefines (previously-DUSE_NONFREE_TESTSand-DUSE_EXTERNAL_TESTS) - Refactor and tidy up the CMake-based build system; note that the minimum required CMake version is now 3.24 from August 2022 (previously 3.9 from July 2017)
Minor changes
- macOS builds now support as early as Mac OS X 10.4 Tiger from 2005
- Parallelize CTest-based external repository tests, for faster testing