Commit Graph
3683 Commits
Author SHA1 Message Date
Rangi b0f49a36b7 Fix -t/--tiny for ROMX in bank 1, and -w/--wramx for WRAMX in bank 1 (#2089) 2026-09-14 15:53:45 -04:00
Rangi ed1ac7309b Fix overflow with high fixed-point magnitudes 2026-09-14 14:27:16 -04:00
Rangi d082f24a2d Fix rounding of fixed-point constants where fractional digits should carry into integer part (#2088) 2026-09-14 13:52:39 -04:00
Rangi 7746ddbf2b Fix reverse-graphics check for whether the tilemap references too-high tile IDs in bank 1 (#2086) 2026-09-14 10:26:57 -04:00
Eldred Habert 0fe43bf0cb Use CMake-native methods to do our static-build macOS trickery (#2083)
This should remain equivalent for our current setups,
but play nicer with anyone wanting to experiment further.

It *may* break for someone building on an Intel Mac,
but this is a libpng limitation and thus out of our control.
2026-09-14 09:55:34 -04:00
Eldred Habert c8e8a2f522 Avoid duplicating warning flags when linking with the Makefile (#2085)
The warning flag list with `make develop` is quite long,
and this duplication is making those command lines particularly indigestible.
2026-09-13 20:35:54 -04:00
Eldred Habert de1e1ff688 Actually silence -Wformat et al. on MinGW (#2084)
Thus far, we have just ensured they wouldn't fail the build,
but they still pollute the build log, so we should silence them entirely.
2026-09-13 20:25:13 -04:00
Rangi f8a1da71c1 Only sort generated palette colors by PLTE order for indexed PNG images
Non-indexed images can still have a PLTE chunk. We should use
`sortRgb` instead of `sortIndexed` for them, since their pixels' colors
may not all be present in the PLTE chunk and would be unsortable.
2026-09-13 18:53:31 -04:00
Rangi 49b3f566b1 Fix handling of PNG files with RGB or RGBA color type that have a PLTE chunk 2026-09-13 16:09:49 -04:00
Rangi 82f58b95ac Fix reversing some images with an input tileset (#2081) 2026-09-13 21:00:58 +02:00
RangiandEldred Habert e9fc7b3135 Warn when tile or palette IDs cannot fit in the tilemap or attrmap respectively (#2077)
Co-authored-by: Eldred Habert <[email protected]>
2026-09-13 19:18:24 +02:00
Rangi 47bbd30f2c Fix a failing assertion when two sections have the same name (#2079) 2026-09-12 17:58:37 -04:00
Rangi 520cc2a80d Fix reversing a tilemapped image with -x trimmed tiles 2026-09-12 15:38:34 -04:00
Rangi a703b8c704 Ignore .pdb files (generated by CMake on Windows) 2026-09-12 14:49:17 -04:00
Rangi e9c800b3be Fix reversing 1bpp images
Fixes #2075
2026-09-12 14:17:33 -04:00
Rangi 8a7019e1f8 Only register colors inside the -L/--slice region, including transparent color
Fixes #2074
2026-09-12 12:52:35 -04:00
Rangi 439a7a1828 Fix reversing multiple palettes with fewer than 4 colors per palette
Fixes #2073
2026-09-12 11:50:47 -04:00
Rangi 438b943a1a Make background tile IDs consistent whether or not deduplication is enabled
Fixes #2072
2026-09-11 20:45:52 -04:00
Erickson Munoz 5a2927778f Remove extra parentheses in man page comment (#2066) 2026-09-11 20:40:06 -04:00
RangiandISSOtm 9e785495ff Fix crash when a background tile first occurs after both tile banks are full (#2070)
Co-authored-by: ISSOtm <[email protected]>
2026-09-12 01:04:31 +02:00
ISSOtm 9d69a08909 Determine the number of fetch/clone jobs ourselves
Apparently our CI has some versions of Git too old to support zero to mean that.
2026-09-11 16:31:19 -04:00
ISSOtm 970bb84450 Fix updating ext-test repos from existing copies
The current setup fails with a "cannot read tree" error.

Also added flags to parallelise each fetch, which is relevant when submodules
are involved. (So, pretty much just starter-kit, haha.)
It would be nice to also parallelise the various fetches, but that would hit
the same remote multiple times, and could lead to rate-limiting...
2026-09-11 16:17:26 -04:00
Rangi a662cad7ce Fix infinite loop when an aligned HRAM section cannot be placed (#2064) 2026-09-11 05:21:26 +02:00
Rangi e85375f3e1 Avoid truncation warning from sp instruction test 2026-09-10 19:09:15 -04:00
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 3112239174 Fix contrib/view_palettes.sh to allow output to stdout with - 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 db9509fba0 Describe rlc/rrc/rlca/rrca" as capitalized "Rotate Left/Right Circularly" 2026-09-07 19:19:29 +02:00
Rangi 7d0cb000e8 Specify COLUMNS in test scripts for consistent output 2026-09-06 00:07:16 +02:00
ISSOtm a0ab1802ff Avoid fetching external repos on 32-bit Cygwin
The comment says we aren't doing this, but we are
2026-09-03 13:39:24 +02:00
ISSOtm bf3ab7cb18 Explicitly specify the Python version to be installed
Turns out `python3-imaging` only redirects to Python 3.**6**'s version,
not the latest like the metapackage does.
2026-09-03 13:39:24 +02:00
Rangi 8988cdde46 Fix reversing images with fewer than 4 colors per palette 2026-09-03 13:39:24 +02:00
Rangi b36028d1d1 Avoid unsigned overflow in INCBIN slice size check 2026-08-25 15:47:27 -04:00
Rangi 760cc4d464 Use PRIu8 for uint8_t 2026-08-25 15:06:31 -04:00
Rangi cebf57630a Prevent creation of a dangling reference to a temporary rvalue 2026-08-25 15:04:28 -04:00
Rangi eb2b7c1842 A 1GB ROM does not have "more than 65536 banks" 2026-08-25 15:02:44 -04: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 ed0a2d1075 Fix infinite loop when a symbol name in an invalid object file starts with an invalid UTF-8 byte like 0xC0 2026-08-22 18:06:32 -04:00
Rangi 71d9e236bc Document multiple -v options in the rgbasm and rgblink man pages, same as rgbgfx 2026-08-19 09:21:05 -04:00
ISSOtm d9003f633a Allow the CMake user to provide their own version string
This will be useful for downstream packagers, as well as rgbds-live
2026-08-15 20:25:35 +02:00
ISSOtm cda77721d4 Avoid assuming that RGBDS is the root CMakeLists
This breaks rgbds-live building us as a subproject, for example
2026-08-15 20:05:17 +02:00