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 9, 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 9, by auntyellow

User metadata
Rank Newbie
Rank
Newbie
torpedo wrote on 2026-06-19, 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 9, 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 9, by auntyellow

User metadata
Rank Newbie
Rank
Newbie
LSS10999 wrote on Yesterday, 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 Yesterday, 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 9, by LSS10999

User metadata
Rank Oldbie
Rank
Oldbie
auntyellow wrote on Yesterday, 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 Yesterday, 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 Yesterday, 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...

Reply 6 of 9, by auntyellow

User metadata
Rank Newbie
Rank
Newbie
LSS10999 wrote on Yesterday, 15:49:

... 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...

Is it because you didn't change display mode to 640x480x8 manually? See this issue.

Another possible reason is that the driver fails to get framebuffer address then uses v86 and vbox's default 0xE0000000.
Framebuffer address can be found in Administrative Tools -> Windows NT Diagnostics -> DMA/Memory.
In v86 emulator's Windows NT 3.51's profile, memory 0xA0000,0x20000 looks like text mode's video memory, and graphic's is not shown.

Could you tell me what graphics card you are using?

Reply 7 of 9, by LSS10999

User metadata
Rank Oldbie
Rank
Oldbie
auntyellow wrote on Today, 01:47:

Is it because you didn't change display mode to 640x480x8 manually? See this issue.

WinNT 3.51 lacks the ability to change resolutions on-the-fly. This is the main reason why official ddraw.dll can never work there. It expected a few imports related to changing desktop resolution which is implemented in Win9x/NT4 but absent in NT 3.51.

While possible to set 640x480x8, it may not be a good idea in NT 3.51 since changing resolution will always require a system reboot there.

PS: Actually, the "Test" option in NT 3.51's Display properties does work and will temporarily set the display to the target resolution. Not sure if this can be used by others in NT 3.51, however...

auntyellow wrote on Today, 01:47:
Another possible reason is that the driver fails to get framebuffer address then uses v86 and vbox's default 0xE0000000. Framebu […]
Show full quote

Another possible reason is that the driver fails to get framebuffer address then uses v86 and vbox's default 0xE0000000.
Framebuffer address can be found in Administrative Tools -> Windows NT Diagnostics -> DMA/Memory.
In v86 emulator's Windows NT 3.51's profile, memory 0xA0000,0x20000 looks like text mode's video memory, and graphic's is not shown.

Could you tell me what graphics card you are using?

I can find the entry of 0xA0000, 0x20000 in the DMA/Memory section. It belongs to \Device\Video2. I didn't find anything else that might look like the graphic (VESA) framebuffer, however...

The setup of my board is a bit odd. I'm using a PCIe-PCI reverse bridge adapter (with PEX8112) to install a PCIe FirePro W4100 into a PCI slot, which works as desired.

However, due to the AGP slot being unpopulated, the Intel onboard video is active in the system, though not being in use. I suspect \Device\Video1 might be the onboard one. It's not using any memory, the BIOS option to "disable" the onboard video simply sets the pre-allocated framebuffer size to zero, so it will not reserve any system memory.

The onboard video cannot be fully disabled this way as from what I read about the 865G/865GV datasheet the toggle seems to be hardwired to the AGP slot so only when there is an AGP video card installed can the onboard video be removed from the system topology.

Reply 8 of 9, by auntyellow

User metadata
Rank Newbie
Rank
Newbie
LSS10999 wrote on Today, 02:48:
I can find the entry of 0xA0000, 0x20000 in the DMA/Memory section. It belongs to \Device\Video2. I didn't find anything else th […]
Show full quote

I can find the entry of 0xA0000, 0x20000 in the DMA/Memory section. It belongs to \Device\Video2. I didn't find anything else that might look like the graphic (VESA) framebuffer, however...

The setup of my board is a bit odd. I'm using a PCIe-PCI reverse bridge adapter (with PEX8112) to install a PCIe FirePro W4100 into a PCI slot, which works as desired.

However, due to the AGP slot being unpopulated, the Intel onboard video is active in the system, though not being in use. I suspect \Device\Video1 might be the onboard one. It's not using any memory, the BIOS option to "disable" the onboard video simply sets the pre-allocated framebuffer size to zero, so it will not reserve any system memory.

The onboard video cannot be fully disabled this way as from what I read about the 865G/865GV datasheet the toggle seems to be hardwired to the AGP slot so only when there is an AGP video card installed can the onboard video be removed from the system topology.

Does your computer have another OS installed? If it is a newer system like Windows XP, can you see the graphics card's memory address? (Display Properties -> Settings -> Advanced -> Adapter -> Properties -> Resources -> multiple "Memory Range"s)

Reply 9 of 9, by LSS10999

User metadata
Rank Oldbie
Rank
Oldbie
auntyellow wrote on Today, 15:14:

Does your computer have another OS installed? If it is a newer system like Windows XP, can you see the graphics card's memory address? (Display Properties -> Settings -> Advanced -> Adapter -> Properties -> Resources -> multiple "Memory Range"s)

Okay... from a 32-bit Win7 I get these memory ranges, apart from usual VGA ports and memory (A0000-BFFFF):
D0000000-DFFFFFFF
FE4C0000-FE4FFFFF

I wonder if the D0000000 range is the framebuffer...