VOGONS


First post, by auntyellow

User metadata
Rank Newbie
Rank
Newbie

I built two open‑source projects that implement DirectDraw and DirectSound for Windows NT running in v86 emulator: vga-ddraw and sb16-dsound. Both are on GitHub:

I’ve successfully run the C&C Red Alert (RA95) Demo and StarCraft Shareware in a Windows NT 3.51 guest on v86 with smooth graphics and working sound. Demo pages:

Thanks to v86’s load‑state feature, I host compact state files (~10–15 MB) on a CDN so the demos can be loaded within 10 seconds.

Enjoy — feedback and testing reports are welcome.

Reply 1 of 5, by torpedo

User metadata
Rank Newbie
Rank
Newbie

And how does this differ from the 9x version of cnc-ddraw? Is it that this runs on NT3.x whereas cnc doesn't?

Edit: read a bit the description box that specifies why 1.3.4.0 was chosen - cnc has had a 9x version for quite a while, also I think the default mode of hooking is IAT, not detours. I did use years ago 6.5.0.x in Windows 98 virtual machines that lacked DD hal. Not sure if it would run on 95, but it probably wouldn't be much to make it work.

Reply 2 of 5, by auntyellow

User metadata
Rank Newbie
Rank
Newbie
torpedo wrote on Yesterday, 15:38:

And how does this differ from the 9x version of cnc-ddraw? Is it that this runs on NT3.x whereas cnc doesn't?

Edit: read a bit the description box that specifies why 1.3.4.0 was chosen - cnc has had a 9x version for quite a while, also I think the default mode of hooking is IAT, not detours. I did use years ago 6.5.0.x in Windows 98 virtual machines that lacked DD hal. Not sure if it would run on 95, but it probably wouldn't be much to make it work.

cnc-ddraw works but very slow in v86 due to slow GDI renderer, so I hacked it to draw entire screen by directly writing into VGA Framebuffer.

btw, I also tried following solutions in v86:

  • Win9x/NT + vbemp + MS DirectX + RA95: Doesn't work, because RA95 fails to lock primary surface.
  • Win9x + vmdisp9x + MS DirectX + RA95: Works but unstable (frequently fails to respond).
  • Win9x/NT + vbemp + MS DirectX + StarCraft: Works smoothly, because StarCraft Blt primary surface from off-screen, if it fails to lock primary.

Reply 3 of 5, by LSS10999

User metadata
Rank Oldbie
Rank
Oldbie

I did a test on my real HW system (AIMB-865) with NT 3.51.
- dpal/dvga/dvga2 fails to install citing not valid Win32 image as well as not having valid MZ. Since I can't install those drivers I haven't tested ddraw functionality.
- dsb16 installs and starts, but test programs fail, citing unable to open either DirectSB16 or DirectSound (using your dsound.dll, though NT3.51 can use official dsound.dll from as high as DX 8.0 IIRC).

I'm using VBEMP NT driver for video and the active sound card is CMI8330 (for which Microsoft's default SB16 driver can be used for everything except MIDI IIRC).
My system has a Pentium Dual-Core E5800 (2 cores/2 threads) and is properly supported by MPS Multiprocessor HAL, in case the Win32 image/invalid MZ problem might have anything to do with this.

Reply 4 of 5, by auntyellow

User metadata
Rank Newbie
Rank
Newbie
LSS10999 wrote on Today, 03:51:

- dpal/dvga/dvga2 fails to install citing not valid Win32 image as well as not having valid MZ. Since I can't install those drivers I haven't tested ddraw functionality.

I also encountered this error during running install.bat, maybe a bug in Windows NT 3.51. After several seconds, run `sc start dvga` again then the driver can be successfully loaded.

LSS10999 wrote on Today, 03:51:

- dsb16 installs and starts, but test programs fail, citing unable to open either DirectSB16 or DirectSound (using your dsound.dll, though NT3.51 can use official dsound.dll from as high as DX 8.0 IIRC).

I've never tried on real hardware. Gemini and Copilot suggest me to set buffer size to 32K, but I found 64K works in VirtualBox and 64K-1byte works (64K results no sound) in v86 emulator, so I hardcoded this size. You can try this driver (compiled with `#define MAX_LENGTH 32768`) on real hardware.

Reply 5 of 5, by LSS10999

User metadata
Rank Oldbie
Rank
Oldbie
auntyellow wrote on Today, 13:11:
I also encountered this error during running install.bat, maybe a bug in Windows NT 3.51. After several seconds, run `sc start […]
Show full quote
LSS10999 wrote on Today, 03:51:

- dpal/dvga/dvga2 fails to install citing not valid Win32 image as well as not having valid MZ. Since I can't install those drivers I haven't tested ddraw functionality.

I also encountered this error during running install.bat, maybe a bug in Windows NT 3.51. After several seconds, run `sc start dvga` again then the driver can be successfully loaded.

LSS10999 wrote on Today, 03:51:

- dsb16 installs and starts, but test programs fail, citing unable to open either DirectSB16 or DirectSound (using your dsound.dll, though NT3.51 can use official dsound.dll from as high as DX 8.0 IIRC).

I've never tried on real hardware. Gemini and Copilot suggest me to set buffer size to 32K, but I found 64K works in VirtualBox and 64K-1byte works (64K results no sound) in v86 emulator, so I hardcoded this size. You can try this driver (compiled with `#define MAX_LENGTH 32768`) on real hardware.

The 32K version of dsb16 works here. I can get sound output, though it gets truncated halfway during playback, which I think is expected considering your known limitations (no ring buffer support).

It seems after reboot, DPAL/DVGA/DVGA2 can be properly started. However, it does not seem to be working correctly here. When I tried running StarCraft nothing happens except the system colors get altered. I can ALT-TAB to desktop and apparently StarCraft crashed with an exception. Test programs (testdd and testdvga) do not work either, and they also further change system colors and no actual output (can properly exit via ESC, however).

Perhaps more work might be needed to get the ddraw wrapper work on real hardware and VBEMP...