Skip to content

Instantly share code, notes, and snippets.

View iwalton3's full-sized avatar

Izzie Walton iwalton3

View GitHub Profile
@iwalton3
iwalton3 / ascal-scaler-plan.md
Last active July 27, 2026 16:33
Claude session where MiSTer ASCAL scaler gained an interlaced output mode

True 480i/576i ASCAL scaler output over direct_video

Context

The MiSTer board is used with direct_video=1 (realtime analog video via HDMI DAC). Cores with native interlaced output (Minimig) produce true 480i on a CRT, but cores that only output 480p (ao486) cannot. Goal: patch the ASCAL scaler so it can render any core's video (and the Linux/menu framebuffer) as true interlaced 480i/576i — alternating 262/263-line (312/313 PAL) fields with a half-line vsync offset — delivered over the direct_video HDMI pins, giving ~480 visible NTSC lines.

Two features, per user decisions:

  1. vga_scaler=1 + direct_video=1 together routes the ASCAL output to the HDMI/DV pins for game cores (today only cores hardwiring VGA_SCALER=1, like ao486, get this). Works with unmodified core bitstreams — it's pure Linux-side routing via the existing CONF_VGA_FB mux (production-tested path, sys_top.v:1317-1320).
  2. New ini key DIRECT_VIDEO_INTERLACE=1: the DV scaler mode becomes true 480i (576i when `ME