github gbdev/rgbds v0.5.0

latest releases: v1.0.0, v1.0.0-rc2, v1.0.0-rc1...
4 years ago

Don't forget to check out our docs for more details on the updated functionality!

Please welcome two new contributors, @Rangi42 and @dannye! Rangi did more than half of the work on this release—our biggest one yet!

Deprecated:

  • _PI wasn't useful, so it's deprecated now
  • PRINTT, PRINTV, PRINTF and PRINTI are obsoleted by the new PRINT/PRINTLN and STRFMT

Known issues:

  • .sym files miss some symbols from multiple SECTION UNIONs/FRAGMENTs (#809)

Added:

  • New MACRO <name> syntax for defining macros! The old syntax will still be supported for a couple versions, but may eventually be phased out.
  • New DEF <name> EQU/EQUS/SET/= ... syntax for defining constants! The old syntax will still be supported, but may eventually be phased out.
  • RGBFIX can now be used in pipelines! Example: rgblink -o - obj/header.o obj/game.o | rgbfix -v -p0xFF >bin/dinos_with_lasers.gb
  • {symbol} interpolation outside of strings, similar to macro args (differs from the pre-0.4.2 behavior!!)
  • __RGBDS_VERSION__ provides a complete version string
  • More complex format specifiers are now allowed in symbol interpolations
  • Anonymous labels
  • Environment var SOURCE_DATE_EPOCH can be used for reproducible builds
  • Underscores can be used in numeric literals (e.g. %1101_1110_1010_1101)
  • New string functions STRRIN, STRRPL and STRFMT
  • \# to get all of a macro's arguments
  • """Multi-line string literals"""
  • FOR blocks!
  • BREAK exits REPT and FOR early
  • POW and LOG fixed-point functions
  • ** exponent operator (for integers)
  • REDEF to redefine EQUS much more conveniently
  • RL has been reintroduced alongside RB and RW
  • LOAD UNION and LOAD FRAGMENT
  • Symbol interpolations now have their recursion depth capped as well

Changed:

  • Syntax errors will now be more verbose! Be careful that YMMV depending on the Bison version that RGBASM was compiled with.
  • Syntax errors are no longer fatal! If a line contains a syntax error, RGBASM will discard it and attempt to continue with the next line.
  • RGBFIX's -m now accepts MBC names
  • More symbols will be available in the .sym and .map files
  • ROM usgae stats are now included in the .map files
  • Interaction of quotes and macro args should be more intuitive
  • ds can now repeat patterns, not just a single byte
  • Global labels can now be indented, not just local ones
  • Trailing commas are allowed for most "list" directives, such as db
  • STRCAT can now concat any amount of strings
  • LOAD blocks cannot create ROM sections anymore (#576)
  • ROUND, FLOOR and CEIL fixed-point builtins were present but undocumented
  • Macro arguments can now be shifted by a negative amount, "un-shifting" them
  • Macro args can now be empty, though this causes a warning
  • Garbage characters in input will no longer attempt to be reported as UTF-8, instead reporting bytes
  • The lexer has been cleaned up somewhat, this should hopefully result in slightly improved performance

Removed:

  • GLOBAL and XDEF keywords (deprecated aliases of EXPORT)
  • Colon-less global labels
  • *-comments
  • rgbasm -v no longer prints the elapsed time (use time for that)
  • RGBASM incorrectly allowed omitting hl as the destination of ld hl, r16 and add hl, r16
  • RGBASM incorrectly allowed omitting the + in ld hl, sp + N

Fixed:

  • Enabled several optimizations that should improve performance, especially RGBASM
  • SECTION FRAGMENTs now respect their constraints at their respective beginnings, not as a whole
  • Line numbers could be incorrect on Windows
  • RGBASM will explicitly reject more than one input file, rather than silently ignore them
  • Macro args weren't ignored in block comments
  • Fixed a rare crash with unterminated REPT/FOR blocks
  • Fixed incorrect handling of text after MACRO, ENDM and ENDR tokens
  • Fixed several bugs in the lexer that tripped assertions (special thanks to @NieDzejkob for fuzzing RGBASM!)
  • Can't start a new section if another with the same name has been PUSHS'd
  • ds N, @ could produce incorrect results
  • ELIF and ELSE were allowed after ELSE
  • . was treated as a label
  • Performance of gbdiff.bash improved significantly
  • Defining an EQUS after referencing it is now an error
  • Passing -t and -O to RGBLINK generated an output too large
  • RGBASM will correctly report errors encountered when opening a file
  • There was actually still a way to overwrite builtin symbols, it's there no more
  • INCBIN "file",<start>[,<stop>] could leak memory in case of a certain error
  • __UTC_*__ were incorrectly declared as EQU instead of EQUS
  • gbz80(7) failed to mention alternatives to [hli] and [hld]
  • Fixed a crash that could occur when modifying a charmap that was on the pushc stack
  • Fixed expanding recurse EQUS "recurse" infinitely hanging RGBASM, no matter the max recursion depth (fixes a regression introduced by 0.4.2's new lexer)

Attention downstream packagers

The yacc dependency has been changed to GNU Bison! Our Makefile relies on bison -V to conditionally enable some features (src/check_bison_ver.sh) and our CMakeLists on the Bison CMake package, so both should be compatible with many versions, at least 3.0 (3.0.4 successfully tested). Please report breakage in our issue tracker.

Don't miss a new rgbds release

NewReleases is sending notifications on new releases.