JHRobotics / softgpu

SW and HW accelerated GPU driver for Windows 9x Virtual Machines
MIT License
610 stars 17 forks source link

QEMU Fedora setup latest QEMU #63

Open CrownParkComputing opened 3 months ago

CrownParkComputing commented 3 months ago

So I followed the guide as I went on and all worked well. I got the PCI error as wrong type VGA card. Removed working one as per your guide, installed softgpu but then i was on 8bit graphics, no acceleration etc. Any tips on how to get this working in latest QEMU. Thanks

JHRobotics commented 3 months ago

I tested last stable (8.2.2) and works without problem. Please make sure, you set right vga adapter, on command line needs to specify:

-vga std

or this way with VRAM:

-device VGA,vgamem_mb=32

Also hw should be set to machine pc: -machine pc

I runs QEMU like this:

qemu-system-x86_64 \
-cpu pentium3 -smp cores=1,sockets=1,threads=1 -machine pc,hpet=off -bios bios.bin -m 512 -nodefaults \
-audiodev sdl,id=sdlaudio \
-netdev user,id=net0, \
-device ac97,audiodev=sdlaudio \
-device pcnet,netdev=net0 \
-device VGA,vgamem_mb=64 \
-display sdl \
-fda "patcher9x-0.8.50-boot.ima" \
-hda win98.img \
-cdrom "win98se_en.iso" \
-boot order=ca,menu=on \
-no-reboot \
-monitor telnet:127.0.0.1:2023,server,nowait \
-rtc base=localtime 

After SoftGPU is installed on acceleration on Windows:

qemu-system-x86_64 \
-cpu pentium3 -smp cores=1,sockets=1,threads=1 -machine pc,accel=whpx,kernel-irqchip=off,hpet=off -bios bios.bin -m 512 -nodefaults \
-audiodev sdl,id=sdlaudio \
-netdev user,id=net0, \
-device ac97,audiodev=sdlaudio \
-device pcnet,netdev=net0 \
-device VGA,vgamem_mb=64 \
-display sdl \
-fda "patcher9x-0.8.50-boot.ima" \
-hda win98.img \
-cdrom "win98se_en.iso" \
-boot order=ca,menu=on \
-no-reboot \
-monitor telnet:127.0.0.1:2023,server,nowait \
-rtc base=localtime 

Or on Linux:

qemu-system-x86_64 \
-cpu pentium3,kvm=off -smp cores=1,sockets=1,threads=1 -machine pc,accel=kvm -bios bios.bin -m 512 -nodefaults \
-audiodev sdl,id=sdlaudio \
-netdev user,id=net0, \
-device ac97,audiodev=sdlaudio \
-device pcnet,netdev=net0 \
-device VGA,vgamem_mb=64 \
-display sdl \
-fda "patcher9x-0.8.50-boot.ima" \
-hda win98.img \
-cdrom "win98se_en.iso" \
-boot order=ca,menu=on \
-no-reboot \
-monitor telnet:127.0.0.1:2023,server,nowait \
-rtc base=localtime 
Nislaco commented 2 months ago

I do want to report that the softgpu works with Q35 as well for both VGA and VMware devices. This is when using either -device X or -VGA X. I routed the device through pcie slot. (Q35 only)

-device pcie-root-port,id=rp21,bus=pcie.0,chassis=2,addr=5.0 -device vmware-svga,id=video0,vgamem_mb=128,bus=rp21 OR -device pcie-root-port,id=rp21,bus=pcie.0,chassis=2,addr=5.0 -device VGA,id=video0,vgamem_mb=128,bus=rp21

I used non sse binaries without win9x/Glide and it is working well enough for what it is in a win95 guest.

Thanks for all the hard work and patches you provide!

Any chance this could work with qemus virtio-vga or would that be superfluous at this point? I have used the bear-windows driver with that device before using softgpu and that was the most performant option previously.

Example config: (Setup.exe /p i with chipset drivers added to win9x/setup folder for proper Os install)

./qemu-system-i386.exe -display sdl,gl=on -M q35,acpi=on,hpet=off,sata=off -m 384 -rtc base=localtime,clock=host \ -k en-us -cpu "qemu32,+hv-relaxed,+hv-vpindex,+hv-runtime,+hv-time,+hv-frequencies,hv-no-nonarch-coresharing=on" \ -audiodev id=sdl,driver=sdl -nodefaults -device vmware-svga,bus=pcie.0,id=video0,vgamem_mb=128 \ -device AC97,bus=pcie.0,audiodev=sdl -device piix4-ide,bus=pcie.0,id=ide1 \ -device ide-cd,bus=ide1.0,drive=disk2 -drive file='L:',id=disk2,if=none,format=raw,media=cdrom \ -device ide-hd,bus=ide1.0,drive=disk1 -drive file=/o/6g.img,id=disk1,if=none,format=raw \ -device pcie-root-port,bus=pcie.0,id=rp1,slot=1 -device pcie-pci-bridge,id=br1,bus=rp1 \ -netdev user,id=net -device i82557b,addr=8,netdev=net,bus=br1

vmware-testimage

Nislaco commented 2 months ago

Also softgpu works on qemu within a docker image on Oracle cloud arm server via Pterodactyl. Was helping someone else get 9x going and that's what they were using as a host for qemu..