Releases: gbdev/rgbds
v0.5.0-rcCar
April Fools! Please don't actually use this version for anything serious, it's 99% incompatible...
Don't forget to check out our docs (particularly gbz80.7) 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!
Changes since v0.5.0-rc2:
- New revised syntax solves the long-standing debate of whether to align instruction operands or not
Deprecated:
_PIwasn't useful, so it's deprecated nowPRINTT,PRINTV,PRINTFandPRINTIare obsoleted by the newPRINT/PRINTLNandSTRFMT
Known issues:
- Regression: Expanding
recurse EQUS "recurse"orrecurse EQUS "\{recurse\}"hangs rgbasm (#696) - .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. - 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!!)- More complex format specifiers are now allowed in symbol interpolations
- Anonymous labels
- Environment var
SOURCE_DATE_EPOCHcan be used for reproducible builds - Underscores can be used in numeric literals (e.g.
%1101_1110_1010_1101) - New string functions
STRRIN,STRRPLandSTRFMT \#to get all of a macro's arguments"""Multi-line string literals"""FORblocks!BREAKexitsREPTandFORearlyPOWandLOGfixed-point functions**exponent operator (for integers)REDEFto redefineEQUSmuch more convenientlyRLhas been reintroduced alongsideRBandRWLOAD UNIONandLOAD FRAGMENT
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
-mnow accepts MBC names - More symbols will be available in the
.symand.mapfiles - Slack totals are now included in the
.mapfiles - Interaction of quotes and macro args should be more intuitive
dscan 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 STRCATcan now concat any amount of stringsLOADblocks cannot create ROM sections anymore (#576)ROUND,FLOORandCEILfixed-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
Removed:
GLOBALandXDEFkeywords (deprecated aliases ofEXPORT)- Colon-less global labels
*-commentsrgbasm -vno longer prints the elapsed time (usetimefor that)
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/FORblocks - Fixed incorrect handling of text after
MACRO,ENDMandENDRtokens - Can't start a new section if another with the same name has been
PUSHS'd ds N, @could produce incorrect resultsELIFandELSEwere allowed afterELSE.was treated as a label- Performance of
gbdiff.bashimproved significantly - Defining an
EQUSafter referencing it is now an error - Passing
-tand-Oto RGBLINK generated an output too large
Attention downstream packagers
Don't package this release, lol
v0.5.0-rc2
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!
Changes since v0.5.0-rc1:
- New
DEF <name> EQU/EQUS/SET/= ...syntax for defining constants! The old syntax will still be supported, but may eventually be phased out. - Fix
ALIGN[1]being ignored - Fix
jrin aLOAD FRAGMENT - Fix an
ELIFcondition right after a takenIF/ELIFblock still being evaluated - Improve some error messages and documentation
- RGBLINK outputs
USEDspace at the end of a .map file
Deprecated:
_PIwasn't useful, so it's deprecated nowPRINTT,PRINTV,PRINTFandPRINTIare obsoleted by the newPRINT/PRINTLNandSTRFMT
Known issues:
- Regression: Expanding
recurse EQUS "recurse"orrecurse EQUS "\{recurse\}"hangs rgbasm (#696) - .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. - 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!!)- More complex format specifiers are now allowed in symbol interpolations
- Anonymous labels
- Environment var
SOURCE_DATE_EPOCHcan be used for reproducible builds - Underscores can be used in numeric literals (e.g.
%1101_1110_1010_1101) - New string functions
STRRIN,STRRPLandSTRFMT \#to get all of a macro's arguments"""Multi-line string literals"""FORblocks!BREAKexitsREPTandFORearlyPOWandLOGfixed-point functions**exponent operator (for integers)REDEFto redefineEQUSmuch more convenientlyRLhas been reintroduced alongsideRBandRWLOAD UNIONandLOAD FRAGMENT
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
-mnow accepts MBC names - More symbols will be available in the
.symand.mapfiles - Slack totals are now included in the
.mapfiles - Interaction of quotes and macro args should be more intuitive
dscan 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 STRCATcan now concat any amount of stringsLOADblocks cannot create ROM sections anymore (#576)ROUND,FLOORandCEILfixed-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
Removed:
GLOBALandXDEFkeywords (deprecated aliases ofEXPORT)- Colon-less global labels
*-commentsrgbasm -vno longer prints the elapsed time (usetimefor that)
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/FORblocks - Fixed incorrect handling of text after
MACRO,ENDMandENDRtokens - Can't start a new section if another with the same name has been
PUSHS'd ds N, @could produce incorrect resultsELIFandELSEwere allowed afterELSE.was treated as a label- Performance of
gbdiff.bashimproved significantly - Defining an
EQUSafter referencing it is now an error - Passing
-tand-Oto RGBLINK generated an output too large
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.
v0.5.0-rc1
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:
_PIwasn't useful, so it's deprecated nowPRINTT,PRINTV,PRINTFandPRINTIare obsoleted by the newPRINT/PRINTLNandSTRFMT
Known issues:
- An
ELIFcondition right after a takenIF/ELIFblock is still evaluated (#764) - Regression: Expanding
recurse EQUS "recurse"hangs rgbasm (#696)
Added:
- New
MACRO <name>syntax for defining macros! The old syntax will still be supported for a couple versions, but will 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!!)- More complex format specifiers are now allowed in symbol interpolations
- Anonymous labels
- Environment var
SOURCE_DATE_EPOCHcan be used for reproducible builds - Underscores can be used in numeric literals (e.g.
%1101_1110_1010_1101) - New string functions
STRRIN,STRRPLandSTRFMT \#to get all of a macro's arguments"""Multi-line string literals"""FORblocks!BREAKexitsREPTandFORearlyPOWandLOGfixed-point functions**exponent operator (for integers)REDEFto redefineEQUSmuch more convenientlyRLhas been reintroduced alongsideRBandRWLOAD UNIONandLOAD FRAGMENT
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
-mnow accepts MBC names - More symbols will be available in the
.symand.mapfiles - Slack totals are now included in the
.mapfiles - Interaction of quotes and macro args should be more intuitive
dscan 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 STRCATcan now concat any amount of stringsLOADblocks cannot create ROM sections anymore (#576)ROUND,FLOORandCEILfixed-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
Removed:
GLOBALandXDEFkeywords (deprecated aliases ofEXPORT)- Colon-less global labels
*-commentsrgbasm -vno longer prints the elapsed time (usetimefor that)
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/FORblocks - Fixed incorrect handling of text after
MACRO,ENDMandENDRtokens - Can't start a new section if another with the same name has been
PUSHS'd ds N, @could produce incorrect resultsELIFandELSEwere allowed afterELSE.was treated as a label- Performance of
gbdiff.bashimproved significantly - Defining an
EQUSafter referencing it is now an error - Passing
-tand-Oto RGBLINK generated an output too large
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.
v0.4.2
New:
- We have a website! Accordingly, HTML documentation is no longer distributed in the source or in the release artifacts below. All old documentation links now redirect to the latest release's documentation
- You may also have noticed the repo has been moved to gbdev instead of rednex! Don't worry, the same people are in charge.
- /* Block comments! */
- Whitespace is now allowed between the brackets in
[bc],[de]and[hl], also allowing[\1]to work. - The second number argument to
INCBINcan now be omitted, going up to the end of the file - The argument to
rbandrwis now optional, defaulting to 1 - RGBASM and RGBLINK can both use
stdinas input, andstdoutas output (support yet to come to RGBFIX) zshcompletion scripts are available in thecontrib/folder. (If you want to make bash ones, apply in #620)
Changes:
- Nested macros are now invalid, but a workaround is possible
- The lexer has been fully rewritten, which should make additions to it easier, and improve performance
- Removed arbitrary limits on charmap size and name length
STRSUBwill no longer warn when taking 0 characters at the end of the string- RGBLINK will no longer report errors stemming from other errors
- RGBASM is now able to write more
jrs without relying on RGBLINK, leading to smaller.ofiles and faster linking INCBINshould produce a slightly more useful error message- A bunch of quality-of-life improvements for downstream packagers, especially using CMake
- Assertions have been removed from release builds, improving performance slightly
charmaps now allocate memory as nodes are allocated, greatly reducing their size (by a factor of ~8)- Documentation now mentions that
SHIFTupdates_NARG
Fixes:
- Two 6+ year-old crashing bugs have been fixed. They were thankfully rare, but should no longer be a problem now.
LOADblocks could produce incorrect output when at the beginning or end of a section__FILE__caused syntax errors if the file name contained a quotejrin certain circumstances could crash RGBLINK- Fixed inconsistent version numbering between the Makefile and the CMakeLists
- Documentation failed to mention
SECTION FRAGMENT - Documentation incorrectly listed bit 7 of symbol type as being the unionized section flag, and failed to mention the section fragment flag
- Documentation erroneously used to claim that symbol names could begin with a digit
- Error out when using
alignoutside of aSECTION, or when usingshiftoutside of a macro... instead of crashing - Fixed a potential RGBASM crash with very large expressions
- Fixed overwriting a builtin symbol succeeding after insisting enough
- Fixed a crash when subtracting two invalid labels
- Fixed using
_NARGoutside of a macro crashing RGBASM
Note to Windows users
Release 0.4.1's binaries were compiled with MSVC instead of MinGW, giving apparently better results. Unfortunately, there is currently a problem with MSVC (not that we can do anything about it, yay!), so the binaries below are MinGW again. 0.4.3 should be compiled with MSVC again, though.
v0.4.2-pre
This is a pre-release! Do not expect this to be fully stable yet; please read the explanation at the end of the changelog.
New:
- We have a website! Accordingly, HTML documentation is no longer distributed in the source or in the release artifacts below. All old documentation links now redirect to the latest release's documentation
- You may also have noticed the repo has been moved to gbdev instead of rednex! Don't worry, the same people are in charge.
- Whitespace is now allowed between the brackets in
[bc],[de]and[hl], also allowing[\1]to work. - The second number argument to
INCBINcan now be omitted, going to the end of the file
Changes:
- The lexer has been fully rewritten, which should make additions to it easier, and improve performance
- Removed arbitrary limits on charmap number and length of name
STRSUBwill no longer warn when talking 0 characters at the end of the string- RGBLINK will no longer report errors stemming from other errors
- RGBASM is now able to write more
jrs without relying on RGBLINK, leading to smaller.ofiles and faster linking INCBINshould produce a slightly more useful error message- A bunch of quality-of-life improvements for downstream packagers, especially using CMake
- Assertions have been removed from release builds, improving performance slightly
- charmaps now allocate memory as nodes are allocated, greatly reducing their size (by a factor of ~8)
Fixes:
- Two 6+ year-old crashing bugs have been fixed. They were thankfully rare, but should no longer be a problem now.
LOADblocks could produce incorrect output when at the beginning or end of a section__FILE__caused syntax errors if the file name contained a quotejrin certain circumstances could crash RGBLINK- Fixed inconsistent version number between the Makefile and the CMakeLists
- Documentation failed to mention
SECTION FRAGMENT - Documentation incorrectly listed bit 7 of symbol type as being the unionized section flag, and failed to mention the section fragment flag
Why a pre-release?
The lexer, which is the core component of RGBASM, has been fully rewritten. Being also a very low-level piece of code, it's prone to crashing. The rewrite may also have changed some behavior (here is a known incompatibility). This pre-release is essentially to test the waters: see if anything breaks, assess how to handle it, and make 0.4.2 a good and stable release.
Why rewrite it? Didn't it work fine?
In short, the old lexer worked "fine" if you didn't look at it the wrong way. It was also hard to edit, and blocked a bunch of issues, 6 open at the time of writing. Further, the performance wasn't great, and we're hoping to improve it with this release.
It sucks! Stuff broke and it's slow!
Alright, we'd love to hear back about that. Check the "issues" tab near the top of the page for anything similar to your problem, otherwise open a new issue. We'd preferably need the code that you ran RGBASM on, so that we can see why it's slow.
⚠️ ATTENTION WINDOWS USERS ⚠️
RGBDS does not ship the Visual C++ runtime libraries anymore; if you don't have the 2019 ones (you should get an error message about some vcruntime DLL missing), you can install them from Microsoft's website.
v0.4.1
The version that brought GBDK support! I mean, brought them our support?
New:
- RGBLINK tries to report more errors at once
- Two-argument
ALIGN[]to additionally specify an offset - Mid-section
aligndirective - A RGBLINK option to prevent padding its output
- A warning for empty
db/dw/dlin ROM sections - (Overdue) documentation of
-MG,-MP,-MTand-MQ - RGBDS can now be compiled using CMake, if you prefer; note that the Makefile is still the main build method
- RGBDS should be able to be compiled using MSVC now
Deprecations:
-Wobsoleteis now enabled by default! This is not a deprecation, but it should make it easier for you to notice deprecated changes*-comments are now deprecated, please use;-comments instead
Changes:
- Consistently with RGBLINK, RGBASM now allows constants to be referenced prior to their definition (see #496 for details)
- RGBASM ISO 8601 symbols now correctly separate time with colons
- Macro can now have an arbitrary number of arguments; a sanity limit has been arbitrarily set to 99,999, which should be enough for everyone
Fixes:
- Fixed RGBLINK incorrectly computing PC inside LOAD blocks
- Fixed
BANK(@)outside of sections crashing RGBASM - Fixed
BANK()of a constant crashing RGBLINK - Fixed period not being accepted as second character of a label name
- Fixed possible RGBASM crash from an empty input file
- Fixed modulo by 0 crashing RGBLINK
- Fixed user-after-free from errors in
INCLUDEd linker scripts - Fixed 0-byte sections being incorrectly printed in .map files
- Fixed a rare RGBASM hang when deleting symbols
- Fixed uninitialized memory reads with
-MTand-MQ - Fixed incorrect explanation of
pop afinstruction - Fixed incorrect reporting of overlapping sections
- Fixed incorrect documentation of unary
! - Fixed documentation not updated regarding behavior of RGBLINK's
-tand-w - Fixed implicitly relying on
-fcommon: RGBDS now builds with GCC 10's default configuration - RGBDS no longer relies on 32-bit
int, making it more portable to e.g. DOS
Note for Windows users: The binaries below have been compiled on Windows using MSVC, instead of cross-compiled. No difference has been found after some testing, but if something breaks, please open an issue!
v0.4.0
Very big release! This includes a lot of bug fixes, large portions of the code rewritten, and some features deprecated or removed. We hope not to break anyone's code, but we won't keep bugs for compatibility's sake. If your code broke and the change isn't in the list below, please open an issue in our tracker.
New:
- Added warning flags to RGBASM: by default, most warnings are disabled now. Please see
man rgbasmfor more info - "
LOADblocks" simplify writing code that should run in RAM; users of unofficial program rgbbin may want to look into this - Shiny new assertions, whose checking can be deferred to RGBLINK
- "Unionized" sections offer a sort of cross-file
UNION - More flags in the RGBASM
-Mfamily for better automatic dependency management - Bracketed symbols can be nested (example)
SHIFTcan now shift multiple times at once- Long options (such as
--versionfor-V) have been added to all programs - RGBASM now accepts escape
\rin strings INCBINnow works with unseekable files as well
Deprecations and removals:
- As part of a cleanup effort, features previously marked as deprecated have been removed, such as the
CODEsection type - Labels not starting with a dot nor followed by a colon have been deprecated; in a future version, they will be treated as macro invocations
- Deprecated
OPT zin favor of new and more consistentOPT p - Deprecated
GLOBALsymbol (and its synonymXDEF), as it has the same effect asEXPORT - Removed "section-local" charmap (deprecated in 0.3.9)
Changes:
.symand.mapfiles are now output sorted- The argument to
rstdoes not need to be known to RGBASM anymore (so labels can be used at all times) - Only labels may have dots in their name now
- Labels beginning with a dot may have whitespace before their declaration
DEF()now accepts labels as argumentsROMXandWRAMXsections can be used in RGBLINK's-tand-wmodes, respectively- RGBLINK will report more detailed "error stacks", like RGBASM
- RGBASM tries harder to treat expressions as "constant"
- Second byte of
stopcan be specified without resorting to usingdb
For further information on new or changed features, please refer to our documentation.
Fixes:
- gbz80(7) had incorrect flag descriptions for
sub - Arguments to RGBASM
-ihave a/implicitly appended if they don't end with one =was treated as identical toset, so= 7, [hl]was valid; this has been fixed- Corrected wrong line reporting with REPT blocks
- Changing sections now resets the label scope
- Built-ins and symbols referenced in link-time expressions can no longer be
PURGEd __ISO_8601_UTC__and__ISO_8601_LOCAL__symbols fixed on Windows (with a caveat for the latter)
Notes:
- RGBDS is now compiled with optimizations by default. To disable optimizations, use
make CFLAGS=-O0. To compile in "debug mode", build usingmake developinstead ofmake; this requires a fairly specific configuration, though, and might not work for you. - Performance of RGBASM and RGBLINK should have been improved (beyond the above), but we would need help from someone experienced with YACC / Bison to make more significant changes
- Reliability across systems and platforms has been improved:
- RGBASM parser grammar has been cleaned up
- Undefined behavior has been removed from various programs
- Nightly builds are available for each commit now ("Actions" tab ⇒ "Regression testing" ⇒ click on the commit name)
- Docs have received an overhaul, including a more responsive and mobile-friendly styling
- General system stability improvements to enhance the user's experience
v0.3.10
v0.3.9
IMPORTANT
This version is missing definitions of the __RGBDS_MAJOR__ etc. symbols. Please use 0.3.10 instead, which rectifies this problem (and does not introduce additional changes).
rgbasm:
- Enforced non-overwritability of some symbols
-now allows assembling a file from stdin- Allowed PUSHS to be used before a section declaration
- Prevented generating symbols with invalid names using macros
- Fixed the precedence of the
==operator - Added different output formats to bracketed symbols
- Fixed a parsing bug with some nested
ifconstructs - Improved error reporting now reports actual file line numbers as well as string expansions
- Added multiple charmaps (be careful as some feature has been deprecated, a warning has been added about it)
- Fixed bug with line numbers in some IF/ELIF/ELSE blocks
- Added configurable recursion limit to prevent infinite loops
- Fixed unary NOT being a no-op on constant expressions
- Made behavior consistent whether outputting a .o file or not
- Allowed tabs to be used before line continuations
- Allowed sections without content to be placed anywhere
- Made error message more explicit with macro argument 0
rgblink:
- Improved many error messages
rgbgfx:
- Added an option to use the GBC's color profile
other:
- Added more tests
- Did some internal cleanup
- Improved cross-platform compatibility of test suite
Also fixed a lot more bugs and crashes in rgbasm and rgblink.
v0.3.8
-
rgbasmandrgblink- Report correct filename and line number of symbols in error messages.
- Fix long-standing issue of ambiguity in constant parsing.
- Fix behaviour of parser regarding newlines and
\.
-
rgbfix- Fix regression on calculation of ROM checksum.
-
Other
- Documentation updates and cleanups.
- Some new tests.
- Re-enabled OS X build CI job.