Skip to content
PifeatureCLI & tooling

Research CRT/NTSC filtering for pi-nes terminal NES emulator

Session from pi-nes-sessions on Hugging Face by thomasmustier · MIT · condensed by Coders Talk

15msession
0interventions
GOAL

Understand why NES games looked better on CRTs and figure out how to implement CRT/NTSC-style image filtering in the pi-nes terminal extension, then document findings as a GitHub issue.

  1. Prompt · +0
    Is it true NES games were designed around CRT display quirks, and how could we replicate that in our pi-nes terminal extension?
  2. Agent did · +0m
    Read through renderer.ts, config.ts, nes-component.ts, index.ts, nes-core.ts, nes-session.ts and README.md to understand how frames are rendered and configured in the extension.
  3. Agent did · +2m
    Confirmed the CRT/composite artifact claim is accurate with nuance, citing scanlines, phosphor bloom, and composite bleed as effects games relied on.
  4. Prompt · +4m
    How would we implement this specifically here? Think through options and research how similar stacks/projects have handled it.
  5. Agent did · +4m
    Used brave-search to research NTSC/CRT filter approaches (Blargg's nes_ntsc/snes_ntsc libraries, TetaNES's Rust wgpu shader), then inspected the Rust nes_rust core's display, ppu palette, and napi bindings to see where a filter could hook in.
  6. Agent did · +8m
    Synthesized research into concrete options for pi-nes: apply an NTSC/composite filter (e.g. Blargg's approach) in the Rust core or as a post-process step, plus optional CRT scanline shader, given the Node+Rust+Kitty graphics stack.
  7. Prompt · +14m
    Please create a GitHub issue with your findings and proposed next steps.
  8. Fail · +15m
    The gh issue create command failed with shell errors (nes_ntsc/snes_ntsc/native paths interpreted as commands) due to unescaped backticks in the issue body.
  9. Agent did · +15m
    Wrote the issue body to a temp file via heredoc instead and successfully created GitHub issue #6 with the findings and proposed next steps.
  10. Outcome · +15m
    GitHub issue #6 created on tmustier/pi-nes documenting the CRT/NTSC filter research and proposed implementation plan.
VERDICT

Next time I'd ask upfront for both the research and a concrete GitHub issue in one go, since the agent handled the investigation (codebase read, web research on Blargg's nes_ntsc and TetaNES) well without any correction needed from me. The only hiccup was a shell-quoting failure when creating the GitHub issue body with backticks, which the agent fixed itself by switching to a heredoc into a temp file.

I tried this · 0

Discussion · 0

How Builds work