Commit Graph
3758 Commits
Author SHA1 Message Date
Rangi42 f37e289fde Fix off-by-one error in transparent palette count 2026-09-27 09:07:33 -04:00
Rangi42 dc585eb302 Bump the Ubuntu runner for creating release artifacts from 22.04 to 24.04
Follow-up to #2168
2026-09-26 22:46:39 -04:00
Rangi fcd4031034 Combine sect_BinaryFile and sect_BinaryFileSlice (#2169) 2026-09-26 22:05:39 -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
Eldred Habert f5f503c7b1 Bump our Ubuntu runners (#2168)
chore: No supported no moar :((
2026-09-27 01:27:41 +02:00
RangiandISSOtm b732f59472 Improve handling of platform-specific build options (#2162)
* Opt into POSIX functions with `_POSIX_C_SOURCE` before any system
  headers are `#include`d
* Allow user to override `make develop`'s `WARNFLAGS` and `CXXFLAGS`
* Use `make develop` on 32-bit Cygwin with sanitizers disabled
* Do not unnecessarily redefine `fseek` and `ftell`
* Disable a false-positive `-Wno-null-dereference` on 32-bit Cygwin

Co-authored-by: ISSOtm <[email protected]>
2026-09-26 16:31:25 -04:00
Rangi 43bdeb873e Consistently use * for Markdown italic emphasis, not _ 2026-09-26 14:59:43 -04:00
RangiandEldred Habert c2d1bcefc8 Link to the GBDev AI policy from CONTRIBUTING.md (#2157)
Co-authored-by: Eldred Habert <[email protected]>
2026-09-26 19:40:24 +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 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
ISSOtm f7b8207322 Release v1.0.4 v1.0.4 2026-09-22 12:47:35 -04:00
Rangi 33ef57ea49 Mention a sed command for updating the man page dates 2026-09-22 12:35:31 -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
Rangi bc1ed831ec Remove leftover .asm file 2026-09-21 21:41:00 -04:00
ISSOtm 4eba73d7b2 Enable -Werror in all release build processes
Since we build in a different configuration, it's plausible that some
warnings would only surface in Release (optimised) builds.
That should be an immediate blocker, so let's make it fail loudly.
2026-09-21 20:36:33 -04:00
ISSOtm 970342f564 Avoid double-zipping all release artifacts
Follow-up to 306a83a4, actually fixing the release script (oops!)
but also propagating the change to other release artifacts,
since unlike the regression testing workflows, we make the archives ourselves.
2026-09-21 20:36:32 -04:00
ISSOtm c43b123183 Add a reminder to read the release process doc 2026-09-21 19:36:02 -04:00
Eldred Habert 306a83a4b4 Avoid double-zipping the binaries
https://github.blog/changelog/2026-02-26-github-actions-now-supports-uploading-and-downloading-non-zipped-artifacts/
2026-09-21 18:34:50 -04:00
Rangi 6da3c3c38d Only include binaries in CPack zip, not man pages 2026-09-21 18:34:50 -04:00
Eldred Habert 629074bc28 Omit build commands from auto-generated install.sh (#2138)
Fixes #2045
2026-09-21 16:04:08 -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
Rangi 2882424407 Cancel in-progress CI jobs when a newer commit supersedes them (#2136) 2026-09-21 19:21:28 +02: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 84c1671cb3 Correct documentation about when SIZEOF and STARTOF are constant 2026-09-21 15:47:25 +02: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 408e861ecc Correct warning message about different RGBGFX -L and -r widths 2026-09-20 14:32:04 -04:00
ISSOtm e1ed304e6b Apply the same enabling logic for UBSan as for ASan 2026-09-19 23:30:35 +02:00
ISSOtm bb0fc08980 Enable our default ASan flags on macOS
Except for the leak detection (Clang complains it's not supported there),
for which I have corrected the comment and its location.
2026-09-19 23:30:35 +02:00
Rangi b7f6c641f1 Define more debug options for make develop (#2124) 2026-09-19 22:07:10 +02: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
Eldred Habert 44328d522b Avoid using snprintf where GCC can check sizes (#2121)
Interestingly, Clang's `-Wformat-overflow` seems to only warn
about buffers so small they will *always* underflow,
whereas GCC tries to infer whether they can overflow *at all*.
(I'm guessing they lean towards false-negatives and false-positives resp.)

Anyway, calling `sprintf` here remains safe, since GCC (notably, via CI)
checks our work, and it simplifies the code ever so slightly while
also providing an (admittedly negligible) performance improvement.

Note that there may be more locations where we could use `sprintf`,
but a cursory glance at our other uses of `snprintf` didn't seem fruitful.
(One way to test is to set the target buffer size to 1, and see if a
warning pops up for such a trivially-wrong size. If not, you can be certain
the compiler won't be able to help you with a more realistic size.)
2026-09-19 03:15:07 +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
Eldred Habert 0286d4119e Check out less of the repo for contrib verification
Shorter checkout time = good, I think.
2026-09-18 21:45:35 +02:00
Eldred Habert c803a20259 Only check contrib scripts when one of them changes
Less unnecessary CI!
2026-09-18 21:39:30 +02:00
ISSOtm aab22852d3 Factor out free space manipulation 2026-09-18 21:19:37 +02: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 ce5c8ce8ac Respect zero-size sections' align offsets
Fixes #2095

This code pre-dates the introduction of alignment offsets,
so it was never updated to take it into account.

That said, some of the code that I have factored out is a little awkward because
it will be used in an upcoming refactoring of the whole assignment loop,
since that turns out to be more byzantine than it ought to be due to
trying to handle a too disparate set of cases in a single loop.
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