Skip to content

Releases: gbdev/rgbds

v1.0.1

01 Jan 06:11

Choose a tag to compare

Happy New Year! 🎊 🐎

As promised, we use semantic versioning now, so 1.0.1 being a "patch" release means that it's fully backwards compatble with 1.0.0. All that's changed is fixing various bugs (and typos, internal refactorings, etc).

(Many of these bugs were found with the "fuzzing" tool AFL++, so they involve unrealistic inputs which would be unlikely or impossible in normal usage of RGBDS. Still, even specifically-crafted garbage inputs should give sensible error messages and not crash, so we try to find and fix these.)

RGBASM:

  • Symbol names of just three or more periods ("...", "....", etc) were mistakenly allowed
  • SECTION UNION was mistakenly allowed for ROM sections (when there was no second SECTION UNION of the same name)
  • -MG and -MC were not accounting for -P/--preinclude files
  • Non-UTF-8 "garbage" characters at the end of a file could hang in an infinite loop

RGBLINK:

  • Undefined symbols could cause extra warning messages about meaningless values in expressions
  • Various invalid object files (which RGBASM would not output in the first place) could print misleading error messages or outright crash

RGBGFX:

  • Input images with ambiguous alpha channel values (neither transparent nor opaque) could crash due to an assertion failure
  • Clarify documentation of rgbgfx -C/--color-curve
  • Improve some error messages

All programs:

  • Some errors with command-line options could be incorrectly reported (due to inaccurate errno values)
  • For RGBASM and RGBLINK, very long error location backtraces could crash with a stack overflow (only ever observed during fuzzing)

v1.0.0

01 Nov 00:48

