News for hackers. Stuff that matters.
Re:Orbiter Space Flight Simulator is now open source by criddell on Wednesday July 28, 2021 @08:23AM (#27982931)
Anybody know what's involved in moving from DX7 to DX11?
Re:Orbiter Space Flight Simulator is now open source by roytries on Wednesday July 28, 2021 @08:35AM (#27983000)
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.

Re:Orbiter Space Flight Simulator is now open source by Arwill on Wednesday July 28, 2021 @08:58AM (#27983162)
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.

Re:Orbiter Space Flight Simulator is now open source by AstralStorm on Wednesday July 28, 2021 @09:14AM (#27983305)
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.

Re:Orbiter Space Flight Simulator is now open source by ricardobeat on Wednesday July 28, 2021 @09:18AM (#27983341)
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.

Re:Orbiter Space Flight Simulator is now open source by jsmith45 on Wednesday July 28, 2021 @09:33AM (#27983526)
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.

Re:Orbiter Space Flight Simulator is now open source by hulitu on Thursday July 29, 2021 @03:04AM (#27993682)
If ain't broke, don't fix it.
Re:Orbiter Space Flight Simulator is now open source by lights0123 on Wednesday July 28, 2021 @08:47AM (#27983084)
There are multiple DX7 to something else translators (https://fdossena.com/?p=wined3d/index.frag and https://dxgl.org/): I wonder if they're 64-bit compatible if that's a higher priority than a modern graphics API.
Re:Orbiter Space Flight Simulator is now open source by AstralStorm on Wednesday July 28, 2021 @09:15AM (#27983314)
Neither is a translator, they're actually emulators - implementing the older API using newer calls. That does not help in porting either.
Re:Orbiter Space Flight Simulator is now open source by Already__Taken on Wednesday July 28, 2021 @02:53PM (#27988042)
Anyone around from the Anarchy Online Engine update shed any light? Looks like it was a gigantic task.