#!/bin/sh

# Enable basic sound output via pulseaudio
# Run "pacmd list-sinks | grep -e 'name:' -e 'index'" to find your QEMU_PA_SINK
export QEMU_AUDIO_DRV=pa
export QEMU_PA_SINK=alsa_output.pci-0000_00_1f.3.analog-stereo
export QEMU_PA_SOURCE=input

# Start QEMU
qemu-system-x86_64 \
    -enable-kvm \
    -m 3G \
    -smp cores=2,threads=2,sockets=1,maxcpus=4 \
    -cpu host,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time \
    -machine type=pc,accel=kvm,kernel_irqchip=on \
    -global PIIX4_PM.disable_s3=1 \
    -global PIIX4_PM.disable_s4=1 \
    -name windows-98-guest \
    -cdrom '/home/raelon/isos/win98se.iso' \
    -drive file='/home/raelon/usd/win98',format=qcow2,l2-cache-size=8M \
    -boot order=d \
    -soundhw hda \
    -usb \
    -device usb-tablet \
    # -nic none \
    -vga qxl \
    -display gtk,gl=on \
    -device vfio-pci,sysfsdev=/sys/devices/pci0000:00/0000:00:02.0/87c17a7c-972b-407a-b14a-74779f799b8d,x-igd-opregion=on,display=on \
