Rednex Game Boy Development System - An assembly toolchain for the Nintendo Game Boy and Game Boy Color
Starting with this release, we now publish statically-linked Linux binaries! We also provide a Dockerfile to build RGBDS.
Deprecated:
DEF
(use {interpolation}
if you relied on EQUS
expansion for defined symbol names)-H/--nop-after-halt
and -l/-auto-ldh
options (which are now off by default)Added:
::
#"raw strings"
don't process any escapes (not even interpolation or macro args!)DS ALIGN[size, offset]
to insert padding until the next alignment boundary within the same sectionINCHARMAP
function to check if a string matches a charmap valueSIZEOF
and STARTOF
can now take section types like WRAM0
as argumentENDSECTION
explicitly ends a sectionDS
in RGBLINK linker scriptsOPTIONAL
sections in RGBLINK linker scriptsFLOATING
addresses in RGBLINK linker scripts (should improve SDCC interop)-X/--max-errors
stops after too many errors, with a default of 100ALIGN alignment, offset
-O/--group-outputs
bases automatic output filenames on the output path, instead of the input pathRemoved:
name: MACRO
syntax (use MACRO name
instead)"\,"
inside strings (not necessary in macro arguments)__FILE__
and __LINE__
Label: :
is invalid)Changed:
-Wtruncation=1
will not warn about 8-bit ~$FF
or 16-bit ~$FFFF
values.map
files is now placed at the top of the fileALIGN 8, -1
is equivalent to ALIGN 8, 255
)--output-*
options have been renamed to --auto-*
for clarity.sym
files sort symbols at the same address by their locality-S/--scramble
prioritizes higher banks--output-*
flags are renamed to --auto-*
--only-free
and --help
options to test scriptsPURGE
arguments can go in any order\@
through INCLUDE
d filesFOR
loops, in some edge cases, could loop with unexpected valuesPUSHO
and POPO
now save and restore the r
optionENDL
now restores the label scope from before LOAD
-1 >>> 32
now equals 0, not -1ATAN2
to have argument order (y, x)
-w
flag properly coerces WRAMX sections to WRAM0-S/--scramble
argument validation--color-curve
now works as it always should have-r/--reverse
gave incorrect output with -d/--depth 1
-L/--slice
if -u/--unique-tiles
wasn't also passed-c/--colors
with -r/--reverse
Starting with this release, we now publish macOS binaries!
Added:
+
and -
)EMPTY
blocks have address ranges, and fixed indentation and duplicates; Next union/fragment
comments have fixed indentation and placement-
for stdin and stdoutFixed:
SECTION FRAGMENT
s that aren't in ROMSECTION
names to support SDCC "areas"Assertion 'this->_M_is_engaged()' failed.
"; we hardened our test configuration to catch more bugs like thisA big thank you to @eievui5 and @PinoBatch for additional testing during the development of this version, as well as @rlewicki for some improvements to the codebase!
Our website received a big facelift, please check it out at https://rgbds.gbdev.io! Thanks to @ISSOtm and @avivace for the work on this.
While some pages have been moved around, all URLs under /docs
have been preserved.
Deprecated:
m: MACRO
syntax; use MACRO m
.__FILE__
and __LINE__
.rgbasm -h
and -L
will soon become the default behavior; please use rgbasm -H
and -l
respectively to opt into the current behavior.rgbgfx -h
has been renamed to the less confusing rgbgfx -Z
.Added:
-c
!rgbgfx -r
can also "reverse" the process and generate a PNG from the binary data.randtilegen
, used for testing; @eievui5, @MarkSixtyFour, and @Rangi42 for review and testing!>>>
!&
can now be constant if applied to a symbol with the right alignment.rgbasm -Q
or OPT Q
configures the fixed-point precision, which is still 16 by default (e.g. -Q8
uses Q24.8).FMOD
function for fixed-point modulo.12.34q8
override the current Q
option value.-Q
option.@
and _NARG
are considered undefined (e.g. by DEF
) when they have no value.rgbasm -P
allows automatically pre-including a file before the source file; for example, to define constants used throughout the codebase.SECTION(symbol)
evaluates to the name of symbol
's section.rgbasm -r
sets the maximum recursion depth, not the minimum failure depth (off by one).OPT r
.-Wunmapped-char=0/1/2
warning for characters not in the charmap. Level 1 ignores unmapped characters in a non-default charmap if it's empty, level 2 does not.\@
only increments its expanded value when used, so merely adding or removing MACRO
, REPT
, or FOR
blocks will not affect generated symbols.-o
.-O
.-M
.EMPTY
space between sections in the .map file, and total used+empty space at the end..clang-format
, though it it only applied to C++ files; we are gradually transitioning away from checkpatch
style.Removed:
PRINTT
, PRINTI
, PRINTV
, PRINTF
(use PRINT
/PRINTLN
instead)_PI
SET
as an assignment operator (use =
instead)rgbgfx -D
, -f
, and -F
were not useful anymoreChanged:
rgbasm -I
over rgbasm -i
, for consistency with other tools (mainly C compilers); -i
will be phased out in a future release.man
pages are now all in a single directory; this affects the release tarballs!.map
files now have a more useful free/used space summary at the end.map
files are now indented using tabs (requested in #1012)Fixed:
rgblink -S
rejected a lot of valid arguments.rgblink -O
could "forget" ROM0 if no such sections were defined, offsetting the entire file.*UTC*
symbols could contain local time instead on some systems.contrib/gbdiff.bash
correctly handles spaces in its arguments (oops)rgbasm -b
and -g
were broken.rgbasm(5)
.Our website received a big facelift, please check it out at https://rgbds.gbdev.io! Thanks to @ISSOtm and @avivace for the work on this.
While some pages have been moved around, all URLs under /docs
have been preserved.
Deprecated:
m: MACRO
syntax; use MACRO m
.rgbasm -h
and -L
will soon become the default behavior; please use rgbasm -H
and -l
respectively to opt into the current behavior.rgbgfx -h
has been renamed to the less confusing rgbgfx -Z
.Added:
-c
!rgbgfx -r
can also "reverse" the process and generate a PNG from the binary data.randtilegen
, used for testing; @eievui5, @MarkSixtyFour, and @Rangi42 for review and testing!>>>
!&
can now be constant if applied to a symbol with the right alignment.rgbasm -Q
or OPT Q
configures the fixed-point precision, which is still 16 by default (e.g. -Q8
uses Q24.8).12.34q8
override the current Q
option value.FMOD
function for fixed-point modulo.rgbasm -r
sets the maximum recursion depth, not the minimum failure depth (off by one).OPT r
.-Wunmapped-char
warning for characters not in the charmap.\@
only increments its expanded value when used, so merely adding or removing MACRO
, REPT
, or FOR
blocks will not affect generated symbols.-O
.-M
.EMPTY
space between sections in the .map file..clang-format
, though it it only applied to C++ files; we are gradually transitioning away from checkpatch
style.Removed:
PRINTT
, PRINTI
, PRINTV
, PRINTF
(use PRINT
/PRINTLN
instead)_PI
SET
as an assignment operator (use =
instead)rgbgfx -D
, -f
, and -F
were not useful anymoreChanged:
man
pages are now all in a single directory; this affects the release tarballs!Fixed:
rgblink -S
rejected a lot of valid arguments.rgblink -O
could "forget" ROM0 if no such sections were defined, offsetting the entire file.*UTC*
symbols could contain local time instead on some systems.contrib/gbdiff.bash
correctly handles spaces in its arguments (oops)rgbasm(5)
.Our website received a big facelift, please check it out at https://rgbds.gbdev.io! Thanks to @ISSOtm and @avivace for the work on this.
While some pages have been moved around, all URLs under /docs
have been preserved.
Deprecated:
rgbasm -h
and -L
will soon become the default behavior; please use rgbasm -H
and -l
respectively to opt into the current behavior.rgbgfx -h
has been renamed to the less confusing rgbgfx -Z
.Added:
-c
!rgbgfx -r
can also "reverse" the process and generate a PNG from the binary data.randtilegen
, used for testing; @eievui5, @MarkSixtyFour, and @Rangi42 for review and testing!>>>
!&
can now be constant if applied to a symbol with the right alignment.-O
.OPT r
.clang-format
, though it it only applied to C++ files; we are gradually transitioning away from checkpatch
style.Removed:
PRINTT
, PRINTI
, PRINTV
, PRINTF
(use PRINT
/PRINTLN
instead)_PI
SET
as an assignment operator (use =
instead)rgbgfx -D
, -f
, and -F
were not useful anymoreChanged:
man
pages are now all in a single directory; this affects the release tarballs!Fixed:
rgblink -S
rejected a lot of valid arguments.rgblink -O
could "forget" ROM0 if no such sections were defined, offsetting the entire file.*UTC*
symbols could contain local time instead on some systems.contrib/gbdiff.bash
correctly handles spaces in its arguments (oops)rgbasm(5)
.We understand that assembly is a fairly dry and old-school language. We understand that it does not necessarily appeal to the modern programmer (and their socks) anymore.
Therefore, we have decided to experiment and shake up the instruction syntax a little bit. UTF-8 characters are now accepted as input, a handful of instructions have been renamed—as have been the registers, and more! :eyes: We invite you to check out the new documentation for the full list of changes~
Pwease be warned that the new syntax is a teeny tiny bit expewimental, and so any ewwows should be wepowted to youw neawest /dev/null
! ^w^
:cat2:
Deprecated:
SET
for mutable definitions is deprecated; use =
Added:
rgbasm
, rgblink
, rgbfix
, and rgbgfx
!rgbfix -O
to silence all "overwriting non-zero byte" warningsrgblink -S
"scrambles" bank assignments to help find broken assumptions in your code-Wnumeric-string=0|1|2
warns about use of strings as numbersDEF x += 1
for DEF x = x + 1
)!
negates condition codes z
/nz
/c
/nc
_
in gfx literals, e.g. `0123_3210
Updated:
rgbfix -m MBC3+TIMER
implies BATTERY
, warning if not specified-Wtruncation
can be made less strict; use -Wtruncation=1
for more lax behaviorFixed:
rgbfix -m MBC3+TIMER+BATTERY
didn't workLOAD
offset wasn't reset when switching sectionsPUSHS
inside UNION
should work as expectedSTRFMT
documentation was cut in the middlergbfix -m help
textDon't forget to check out our docs for more details on the updated functionality!
Added:
\<10>
and \<num_sym>
macro arg syntaxesSIZEOF("section")
and STARTOF("section")
CHARLEN
and CHARSUB
for working with charmap output unitsOPT L
, OPT W
, and OPT h
REDEF EQU
"\n \r \t \" \\"
)rgbfix -m help
will list the accepted MBC namesrgbfix -m
accepts $
-prefixed hex literalsChanged:
macro STRCAT("foo", "bar")
used to be 2 arguments, now it's only one!STRSUB
and CHARSUB
allow negative start positions, relative to the end of the stringSTRSUB
's second parameter can be omitted to read until the end of the string$ff00
in ld [$ff00 + c], a
and ld a, [$ff00 + c]
; and arbitrary whitespace, line continuations, and block comments are allowedRemoved:
LOAD FRAGMENT
had buggy behavior, and its use cases can be done differentlyFixed:
SECTION UNION
/FRAGMENT
could be missing from the .sym fileld hl, sp - <expr>
was broken in 0.5.0 (workaround: ld hl, sp + -<expr>
)$ff00 + constant
(or any symbol name starting with "c") would cause a syntax error since 0.4.2 (workarounds: ($ff00) + constant
, constant + $ff00
, or $ff00 + /**/ constant
)jr
could be incorrect within SECTION FRAGMENT
PUSHS
didn't reset the section scope correctly (regression), and didn't save the LOAD
stateREDEF EQUS
had a few bugs_ISO_C11_SOURCE
; this notably fixes building on FreeBSD (see #789 for more info)An "annex" program, rgbobj
, has been developed as an equivalent of objdump
for RGBDS. It's not integrated with the rest of the codebase, as it's written in Rust. If you are distributing pre-built binaries, you may want to bundle it with RGBDS regardless.
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 nowPRINTT
, PRINTV
, PRINTF
and PRINTI
are obsoleted by the new PRINT
/PRINTLN
and STRFMT
Known issues:
SECTION UNION
s/FRAGMENT
s (#809)Added:
MACRO <name>
syntax for defining macros! The old syntax will still be supported for a couple versions, but may eventually be phased out.DEF <name> EQU/EQUS/SET/= ...
syntax for defining constants! The old syntax will still be supported, but may eventually be phased out.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 stringSOURCE_DATE_EPOCH
can be used for reproducible builds%1101_1110_1010_1101
)STRRIN
, STRRPL
and STRFMT
\#
to get all of a macro's arguments"""
Multi-line string literals"""
FOR
blocks!BREAK
exits REPT
and FOR
earlyPOW
and LOG
fixed-point functions**
exponent operator (for integers)REDEF
to redefine EQUS
much more convenientlyRL
has been reintroduced alongside RB
and RW
LOAD UNION
and LOAD FRAGMENT
Changed:
-m
now accepts MBC names.sym
and .map
files.map
filesds
can now repeat patterns, not just a single bytedb
STRCAT
can now concat any amount of stringsLOAD
blocks cannot create ROM sections anymore (#576)ROUND
, FLOOR
and CEIL
fixed-point builtins were present but undocumentedRemoved:
GLOBAL
and XDEF
keywords (deprecated aliases of EXPORT
)*
-commentsrgbasm -v
no longer prints the elapsed time (use time
for that)hl
as the destination of ld hl, r16
and add hl, r16
+
in ld hl, sp + N
Fixed:
SECTION FRAGMENT
s now respect their constraints at their respective beginnings, not as a wholeREPT
/FOR
blocksMACRO
, ENDM
and ENDR
tokensPUSHS
'dds N, @
could produce incorrect resultsELIF
and ELSE
were allowed after ELSE
.
was treated as a labelgbdiff.bash
improved significantlyEQUS
after referencing it is now an error-t
and -O
to RGBLINK generated an output too largeINCBIN "file",<start>[,<stop>]
could leak memory in case of a certain error__UTC_*__
were incorrectly declared as EQU
instead of EQUS
[hli]
and [hld]
charmap
that was on the pushc
stackrecurse EQUS "recurse"
infinitely hanging RGBASM, no matter the max recursion depth (fixes a regression introduced by 0.4.2's new lexer)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 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
:
Deprecated:
_PI
wasn't useful, so it's deprecated nowPRINTT
, PRINTV
, PRINTF
and PRINTI
are obsoleted by the new PRINT
/PRINTLN
and STRFMT
Known issues:
recurse EQUS "recurse"
or recurse EQUS "\{recurse\}"
hangs rgbasm (#696)Added:
MACRO <name>
syntax for defining macros! The old syntax will still be supported for a couple versions, but may eventually be phased out.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!!)SOURCE_DATE_EPOCH
can be used for reproducible builds%1101_1110_1010_1101
)STRRIN
, STRRPL
and STRFMT
\#
to get all of a macro's arguments"""
Multi-line string literals"""
FOR
blocks!BREAK
exits REPT
and FOR
earlyPOW
and LOG
fixed-point functions**
exponent operator (for integers)REDEF
to redefine EQUS
much more convenientlyRL
has been reintroduced alongside RB
and RW
LOAD UNION
and LOAD FRAGMENT
Changed:
-m
now accepts MBC names.sym
and .map
files.map
filesds
can now repeat patterns, not just a single bytedb
STRCAT
can now concat any amount of stringsLOAD
blocks cannot create ROM sections anymore (#576)ROUND
, FLOOR
and CEIL
fixed-point builtins were present but undocumentedRemoved:
GLOBAL
and XDEF
keywords (deprecated aliases of EXPORT
)*
-commentsrgbasm -v
no longer prints the elapsed time (use time
for that)Fixed:
SECTION FRAGMENT
s now respect their constraints at their respective beginnings, not as a wholeREPT
/FOR
blocksMACRO
, ENDM
and ENDR
tokensPUSHS
'dds N, @
could produce incorrect resultsELIF
and ELSE
were allowed after ELSE
.
was treated as a labelgbdiff.bash
improved significantlyEQUS
after referencing it is now an error-t
and -O
to RGBLINK generated an output too largeDon't package this release, lol