August 10th, 2024

SNES Graphics: 186.2ns or Bust

The article explains the SNES graphics rendering, detailing real-time pixel generation, VRAM access limitations, internal memory optimization, various video modes, and efficient sprite rendering using a line buffer.

Read original articleLink Icon
SNES Graphics: 186.2ns or Bust

The article discusses the intricate workings of the Super Nintendo Entertainment System (SNES) graphics rendering, focusing on how its hardware components collaborate to produce sprites and backgrounds. The SNES operates without a framebuffer, requiring it to generate pixel colors in real-time, specifically every 186.2 nanoseconds, dictated by its video dot clock of 5,369,317 Hz. The limitations in rendering arise from the latency of accessing video RAM (VRAM), which takes 100 nanoseconds per read. This restricts the number of layers and sprites that can be processed simultaneously. The article details how the SNES manages to render multiple layers by utilizing internal memory to cache data and optimize VRAM access. It explains the different video modes supported by the SNES, each with varying bits-per-pixel (bpp) and layer configurations, and how the system cleverly retrieves tilemap entries and pixel data to fit within the strict timing constraints. Additionally, it covers sprite rendering, which is limited by the available VRAM bandwidth, and how the SNES employs a line buffer to manage sprite data during horizontal blanking periods. The article concludes by comparing the SNES's sprite handling capabilities with those of other contemporary systems, highlighting the unique challenges and solutions that defined its graphics architecture.

- The SNES generates pixel colors in real-time every 186.2 nanoseconds.

- VRAM access latency limits the number of layers and sprites that can be rendered.

- The system uses internal memory to cache data and optimize VRAM access.

- Different video modes have varying bits-per-pixel and layer configurations.

- The SNES employs a line buffer for efficient sprite rendering during horizontal blanking.

Link Icon 2 comments
By @andrepd - 6 months
Incredible. Always makes me chuckle when I see developers, 30+ years later, explaining why their trivial app runs at 10fps