1
0
Fork 0
mirror of https://github.com/imjasonh/nescript synced 2026-07-08 00:45:38 +00:00
nescript/tests/emulator/goldens
Claude 615490fbe5
platformer: stabilise sprite-0 HUD by splitting below the HUD row
The previous commit parked the sprite-0 hit anchor on top of
the visible HUD coin at NT col 2, row 1 — the hit therefore
fired at dot 19 of scanline 15 (the HUD's last scanline) and
jsnes's PPU model applied the scroll change to the rest of that
same scanline, smearing the bottom row of every HUD glyph as
`camera_x` drifted. The score "0"/"2" digit, the heart, and
the lives "3" each flickered a handful of different pixel
patterns per frame as the scroll shifted. An in-harness
check for unique HUD states across the 180-frame window saw
~20-40 distinct states.

Fix: move both anchors off the HUD row entirely.

- `TILE_SPRITE0_ANCHOR` still has its single opaque pixel at
  row 7, col 3, but now draws at OAM `(248, 8)` so the pixel
  lands at screen `(251, 16)` — the first scanline of the
  playfield.
- New `TILE_BG_ANCHOR` (tile 28) mirrors it with a single opaque
  pixel at row 0, col 3; the map pre-paints it at NT `(col 31,
  row 2)` via the new `a` legend entry. Its one opaque pixel
  lands at the same `(251, 16)`, so the PPU's sprite-0 hit
  fires there instead.
- An explicit `scroll(0, 0)` right before `sprite_0_split`
  defensively re-latches scroll to zero in case jsnes has
  carried stale `$2005` state over from the previous frame.

With the hit on scanline 16, `$2005` writes in HBLANK of
scanline 16 (or thereabouts) only affect scanline 17 onward;
rows 8-15 all render at scroll=0 and the HUD glyphs stay
pixel-stable. The unique-state count across the 180-frame
harness drops from ~40 to 4 — and those 4 correspond to the
legitimate score / lives transitions (initial title, post-
stomp-1, post-stomp-2, etc.), not per-frame jitter.

Column 31 and OAM x=248 both sit inside jsnes's right-edge
overscan so the anchor pixels are invisible in the committed
golden. Goldens + gif refreshed.
2026-04-20 17:54:55 +00:00
..
arrays_and_functions.audio.hash
arrays_and_functions.png compiler: fix three scoping bugs; war: revert all local/param workarounds 2026-04-15 20:33:41 +00:00
audio_demo.audio.hash peephole: step past non-A ops in remove_dead_loads 2026-04-19 01:43:58 +00:00
audio_demo.png
auto_chr_background.audio.hash assets: auto-generate CHR data from @nametable() PNG sources 2026-04-15 03:29:58 +00:00
auto_chr_background.png assets: auto-generate CHR data from @nametable() PNG sources 2026-04-15 03:29:58 +00:00
auto_sprite_flicker.audio.hash compiler: GNROM / debug port / sprite flicker / fade / sprite-0 split + docs 2026-04-18 19:31:55 +00:00
auto_sprite_flicker.png compiler: GNROM / debug port / sprite flicker / fade / sprite-0 split + docs 2026-04-18 19:31:55 +00:00
axrom_simple.audio.hash compiler: PRNG / edge input / palette fade / AxROM / CNROM / FCEUX labels 2026-04-18 18:13:18 +00:00
axrom_simple.png compiler: PRNG / edge input / palette fade / AxROM / CNROM / FCEUX labels 2026-04-18 18:13:18 +00:00
bitwise_ops.audio.hash
bitwise_ops.png
bouncing_ball.audio.hash
bouncing_ball.png
cnrom_simple.audio.hash compiler: PRNG / edge input / palette fade / AxROM / CNROM / FCEUX labels 2026-04-18 18:13:18 +00:00
cnrom_simple.png compiler: PRNG / edge input / palette fade / AxROM / CNROM / FCEUX labels 2026-04-18 18:13:18 +00:00
coin_cavern.audio.hash
coin_cavern.png
comparisons.audio.hash
comparisons.png codegen: emit gate markers at end of generate() to protect peephole 2026-04-16 21:31:47 +00:00
edge_input_demo.audio.hash compiler: PRNG / edge input / palette fade / AxROM / CNROM / FCEUX labels 2026-04-18 18:13:18 +00:00
edge_input_demo.png compiler: PRNG / edge input / palette fade / AxROM / CNROM / FCEUX labels 2026-04-18 18:13:18 +00:00
fade_demo.audio.hash compiler: GNROM / debug port / sprite flicker / fade / sprite-0 split + docs 2026-04-18 19:31:55 +00:00
fade_demo.png compiler: GNROM / debug port / sprite flicker / fade / sprite-0 split + docs 2026-04-18 19:31:55 +00:00
feature_canary.audio.hash examples: add feature_canary that turns red on any memory silent-drop regression 2026-04-18 00:14:40 +00:00
feature_canary.png examples: add feature_canary that turns red on any memory silent-drop regression 2026-04-18 00:14:40 +00:00
friendly_assets.audio.hash peephole: step past non-A ops in remove_dead_loads 2026-04-19 01:43:58 +00:00
friendly_assets.png
function_chain.audio.hash
function_chain.png
gnrom_simple.audio.hash compiler: GNROM / debug port / sprite flicker / fade / sprite-0 split + docs 2026-04-18 19:31:55 +00:00
gnrom_simple.png compiler: GNROM / debug port / sprite flicker / fade / sprite-0 split + docs 2026-04-18 19:31:55 +00:00
hello_sprite.audio.hash
hello_sprite.png
hud_demo.audio.hash docs + example: HUD demo and language-guide VRAM buffer section 2026-04-18 21:34:44 +00:00
hud_demo.png runtime: reset PPU scroll after VRAM buffer drain 2026-04-18 22:57:46 +00:00
i16_demo.audio.hash compiler: i16 / SRAM saves / inline-asm dot labels / docs 2026-04-18 20:49:06 +00:00
i16_demo.png compiler: i16 / SRAM saves / inline-asm dot labels / docs 2026-04-18 20:49:06 +00:00
inline_asm_demo.audio.hash
inline_asm_demo.png codegen: reuse analyzer's local allocations so inline asm {param} works 2026-04-16 16:03:10 +00:00
logic_ops.audio.hash
logic_ops.png
loop_break_continue.audio.hash
loop_break_continue.png
match_demo.audio.hash
match_demo.png
metasprite_demo.audio.hash
metasprite_demo.png
metatiles_demo.audio.hash metatiles + collision: metatileset, room, paint_room, collides_at 2026-04-19 01:28:17 +00:00
metatiles_demo.png metatiles + collision: metatileset, room, paint_room, collides_at 2026-04-19 01:28:17 +00:00
mmc1_banked.audio.hash
mmc1_banked.png
mmc3_per_state_split.audio.hash
mmc3_per_state_split.png
nested_structs.audio.hash
nested_structs.png
noise_triangle_sfx.audio.hash peephole: step past non-A ops in remove_dead_loads 2026-04-19 01:43:58 +00:00
noise_triangle_sfx.png
palette_and_background.audio.hash
palette_and_background.png codegen: emit gate markers at end of generate() to protect peephole 2026-04-16 21:31:47 +00:00
palette_brightness_demo.audio.hash compiler: PRNG / edge input / palette fade / AxROM / CNROM / FCEUX labels 2026-04-18 18:13:18 +00:00
palette_brightness_demo.png compiler: PRNG / edge input / palette fade / AxROM / CNROM / FCEUX labels 2026-04-18 18:13:18 +00:00
platformer.audio.hash platformer: stabilise sprite-0 HUD by splitting below the HUD row 2026-04-20 17:54:55 +00:00
platformer.png platformer: stabilise sprite-0 HUD by splitting below the HUD row 2026-04-20 17:54:55 +00:00
pong.audio.hash peephole: step past non-A ops in remove_dead_loads 2026-04-19 01:43:58 +00:00
pong.png codegen: fuse compare-then-branch to drop boolean materialization 2026-04-16 17:10:02 +00:00
prng_demo.audio.hash compiler: PRNG / edge input / palette fade / AxROM / CNROM / FCEUX labels 2026-04-18 18:13:18 +00:00
prng_demo.png review: tighten PRNG / void-intrinsic / FCEUX path handling 2026-04-18 18:48:55 +00:00
scanline_split.audio.hash
scanline_split.png
sfx_pitch_envelope.audio.hash codegen: emit gate markers at end of generate() to protect peephole 2026-04-16 21:31:47 +00:00
sfx_pitch_envelope.png linker: skip default palette + rendering enable for non-visual ROMs 2026-04-16 21:15:08 +00:00
sha256.audio.hash examples/sha256: interactive SHA-256 hasher with on-screen keyboard 2026-04-16 14:02:58 +00:00
sha256.png examples/sha256: interactive SHA-256 hasher with on-screen keyboard 2026-04-16 14:02:58 +00:00
signed_compare.audio.hash ir/codegen: signed comparison lowering for i8/i16 2026-04-19 00:17:34 +00:00
signed_compare.png ir/codegen: signed comparison lowering for i8/i16 2026-04-19 00:17:34 +00:00
sprite_0_split_demo.audio.hash compiler: GNROM / debug port / sprite flicker / fade / sprite-0 split + docs 2026-04-18 19:31:55 +00:00
sprite_0_split_demo.png compiler: GNROM / debug port / sprite flicker / fade / sprite-0 split + docs 2026-04-18 19:31:55 +00:00
sprite_flicker_demo.audio.hash sprite-per-scanline: add cycle_sprites runtime flicker + debug telemetry 2026-04-15 22:07:19 +00:00
sprite_flicker_demo.png sprite-per-scanline: add cycle_sprites runtime flicker + debug telemetry 2026-04-15 22:07:19 +00:00
sprites_and_palettes.audio.hash
sprites_and_palettes.png
sram_demo.audio.hash compiler: i16 / SRAM saves / inline-asm dot labels / docs 2026-04-18 20:49:06 +00:00
sram_demo.png compiler: i16 / SRAM saves / inline-asm dot labels / docs 2026-04-18 20:49:06 +00:00
state_machine.audio.hash
state_machine.png
structs_enums_for.audio.hash
structs_enums_for.png
two_player.audio.hash
two_player.png
uxrom_banked.audio.hash
uxrom_banked.png
uxrom_banked_to_banked.audio.hash
uxrom_banked_to_banked.png
uxrom_user_banked.audio.hash
uxrom_user_banked.png
vram_buffer_demo.audio.hash compiler: VRAM update buffer (nt_set / nt_attr / nt_fill_h) 2026-04-18 21:14:31 +00:00
vram_buffer_demo.png runtime: reset PPU scroll after VRAM buffer drain 2026-04-18 22:57:46 +00:00
war.audio.hash peephole: step past non-A ops in remove_dead_loads 2026-04-19 01:43:58 +00:00
war.png examples: regenerate ROMs, gifs, and goldens after codegen local fix 2026-04-16 16:12:46 +00:00