Rangi
39f0f9edc0
Remove previously deprecated features ( #1777 )
...
- Treating multi-unit strings as numbers
- `rgbasm -Wnumeric-string`
- `ldio [c], a` and `ldio a, [c]` (use `ldh`)
- `ld [c], a` and `ld a, [c]` (use `ldh`)
- `ldh [$xx], a` and `ldh a, [$xx]` (use `$FFxx`)
2025-08-05 16:24:10 -04:00
Rangi42
a3983b7b0f
Support rgbgfx -c dmg to imply -c dmg=e4
...
Fixes #1776
2025-08-05 14:18:25 -04:00
Rangi42
fc9b614225
Allow the index of CHARVAL to be optional
...
Fixes #1773
2025-08-03 08:44:06 -04:00
Rangi42
b51056f743
Fix "while expanding symbol" error message
...
Fixes #1771
2025-08-01 16:25:44 -04:00
Rangi42
86b43ea14f
Fix interpolation after empty string literal
2025-07-31 15:17:11 -04:00
Rangi42
32b5ef5095
Expand the test for {interpolation} after two double quotes
2025-07-31 07:08:05 -04:00
Rangi42
a36f2b3b7d
Add test for {interpolation} after two double quotes
...
This is an edge case of how the lexer changes behavior when
reading string literals versus reading unquoted source code.
Three double quotes would begin a multi-line string literal,
but just two are still ambiguous, so it has to `peek()` to
see whether it's inside a multi-line string literal or
outside an empty regular string.
2025-07-31 03:31:16 -04:00
Rangi42
cd4be6aa07
Update test dependencies
2025-07-30 14:49:11 -04:00
Rangi42
308d488833
Use UpperMap for rgblink -S scramble spec matching
...
This also makes invalid RGBLINK CLI options into fatal errors
like the other programs
2025-07-29 03:41:31 -04:00
Rangi42
cecbf0aa0e
Add test case for some macro+interpolation behavior
2025-07-29 01:34:55 -04:00
Rangi42
d16751f56a
Avoid hard-coding a redundant "FATAL:" in RGBLINK
2025-07-27 20:07:53 -04:00
Rangi42
16e16cdf51
Split up the linkerscript lexer and layout actions
2025-07-27 13:38:20 -04:00
Rangi42
3bc8b1ff7c
Handle unknown MBCs, since raw numeric values are accepted
2025-07-26 14:15:05 -04:00
Rangi
0df5b7b86d
Implement warning diagnostic flags for RGBFIX ( #1766 )
...
* Implement warning diagnostic flags for RGBFIX
* `-m/--mbc-type help` prints to stdout
* Support `-m list` as well as `-m help`
* Make invalid `rgbfix -l` characters a fatal error, like other invalid CLI arguments
* Refactor fix/main.cpp into multiple files
2025-07-26 12:11:52 -04:00
Rangi42
87c10988ed
Add test case for block comments after line continuations
2025-07-25 07:49:25 -04:00
Rangi42
c6d0e8de63
Improve some error messages
2025-07-24 11:19:04 -04:00
Rangi
7e151f16c3
Factor out a single PNG-reading function to encapsulate the libpng API ( #1765 )
2025-07-23 15:53:33 -04:00
Rangi
ad81c74cda
Support PNG-format palette spec files ( #1764 )
2025-07-21 11:33:16 -04:00
Rangi42
89ca6a325c
Increase parser test coverage
2025-07-20 13:52:29 -04:00
Rangi42
9e0e7ef9a1
Improve RGBASM test coverage
2025-07-20 13:13:45 -04:00
Rangi42
e3a5290dad
Restore blue-painting of macro arg expansions to prevent recursion
2025-07-20 11:53:36 -04:00
Rangi
2935942667
Allow multiple preinclude files ( #1763 )
2025-07-19 17:07:15 -04:00
Rangi42
250e08043b
Fix -W parameter parsing
2025-07-19 16:18:35 -04:00
Rangi
53c39d01d4
Implement READFILE function ( #1759 )
2025-07-18 18:27:52 -04:00
Rangi42
e7d63f5f6b
Refactor code that handles when included files are missing
...
- Single unified routine for erroring out or handling missing dependencies
- Single three-state enum instead of two Booleans for missing dependencies
(this causes `-MC` to imply `-MG` instead of needing `-MG -MC`)
- Functions than can miss included files return a Boolean for whether the
parser should `YYACCEPT` and exit
2025-07-18 14:03:23 -04:00
Rangi42
b80b30fba1
Ensure that INCBIN parameters are non-negative
2025-07-18 12:44:27 -04:00
Rangi42
9a9fd6603c
Replace test comments with assertions
2025-07-18 07:47:40 -04:00
Rangi
4c8724899b
Support SIZEOF(reg) to distinguish 8- and 16-bit registers ( #1758 )
2025-07-17 15:49:28 -04:00
Rangi
5eb093f13e
Implement warning diagnostic flags for RGBLINK ( #1754 )
2025-07-17 12:54:29 -04:00
Rangi
776e37980b
Add gb-starter-kit to test suite, excluding it on Windows, macOS, and BSD ( #1753 )
2025-07-16 18:17:01 -04:00
Rangi
7f24d46d44
Support more syntax in linkerscripts ( #1752 )
...
* No need to use `locale`s
* Implement octal numbers, `_` digit separators, and `0x/0b/0o` prefixes in linkerscripts
* Refactor some functions out of `yylex`
* Support `\0` in linkerscripts
2025-07-16 15:00:02 -04:00
Rangi42
cf6e5fec63
Fix unterminated strings in linkerscripts consuming their newline
2025-07-16 09:59:48 -04:00
Rangi
1fecf80659
Implement 'character' literals ( #1747 )
2025-07-15 13:08:50 -04:00
Rangi
b6d77fbb9e
Implement BYTELEN and STRBYTE ( #1744 )
2025-07-14 21:46:35 -04:00
Rangi
8a19c5c30a
Fix string function behavior with NUL characters ( #1746 )
2025-07-14 21:43:32 -04:00
Rangi42
35335aadbe
Add test for labels when expecting symbols
2025-07-14 00:10:14 -04:00
Rangi42
ddb2acb652
Reduce more nesting depth, and fix an error message
2025-07-12 08:17:26 -04:00
Rangi
510a4aa99d
Add RGBASM -MC flag to continue -MG after missing dependency files ( #1687 )
2025-07-10 13:25:36 -04:00
Rangi
3f4e8396aa
Implement warning diagnostic flags for RGBGFX ( #1738 )
2025-07-10 09:58:40 -04:00
Rangi
41ab5dff5a
Implement [[ fragment literals ]] ( #1614 )
...
This feature is referred to as "code/data literals" in ASMotor,
and simply as "literals" in some older assemblers like MIDAS
for the PDP-10. RGBASM already had the "section fragments"
feature for keeping disparate contents together when linked,
so these worked naturally as "fragment literals".
2025-07-09 12:13:01 -04:00
Rangi
5e43ece578
Remove errx and errors.hpp ( #1737 )
2025-07-09 11:04:23 -04:00
Rangi42
8c50839109
Miscellaneous updates
2025-07-08 17:45:13 -04:00
Rangi
5de05e2e4b
Replace DefaultInitVec with std::vector ( #1732 )
2025-07-08 14:55:28 -04:00
Rangi
35962dedc4
Refactor warnings and errors ( #1728 )
...
* Remove `err` and `warn`, keep `errx` and `warnx`, using them in RGBGFX too
* Separate RGBGFX and RGBLINK warnings/errors from main options
* Separate `report` function into `error` and `fatal` messages
* Implicit newlines for most RGBASM errors
2025-07-08 12:58:23 -04:00
Rangi
991b74dd0d
Fix segfault with invalid RGBLINK scramble spec ( #1730 )
2025-07-08 12:34:54 -04:00
Rangi
1a77667409
Fix UBSan error with overflowing exponent operator ( #1727 )
2025-07-07 19:08:26 -04:00
Rangi42
202c91471c
Fix alignment compatibility with current lower alignment
2025-07-07 22:43:19 +02:00
Rangi
e14f68d1d7
Improve error message for align failure ( #1721 )
2025-07-06 08:36:11 -04:00
Rangi42
185a3b29e6
Implement base palette ID
2025-07-06 12:57:20 +02:00
Rangi42
965288de38
Fix out-of-bounds image slices
2025-07-02 19:43:11 +02:00