github gbdev/rgbds v1.0.4

3 hours ago

Another bugfix update for the fall equinox 🍂, but the number of bugs fixed is anything but small (unfurl the collapsed lists below if you're curious)! No new features whatsoever, but we expect this should be the most stable version of RGBDS ever. (Hope that didn't jinx it?)

Note

Most of the bugs since v1.0.1 have been found by running various (free 🥒) LLMs to audit the codebase. However (to the best of our knowledge) none of RGBDS' code or documentation has been authored by an LLM. (See also GBDev's AI policy.)

RGBASM

  • add sp, <offset> and ld hl, sp + <offset> will now also warn about offsets between 128 and 255 (caveat: offsets computed by RGBLINK cannot currently be warned about, but this should be implemented in v1.1.0)
  • NUL characters (\0) are no longer allowed in section names and assertion messages
Minor fixes
  • STRFMT no longer stops processing format strings at the first NUL character
  • Some too-precise fixed-point literals would fail to round up to the next integer (e.g. 1.999999 is now 2.0 instead of 1.0)
  • High fixed-point magnitudes can no longer cause overflows
  • Section fragments can no longer overflow a fixed address
  • ALIGN[16, offset] is now rejected if offset is lower than the section's size

RGBLINK

  • Symbol and map files now get emitted as soon as a valid section layout is found, even if any assertions fail, which we hope will make some failing bank- or address-related assertions easier to debug (caveat: if any assertions do fail, any previous .sym and .map files will have been overwritten but the previous ROM file will not!)
  • Overhauled the section placement algorithm, fixing several bugs (hangs, invalid placements, etc), and possibly improving performance; notably:
    • -S/--scramble now enforces that sections fit within the specified number of banks, rather than silently falling back to the default packing
    • Correctly check sufficiently large alignment with non-zero offsets
    • Honor zero-sized sections' alignment offsets, memory regions, etc.
  • -t/--tiny now accepts fixed-bank ROMX, BANK[1] sections, and -w/--wramx now accepts fixed-bank WRAMX, BANK[1] sections
  • -S/--scramble sram=256 is now accepted
Minor fixes
  • Map files incorrectly reported EMPTY space around zero-size sections
  • Fixed defining two sections with the same name (regression introduced in 1.0.2)
  • Fixed ALIGN 16 not being properly honored in linker scripts after FLOATING
  • Fixed many ways to confuse or crash RGBLINK with invalid object files
  • Fixed signed integer overflow with +, -, and * operators, which could behave incorrectly

RGBGFX

  • Fixed several crashes related to -B/--background-color and -x/--trim-end
    💡 Note: we would like to deprecate -x/--trim-end in v1.1.0! Please let us know if this would be an issue for you. We believe -B/--background covers its use cases more cleanly: unlike trimmed tiles, background tiles are applied in the tilemap and attrmap too; they can be placed anywhere in the image, not just the end; and they do not require updating a hard-coded number if you edit the image.
  • -C/--color-curve is now supported in -r/--reverse mode
  • Tile or palette IDs that can't fit in the tile/attribute maps now raise a warning
  • Fixed omitting a transparent color from explicitly-specified palettes if the image has transparency
Minor fixes
  • Inline palette specs with too many colors are no longer silently truncated
  • Fixed reversing images with fewer than 4 colors per palette, or that are 1bpp, or that use -i/--input-tileset and bank 1
  • Color sorting now ignores any (rare) embedded palettes in non-indexed PNGs, avoiding a crash and inherently inconsistent behavior (but please use -c embedded rather than the implicit color sorting!)
  • Transparent pixels outside of the -L/--slice area are now fully ignored
  • Background tiles now always have consistent IDs and consistent bank 0
  • Fixed transparent colors being sometimes emitted as $FFFF instead of $8000
  • Ambiguously transparent nor opaque colors are handled more cleanly as errors
  • An invalid -s/--palette-size with corresponding invalid -c/--colors no longer causes issues

All

  • Many documentation mistakes have been corrected
  • Several error and warning messages have been fixed and/or cleaned up
  • Some performance optimizations have been made, though we have not measured any significant improvements on recent hardware (contact us if RGBDS is slow on your machine!)
  • Fixed a dozen or so integer overflows throughout, which would cause silent invalid behavior (but no crashes)

Misc

  • contrib/view_palettes.sh can now output to standard output
  • Many internal fixes to the development setup; we hope that contributing to RGBDS is now easier than ever!
  • General system stability improvements to enhance the user's experience 😜

Also, pour one out for the one program who's been absent from changelogs since v0.9.4, handling our thorough reviews like a champ... RGBFIX! 🫡

Don't miss a new rgbds release

NewReleases is sending notifications on new releases.