Rangi
c459913f87
Guard against invalid alignment offsets in corrupt object files
2026-11-24 20:54:46 -05:00
Rangi
18a6f8b12e
Unify RGBASM and RGBLINK fstack node backtrace printing methods into one generic function ( #2253 )
...
Remove now-trivial `printBacktrace` methods; just call `trace_PrintFstackNodeBacktrace` directly.
2026-11-24 12:52:38 -05:00
Rangi
edfb9c15d5
Replace platform-specific ctz/clz definitions with C++20 <bit> functions
2026-11-24 17:57:23 +01:00
Rangi
a6a70bb7e6
Format code with clang-format 21 ( #2247 )
...
Use `ubuntu-latest` not `ubuntu-slim` for check-format.yml;
`ubuntu-slim` is still Ubuntu 24.04 with clang-format 18.
2026-11-20 23:58:53 -05:00
Rangi
4c29408a80
Fix incorrect bank for first unoptimized tile with no tiles in bank 0 ( #2244 )
2026-11-18 16:24:07 -05:00
Rangi
965c298289
Escape Make special characters other than dollar signs
2026-11-15 01:58:18 +01:00
Rangi
f18bdc37db
Escape Make characters in -M dependency filenames, not just -MQ target filenames
2026-11-15 01:58:18 +01:00
Rangi
bec11bcaa7
Validate section patch sizes in case object files are invalid ( #2242 )
2026-11-15 01:50:34 +01:00
Rangi
926d6d81ce
Fix -B/--background with -c/--color dmg ( #2237 )
...
The background color should not count towards the used DMG colors
2026-11-06 18:13:08 -05:00
Eldred Habert
6466c167d6
Point out offsets when merging fragments bails ( #2232 )
2026-11-06 17:46:16 -05:00
Rangi
6054102f9e
Raise the effective limit of rgbgfx --nb-tiles ( #2235 )
2026-10-30 23:42:00 +01:00
Rangi
27a0a6bc2a
Use named constants for meaningful numbers in RGBGFX ( #2233 )
2026-10-29 00:19:33 +01:00
Rangi
65d730336f
Factor out shared alignment sanity checks for linker scripts
2026-10-22 15:56:47 -04:00
Rangi
1e9e2ad5fa
Fix reversing an image with an empty -c/--colors spec file ( #2228 )
2026-10-22 15:30:43 -04:00
Rangi
b99069e25d
Fix reversing an image with an empty -p/--palette file ( #2227 )
2026-10-22 14:41:11 -04:00
Rangi
44b55dce69
Fix parsing of SDCC .rel objects' "b_" magic bank symbols ( #2226 )
...
This was a regression from 48b2e94aa3
swapping where `+ 1` applies when converting `strcmp` to `ends_with`.
2026-10-22 13:42:09 -04:00
Rangi
ada6be082e
Add error check for empty OPT string
2026-10-21 17:25:21 -04:00
Rangi
129b4dabee
Fix an off-by-one overflow bug in SDCC object parsing ( #2222 )
2026-10-21 15:59:00 -04:00
Rangi
85f96d671f
Allow empty one-past-the-end sections ( #2221 )
2026-10-21 15:58:30 -04:00
Rangi
72c9171216
Output UINT16_MAX for unused grayscale palette slots ( #2219 )
2026-10-21 10:01:41 -04:00
Rangi
4864f37662
Do not allow -c embedded for non-indexed PNGs even with PLTE chunks
2026-10-20 11:17:26 -04:00
ISSOtm
d766efe95d
Use a vector for emitting section patches
...
Turns out this makes errors be emitted in source order,
which is far more intuitive and pleasant-looking!
2026-10-17 14:39:51 -04:00
ISSOtm
6883dd903e
Omit a type name where possible
...
This also allows omitting a header
(though it gets included implicitly by `<queue>` instead,
but that's fine).
This also makes our code slightly more amenable to change,
of course.
2026-10-17 14:15:54 -04:00
Rangi
170b341315
Refactor unassignedSections into a flat list sorted by constraints ( #2218 )
...
Also removes the now-redundant `nbSectionsToAssign` counter
2026-10-17 14:12:58 -04:00
Rangi
d1fb662501
Fix rgbgfx -c/--colors to read GBC palettes with less than 4 colors ( #2216 )
2026-10-16 01:47:23 +02:00
Rangi
451cf69f7d
Fix a typo
2026-10-15 10:21:42 -04:00
Rangi
c5fe5f0762
Use else if in checkNBit for symmetry with checkPatchSize
2026-10-15 10:21:27 -04:00
Rangi
292f39deb3
Ensure that STRCMP is either -1, 0, or 1
2026-10-15 10:20:24 -04:00
Rangi
586bd2eec8
Non-constant expressions do not fail a static_assert ( #2215 )
2026-10-14 19:24:47 -04:00
Eldred Habert
d663ab59e4
Enable more sanitizers ( #2154 )
2026-10-14 18:00:14 -04:00
ISSOtm
6818759a8c
Tiny refactor
2026-10-11 18:56:32 +02:00
Rangi
6df6868f0d
Check assert message requirement whether or not they are deferred
2026-10-10 22:36:19 -04:00
ISSOtm
82ee97b088
Check for builtin symbols directly, and document why
2026-10-11 03:44:39 +02:00
ISSOtm
bf894bce6f
Encapsulate Symbol and Section ID checks into isReferenced methods
2026-10-11 03:44:39 +02:00
Rangi
af192a95b1
Do not output unreferenced unexported symbols in object files
2026-10-11 03:44:39 +02:00
Rangi
9d6dab13d8
Sort linked sections by alignment before size ( #2201 )
...
Note that Libbet has no canonical hash and is sensitive to floating section placement
2026-10-11 03:40:15 +02:00
Rangi
d73a05aa78
Fix backtraces for REPT nodes with quiet non-REPT ancestors ( #2196 )
2026-10-03 22:16:58 +02:00
Rangi
9095c5b320
Do not reuse Patch struct for outputting assertions ( #2184 )
2026-10-03 19:24:49 +02:00
Rangi
6c76606839
Remove unused RawTiles class
...
This has been left over ever since its introduction in 8c62e80c1 (#981 ).
2026-10-02 10:28:27 -04:00
Rangi
c0a16e4bad
Move File-opening of PNG image into Png constructor ( #2161 )
...
Also rename `File::c_str` to `display_name` for clarity
2026-09-27 13:19:05 -04:00
Rangi42
f37e289fde
Fix off-by-one error in transparent palette count
2026-09-27 09:07:33 -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
Rangi and ISSOtm
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
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
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
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