Building QEMU for retro guests: integer scaling, a non-blocking LPT and CUE/BIN audio CDs

Three independent QEMU patch series for running DOS, Windows 9x and Windows XP guests on a modern Linux desktop, and how to build them into one binary.

Build steps qemu-wayland-scaler qemu-parallel-port-freeze qemu-cue-bin

Running old games and applications under QEMU on a Wayland desktop tends to hit the same three walls:

Each has its own patch series and write-up. This page shows how to combine them.

1. The three series

SeriesFixesTouchesPatches
qemu-wayland-scalerBlurry Wayland/HiDPI scaling, relative-pointer drift in SDL and GTK, slow PS/2 mouse in Windows XP; adds pixel-exact -display sdl,scaler=integer|integerplus|nearest|linear (cycled at run time with Ctrl+Alt+S) and zoom-to-fit=on for SDLui/gtk.c, ui/sdl2*.c, qapi/ui.json, qemu-options.hx, hw/input/ps2.c9
qemu-parallel-port-freezeWhole-VM freeze when a socket chardev behind LPT1 stops draining; raises the printer BUSY line instead of blocking the vCPU threadhw/char/parallel.c, include/hw/char/parallel.h1
qemu-cue-binNative .cue/.bin images and CD audio on ide-cd: digital extraction (READ CD) and analog PLAY AUDIO through an audiodevhw/ide/ (atapi.c, new cdrom-cue.{c,h}, core.c, ide-dev.c)3

The series touch disjoint parts of QEMU. Without their options — no scaler=, a file chardev, an .iso image — QEMU behaves as upstream.

2. Applying all three and building

mkdir qemu-retro && cd qemu-retro
git clone https://gitlab.com/qemu-project/qemu.git
git clone https://github.com/zirize/qemu-wayland-scaler.git
git clone https://github.com/zirize/qemu-parallel-port-freeze.git
git clone https://github.com/zirize/qemu-cue-bin.git

cd qemu
git checkout -b retro 5f664cd37a      # QEMU 11.1.50, the base all thirteen patches were checked on

git am ../qemu-wayland-scaler/patches/qemu-master/000[1-9]-*.patch
git am ../qemu-parallel-port-freeze/patches/0001-parallel-nonblocking-tx.patch
git am ../qemu-cue-bin/patches/000[1-3]-*.patch

./configure --target-list=i386-softmmu,x86_64-softmmu --enable-sdl --enable-pipewire
ninja -C build

SDL is needed for scaler=; the audio backend (PipeWire here, or PulseAudio/ALSA) carries CD audio. The qemu-wayland-scaler repository also has the scaler series rebased onto the screamer fork for Mac OS 9 guests.

3. One command line using all three

./build/qemu-system-i386 \
  -enable-kvm -M pc -m 512 \
  -display sdl,scaler=integerplus \
  -audiodev pipewire,id=pw0 \
  -device AC97,audiodev=pw0 \
  -chardev socket,id=lpt0,host=127.0.0.1,port=9100,server=off \
  -parallel chardev:lpt0 \
  -drive file=disk.qcow2,if=ide,index=0,media=disk \
  -drive file=/path/to/game.cue,if=ide,index=2,media=cdrom

Display and mouse

Parallel port

CD-ROM

4. Guest notes

CD audio: digital or analog

Guest OS / audio driverDigital (DAE)Analog
DOS (MSCDEX)not availableworks
Windows 95not availableworks
Windows 98 SE + Sound Blaster (VxD)not availableworks
Windows 98 SE + WDM driver (AC97)works (opt-in)works (default)
Windows XPworks (recommended)works

Why, and what was actually tested: qemu-cue-bin.

Windows XP refuses “Enable digital CD audio”

An XP VM that first booted on an unpatched QEMU has cached “no CD-DA” for the drive under HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E965-E325-11CE-BFC1-08002BE10318}\0000\DigitalAudio (CDDASupported = 0, CDDAAccurate = 0) and never re-checks. In Device Manager, uninstall QEMU DVD-ROM and scan for hardware changes (or reboot), then tick the checkbox again. Deleting the DigitalAudio key and rebooting works too.

Verified

On 2026-11-24 all thirteen patches (scaler 1–9, parallel port 1, CUE/BIN 1–3) were applied in the order above onto QEMU 5f664cd37a with no conflicts, and qemu-system-i386 was built with the configure line above. Its -help lists scaler= and zoom-to-fit= on the SDL display line only, and the binary passes the qemu-cue-bin Linux test on pc and q35. Guest-level testing of each feature is described on its own page.

Not submitted upstream

QEMU declines contributions that include or derive from AI-generated content, and all three series were written with Claude. None of them are in QEMU. They are offered as-is under QEMU's licence (GPL-2.0-or-later).