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>
Integrate stb_truetype.h to rasterize TTF glyphs into 1-bit .FNT v3
format consumed by Win3.x display drivers. Key implementation detail:
.FNT bitmaps use column-major byte order (all rows of byte-column 0
first, then byte-column 1, etc.), not row-major.
New API: wdrvLoadFontTtf(path, pointSize) loads any TTF at any size.
Demo 7 renders Liberation Sans/Serif/Mono at 16/20/24pt.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Load Windows 3.x .FON (NE resource containers) and raw .FNT font files
for use with ExtTextOut. Multiple fonts can be active simultaneously.
All available .FON files contain v2 fonts but VBESVGA.DRV requires v3
in 386 protected mode, so the loader converts on load.
- Add NE resource table structures (NeResourceTypeT, NeResourceEntryT)
- Add WdrvFontT opaque type with load/unload API
- Implement buildFontFromFnt() v2→v3 converter
- Implement wdrvLoadFontFon() NE resource parser
- Move font from per-driver to global singleton (wdrvLoadFontBuiltin)
- Add WdrvFontT parameter to wdrvExtTextOut (NULL = built-in)
- Add Demo 6: Courier, Sans Serif, System fonts side by side
- Copy fon/*.FON to bin/ during build
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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>
Add comprehensive README covering architecture, API usage, build
instructions, tested drivers, binary patching details, and DGROUP
layout. Expand file header comments in all library sources and headers
to document module responsibilities, data flow, and key constraints.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Strip out watchpoint system (thunkSetWatch, WATCH-PRE/POST), INT 10h
entry counters, segment verification dumps, and inline extern
declarations. Add neSetDebug to neload.h, correct -fno-gcse comment,
and add project CLAUDE.md for git-tracked notes.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>