Happy Halloween! 🎃
We've finally hit a big milestone: the first major version increment, from 0.x to 1.0.0! 🥳
From now on RGBDS will adhere to semantic versioning ("semver"), meaning that you can rely on meaningful version numbers. Breaking changes will be reserved for new major versions; new features will require a minor version update; and bugfixes, internal refactorings, or other small tweaks will be patch-level version updates.
Removed
- Treating multi-value strings as numbers, and the
rgbasm -Wnumeric-stringwarning about doing so ldio [c], a/ldio a, [c], andld [c], a/ld a, [c](useldh [c], a/ldh a, [c]instead)ldh [$xx], a/ldh a, [$xx](useldh [$FFxx], a/ldh a, [$FFxx]instead)
Deprecated
You can pass -Wno-obsolete to silence warnings about these deprecations for now, but they will eventually be removed.
- Treating single-value strings as numbers (use
'c'haracter constants or theCHARVALfunction instead) - 1-indexed string functions
STRIN,STRRIN,STRSUB, andCHARSUB(use 0-indexedSTRFIND,STRRFIND,STRSLICE, andSTRCHARinstead) rgbfix -O/--overwrite(use the-Wno-overwritediagnostic flag instead)
Added
- Error/warning output is
$\normalsize{\textsf{\color{#ff0000}c\color{#ff8000}o\color{#cccc00}l\color{#00aa00}o\color{#00aaaa}r\color{#4444ff}f\color{#6600cc}u\color{#ff00aa}l}}$ by default when sent to a terminal; control it with--color always/never/auto, or theNO_COLORorFORCE_COLORenvironment variables - Add a question mark after
macro?,rept?,for?,include?or macro invocations likemy_mac?, to "silence" them, excluding them from error/warning location backtraces -
===and!==operators for string comparison, as an alternative toSTRCMP -
::can joindb/dw/dl/dsdirectives as well as instructions onto one line -
__SCOPE__is an empty string "", ".", or "..", according to the current innermost label scope level -
CHARVAL(str), without an index argument, gets the numeric value of a single-character string -
OPTallows an optional dash before flags to be more like the CLI (e.g.OPT -Wno-obsolete) -
CHARMAPaccepts character literals as well as strings (there is no difference in effect) -
-B/--backtraceconfigures location backtraces for error/warning messages in RGBASM and RGBLINK -
-v/--verbosehas multiple levels for RGBASM and RGBLINK too, not just RGBGFX
(RGBFIX's functionality is too simple to need verbose debug output, and it uses the-vflag for something else already) -
rgbasm -Wexport-undefinedwarns when youEXPORTan undefined symbol (enabled by-Wall) -
rgblink -Wtruncationsupports warning levels=0,=1, or=2, same asrgbasm -Wtruncation -
rgbgfx -c autoexplicitly specifies to use the automatic palette generation algorithm -
rgbgfx -c dmgis short forrgbgfx -c dmg=e4 -
rgbgfx -Owithout-oor without any of-A -P -Q -Tprints a warning - Numeric command-line arguments and
OPTarguments can use any base prefix:0xor$for hex,0bor%for binary,0oor&for octal, or nothing for decimal -
rgbasm,rgblink, andrgbfix, as well asrgbgfxalready, support@args.flagsto read more CLI arguments from anargs.flags"at-file"
Changed
- Underscores in integer constants can go after the base prefix, between digits, or before the fixed-point
qsuffix, but cannot be multiple in a row or trailing - Too-large integer constants get evaluated as 0
OPT pargument is decimal by default, and requires0xprefix for hexadecimal (likeOPT Q,OPT r, and CLI-p/--pad-value)- Leading spaces are stripped from all
OPTarguments, not justOPT r - Spaces are consistently stripped from the beginning and end of macro arguments, even with a block comment in the middle of the spaces
rgbasm -Wlarge-constantis enabled by default instead of by-Wallrgbasm -Wpurgedefault level is increased from 1 to 2rgbasm -Wtruncationandrgblink -Wtruncationdefault level is reduced from 2 to 1- RGBLINK .map files will only print
; Next fragmentor; Next unioncomments when they also have subsequent labels to print - Reformatted and rephrased some error messages; in particular, location traces are now indented and have one file location per line
Fixed
bit/res/setwith an unknown bit index could segfault- Division and modulo were off by one for very large negative numbers
- Exporting an undefined symbol is now an error
- A local label after a keyword (e.g.
call.local) is now an error - Labels were allowed before
ENDC, which could lead to inconsistent lexing and parsing - Line numbers after using "nested" macros were incorrect
Macros can be "nested" by defining the inner macro within anEQUSand expanding it - Interpolation would fail after an empty string literal (
""{example}) qcould be repeated in fixed-point format specs (e.g.STRFMT("%qqq16f", 3.14q16))- Formatting very long fixed-point numbers could cut off the end (e.g.
STRFMT("%#.255q1f", 1073741823.5q1)) - Character literals would be misread after invalid "garbage" characters
- "while expanding symbol" error backtrace was printing the symbol's contents instead of its name
- Too-large integer constants would print a
-Wlarge-constanterror for every subsequent digit - Section-related error messages could be inaccurate/misleading after use of
[[ fragment literals ]] - RGBASM's Bash completion script supports
-MC - RGBLINK supports .rel object files generated by SDCC 4.4.0 and later (
XL4instead ofXL3) - RGBGFX could output incorrect attrmap data for bank 1 when bank 0 contained 256 duplicatable tiles (i.e.
-N 256,256without-u)
Thanks to @Rangi42, @ISSOtm, and @ReiquelApplegate for the work done for this release.