Commit graph

3 commits

Author SHA1 Message Date
5527130145 Add wdrvScreenshot, auto-demo mode, palette fixes, and DAC width detection
Add wdrvScreenshot() to capture the screen to PNG via stb_image_write.h,
reading the framebuffer (or DDI bitmap fallback) and VGA DAC palette.

Convert demo.c to non-interactive mode with automatic screenshots after
each demo (DEMO01-15.PNG) and no keypress waits, plus per-driver
DOSBox-X configs for automated testing.

Set a standard Windows 3.1 256-color palette (8R x 8G x 4B color cube
with 20 static system colors) to ensure consistent output across drivers.

Fix wdrvSetPalette to also program the VGA DAC directly, since VBESVGA's
SetPalette DDI updates its internal color table but not the hardware.

Detect DAC width via VBE 4F08 (S3TRIO=6-bit, VBESVGA=8-bit) and use
correct shift in both DAC writes and reads — fixes dark display on
VBESVGA where 6-bit values in 8-bit DAC produced 1/4 brightness.

Fix S3 dispYOffset: extend PDEVICE deHeight by the offset so the
driver's internal clipping allows the full 600-row logical screen,
rather than incorrectly reducing dpVertRes to 590.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 18:55:57 -06:00
946719052f Implement ExtTextOut DDI wrapper with built-in VGA ROM font
Add text rendering support via the Windows 3.x ExtTextOut DDI function.
Builds a .FNT v3 font structure from the VGA BIOS 8x16 ROM font
(INT 10h AH=11h), with v3 char table (6-byte entries, absolute offsets)
required by VBESVGA.DRV's BigFontFlags in protected mode. Provides a
full-screen clip rect since STRBLT.ASM unconditionally dereferences
lpClipRect. Tested with both VBESVGA.DRV and S3TRIO.DRV.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 21:21:23 -06:00
628ef231b9 Initial commit. 2026-02-21 18:01:54 -06:00