Rangi
429a2325fb
Add test case for reversing image with transparent color
2026-09-10 18:18:37 -04:00
Rangi
9c5e872f9c
First color of -c palettes with transparent pixels is transparent $8000, not unspecified $ffff
2026-09-10 16:41:32 -04:00
Rangi
25240e9fc0
Fix but deprecate an implicit transparent color #0
2026-09-10 19:32:00 +02:00
Rangi
8a6b1946e3
Parse inline palette specs after getting CLI palette size limit ( #2054 )
2026-09-10 18:54:24 +02:00
Max Freedom Pollard
631ef003e7
Avoid signed overflow in RGBLINK's +, -, and * ( #2060 )
...
RGBASM computes these with unsigned arithmetic and casts back, since
signed overflow is UB in C++, but RGBLINK's RPN evaluator used `int32_t`
directly, so `src/link/patch.cpp` tripped UBSan on lines 117, 121, and
124. Share the three operators through `opmath.cpp` so both evaluators
stay in step.
2026-09-07 16:15:07 -04:00
Rangi
fdd6cece30
Warn about signed 8-bit truncation for add sp, e8 and ld hl, sp + e8
2026-09-07 19:28:45 +02:00
Rangi
7d0cb000e8
Specify COLUMNS in test scripts for consistent output
2026-09-06 00:07:16 +02:00
Rangi
8988cdde46
Fix reversing images with fewer than 4 colors per palette
2026-09-03 13:39:24 +02:00
Rangi
a2c52caca2
Disallow NUL characters in section names and assertion messages
...
Allowing these in object files would lose anything after the '\0'
when RGBLINK reads the object.
2026-08-22 19:51:03 -04:00
Rangi
21a4b85a4f
Fix STRFMT stopping at NUL characters in format spec strings
2026-08-22 19:23:49 -04:00
Rangi
9fa5058add
Correct error message for macro arg \<-INT_MIN>
2026-08-22 19:02:23 -04:00
Rangi
e287ee2724
Fix C++ UB from negating INT_MIN with macro shift INT_MIN
2026-08-22 18:48:36 -04:00
Rangi
0888600cb7
Avoid OOM allocation error from invalid too-high bank numbers
2026-08-22 18:31:26 -04:00
Rangi
8bc7de35f9
Prevent SECTION FRAGMENT combined sizes from overflowing their uint16_t size
2026-08-22 18:24:17 -04:00
Rangi
e7e671b249
Update external test commits
2026-08-01 11:24:42 -04:00
Rangi
0c772ea049
Update external testing CI with libbet's new way of running Python
...
libbet now uses `py -3` if the `py` binary exists, instead of if
`COMSPEC` is defined. So we don't need to `unset COMSPEC`, we just
need to avoid Windows' `py` launcher from being in Cygwin's `PATH`.
It turns out that `C:\cygwin\bin\env.exe CYGWIN_NOWINPATH=1 ...`
was not effectively preventing Windows' `PATH` from being inherited
by Cygwin's `PATH`, because to take effect it needs to run Cygwin's
`/etc/profile` script. The simple way to do that is using a login
shell. So we don't need the `PREFIX`/`--prefix` from the previous
commit after all.
2026-08-01 04:49:43 +02:00
Rangi
ec5e6cbabb
Handle -Wtruncation for link-time jr values
...
Fixes #2028
2026-07-21 14:51:58 -04:00
Rangi
d9c0d37fd5
Explicitly allow JR offsets to wrap around in RGBLINK
...
This reverts commit f27a8132d9 .
2026-07-20 19:23:11 -04:00
Rangi
9a15b723f2
Format CGB colors in error/verbose messages as "GB:rr,gg,bb"
...
These should be more debuggable than packed "$xxxx" format.
2026-07-14 10:34:27 -04:00
Rangi
19e60d9864
Fix large ds in linker script overflowing the PC
2026-07-14 00:42:42 -04:00
Rangi
c0ff3d92ad
Fix reverse palette offsets when base palette ID wraps around to 0
2026-07-13 23:08:20 -04:00
Rangi
5869e0dc60
Fix RGBLINK scrambling algorithm to work for SRAM
...
Since SRAM sections start from 0, we had been using a signed
`int8_t curScrambleSRAM` counter to allow 0 as a scrambled bank,
but this actually just placed all floating SRAM sections in bank 0.
2026-07-13 22:39:41 -04:00
Rangi
196d50c1d7
Add XXX: comment tag to working but fragile test cases
2026-07-13 22:39:41 -04:00
Rangi
417b5212d4
Fix OOM for too-small overlay files in 32K mode (rgblink -t)
2026-07-13 16:17:30 -04:00
Rangi
96bc58b7f7
Add test case for local labels that superficially look like keywords
2026-07-11 13:51:53 -04:00
Rangi
4857ad1e00
Fix crash on image without any colors (all transparent)
2026-07-11 13:18:40 -04:00
Rangi
3b33c942ae
Fix a crash and a limitation in RGBGFX unoptimized output
...
- If both banks 0 and 1 were completely filled, then
`assume(bank == 0)` would false and potentially crash.
- If the input image had fully-background tiles, they would be
incorrectly counted towards `nbTiles` and could cause the
"Image contains N tiles, exceeding the limit" check to fail.
2026-07-11 12:32:31 -04:00
Rangi
5525dd902b
Update external test commits
2026-07-10 23:29:19 -04:00
Rangi
be4c1161bd
Fix RGBGFX crash when trimming more tiles than exist after deduplication
2026-07-10 17:35:32 -04:00
Rangi
7b97d7ce15
Fix RGBGFX crash on deduplicating transparent tiles
2026-07-09 21:24:59 -04:00
Rangi
21682e8814
Consistently handle negative shifted macro args ( #2014 )
...
Negative macro arguments count from the end, i.e. `\<-1>`
is equivalent to `\<_NARG>`, even after `shift`ing them.
Negative arguments cannot be used to access shifted values.
2026-07-07 02:19:37 -04:00
Rangi
f82b0838a1
Disallow minus sign before symbol name in bracketed macro arguments ( #2015 )
...
This was being silently allowed but without actually negating the symbol's value
2026-07-07 00:42:09 -04:00
Rangi
fe3b238dea
Do not allow defining labels outside sections ( #2013 )
...
Creating a `Symbol` with `type = SYM_LABEL` but `section = nullptr`
is inconsistent and dangerous. I was not able to cause any buggy
behavior so far, but it's safer and reasonable to not create such
a symbol in the first place.
The main consequence is that `DEF(LabelOutsideSection)` will now
evaluate as 0.
2026-07-06 16:18:42 -04:00
Rangi
46a6966b70
Fix $8000_0000 % -1 to warn with -Wdiv like $8000_0000 / -1 does ( #2012 )
2026-07-06 15:08:44 -04:00
Rangi
be3fc61859
Fix included linker scripts with no newline at EOF ( #2011 )
2026-07-06 14:01:40 -04:00
Rangi
0adbb92e50
Same-line shellcheck comment explanations
...
These are obvious even with `git grep shellcheck`.
2026-07-06 04:43:08 +02:00
Rangi
09da4e001a
Use Bash arrays instead of POSIX splitting when possible
2026-07-06 04:43:08 +02:00
Rangi
189c679e13
Parallelize build jobs according to CPU count
2026-07-05 20:58:50 -04:00
Rangi
f81f5fe63c
Use git clean -fdx instead of make clean in external projects
2026-07-05 20:58:50 -04:00
Rangi
de36a11be7
Prevent rgblink -Wno-* disabled warnings from printing a location trace anyway
...
Fixes #2005
2026-07-04 23:02:16 -04:00
Rangi
e3c594c250
Explain why we do not use file(GLOB ext_projects CONFIGURE_DEPENDS "external/*.cfg")
2026-07-03 18:38:07 -04:00
Rangi
9bbb2247a7
Fix rgbasm -Werror=... not adding to the final error count
2026-07-03 13:05:33 -04:00
ISSOtm
4a77c42ed7
Remove redundant labels from tests
...
It's possible to filter tests by name (`-R`)
2026-07-02 10:39:59 -04:00
ISSOtm
b12eac356e
Try to automatically determine the test OS name
2026-07-02 10:39:59 -04:00
ISSOtm
82702d8149
Point out an ordering dep isn't a success one
2026-07-02 10:39:59 -04:00
ISSOtm
1f9cc9651a
Avoid fetching some repos twice
...
Also enables a nice bit of logic cleanup
2026-07-02 10:39:59 -04:00
ISSOtm
04b9c7fa3d
Move external tests files to tests/external/
2026-07-02 10:39:59 -04:00
ISSOtm
5e8a6cde20
Remove the need to explicitly list external tests
...
I like having a single source of truth!
2026-07-02 10:39:59 -04:00
ISSOtm
d59081a918
Shorten external test prop names slightly
...
Makes the scripts a bit easier to read, I think
2026-07-02 10:39:59 -04:00
Rangi
3941a28661
Remove unused variables
2026-06-30 10:30:31 -04:00