DEV Community

Nivando Soares
Nivando Soares

Posted on

Adding a Zelda3-style compare lane to the TD2 port

Adding a Zelda3-style compare lane to the TD2 port

The SDL port now has its first built-in compare/reporting path instead of relying only on ad hoc external frame diffs.

This checkpoint adds --compare to the native runtime. For a promoted design-pack fixture, the binary now emits:

  • the native runtime frame
  • the trusted main_visible.ppm golden
  • an absolute RGB diff map
  • a runtime | golden | diff strip
  • a JSON summary with mismatch, ratio, max channel delta, mean absolute error, and RMSE

The current cheap validation surface is now:

make -C port test
Enter fullscreen mode Exit fullscreen mode

That covers both:

  • exact frame parity on the promoted fixtures
  • compare-bundle generation on the same fixtures

The promoted compare fixtures are still exact:

  • frame 300: 0 mismatched pixels
  • frame 1086: 0 mismatched pixels

The immediate value is not the pretty strip by itself. The important part is that the runtime now has a built-in place where callback/state drift can be reported once the callback execution spine is promoted into C.

I also added a repo-local push wrapper:

./tools/push_checkpoint.sh
Enter fullscreen mode Exit fullscreen mode

It pushes the current checkpoint, rebuilds the curated docs wiki, and auto-commits the wiki refresh only when that would not sweep unrelated dirty worktree changes into the follow-up commit.

Next gate: feed validated callback/state contracts into this compare spine so later intro windows can fail on semantic drift, not just pixel drift.

Top comments (0)