Skip to content

experiment(ppu): deferred scanline rendering via per-HBlank register … - #62

Open
eduardovra wants to merge 1 commit into
mainfrom
ppu-numpy
Open

experiment(ppu): deferred scanline rendering via per-HBlank register …#62
eduardovra wants to merge 1 commit into
mainfrom
ppu-numpy

Conversation

@eduardovra

Copy link
Copy Markdown
Owner

…snapshots

Captures PPU register state at each HBlank into a flat tuple snapshot instead of rendering immediately. At VBlank start, all 224 scanlines are rendered in a single burst from their snapshots.

Rationale: batch rendering keeps VRAM, CGRAM cache and framebuffer hot in L3 cache, and is the prerequisite for full-frame NumPy vectorisation passes. Snapshot uses identity-check dirty tracking for CGRAM and OAM to avoid redundant copies.

Benchmark results (15k frames):
Mega Man X: 129.92 → 129.14 FPS (~neutral)
SMW: 89.81 → 91.24 FPS (+1.6%)

Net verdict: break-even to marginally positive. Complexity cost is high for the gain achieved; keeping as an experiment to enable future full-frame vectorisation.

…snapshots

Captures PPU register state at each HBlank into a flat tuple snapshot instead
of rendering immediately. At VBlank start, all 224 scanlines are rendered in a
single burst from their snapshots.

Rationale: batch rendering keeps VRAM, CGRAM cache and framebuffer hot in L3
cache, and is the prerequisite for full-frame NumPy vectorisation passes.
Snapshot uses identity-check dirty tracking for CGRAM and OAM to avoid
redundant copies.

Benchmark results (15k frames):
  Mega Man X: 129.92 → 129.14 FPS (~neutral)
  SMW:         89.81 →  91.24 FPS (+1.6%)

Net verdict: break-even to marginally positive. Complexity cost is high for the
gain achieved; keeping as an experiment to enable future full-frame vectorisation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant