Hacker News new | ask | show | jobs
by roytries 1780 days ago
It would be a huge undertaking, especially if the DirectX types leaked into the rest of the application. DirectX 7 is from 1999, games like Half-Life 1 used it. This is when GPUs were mostly fixed-function. While nowadays a GPU is almost as versatile as a CPU.

The hardest/largest step would probably be to get it into this century, with the latest version of DirectX 9 (2005, Windows XP / Xbox 360 era). The step from 9 to 11 is also quite big, but a lot of APIs have stayed compatible.

4 comments

A viable solution for DX9 is using DXVK to emulate the old DX API under Vulkan, then add your own hooks into DXVK and transition to Vulkan in a more relaxed manner.

Now DXVK does not support DX7, but a quick search found dgVoodoo2, which does emulate DX7 under DX11. Maybe that or a similar library can be used as a stepping stone.

Regarding porting legacy apps to 64bit, the most problems i've seen were concerning old libraries (on Windows). That usually requires replacing old libraries with new a version, and fixing includes. I've seen only a handful of bugs arising purely from 32bit vs 64bit differences.

Unfortunately the swapchain and rendering is vastly different from DX9 to DX11, the latter being now more similar to Vulkan.

So maybe it could work to port the codebase to DX9 but no further really.

How necessary is porting it, and for how long will old DirectX versions continue to work?

Having no knowledge of the code, I imagine if you have a functioning graphics layer, most of the work would happen on the underlying physics models and high level drawing/scene APIs, not directly interfacing with DX.

Hm.. I would have thought getting to DirectX9 would be easier, as directx9 still had some support for the fixed function pipeline.

What I'm sure you were getting at is a proper conversion to DX9 making use of the shader based pipeline.

That said, looking at the code I don't think porting to proper shader based DirectX would be terribly difficult for anybody experienced in setting up directx in a shader based pipeline. Nothing looks too fancy.

Of course it could be made more complicated by actually making use of shaders to improve over the fixed function design, but that is not required for an initial port.

If ain't broke, don't fix it.