Commit Graph
3604 Commits
Author SHA1 Message Date
Rangi 0af28de791 Fix assertion failure on nonzero base palette ID without an attribute map or palette map
Also fix palette map IDs to wrap at 256, not at 8 like attributes
2026-07-19 23:59:38 -04:00
Rangi 8d2275dc48 Use rpnErrorAt wrapper to ensure setting isError on all RPN errors
Two possible RPN errors were missing `isError = true;`
2026-07-19 23:45:45 -04:00
Rangi 7e11ab4d8f uint16_t tileIdx type matches options.baseTileIDs
Tile IDs wrap at 8 bits, but that's handled by `uint8_t tileID`
2026-07-19 23:33:01 -04:00
Rangi e84bcf83b4 Use Procedure concept to type-check decantOn lambda 2026-07-15 23:27:08 -04:00
Rangi 57c9bab3a5 Addresses are 16-bit in .map files, consistent with .sym files 2026-07-15 22:59:50 -04:00
Rangi 4ada3e85d8 Avoid overflow for very large ROMs (e.g. TPP1) 2026-07-15 22:57:25 -04:00
Rangi ba4a7f2e6a Explicitly assume what was verified earlier by readSection 2026-07-15 22:56:43 -04:00
Rangi b0948566bb Fail-safe treat 16-bit alignment as a fixed address even in RGBLINK
RGBASM does this itself, so should not output sections with 16-bit
alignment, but an invalid object file could otherwise cause
`getPlacement` to infinitely loop.
2026-07-15 22:46:57 -04:00
Rangi 5aa7067876 Comment on how overflow to 0 is explicitly allowed for tile and palette IDs 2026-07-15 22:28:08 -04:00
Rangi dff176791c Correct grammar "is" vs "are" in RGBGFX reverse mode error messages 2026-07-14 11:29:30 -04:00
Rangi 07f5969005 Consistency check the palette map, not just the attribute map 2026-07-14 11:27:41 -04:00
Rangi d61c0561c1 Correct condition to completely print both palettes and options.palSpec 2026-07-14 11:23:03 -04:00
Rangi b13b0c8eb8 Fix the same shifting UB for SDAS objects as for RGBDS ones 2026-07-14 11:13:30 -04:00
Rangi ca2de0f429 Add issue template 2026-07-14 10:34:43 -04:00
Rangi a821badc3e Reorganize the readme
- Use sub-headings to let the reader skim more easily
- Link specifically to the Discord server before less-useful
  "other community channels"
2026-07-14 10:34:43 -04:00
Rangi cb34fe18f7 Use transparent instead of repeating 0x8000 2026-07-14 10:34:27 -04:00
Rangi 1ed22cc518 Mask blue for consistency (avoids transparent bit bugs) 2026-07-14 10:34:27 -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 7e2a3491a5 Encapsulate fseek+ftell idiom in seekSize
This allows a single check for the return value of `seekSize`
to verify all three `fseek`+`ftell`+`fseek` calls.
2026-07-14 01:32:18 -04:00
Rangi e7855ea1b8 Fix reverse mode with -s/--palette-size too small for the tile data 2026-07-14 01:11:11 -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 e4583e7ac2 RGBGFX reverse mode checks for too-low palette IDs, not just too-high 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 8b951bc047 Fix a flaky/random-seed rgbgfx_test test failure
Commit 21eaa2d2cc missed some
intentional unsigned underflow that is needed to set `nbTilesInBank`.
Without it, some of the randomly-seeded RGBGFX tests, such as
`./rgbgfx_test seed8.bin -b 207 -N 54,256`, can fail with "Color
mismatch after round-tripping" errors.
2026-07-13 21:31:05 -04:00
Rangi 59b6b15106 Run make format 2026-07-13 21:30:23 -04:00
Rangi 304cbb464f Factor out verboseDo to encapsulate magenta output color 2026-07-13 18:05:55 -04:00
Rangi ea3a8ee171 Use magenta color for some verbose output which was missing it 2026-07-13 17:47:38 -04:00
Rangi f0419eb183 More guards against invalid object file patch data 2026-07-13 17:47:38 -04:00
Rangi 4a6ea35299 Avoid overflow in counting tiles for unrealistically large images 2026-07-13 17:47:38 -04:00
Rangi 08354cf573 Explicitly encode assumption that an overlapping section exists 2026-07-13 17:47:38 -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 66312f55dd Avoid unsigned overflow/truncation from bad offset values in invalid object files 2026-07-13 13:17:09 -04:00
Rangi 21eaa2d2cc Fix a > to >=, and avoid underflow in some sanity checks 2026-07-13 13:14:06 -04:00
Rangi e9fa1e4e94 Avoid closing stdin/stdout/stderr standard streams 2026-07-13 13:02:46 -04:00
Rangi 8ab6190f96 Fix relative links in Markdown docs 2026-07-11 16:19:27 -04:00
Eldred Habert 22bd8a9bd5 Enable automatic generation of compile_flags.txt for clang-tidy via make tidy (#2008) 2026-07-11 16:11:14 -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 4350a3252d Upgrade FreeBSD testing from 14.3 to 15.1 2026-07-10 23:14:39 -04:00
Rangi a8442bccc7 Group the two dep install commands together in Dockerfile 2026-07-10 23:12:49 -04:00
Rangi 00006a9d00 Use set -u too 2026-07-10 23:12:49 -04:00
Rangi a383bec96e Rename install_deps.sh to install-deps.sh for consistency 2026-07-10 23:12:49 -04:00
Rangi 226031c18b Use #!/usr/bin/env bash, not #!/bin/bash 2026-07-10 23:12:49 -04:00
Rangi 24a896f60a Move CI-only check-diff script to .github/ 2026-07-10 23:12:49 -04:00
Rangi a6f5e3efd1 Move CI-only check-format script to .github/ 2026-07-10 23:12:49 -04:00
Rangi c02b234bb1 Add CI job to check syntax of contrib scripts
Note that `zsh` is not installed in `ubuntu-slim` by default.
2026-07-10 23:12:49 -04:00