github gbdev/rgbds v1.0.2

latest release: v1.0.2+hotfix
17 hours ago

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 % -1 warns with -Wdiv, like $8000_0000 / -1 already did
  • Fix negative macro arguments (e.g. \<-1>) when SHIFTed 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, and 0.5q264 is 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. {name without a closing } brace) from expanding anyway
  • Fix parsing of invalid characters in bracketed macro arguments (e.g. \<idx without a closing > bracket)
  • Fix a parsing inconsistency involving line continuations inside untaken IF/ELIF/ELSE blocks
  • Fix a parsing inconsistency involving (invalid) local labels after ENDC/ENDR/ENDM keywords
  • Fix -s/--state, if passed more than once, to use the last option's value
  • Ignore the SOURCE_DATE_EPOCH environment 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-constant warning (about numbers in linker scripts) that's enabled by default (the same as RGBASM)
  • Modulo $8000_0000 % -1 warns with -Wdiv, like $8000_0000 / -1 already did, and does not potentially crash
  • SECTION UNION alignment could be incorrect or fail to build depending on the order of UNIONs 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 ds in 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/--scramble algorithm to work for scrambling SRAM sections too
  • Fix potential out-of-memory error for too-small -O/--overlay files in -t/--tiny mode
  • Validate Def and Ref lines 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/--palette generation being inconsistent and potentially failing depending on whether -Z/--columns was 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 -B background 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-tiles or -l/--base-palette IDs wrapped around to 0
  • Fix reverse mode with -s/--palette-size too small for the tile data (error message, not crash)
  • Fix reverse mode with invalid -q/--palette-map indexes (error message, not crash)
  • Add more fail-safe checks for invalid -r/--reverse image output (e.g. invalid palette IDs in attribute maps)

Build/Test:

  • Rename test/fetch-test-deps.sh to test/external/fetch-repos.sh
  • Refactor and tidy up the CTest-based testing system to use LABELS instead of ad-hoc -D defines (previously -DUSE_NONFREE_TESTS and -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

Don't miss a new rgbds release

NewReleases is sending notifications on new releases.