Anonymous edits have been disabled on the wiki. If you want to contribute please login or create an account.


Warning for game developers: PCGamingWiki staff members will only ever reach out to you using the official press@pcgamingwiki.com mail address.
Be aware of scammers claiming to be representatives or affiliates of PCGamingWiki who promise a PCGW page for a game key.

Difference between revisions of "User:Eddman"

From PCGamingWiki, the wiki about fixing PC games
m (removed Special K from D3D8-9 (it has no native support for D3D8))
 
(17 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
===Direct3D versions===
 
===Direct3D versions===
'''DirectDraw''' is an obsolete 2D rendering API from Microsoft that was used by game developers mainly before the release of Direct3D 8.''
+
'''''DirectDraw''' is an obsolete 2D rendering API from Microsoft that was used by game developers mainly before the release of Direct3D 8.''
  
 
===DirectDraw versions===
 
===DirectDraw versions===
'''DirectDraw''' is an obsolete 2D rendering API from Microsoft that was used by game developers mainly before the release of Direct3D 8. To determine the exact version of DirectDraw being used by a game, a more in-depth investigation needs to be performed by checking used DLL files and/or dgVoodoo and tracing API calls, see [[#Determine Direct3D/DirectDraw version for older games|Determine Direct3D/DirectDraw version for older games]].
+
'''DirectDraw''' is an obsolete 2D rendering API from Microsoft that was used by game developers mainly before the release of Direct3D 8. To determine the exact version of DirectDraw being used by a game, a more in-depth investigation needs to be performed by tracing the API calls with dgVoodoo 2 (see [[#Determine the Direct3D/DirectDraw version for older games|Determine the Direct3D/DirectDraw version for older games]]).
  
 
===Determine the Direct3D/DirectDraw version for older games===
 
===Determine the Direct3D/DirectDraw version for older games===
This section is only applicable for '''DirectDraw''' and '''Direct3D 7 or older'''. For newer render APIs, use a tool such as [https://www.msi.com/Landing/afterburner/graphics-cards MSI Afterburner] or [[Special K]].
+
This section is applicable for '''DirectDraw''' and '''Direct3D 7 or older'''. Although these methods can be used for Direct3D 8-9, using a tool such as [https://www.msi.com/Landing/afterburner/graphics-cards MSI Afterburner] is recommended.
  
 
{{Fixbox|description=Identify the render API being used:|ref=|fix=
 
{{Fixbox|description=Identify the render API being used:|ref=|fix=
Use a tool such as [https://learn.microsoft.com/en-us/sysinternals/downloads/process-explorer Process Explorer] to identify the loaded DLL files of the game process while the game is running:
 
* If the game loads {{file|d3dim700.dll}}, it uses '''Direct3D 7'''.
 
  
*If the game loads the following DLLs, the exact API version cannot be determined based on the DLL alone. A tool such as [[dgVoodoo]] must be used to trace the API calls for determining the exact version:
+
'''Start by identifing the loaded DLL modules while the game is running:''' (using e.g. [https://learn.microsoft.com/en-us/sysinternals/downloads/process-explorer Process Explorer)]
** If the game loads {{file|d3dim.dll}}, it uses a version in the '''Direct3D 2-6''' range.
+
:* If the game loads {{file|d3d8.dll}}, use [https://www.msi.com/Landing/afterburner/graphics-cards MSI Afterburner] to validate if it actually renders using '''Direct3D 8''' or not.
** If the game loads {{file|ddraw.dll}} '''only''', it uses a version in the '''DirectDraw 1-7''' range.
+
:* If the game loads {{file|d3dim700.dll}}, it uses '''Direct3D 7'''.
** If the game loads both {{file|d3dim.dll}} and {{file|d3dim700.dll}}, it uses one for rendering and the other for other purposes.
+
:* If the game loads the following DLLs, the exact API version cannot be determined based on the DLL alone. A tool such as [[dgVoodoo 2]] must be used to trace the API calls for determining the exact version:
** If a 2D game loads {{file|d3dim700.dll}}, despite the 2D graphics, the possible reasons are:
+
:** If the game loads {{file|d3dim.dll}}, it uses a version in the '''Direct3D 2-6''' range.
**#Direct3D 7 is used to render certain effects which are not possible with DirectDraw only.
+
:** If the game loads {{file|ddraw.dll}} '''only''', it uses a version in the '''DirectDraw 1-7''' range.
**#The game might not be utilizing Direct3D 7 in any meaningful capacity at all. {{file|d3dim700.dll}} is possibly loaded as a result of a developer mistake, or using developer tools that added the DLL as a dependency by default.
+
:** If the game loads both {{file|d3dim.dll}} and {{file|d3dim700.dll}}, it uses one for rendering and the other for other purposes.
 +
:** If a 2D game loads {{file|d3dim700.dll}}, despite the 2D graphics, the possible reasons are:
 +
:**#Direct3D 7 is used to render certain effects which are not possible with DirectDraw only.
 +
:**#The game might not be utilizing Direct3D 7 in any meaningful capacity at all. {{file|d3dim700.dll}} is possibly loaded as a result of a developer mistake, or using developer tools that added the DLL as a dependency by default.
 +
:* Note that {{file|ddraw.dll}} is always loaded alongside {{file|d3dim.dll}} and {{file|d3dim700.dll}}, since Direct3D 2-7 require DirectDraw to be able to function.
  
{{ii}}Note that {{file|ddraw.dll}} is always loaded alongside {{file|d3dim.dll}} and {{file|d3dim700.dll}}, since Direct3D 2-7 require DirectDraw to be able to function.
+
'''If tracing the API calls are necessary then do the following:'''
 
+
:# Download '''''the debug build''''' of '''[[dgVoodoo|dgVoodoo 2]]''' as well as [https://learn.microsoft.com/en-us/sysinternals/downloads/debugview '''DebugView'''] or [https://github.com/CobaltFusion/DebugViewPP '''DebugView++.''']
If [[dgVoodoo]] needs to be used, perform the following procedure to trace the calls:
+
:# Apply the '''dgVoodoo 2''' files to the game per the usual method in the [[DgVoodoo_2#Installation|guide]].
{{ii}} Some games might refuse to load dgVoodoo's {{file|DDraw.dll}} from their folder. Apply [https://github.com/narzoul/DDrawCompat/wiki/Installation-guide#method-2-add-com-redirection-keys-for-directdraw-in-the-registry-for-windows-810-only this] workaround.
+
:# In the game folder, run {{file|dgVoodooCpl.exe}}, right-click on the <code>dgVoodoo</code> banner, and enable <code>Show all sections of the configuration</code>.
 
+
:# Open the last tab, <code>Debug</code>, and set <code>Maximum trace level</code> to <code>+Additional trace info for internals</code>.
#Download the debug build (named as <code>(spec release with Debug Layer)</code>) of dgVoodoo2, and also download <code>DebugView</code> or <code>DebugView++</code>.
+
:# Run the downloaded DebugView tool. Make sure its window is empty before launching the game.
#Apply the dgvoodoo files to the game per the usual method in the guide.
+
:# Launch the game, start a new game and proceed until you reach in-game graphics.
#In the game folder, run {{file|dgVoodooCpl.exe}}, right-click on the <code>dgVoodoo</code> banner, and enable <code>Show all sections of the configuration</code>.
+
:# Exit the game and check the DebugView window.
#Open the last tab, <code>Debug</code>, and set <code>Maximum trace level</code> to <code>+Additional trace info for internals</code>.
+
:# If done correctly, a list of interfaces sorted by time should be visible. Determine the Direct3D or DirectDraw version using the following tables:
#Run <code>DebugView</code> or <code>DebugView++</code> and keep it running. Make sure its window is empty before launching the game.
 
#Launch the game, start a new game and proceed until you reach in-game graphics.
 
#Exit the game and check <code>DebugView</code> or <code>DebugView++</code>.
 
 
 
You should see a list of interfaces sorted by time. Determine the Direct3D or DirectDraw version using the following tables:
 
{{ii}}There is no Direct3D 4 or DirectDraw 4, since DirectX 4 was canceled and never released.
 
 
<pre>
 
<pre>
 
Direct3D version | Interfaces
 
Direct3D version | Interfaces
-----------------|-----------------------------
+
-----------------|---------------------------------------
2/3              | Direct3D,    Direct3DDevice
+
2/3              | Direct3D
5                | Direct3D2Direct3DDevice2
+
                | Direct3DDevice
6                | Direct3D3Direct3DDevice3
+
.........................................................
7                | Direct3D7Direct3DDevice7
+
5                | Direct3D2
 +
                | Direct3D2::CreateDevice
 +
                |
 +
                | Direct3DDevice2
 +
                | Direct3DDevice2::SetCurrentViewport
 +
                | Direct3DDevice2::GetCurrentViewport
 +
                | Direct3DDevice2::SetRenderTarget
 +
                | Direct3DDevice2::GetRenderTarget
 +
                | Direct3DDevice2::Begin
 +
                | Direct3DDevice2::BeginIndexed
 +
                | Direct3DDevice2::Vertex
 +
                | Direct3DDevice2::Index
 +
                | Direct3DDevice2::End
 +
                | Direct3DDevice2::GetRenderState
 +
                | Direct3DDevice2::SetRenderState
 +
                | Direct3DDevice2::GetLightState
 +
                | Direct3DDevice2::SetLightState
 +
                | Direct3DDevice2::SetTransform
 +
                | Direct3DDevice2::GetTransform
 +
                | Direct3DDevice2::MultiplyTransform
 +
                | Direct3DDevice2::DrawPrimitive
 +
                | Direct3DDevice2::DrawIndexedPrimitive
 +
                | Direct3DDevice2::SetClipStatus
 +
                | Direct3DDevice2::GetClipStatus
 +
                |
 +
                | Direct3DRampDevice
 +
                | Direct3DRGBDevice
 +
                | Direct3DHALDevice
 +
                | Direct3DMMXDevice
 +
                | Direct3DMaterial2
 +
                | Direct3DTexture2
 +
                | Direct3DViewport2
 +
.........................................................
 +
6                | Direct3D3
 +
                | Direct3D3::CreateVertexBuffer
 +
                | Direct3D3::EnumZBufferFormats
 +
                | Direct3D3::EvictManagedTextures
 +
                |
 +
                | Direct3DDevice3
 +
                | Direct3DDevice3::DrawPrimitiveStrided
 +
                | Direct3DDevice3::DrawIndexedPrimitiveStrided
 +
                | Direct3DDevice3::DrawPrimitiveVB
 +
                | Direct3DDevice3::DrawIndexedPrimitiveVB
 +
                | Direct3DDevice3::ComputeSphereVisibility
 +
                | Direct3DDevice3::GetTexture
 +
                | Direct3DDevice3::SetTexture
 +
                | Direct3DDevice3::GetTextureStageState
 +
                | Direct3DDevice3::SetTextureStageState
 +
                | Direct3DDevice3::ValidateDevice
 +
                |
 +
                | Direct3DRefDevice
 +
                | Direct3DNullDevice
 +
                | Direct3DMaterial3
 +
                | Direct3DViewport3
 +
                | Direct3DVertexBuffer
 +
.........................................................
 +
7                | Direct3D7
 +
                | Direct3DDevice7
 +
</pre>
  
  
 +
<pre>
 
DirectDraw version | Interfaces
 
DirectDraw version | Interfaces
-------------------|---------------------------
+
-------------------|-------------------------------------
1                  | DirectDrawDirectDrawSurface
+
1                  | DirectDraw
2/3                | DirectDraw2, DirectDrawSurface2
+
                  | DirectDrawSurface
5                  | DirectDraw2, DirectDrawSurface3
+
.........................................................
6                  | DirectDraw4, DirectDrawSurface4
+
2/3                | DirectDraw2
7                  | DirectDraw7, DirectDrawSurface7
+
                  | DirectDraw2::GetAvailableVidMem
 +
                  |
 +
                  | DirectDrawSurface2
 +
                  | DirectDrawSurface2::GetDDInterface
 +
                  | DirectDrawSurface2::PageLock
 +
                  | DirectDrawSurface2::PageUnlock
 +
.........................................................
 +
5                  | DirectDrawSurface3
 +
                  | DirectDrawSurface3::SetSurfaceDesc
 +
                  |
 +
                  | DirectDrawColorControl
 +
.........................................................
 +
6                  | DirectDraw4
 +
                  | DirectDraw4::GetSurfaceFromDC
 +
                  | DirectDraw4::RestoreAllSurfaces
 +
                  | DirectDraw4::TestCooperativeLevel
 +
                  | DirectDraw4::GetDeviceIdentifier
 +
                  |
 +
                  | DirectDrawSurface4
 +
                  | DirectDrawSurface4::SetPrivateData
 +
                  | DirectDrawSurface4::GetPrivateData
 +
                  | DirectDrawSurface4::FreePrivateData
 +
                  | DirectDrawSurface4::GetUniquenessValue
 +
                  | DirectDrawSurface4::ChangeUniquenessValue
 +
.........................................................
 +
7                  | DirectDraw7
 +
                  | DirectDraw7::StartModeTest
 +
                  | DirectDraw7::EvaluateMode
 +
                  |
 +
                  | DirectDrawSurface7
 +
                  | DirectDrawSurface7::SetPriority
 +
                  | DirectDrawSurface7::GetPriority
 +
                  | DirectDrawSurface7::SetLOD
 +
                  | DirectDrawSurface7::GetLOD
 
</pre>
 
</pre>
 
+
'''Notes'''
{{ii}}Direct3D 2 and 3, and DirectDraw 2 and 3, use the exact same interfaces. As a result they cannot be distinguished by interfaces. For these cases use the DirectX version listed in requirements or readme, or the version of the DirectX installer shipped with the original release of the game.
+
{{ii}} There are no Direct3D/DirectDraw '''4''' since DirectX 4 was canceled during development.
 
+
{{ii}} The Direct3D table is not complete, however the listed interfaces should be enough to determine the version. In most cases checking <code>Direct3D*</code> and/or <code>Direct3DDevice*</code> is enough.
{{ii}}DirectDraw 2/3 and 5 use the identically named <code>DirectDraw2</code> interface. To distinguish between the two check the name of the <code>DirectDrawSurface</code> interface.
+
{{ii}} When dealing with mixed usage of interfaces, note the following:
 
+
:* Direct3D '''2''' and '''3''', and DirectDraw '''2''' and '''3''' uses the exact same interfaces, and so cannot be distinguished between. Use the DirectX version listed in the system requirements or {{file|ReadMe}} file of the game, or the version of the DirectX installer shipped with the original release of the game.
{{ii}}If you have trouble determining the exact DirectDraw version, simply write <code>true</code> in the <code>directdraw versions</code> field on the wiki page.
+
:* DirectDraw 2/3 and 5 use the same <code>DirectDraw2</code> interface. To distinguish between the two check which <code>DirectDrawSurface</code> interface is used.
 +
:* <code>DirectDrawSurface</code> interfaces refer to texture (.DDS) related methods. A game that uses a newer DirectDraw version may not have a need to use the functionality exposed in the newer versions of the texture related DirectDrawSurface interfaces, so if a game for example uses <code>DirectDraw4</code> combined with <code>DirectDrawSurface2</code> with no dependency on <code>DirectDrawSurface4</code>, it is safe to assume it uses '''DirectDraw 6''' based on the <code>DirectDraw4</code> functions.
 +
:* If having trouble determining the exact DirectDraw version, simply write <code>true</code> in the <code>directdraw versions</code> field on the wiki page, though also note the following:
 
}}
 
}}

Latest revision as of 21:08, 6 April 2024

Direct3D versions

DirectDraw is an obsolete 2D rendering API from Microsoft that was used by game developers mainly before the release of Direct3D 8.

DirectDraw versions

DirectDraw is an obsolete 2D rendering API from Microsoft that was used by game developers mainly before the release of Direct3D 8. To determine the exact version of DirectDraw being used by a game, a more in-depth investigation needs to be performed by tracing the API calls with dgVoodoo 2 (see Determine the Direct3D/DirectDraw version for older games).

Determine the Direct3D/DirectDraw version for older games

This section is applicable for DirectDraw and Direct3D 7 or older. Although these methods can be used for Direct3D 8-9, using a tool such as MSI Afterburner is recommended.

Identify the render API being used:

Start by identifing the loaded DLL modules while the game is running: (using e.g. Process Explorer)

  • If the game loads d3d8.dll, use MSI Afterburner to validate if it actually renders using Direct3D 8 or not.
  • If the game loads d3dim700.dll, it uses Direct3D 7.
  • If the game loads the following DLLs, the exact API version cannot be determined based on the DLL alone. A tool such as dgVoodoo 2 must be used to trace the API calls for determining the exact version:
    • If the game loads d3dim.dll, it uses a version in the Direct3D 2-6 range.
    • If the game loads ddraw.dll only, it uses a version in the DirectDraw 1-7 range.
    • If the game loads both d3dim.dll and d3dim700.dll, it uses one for rendering and the other for other purposes.
    • If a 2D game loads d3dim700.dll, despite the 2D graphics, the possible reasons are:
      1. Direct3D 7 is used to render certain effects which are not possible with DirectDraw only.
      2. The game might not be utilizing Direct3D 7 in any meaningful capacity at all. d3dim700.dll is possibly loaded as a result of a developer mistake, or using developer tools that added the DLL as a dependency by default.
  • Note that ddraw.dll is always loaded alongside d3dim.dll and d3dim700.dll, since Direct3D 2-7 require DirectDraw to be able to function.

If tracing the API calls are necessary then do the following:

  1. Download the debug build of dgVoodoo 2 as well as DebugView or DebugView++.
  2. Apply the dgVoodoo 2 files to the game per the usual method in the guide.
  3. In the game folder, run dgVoodooCpl.exe, right-click on the dgVoodoo banner, and enable Show all sections of the configuration.
  4. Open the last tab, Debug, and set Maximum trace level to +Additional trace info for internals.
  5. Run the downloaded DebugView tool. Make sure its window is empty before launching the game.
  6. Launch the game, start a new game and proceed until you reach in-game graphics.
  7. Exit the game and check the DebugView window.
  8. If done correctly, a list of interfaces sorted by time should be visible. Determine the Direct3D or DirectDraw version using the following tables:
Direct3D version | Interfaces
-----------------|---------------------------------------
2/3              | Direct3D
                 | Direct3DDevice
.........................................................
5                | Direct3D2
                 | Direct3D2::CreateDevice
                 |
                 | Direct3DDevice2
                 | Direct3DDevice2::SetCurrentViewport
                 | Direct3DDevice2::GetCurrentViewport
                 | Direct3DDevice2::SetRenderTarget
                 | Direct3DDevice2::GetRenderTarget
                 | Direct3DDevice2::Begin
                 | Direct3DDevice2::BeginIndexed
                 | Direct3DDevice2::Vertex
                 | Direct3DDevice2::Index
                 | Direct3DDevice2::End
                 | Direct3DDevice2::GetRenderState
                 | Direct3DDevice2::SetRenderState
                 | Direct3DDevice2::GetLightState
                 | Direct3DDevice2::SetLightState
                 | Direct3DDevice2::SetTransform
                 | Direct3DDevice2::GetTransform
                 | Direct3DDevice2::MultiplyTransform
                 | Direct3DDevice2::DrawPrimitive
                 | Direct3DDevice2::DrawIndexedPrimitive
                 | Direct3DDevice2::SetClipStatus
                 | Direct3DDevice2::GetClipStatus
                 | 
                 | Direct3DRampDevice
                 | Direct3DRGBDevice
                 | Direct3DHALDevice
                 | Direct3DMMXDevice
                 | Direct3DMaterial2
                 | Direct3DTexture2
                 | Direct3DViewport2
.........................................................
6                | Direct3D3
                 | Direct3D3::CreateVertexBuffer
                 | Direct3D3::EnumZBufferFormats
                 | Direct3D3::EvictManagedTextures
                 | 
                 | Direct3DDevice3
                 | Direct3DDevice3::DrawPrimitiveStrided
                 | Direct3DDevice3::DrawIndexedPrimitiveStrided
                 | Direct3DDevice3::DrawPrimitiveVB
                 | Direct3DDevice3::DrawIndexedPrimitiveVB
                 | Direct3DDevice3::ComputeSphereVisibility
                 | Direct3DDevice3::GetTexture
                 | Direct3DDevice3::SetTexture
                 | Direct3DDevice3::GetTextureStageState
                 | Direct3DDevice3::SetTextureStageState
                 | Direct3DDevice3::ValidateDevice
                 | 
                 | Direct3DRefDevice
                 | Direct3DNullDevice
                 | Direct3DMaterial3
                 | Direct3DViewport3
                 | Direct3DVertexBuffer
.........................................................
7                | Direct3D7
                 | Direct3DDevice7


DirectDraw version | Interfaces
-------------------|-------------------------------------
1                  | DirectDraw
                   | DirectDrawSurface
.........................................................
2/3                | DirectDraw2
                   | DirectDraw2::GetAvailableVidMem
                   |
                   | DirectDrawSurface2
                   | DirectDrawSurface2::GetDDInterface
                   | DirectDrawSurface2::PageLock
                   | DirectDrawSurface2::PageUnlock
.........................................................
5                  | DirectDrawSurface3
                   | DirectDrawSurface3::SetSurfaceDesc
                   |
                   | DirectDrawColorControl
.........................................................
6                  | DirectDraw4
                   | DirectDraw4::GetSurfaceFromDC
                   | DirectDraw4::RestoreAllSurfaces
                   | DirectDraw4::TestCooperativeLevel
                   | DirectDraw4::GetDeviceIdentifier
                   |
                   | DirectDrawSurface4
                   | DirectDrawSurface4::SetPrivateData
                   | DirectDrawSurface4::GetPrivateData
                   | DirectDrawSurface4::FreePrivateData
                   | DirectDrawSurface4::GetUniquenessValue
                   | DirectDrawSurface4::ChangeUniquenessValue
.........................................................
7                  | DirectDraw7
                   | DirectDraw7::StartModeTest
                   | DirectDraw7::EvaluateMode
                   |
                   | DirectDrawSurface7
                   | DirectDrawSurface7::SetPriority
                   | DirectDrawSurface7::GetPriority
                   | DirectDrawSurface7::SetLOD
                   | DirectDrawSurface7::GetLOD

Notes

There are no Direct3D/DirectDraw 4 since DirectX 4 was canceled during development.
The Direct3D table is not complete, however the listed interfaces should be enough to determine the version. In most cases checking Direct3D* and/or Direct3DDevice* is enough.
When dealing with mixed usage of interfaces, note the following:
  • Direct3D 2 and 3, and DirectDraw 2 and 3 uses the exact same interfaces, and so cannot be distinguished between. Use the DirectX version listed in the system requirements or ReadMe file of the game, or the version of the DirectX installer shipped with the original release of the game.
  • DirectDraw 2/3 and 5 use the same DirectDraw2 interface. To distinguish between the two check which DirectDrawSurface interface is used.
  • DirectDrawSurface interfaces refer to texture (.DDS) related methods. A game that uses a newer DirectDraw version may not have a need to use the functionality exposed in the newer versions of the texture related DirectDrawSurface interfaces, so if a game for example uses DirectDraw4 combined with DirectDrawSurface2 with no dependency on DirectDrawSurface4, it is safe to assume it uses DirectDraw 6 based on the DirectDraw4 functions.
  • If having trouble determining the exact DirectDraw version, simply write true in the directdraw versions field on the wiki page, though also note the following: