Commit Graph
1032 Commits
Author SHA1 Message Date
Rangi ffa32a94e8 Implement -c embedded:multiple (#2194) 2026-10-03 19:26:02 +02:00
Rangi c592d665a8 Allow negative from-the-end starting indexes in INCBIN (#2181) 2026-09-28 20:43:14 -04:00
Rangi ad4e399018 Merge branch 'master' into features-1.1.0 2026-09-27 20:49:36 -04:00
Rangi 165b79546c Add RGBASM -Winclude-shadow warning (#2180) 2026-09-27 20:49:21 -04:00
Rangi 380c22f343 Add RGBLINK truncation warnings for add sp, e8 and ld hl, sp + e8 (#2179) 2026-09-27 20:08:26 -04:00
Rangi ba4e58f4e0 Add -Wsingle-union warning for UNION without NEXTU (#2170) 2026-09-27 20:02:42 -04:00
Rangi 62a9d8d518 Add __CYCLES__ variable to count cycles used by instructions (#2171) 2026-09-27 19:59:32 -04:00
Rangi 1d4c741975 Test division and modulo at link time as well as asm time 2026-09-27 14:01:36 -04:00
Rangi 093024c534 Verify that successful RGBLINK runs have no stderr output 2026-09-27 13:50:49 -04:00
Rangi 32a9d3a01b Consistently compare outputs for RGBGFX tests even when .err exists (#2177) 2026-09-27 13:21:06 -04:00
Rangi ac7d7edf4d Consistently compare .out.bin test results for RGBLINK tests (#2176)
Tests with variant flags or linker scripts were not checking ROM output
2026-09-27 13:02:37 -04:00
Rangi 721df27ae1 Use Bash array for run-tests.sh args to make (#2175) 2026-09-27 12:08:32 -04:00
Rangi e06140be46 Actually use -C for reverse_curve test now that #2110 supports it 2026-09-27 11:51:58 -04:00
Rangi 877ce79a39 Remove non-functioning and unused --installed-rgbds flag from run-tests.sh (#2174) 2026-09-27 11:51:24 -04:00
Rangi 74ee2b217f Fix RGBFIX test harness's special tests (#2173) 2026-09-27 11:37:31 -04:00
Rangi 6df932c010 Fix rgbgfx_test.cpp 8-to-5 bit color conversion (#2172) 2026-09-27 09:16:07 -04:00
Rangi 321ad497fa Fix RGBFIX --output with a pre-existing or same-as-input file (#2145) 2026-09-27 01:31:53 +02:00
Rangi 6e2e2f1db7 Add %A/%a uppercase/lowercase string format specifiers (#2165) 2026-09-26 19:30:05 -04:00
Rangi ed02991af9 Make STRCMP and STRICMP tests more precise 2026-09-26 18:31:53 -04:00
Rangi 6edf41e83f Allow RSSET to take a negative value (#2167) 2026-09-26 18:24:39 -04:00
Rangi cf897aa065 Add STRICMP case-insensitive string compare function (#2164) 2026-09-27 00:19:10 +02:00
Rangi d95e9260e4 Add POPCOUNT function (#2166) 2026-09-27 00:17:31 +02:00
Rangi ff6f1699e9 Merge branch 'master' into features-1.1.0 2026-09-26 16:47:44 -04:00
RangiandEldred Habert f1e530ac39 Make the comma after assert warn/fail/fatal optional (#2160)
Co-authored-by: Eldred Habert <[email protected]>
2026-09-26 19:55:35 +02:00
Rangi fdd819d0ea Fix typo ("implict" -> "implicit") 2026-09-26 19:20:18 +02:00
Rangi fd7715dcb0 Fix inconsistent handling of transparent colors in the middle of palettes 2026-09-26 19:20:18 +02:00
Rangi e6e5133bcf RGBGFX honors -c/--colors in -r/--reverse mode (#2144)
f4463b17 (#1254) was an incomplete fix for #1166
2026-09-26 19:13:34 +02:00
Rangi e8422c1c88 Implement compound assignment operators **= and >>>= (#2158) 2026-09-26 19:10:39 +02:00
Rangi e0ee6c9013 Allow STARTOF(SECTTYPE) and SIZEOF(SECTTYPE) to be constant when possible (#2131) 2026-09-26 19:08:28 +02:00
Rangi 548a11c3ef Add STRSTARTS and STRENDS functions (#2159) 2026-09-26 19:04:14 +02:00
Rangi 03c71ced93 Fix FLOATING in linker scripts conflicting with section constraints (#2148) 2026-09-26 07:54:48 -04:00
ISSOtm 6a08e809b5 Mark an asm test as failed if linking fails 2026-09-25 13:48:10 -04:00
Rangi 646cb05faf Fix BANK(@) discrepancy within LOAD blocks (#2149)
RGBASM and RGBLINK disagreed on which section to consider `@` to be in;
we have decided that the latter is correct.

The `assume` change is known to be suspicious; for more discussion, see
https://github.com/gbdev/rgbds/pull/2149#discussion_r4106902830
2026-09-25 19:18:52 +02:00
Rangi42 dc701294f8 Add an additional check to the jr-@ test (ported from rsgbds) 2026-09-25 12:59:00 -04:00
Rangi 6e5d7a9823 Correct the ROM hash for gb-starter-kit
I hadn't set the right `SOURCE_DATE_EPOCH`...
2026-09-22 12:33:10 -04:00
Rangi 4d5b38ebfe Update external test commits 2026-09-22 12:29:08 -04:00
Rangi eca8c1f3e7 Do not deprecate implicit transparent color 0 2026-09-22 12:03:33 -04:00
Eldred Habert 63a06f02c3 Fix constrained empty sections escaping their regions (#2137) 2026-09-21 15:54:10 -04:00
Rangi42 c8b05a6a46 Use += in Bash shell script 2026-09-21 13:27:03 -04:00
RangiandEldred Habert 04bbe80ae0 Some shell script style improvements (#2087)
* Escape special characters in filenames when comparing gfx .err output
* Use `if` instead of `&&`
* Use `case` instead of `if` disjunction

---------

Co-authored-by: Eldred Habert <[email protected]>
2026-09-21 10:15:40 -04:00
Rangi a2dd318f1d Remove executable status from non-script files (git update-index --chmod=-x) 2026-09-20 19:46:40 -04:00
Rangi ace8db1b73 Fix RGBGFX -t/--trim-end combined with -B/--background-color for non-deduplicated output (#2130) 2026-09-20 15:05:06 -04:00
Rangi b80bbe0fe6 Correct documentation for rgbgfx -x re: interaction with -N (#2126) 2026-09-19 14:40:02 -04:00
Rangi c151450d9f Fix underflowing SECTION FRAGMENT fixed address in RGBLINK (#2122) 2026-09-18 22:00:27 -04:00
Rangi 76bba2809b Fix incorrect EMPTY space in .map files (#2119) 2026-09-19 03:17:15 +02:00
Rangi 142eae4558 Fix repeated "And N more" in overlay error message (#2118) 2026-09-18 17:35:30 -04:00
Rangi 89403ca23b Fix RGBGFX to support -C/--color-curve in -r/--reverse mode (#2110)
Clarifies error message when RGBGFX reverse mode has `-c` mismatching `-p`.
2026-09-18 17:35:22 -04:00
ISSOtm 0e41ace1e3 Refactor section placement algorithm
Massively simplified, by not trying to shoehorn differently-behaving
cases into the same one loop!

This may have introduced bugs (the test suite has caught three different
oversights, two of which via external projects, in fact!), but this also
makes the logic clearer and more streamlined, so that we are also less
likely to have any latent or future bugs.

In particular, previously, the first iteration of the loop could attempt
placement at an address not matching the section's constraints,
which made advancing to the next target address unnecessarily complicated
(https://github.com/gbdev/rgbds/pull/2064#discussion_r3985466596),
among other weirdness. The code ended up being defensive, and thus the
overall logic was murky.

I'm also expecting that this should provide a performance improvement due
to being essentially a form of loop-invariant code motion (and very likely
one a compiler couldn't have performed automatically), though I haven't
measured.
2026-09-18 21:19:37 +02:00
ISSOtm c49828f7c9 Fix memory region alignment checks
Turns out the checks could fail spuriously if the starting alignment is non-zero,
e.g. `align 8,$C0` in HRAM. (Fixes #2113.)
This was tripped up by a test added to exercise the linker's section placement algorithm
on a similar aligment-related issue. :D

Note that this may be caused by the code in question pre-dating alignment offsets,
and we never checked. That said, these checks only work due to the regions' starting
addresses being no more aligned than their size (..if that makes sense?), so allowing
custom memory regions (#524) could violate that assumption and make those checks incorrect.
2026-09-18 21:19:37 +02:00
ISSOtm 5b9903f358 Mark a link test as failed if assembling fails
Assembling is never *supposed* to fail, but in this case I ended up adding
a test case that triggered a bug in the assembler, and that caused the rest
of the test to become garbled. This is thus more robust.
2026-09-18 21:19:37 +02:00