Choose a tag to compare

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-string warning about doing so
  • ldio [c], a/ldio a, [c], and ld [c], a/ld a, [c] (use ldh [c], a/ldh a, [c] instead)
  • ldh [$xx], a/ldh a, [$xx] (use ldh [$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 the CHARVAL function instead)
  • 1-indexed string functions STRIN, STRRIN, STRSUB, and CHARSUB (use 0-indexed STRFIND, STRRFIND, STRSLICE, and STRCHAR instead)
  • rgbfix -O/--overwrite (use the -Wno-overwrite diagnostic 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 the NO_COLOR or FORCE_COLOR environment variables
  • Add a question mark after macro?, rept?, for?, include? or macro invocations like my_mac?, to "silence" them, excluding them from error/warning location backtraces
  • === and !== operators for string comparison, as an alternative to STRCMP
  • :: can join db/dw/dl/ds directives 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
  • OPT allows an optional dash before flags to be more like the CLI (e.g. OPT -Wno-obsolete)
  • CHARMAP accepts character literals as well as strings (there is no difference in effect)
  • -B/--backtrace configures location backtraces for error/warning messages in RGBASM and RGBLINK
  • -v/--verbose has 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 -v flag for something else already)
  • rgbasm -Wexport-undefined warns when you EXPORT an undefined symbol (enabled by -Wall)
  • rgblink -Wtruncation supports warning levels =0, =1, or =2, same as rgbasm -Wtruncation
  • rgbgfx -c auto explicitly specifies to use the automatic palette generation algorithm
  • rgbgfx -c dmg is short for rgbgfx -c dmg=e4
  • rgbgfx -O without -o or without any of -A -P -Q -T prints a warning
  • Numeric command-line arguments and OPT arguments can use any base prefix: 0x or $ for hex, 0b or % for binary, 0o or & for octal, or nothing for decimal
  • rgbasm, rgblink, and rgbfix, as well as rgbgfx already, support @args.flags to read more CLI arguments from an args.flags "at-file"

Changed

  • Underscores in integer constants can go after the base prefix, between digits, or before the fixed-point q suffix, but cannot be multiple in a row or trailing
  • Too-large integer constants get evaluated as 0
  • OPT p argument is decimal by default, and requires 0x prefix for hexadecimal (like OPT Q, OPT r, and CLI -p/--pad-value)
  • Leading spaces are stripped from all OPT arguments, not just OPT 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-constant is enabled by default instead of by -Wall
  • rgbasm -Wpurge default level is increased from 1 to 2
  • rgbasm -Wtruncation and rgblink -Wtruncation default level is reduced from 2 to 1
  • RGBLINK .map files will only print ; Next fragment or ; Next union comments 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/set with 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 an EQUS and expanding it
  • Interpolation would fail after an empty string literal (""{example})
  • q could 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-constant error 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 (XL4 instead of XL3)
  • RGBGFX could output incorrect attrmap data for bank 1 when bank 0 contained 256 duplicatable tiles (i.e. -N 256,256 without -u)

Thanks to @Rangi42, @ISSOtm, and @ReiquelApplegate for the work done for this release.

v1.0.0-rc2

30 Sep 23:35

Choose a tag to compare

v1.0.0-rc2 Pre-release
Pre-release

RGBDS's major version number is finally going to increment from 0 to 1! As of this release, we'll stick to semantic versioning, so that any future breaking changes will require a major version update, new features will be a minor version, and bug fixes will be a patch version. That should make it easier to manage RGBDS version compatibility for assembly projects. (And if a "version 2.0" does eventually come after this one, it might be rewritten in Rust.)

This is a release candidate to help people test it out early, and make sure we won't need to release a 1.0.1 bugfix immediately afterwards.

What's different from v1.0.0-rc1?

  • Added: === and !== operators for string comparison, as an alternative to STRCMP
  • Added: CHARMAP accepts character literals as well as strings (there is no difference in effect)
  • Changed: rgbgfx -O without -o or without any of -A -P -Q -T prints a warning
  • Changed: Numeric command-line arguments and OPT arguments can use any base prefix: 0x or $ for hex, 0b or % for binary, 0o or & for octal, or nothing for decimal
  • Changed: OPT p argument is decimal by default, and requires 0x prefix for hexadecimal (like OPT Q, OPT r, and CLI -p/--pad-value)
  • Changed: Leading spaces are stripped from all OPT arguments, not just OPT r
  • Changed: Spaces are consistently stripped from the beginning and end of macro arguments, even with a block comment in the middle of the spaces
  • Changed: RGBLINK .map files will only print ; Next fragment or ; Next union comments when they also have subsequent labels to print
  • Changed: RGBGFX accurately rounds 8-bit to 5-bit color conversion (and vice-versa for -r/--reverse)
  • Fixed: bit/res/set with an unknown bit index could segfault
  • Fixed: Formatting very long fixed-point numbers could cut off the end (e.g. STRFMT("%#.255q1f", 1073741823.5q1))
  • Fixed: Section-related error messages could be inaccurate/misleading after use of [[ fragment literals ]]

Thanks to @Rangi42, @ISSOtm, and @ReiquelApplegate for the work done for this release.

v1.0.0-rc1

01 Sep 22:40

Choose a tag to compare

v1.0.0-rc1 Pre-release
Pre-release

RGBDS's major version number is finally going to increment from 0 to 1! As of this release, we'll stick to semantic versioning, so that any future breaking changes will require a major version update, new features will be a minor version, and bug fixes will be a patch version. That should make it easier to manage RGBDS version compatibility for assembly projects. (And if a "version 2.0" does eventually come after this one, it might be rewritten in Rust.)

This is a release candidate to help people test it out early, and make sure we won't need to release a 1.0.1 bugfix immediately afterwards.

Removed

  • Treating multi-value strings as numbers, and the rgbasm -Wnumeric-string warning about doing so
  • ldio [c], a/ldio a, [c], and ld [c], a/ld a, [c] (use ldh [c], a/ldh a, [c] instead)
  • ldh [$xx], a/ldh a, [$xx] (use ldh [$FFxx], a/ldh a, [$FFxx] instead)

Deprecated

  • Treating single-value strings as numbers (use 'c'haracter constants or the CHARVAL function instead)
  • 1-indexed string functions STRIN, STRRIN, STRSUB, and CHARSUB (use 0-indexed STRFIND, STRRFIND, STRSLICE, and STRCHAR instead)
  • rgbfix -O/--overwrite (use the -Wno-overwrite diagnostic 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 the NO_COLOR or FORCE_COLOR environment variables
  • Add a question mark after macro?, rept?, for?, include? or macro invocations like my_mac?, to "silence" them, excluding them from error/warning location backtraces
  • :: can join db/dw/dl/ds directives as well as instructions onto one line
  • CHARVAL(str), without an index argument, gets the numeric value of a single-character string
  • OPT allows an optional dash before flags to be more like the CLI (e.g. OPT -Wno-obsolete)
  • -B/--backtrace configures location backtraces for error/warning messages in RGBASM and RGBLINK
  • -v/--verbose has 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 -v flag for something else already)
  • rgbasm -Wexport-undefined warns when you EXPORT an undefined symbol (enabled by -Wall)
  • rgblink -Wtruncation supports warning levels =0, =1, or =2, same as rgbasm -Wtruncation
  • rgbgfx -c auto explicitly specifies to use the automatic palette generation algorithm
  • rgbgfx -c dmg is short for rgbgfx -c dmg=e4

Changed

  • Underscores in integer constants can go after the base prefix, between digits, or before the fixed-point q suffix, but cannot be multiple in a row or trailing
  • Too-large integer constants get evaluated as 0
  • rgbasm -Wlarge-constant is enabled by default instead of by -Wall
  • Reformatted and rephrased some error messages; in particular, location traces are now indented and have one file location per line

Fixed

  • Division and modulo were off by one for very large negative numbers
  • Exporting an undefined symbol is now an error
  • Line numbers after using "nested" macros were incorrect
    Macros can be "nested" by defining the inner macro within an EQUS and expanding it
  • Interpolation would fail after an empty string literal (""{example})
  • q could be repeated in fixed-point format specs (e.g. STRFMT("%qqq16f", 3.14q16))
  • 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-constant error for every subsequent digit
  • RGBASM's Bash completion script supports -MC
  • RGBLINK supports .rel object files generated by SDCC 4.4.0 and later (XL4 instead of XL3)

Thanks to @Rangi42 and @ISSOtm for the work done for this release.

v0.9.4

31 Jul 12:14

Choose a tag to compare

We're still not following SemVer yet, so this release has a lot in it even though it's "only" a patch-level update -- comparable to v0.3.9, v0.4.2, v0.5.2...

Added

  • Inline [[ fragment literals ]] can be used instead of labels for one-off data
  • 'character' constants are now preferred to single-character "strings" for getting the numeric value of a character
  • READFILE(name[, maxlen]) returns the contents of a file as a string
  • BYTELEN(str) returns the number of bytes in a string
  • STRBYTE(str, idx) returns the idxth byte in a string
  • SIZEOF applies to 8-and 16-bit registers, evaluating to their 1- or 2-byte size
  • -W warning diagnostics for RGBLINK, RGBFIX, and RGBGFX
  • rgbasm -MC flag which continues assembling even after a missing dependency (unlike -MG, which exits to let the dependency be generated before continuing)
  • rgbasm -P can be specified multiple times to pre-include multiple files
  • Linkerscripts support 0x/0b/0o/& numeric prefixes, _ numeric separators, and "\0" characters, same as assembly
  • rgbgfx -c/--colors supports png: for PNG images as palette spec inputs
  • rgbgfx -l/--base-palette sets a base palette ID, like -b/--base-tiles does for tilemap IDs
  • rgbfix -m list does the same thing as rgbfix -m help (lists supported MBCs)
  • Documented some more historical deprecations/removals which had been left out of rgbasm-old(5)

Changed

  • Error message for ALIGN failure tells you what the actual alignment is
  • Invalid rgblink -S/--scramble or rgbfix -f/--fix-spec arguments are a fatal error, not a warning

Fixed

  • Aligning a section first to one size and then to a greater size could fail even when the new alignment is compatible
  • Some string functions treated \0 characters in strings as the end of the string
  • Overflowing exponent operator ** could cause undefined behavior
  • Invalid warning flag parameters could be silently accepted, e.g. rgbasm -Wtruncation=256 acting like =0
  • Unterminated strings in linkerscripts would break subsequent parsing
  • Invalid rgblink -S/--scramble spec could crash
  • Out-of-bounds rgbgfx -L/--slice coordinates could crash
  • RGBGFX was skipping a step of its palette generation algorithm
  • rgbfix -m with unlisted numeric values could crash
  • The rgbds:latest Docker tag is correctly updated

Thanks to @Rangi42 and @avivace for the work done for this release.

v0.9.3

30 Jun 19:31

Choose a tag to compare

Happy Pride month! 🏳️‍🌈

Added

  • CHARVAL function gets individual values from a multi-value charmap entry
  • ++ operator for string concatenation, as an alternative to STRCAT
  • rgbgfx -c can take a dmg=XX DMG grayscale palette specification (works like rBGP)

Changed

  • Restrict custom binary and graphics digits to digits, letters, ., #, or @
  • Recover from syntax errors even inside REPT/FOR loops
  • Hint to {interpolate} names when EQUS expanding does not occur
  • .sym file sorting accounts for local labels' parents' addresses and names
  • rgbgfx -r encodes reversed PNG images as grayscale or indexed colors when possible
  • Omit the version number from distributed release archive filenames

Fixed

  • STRSLICE with two arguments assumed an off-by-one stop index
  • rgbasm -MP would generate phony dependencies even for files that don't exist
  • Handle missing newline at EOF for linkerscript INCLUDEd files
  • The Dockerfile was building but not installing RGBDS in its environment
  • Building with Bison versions 3.x below 3.5 could fail over "parse.lac=full"
  • A second rgbgfx -c argument might not completely override the previous one

Thanks to @Rangi42 and @ISSOtm for the work done for this release.

v0.9.2

04 May 14:25

Choose a tag to compare

May the 4th be with you! ⭐ 👾

Added

  • New 0-indexed string functions (we plan to eventually deprecate the old 1-indexed ones):
    • STRFIND and STRRFIND: like STRIN and STRRIN
    • STRCHAR: like CHARSUB
    • STRSLICE: like STRSUB, but taking start and stop indexes, instead of a start position and length
  • CHARCMP: compares two strings by their charmap value sequences
  • CHARSIZE: counts how many charmap values a single character would map to
  • REVCHAR: reverse-maps a value sequence to its charmap string (the values must have one unique corresponding charmap)
  • Allow macro \<arg> to take negative values to count arguments from the end (e.g. \<-2> is the penultimate arg)
  • Allow the index of bit/res/set instructions to be determined at link time
  • rgbgfx -B/--background specifies a "background" color; tiles entirely of that color will be skipped in the graphic output
  • rgbfix -o/--output can write its output to a different file than its input (must have one input file); thanks @jmillikin!

Changed

  • Raw symbols do not undergo EQUS expansion (so #symbol can be used instead of "{symbol}")
  • Some invalid instructions have more specific error messages than just "syntax error"
  • Terser RGBASM output for sequences of unknown characters
  • contrib/gbdiff.bash does not need a .sym file to be sorted

Fixed

  • Macro names could be used as numeric symbols with value 0
  • Map files were listing anonymous labels (as Unicode escape syntax)
  • RGBGFX could segfault with transparent colors in embedded palettes
  • RGBGFX could segfault or give incorrect output for grayscale images with transparent colors
  • RGBFIX expects nonzero -r/--ram-size for -m MBC6 (the one game that uses MBC6 has -r 3)
  • CMAKE_CXX_FLAGS_DEBUG can be user-specified

Thanks to @Rangi42 and @ISSOtm for the work done for this release.

v0.9.1

02 Feb 20:07

Choose a tag to compare

Happy (belated) New Year! 🎊 🐍

Our GitHub Actions CI now tests RGBDS in Cygwin x64 and FreeBSD 15.0, verifying that it can build and run correctly on those platforms.

Added

  • All programs now support -h or --help arguments to print usage information

Changed

  • ld [$ff00+c], a and ld a, [$ff00+c] instruction syntax is not deprecated any more!
    • The 0.9.0 release deprecated ld [c], a and ld a, [c] (since ldh [c], a and ldh a, [c] are more appropriate), but also deprecated the [$ff00+c] syntax, which this release undoes
  • The undocumented 99,999-argument limit for macros was removed
  • Floating sections may be output in a different order

Fixed

  • Fix undefined behavior with backslash at EOF in macro arguments
  • Avoid errors after missing INCLUDE with -MG
  • Object files used the MACRO node type for FILE nodes since 0.8.0
  • STRLEN and STRSUB would cut off early on incomplete UTF-8 strings
  • CHARLEN and CHARSUB would cut off early on invalid UTF-8 strings
  • RGBGFX -u deduplication would fail without an input or output tileset (e.g. only an output tilemap+attrmap)
  • RGBFIX could output an incorrect ROM if a write syscall did not write all the bytes given to it
  • Correct the gbz80(7) documentation for the DAA instruction

Thanks to @Rangi42 and @ISSOtm , @robbi-blechdose , @avivace for the work done for this release.

v0.9.0

25 Dec 15:59

Choose a tag to compare

Merry Christmas everyone! 🎅 🎄

Tip

Starting with this release, we publish universal ("fat") binaries for macOS, so they'll support x86-64 and newer ARM (“Apple Silicon”) CPUs!

⚠️ Deprecated

  • Treating multi-character strings as numbers (you can use a single 32-bit character mapping instead)
  • ldio (use ldh instead)
  • ld [c] (use ldh instead)
  • ldh [$xx] (use ldh [$FFxx] instead)

We now document RGBDS's history of deprecated and removed/replaced features in rgbasm-old.5.

Added

  • The contrib/view_palettes.sh script lets you render a GBC .pal file as an image
  • RGBASM -s outputs a "state file", listing the values of (non-label) symbols when finished assembling
  • RGBASM -Wpurge warns when purging exported symbols or labels
  • RGBASM -Wunmatched-directive warns when PUSHC, PUSHO, or PUSHS lacks a POPC, POPO, or POPS
  • Symbols can have non-leading $ characters (so an interpolated prefix{numeric} symbol works)
  • Symbols can have the same names as reserved keywords by prefixing them with a #
  • CHARMAP can map characters to sequences of multiple values, with values not limited to 8 bits
  • A string constant . (period) which expands to the current global label scope
  • A string constant .. (two periods) which expands to the current fully-qualified local label scope (e.g. Global.local)
  • 0x, 0b, and 0o prefixes for hex, binary, and octal numbers (in addition to $, %, and &)
  • LOAD FRAGMENT (removed in 0.5.1 due to bugs; we're not totally certain that all bugs are fixed, testing is appreciated!)
  • BITWIDTH(n) returns the number of bits necessary to represent n
  • TZCOUNT(n) returns the count of trailing zero bits of n
  • EXPORT DEF defines and exports a numeric symbol in a single line
  • PUSHC name acts like PUSHC followed by SETCHARMAP name
  • PUSHS ... acts like PUSHS followed by SECTION ...
  • PUSHO ... acts like PUSHO followed by OPT ...
  • ENDL is explicitly optional, but with an opt-in -Wunterminated-load warning about it
  • cpl can also be written as cpl a
  • Allow a no- prefix to negate "meta" warnings (-Wno-all, -Wno-extra, -Wno-everything)
  • Allow -Wno-error=... to override -Werror (including for "meta" warnings)
  • RGBLINK supports e.g. ROMX FLOATING in linker scripts, which allows assigning a section to no particular bank (this is generally only useful with SDCC object files)
  • RGBLINK's .sym file now includes exported numeric constants (if this breaks your tools, please check the .sym specification!)
  • RGBGFX -i/--input-tileset uses a given tileset instead of generating all the tiles itself
  • RGBGFX -r 0 infers a valid width for the reversed image
  • RGBGFX -X or -Y only mirror tiles horizontally or vertically (-X -Y acts like -m)

Changed

  • Macro invocations can be at column 1, the very start of a line
  • ** exponent operator is right-associative (so p ** q ** r == p ** (q ** r))
  • LOW(Label) can be constant if Label is aligned to 8 or more bits
  • !expr can be constant 0 if expr has any non-zero bits
  • Error messages for undefined symbols mention if the symbol was previously purged
  • Sections that grew too big are reported after the whole assembly file has been processed
  • When RGBLINK encounters an unknown symbol, it lists the potential un-exported symbols by that name
  • RGBLINK reports source locations for conflicts between object files
  • Escape characters in section names in map files, and format empty sections more consistently too
  • RGBGFX -r gives a detailed warning if -c and -p mismatch; improved several other error messages too
  • LOW() and HIGH() have their own RPN operators in the object file (this should lead to nicer output from rgbobj)
  • Clarified a lot of documentation, including for fixed-point numbers, macros, and DAA
  • Explicitly document that FMOD behaves differently than %
  • Increment object file revision number to 11
  • Tests can be run with CTest if you use CMake

Fixed

  • Label & CONSTANT was not actually doing the & operation!
  • Some nonsensical uses of empty local labels (Global.) were ignored
  • Many bugs prevented SDCC object files from being processed correctly (special thanks to @RubenZwietering for helping with bugfixing and testing!)
  • Crash when assembling a nonexistent file
  • Crash when INCLUDEing an unbounded-size file (e.g. /dev/urandom)
  • Crash when passing an object file with invalid patch offsets to RGBLINK
  • Crash when specifying palette files within RGBGFX at-files
  • Crash when reversing an image if the tilemap referred to nonexistent tiles
  • Multiple bugs with parsing text palette files (GPL, HEX, and PSP)
  • Reversing a 1bpp image had incorrect tile data
  • Palette generation was suboptimal, potentially failing to fit within 8 palettes
  • Palette generation was also inconsistent between platforms
  • Tiles with too many colors were being detected incorrectly
  • Maximum number of palettes wrapped around after 255
  • Allow text palette files to have the maximum number of colors
  • Allow tab character after backslash for line continuation
  • Syntax errors at the beginning of a line do not abort assembly
  • -Wall did not enable -Wcharmap-redef
  • -Wnested-comment was undocumented
  • Building works on BSD systems
  • Building works on systems with bison 3.8.0

Thanks to @Rangi42 and @ISSOtm , @JL2210 , @avivace , @sukus21 for the work done for this release.

v0.9.0-rc2

22 Oct 03:14

Choose a tag to compare

v0.9.0-rc2 Pre-release
Pre-release

Tip

Starting with this release, we publish universal ("fat") binaries for macOS, so they'll support x86-64 and newer ARM (“Apple Silicon”) CPUs!

⚠️ Deprecated

  • Treating multi-character strings as numbers (you can use a single 32-bit character mapping instead)

Added

  • RGBASM -s outputs a "state file", listing the values of (non-label) symbols when finished assembling
  • RGBASM -Wpurge warns when purging exported symbols or labels
  • Symbols can have non-leading $ characters (so an interpolated prefix{numeric} symbol works)
  • Symbols can have the same names as reserved keywords by prefixing them with a #
  • CHARMAP can map characters to sequences of multiple values, with values not limited to 8 bits
  • A string constant . (period) which expands to the current global label scope
  • A string constant .. (two periods) which expands to the current fully-qualified local label scope (e.g. Global.local)
  • 0x, 0b, and 0o prefixes for hex, binary, and octal numbers (in addition to $, %, and &)
  • BITWIDTH(n) returns the number of bits necessary to represent n
  • TZCOUNT(n) returns the count of trailing zero bits of n
  • EXPORT DEF defines and exports a numeric symbol in a single line
  • PUSHC name acts like PUSHC followed by SETCHARMAP name
  • PUSHS ... acts like PUSHS followed by SECTION ...
  • PUSHO ... acts like PUSHO followed by OPT ...
  • ENDL is explicitly optional, but with an opt-in -Wunterminated-load warning about it
  • cpl can also be written as cpl a
  • Allow a no- prefix to negate "meta" warnings (-Wno-all, -Wno-extra, -Wno-everything)
  • Allow -Wno-error=... to override -Werror (including for "meta" warnings)
  • RGBLINK supports e.g. ROMX FLOATING in linker scripts, which allows assigning a section to no particular bank (this is generally only useful with SDCC object files)
  • RGBLINK's .sym file now includes exported numeric constants (if this breaks your tools, please check the .sym specification!)
  • RGBGFX -i/--input-tileset uses a given tileset instead of generating all the tiles itself
  • RGBGFX -r 0 infers a valid width for the reversed image
  • RGBGFX -X or -Y only mirror tiles horizontally or vertically (-X -Y acts like -m)
  • The contrib/view_palettes.sh script lets you render a GBC .pal file as an image

Changed

  • Macro invocations can be at column 1, the very start of a line
  • LOW(Label) can be constant if Label is aligned to 8 or more bits
  • !expr can be constant 0 if expr has any non-zero bits
  • Error messages for undefined symbols mention if the symbol was previously purged
  • Sections that grew too big are reported after the whole assembly file has been processed
  • When RGBLINK encounters an unknown symbol, it lists the potential un-exported symbols by that name
  • RGBLINK reports source locations for conflicts between object files
  • RGBGFX -r gives a detailed warning if -c and -p mismatch; improved several other error messages too
  • LOW() and HIGH() have their own RPN operators in the object file (this should lead to nicer output from rgbobj)
  • Clarified a lot of documentation, including for fixed-point numbers and macros
  • Explicitly document that FMOD behaves differently than %
  • Increment object file revision number to 11
  • Tests can be run with CTest if you use CMake

Fixed

  • Label & CONSTANT was not actually doing the & operation!
  • Some nonsensical uses of empty local labels (Global.) were ignored
  • Many bugs prevented SDCC object files from being processed correctly (special thanks to @RubenZwietering for helping with bugfixing and testing!)
  • Crash when assembling a nonexistent file
  • Crash when INCLUDEing an unbounded-size file (e.g. /dev/urandom)
  • Crash when passing an object file with invalid patch offsets to RGBLINK
  • Crash when specifying palette files within RGBGFX at-files
  • Crash when reversing an image if the tilemap referred to nonexistent tiles
  • Multiple bugs with parsing text palette files (GPL, HEX, and PSP)
  • Palette generation was suboptimal, potentially failing to fit within 8 palettes
  • Tiles with too many colors were being detected incorrectly
  • Maximum number of palettes wrapped around after 255
  • Allow text palette files to have the maximum number of colors
  • Allow tab character after backslash for line continuation
  • -Wall did not enable -Wcharmap-redef
  • -Wnested-comment was undocumented
  • Building works on BSD systems
  • Building works on systems with bison 3.8.0