Rangi
49a4da2235
Revert "Generate Bison output in CMake build tree"
...
This reverts commit 4577ff16bc .
2026-04-10 17:18:40 -04:00
Rangi
2cfb2b2533
Remove the claim that only exported symbols appear in sym and map files
...
Fixes #1916
This claim was true in v0.4.2, but intentionally changed in v0.5.0.
rgblink(1) already explains that "all visible labels and exported numeric constants"
will appear, which is a more appropriate location than rgbasm(5).
2026-04-09 21:28:07 -04:00
Rangi
187e1a55b8
Add examples for using character literals instead of strings as numbers
...
Fixes #1890
2026-04-08 21:42:10 -04:00
Rangi
6e13779b8b
Use C++-sryle static_cast, not C-style explicit cast
...
`uint32_t(param)` is actually functional notation of explicit casting,
not a direct constructor call. `uint32_t{param}` would be uniform
initialization syntax for a constructor call, but would not allow
narrowing from `uint64_t`. See issue #1904 for discussion.
2026-04-08 20:05:36 -04:00
Rangi
25bf0e9e2c
SOURCE_DATE_EPOCH must be in base 10
2026-03-30 21:31:37 -04:00
Rangi
4ce4162da4
A little .yml cleanup
2026-03-30 20:29:06 -04:00
Rangi
18b074711e
Fix rgbasm -s not overriding a previous -s
2026-03-30 20:18:19 -04:00
Rangi
efd4373a56
Check for a SDAS "Def" or "Ref" line before reading a subsequent integer
...
Without checking `token[0]` through `token[2], `readInt` starting at
`&token[3]` could go out of bounds on a badly-formed SDAS .rel object file
2026-03-30 19:45:44 -04:00
Rangi
92a31ff7df
Correct list numbering
2026-03-30 19:23:42 -04:00
Rangi42
919a5dba89
Correct CONTRIBUTING.md to accurately describe test/fetch-test-deps.sh
2026-03-23 11:13:23 -04:00
Rangi
65b0b49720
Update zlib to 1.3.2
...
Note that the DLL name created by CMake with `BUILD_SHARED_LIBS`
has changed from `zlib1.dll` to `z.dll`. This was caused by the
"Continued rewrite of CMake build [Vollstrecker]" from its
changelog <https://zlib.net/ChangeLog.txt >, and has been reported
in <https://github.com/madler/zlib/issues/1181 >.
The MinGW package `libz-mingw-w64-dev` still calls it `libz1.dll`.
2026-03-06 22:28:09 -05:00
Rangi
48d58ba095
Pass -Wdangling-alias to Bison 3.5 or newer
...
`bison -Wall` enables all diagnostics except `-Wcounterexamples`
(added in 3.7; we already pass it), `-Wyacc` (which we do not need),
and `-Wdangling-alias` (added in 3.5).
2026-03-06 22:28:09 -05:00
Rangi
af0505b4cd
Explicitly clarify that SECTION(@) returns the name of the current section
2026-02-06 19:37:49 -05:00
Rangi
d053025070
Avoid writing "XXX" since it's a conventional "TODO/FIXME" comment
2026-01-22 13:01:10 -05:00
Rangi
ade898d815
List -B in rgbgfx options
2026-01-13 09:46:33 -05:00
Rangi
e738b90c69
Refactor to combine similar functions into one
2026-01-07 16:36:04 -05:00
Rangi
a91d26192d
Fix SECTION UNION alignment depending on piece order
2026-01-07 16:36:04 -05:00
Rangi
92bfe5d930
Release v1.0.1
2026-01-01 00:43:43 -05:00
Rangi
9b22ff3491
Fix link in man page
2025-12-12 18:25:47 -05:00
Rangi
a4af81f250
Fix two "Using a macro as first argument cancels effect of .Li" man page warnings
...
These were observed in https://udd.debian.org/lintian/?packages=rgbds
and can be reproduced by running:
for f in man/*; do
echo $f
LC_ALL=C.UTF-8 MANROFFSEQ='' MANWIDTH=120 \
man --warnings -E UTF-8 -l -Tutf8 -Z "$f" >/dev/null
done
2025-12-12 12:31:03 -05:00
Rangi
d4e0ca5f90
Update libpng to 1.6.53
2025-12-11 11:48:18 -05:00
Rangi42
27dca5680c
Fix formatting typo in man/rgbasm-old.5
2025-12-09 10:33:24 -05:00
Rangi
c8161be23a
Add missing SPDX-License-Identifier: MIT comments
2025-12-05 22:41:12 -05:00
Rangi
2c5c453ab8
Refactor FileStackNode::printBacktrace from recursive to iterative
...
This avoids a potential stack overflow for very long backtraces,
or for corrupt object files with cyclic backtraces
2025-12-05 22:41:12 -05:00
Rangi
c3e245c13e
Correct typo in rgbds(5)
2025-12-05 22:39:30 -05:00
Rangi
1c00123b33
Add missing return 0; to rgblink main()
2025-12-04 21:06:46 -05:00
Rangi
8d6c617875
Use 4 spaces per tab in LCOV coverage report
2025-12-04 17:56:16 -05:00
Rangi42
752e2b3620
Symbol names with more than two '.'s could be defined as constants
...
Dot-only names could also trip an assertion in `make develop`
when used as labels
2025-12-04 15:15:41 -05:00
Rangi42
ad3188f038
Fix garbage characters at EOF causing an infinite loop
2025-12-04 15:15:41 -05:00
Rangi
1eb4eb3339
Reuse the usage.name for printing version info
2025-11-18 22:32:45 -05:00
Rangi
a3d3e1525a
Fix RGBLINK object type detection
2025-11-18 22:01:43 -05:00
Rangi
3553c9c4da
Fix RGBLINK evaluation of undefined RPN symbols
...
This was the only RPN case to not assign a deliberate value
in all possible branches.
Fixes #1858
2025-11-18 16:40:24 -05:00
Rangi
5c2c893ced
Refactor getSectionDescription in src/link/assign.cpp
2025-11-16 17:37:01 -05:00
Rangi
04e3a904c2
Avoid calling style_Set/Reset before strerror(errno),
...
since they may call `isatty` which can change `errno`
Fixes #1857
2025-11-08 12:06:16 -05:00
Rangi
395b03e88e
Disallow SECTION UNION for ROM sections
...
Fixes #1855
2025-11-07 11:38:06 -05:00
Rangi42
fb9fa6038c
Release version 1.0.0
2025-10-31 20:19:24 -04:00
Rangi42
558d3ca0fc
Disallow labels before ENDC
2025-10-31 18:21:59 -04:00
Rangi42
df5162edca
Use loops instead of tail calls and musttail
...
gcc 15.2.1 20250813 complains "address of automatic variable can
escape to `musttail` call" from `-Wmaybe-musttail-local-addr`,
and guaranteeing tail-call optimization cross-platform is more
trouble than it's worth.
2025-10-27 12:05:27 -04:00
Rangi42
2519d1e698
Mention REDEF and FOR regarding EQUS expansion
...
Fixes #1851
2025-10-27 10:54:16 -04:00
Rangi42
ca383c91ca
Revert "More accurate 8-bit <=> 5-bit RGB color conversion ( #1827 )"
...
This reverts commit 223b3d1921 .
2025-10-24 13:32:59 -04:00
Rangi
8bedd710d7
Simplify musl's getopt, including removing optind, optopt, opterr, idx, and longonly
2025-10-23 13:39:28 -04:00
Rangi
efb5a88edb
Show conventional colored "error:"/"FATAL:" for CLI option errors
2025-10-23 12:40:29 -04:00
Rangi
a0bb830679
More consistent man page descriptions for CLI options
2025-10-22 14:48:24 -04:00
Rangi
7654c6e27a
More consistent man page descriptions for warning diagnostics
2025-10-22 14:03:34 -04:00
Rangi
400375b2e5
Share some handling between two tests of rgbasm -M -
2025-10-20 20:57:48 -04:00
Rangi
1badba03d8
Clean up some #define callables
...
These are used where anonymous functions would not be sufficient
2025-10-13 13:14:49 -04:00
Rangi42
64bcef99bd
Lower default -Wtrunction= level to 1
2025-10-13 11:48:33 -04:00
Rangi42
aa672bbec9
Rephrase PURGE documentation and raise the default level to 2
...
Fixes #1847
2025-10-13 11:43:29 -04:00
Rangi42
651877e094
Avoid reusing a static local variable (too fragile)
2025-10-08 21:19:23 -04:00
Rangi
26c48cc409
Add RGBGFX test for libpng warning with invalid bKGD chunk
2025-10-08 15:44:15 -04:00
Rangi
23b9039716
Give clearer names to template parameters
2025-10-08 14:55:43 -04:00
Rangi
711fba5e35
Add more tests for things that only the external tests had covered
2025-10-08 13:32:48 -04:00
Rangi
089fc11e31
A local label starting with a keyword (e.g. jr.local) is an error
2025-10-08 12:23:08 -04:00
Rangi42
837f552987
Fix bank increment never happening due to unsigned overflow
2025-10-07 16:20:24 -04:00
Rangi
cb8c973453
Add test for undefined __SCOPE__
2025-10-06 17:51:21 -04:00
Rangi
cca3794dd0
Mention libpng in its internal warning and error messages
2025-10-06 17:03:51 -04:00
Rangi
02c2408f58
Implement reversed template for reversing for-each loops
2025-10-06 16:50:47 -04:00
Rangi
fba0562650
Fix repeated REPT nodes in backtraces
2025-10-06 16:36:55 -04:00
Rangi
0c9920d4a6
Use C++ iterator for fragment/union "pieces" of RGBLINK sections
2025-10-05 15:07:25 -04:00
Rangi
13e85b5151
Replace all ctype.h functions with locale-independent ones
2025-10-03 12:52:24 -04:00
Rangi
268b586c9d
Release v1.0.0-rc2
2025-09-30 18:56:00 -04:00
Rangi
85d3b5df58
Add more RGBFIX tests
2025-09-30 18:20:53 -04:00
Rangi
eea277ae9c
Add more tests for RGBFIX
2025-09-29 22:43:16 -04:00
Rangi
538395b92c
Prevent simple syntax highlighters from breaking on /* in a string
2025-09-29 11:11:40 -04:00
Rangi
3108fb5297
Rename gbz80.7 "CPU opcode reference" to "Game Boy CPU instruction reference"
2025-09-28 16:43:36 -04:00
Rangi42
f99591bf6f
Link FORCE_COLOR and NO_COLOR
2025-09-25 14:06:44 -04:00
Rangi42
0297da4d4c
Add more tests for RGBASM coverage
2025-09-25 13:30:30 -04:00
Rangi42
96b953fe51
Add a test case for overlapping IF/ENDC and REPT/ENDR
...
This trips an asserton in the Rust rewrite because of its different
conditional stack design
2025-09-25 11:57:56 -04:00
Rangi42
0670c03bc2
Add CLI tests for RGBASM
2025-09-25 11:57:56 -04:00
Rangi42
09ef5b7e06
Refactor error fix suggestions in fstk_RunMacro
2025-09-24 19:35:41 -04:00
Rangi42
d5bb462f25
Separate isLetter into isUpper and isLower
2025-09-24 19:19:50 -04:00
Rangi42
b0727e9779
Suggest removing space before colon to define a label instead of invoking a macro
2025-09-24 18:32:45 -04:00
Rangi42
ca4b890273
Consistently do & alignMask, not % alignSize
...
Also add more unrelated tests for coverage
2025-09-23 13:25:51 -04:00
Rangi42
96a75500d3
Test gb-starter-kit from codeberg.org, not github.com
2025-09-23 13:06:12 -04:00
Rangi42
c8d22d8744
Refactor some iterator template code in RGBGFX pal_packing.cpp
2025-09-21 10:59:59 -04:00
Rangi42
3ece61b103
Use fewer templates in RGBGFX pal_packing.cpp
2025-09-20 22:00:17 -04:00
Rangi42
a82fd17529
Simplify RGBGFX code by using fewer templates
2025-09-20 21:06:51 -04:00
Rangi42
e7f5ab3f55
Warn about rgbgfx -O without -o or any of -A -T -P -Q
2025-09-20 20:23:29 -04:00
Rangi42
595c87b2f8
Update test dependencies
2025-09-20 15:23:02 -04:00
Rangi42
d8aff148bb
Factor out RRANGE macro like RANGE
2025-09-19 16:53:44 -04:00
Rangi42
6cffd991f7
Document rgbasm -Wempty-data-directive
...
Fixes #1829
2025-09-15 09:44:50 -04:00
Rangi42
1fdeb34e50
Fix too-short .out.bin expected test results
...
RGBASM tests now use `rgblink -x` instead of `dd` to get trimmed
test output. RGBLINK tests cannot do so because some of them
(e.g. bank-numbers.asm and sizeof-startof.asm) rely on ROMX
sections above 1, and `-x` implies `-t` which breaks that.
2025-09-15 09:25:33 -04:00
Rangi42
9f16881d64
Use for-each loop
2025-09-10 21:18:33 -04:00
Rangi42
d404621e0d
Don't silence strings-as-numbers with OPT Wno-obsolete in tests
2025-09-07 12:17:39 -04:00
Rangi42
c8a088f281
Avoid nonessential EQUS expansion in tests
2025-09-06 13:45:12 -04:00
Rangi42
94ed28acf8
Avoid nonessential strings-as-numbers in tests
2025-09-06 12:45:01 -04:00
Rangi42
00b5077b2a
Make usage info output responsive to the terminal width
2025-09-05 21:58:17 -04:00
Rangi42
024b33b63a
make format should apply to all .cpp and .hpp files
2025-09-05 21:05:58 -04:00
Rangi42
dcc10cebc3
Add test for duplicate section after use of fragment literal
...
Verifies that #1822 was fixed (by c6997fe73c )
2025-09-05 20:14:01 -04:00
Rangi42
1fc9ba86c4
Some RGBLINK refactoring
...
- Consistently refer to `Section` fragments/unions as "pieces" (renaming `.nextu`)
- Remove `Symbol`'s `.label()` accessors (use `std::get<Label>`)
- Move some `Label`-related logic into `Symbol` methods
2025-09-05 16:34:51 -04:00
Rangi42
e569e0c200
Don't comment "; Next fragment/union" in .map files for empty section pieces
...
Fixes #1821
2025-09-05 15:31:46 -04:00
Rangi42
f7fb3af615
Run make tidy with Checks: '-*,misc-include-cleaner' in .clang-tidy (IWYU)
2025-09-04 13:39:23 -04:00
Rangi42
1dfc1d3231
Factor out isBinDigit and parseHexDigit utility functions
2025-09-04 13:23:10 -04:00
Rangi42
891e6f98df
Fix formatting of very long fixed-point numbers
2025-09-04 12:54:14 -04:00
Rangi42
bdc885bd69
Avoid UB when checking truncation range
...
Fixes #1818
2025-09-04 12:04:10 -04:00
Rangi42
5b67dc94b6
Add more test coverage
2025-09-04 01:29:50 -04:00
Rangi42
4f702a4be8
Try to optimize RPN expressions with .emplace_back instead of .push_back
2025-09-03 23:00:06 -04:00
Rangi42
c5d437ab3c
Tell people to use character literals or CHARVAL instead of strings as numbers
2025-09-03 22:46:19 -04:00
Rangi42
c5c2800f17
Move RPN buffer encoding logic into rpn.cpp
2025-09-03 22:36:00 -04:00
Rangi42
c798500563
Don't call rpn.clear() when we can safely assume it's already empty()
2025-09-03 21:02:57 -04:00