OpenSNES
Modern Open-Source SNES Development SDK
Loading...
Searching...
No Matches
Windows

Colour & effects — masking part of the screen. The PPU has two hardware windows: rectangular (or, driven per scanline, any-shaped) regions that gate what each layer and colour-math shows. Spotlights, portholes, iris wipes, "only darken inside this shape" — all windows.

Not the same as panel (tile boxes) — these are the PPU's masking registers.

The ladder

Example Developer question
window How do I mask part of the screen with one window, or darken only inside it?
window_multi_hdma How do I shape both windows per scanline?

Climb from one HDMA-shaped window — used as a mask, then as the region of colour math — to both windows shaped per scanline.

The idea in one screen

Each window is a left/right edge pair (WH0/WH1, $2126–$2129); a layer or colour math reads a per-layer bit that says "apply me inside / outside the window." Set the edges once and you get a static rectangle. Rewrite the edges every scanline with HDMA and the two straight edges trace any curve — a circle, a wave, a shrinking iris. Point colour math at the window instead of a layer and you darken/tint only the shape.

Window -- HDMA Torch Beam: Masking and Lighting Multi-window HDMA — both windows animated per scanline