VOGONS

Common searches


Reply 40 of 63, by Stiletto

User metadata
Rank l33t++
Rank
l33t++

No problem, man! I understand the challenge.

Zeus of nGlide shared with me:

Well, it's not a lack of interest that's holding us back in creating DX1-7 wrapper, but a perspective of spending 7 years (and maybe even more) before the wrapper became 99% compatible.

There's also another problem. Let's say we'll use DX12 as a target API, but will DX1-7 games be still compatible after that period of time with Windows 10?

(7 years being about how long nGlide's been in development if I recall correctly...)

"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto

Reply 41 of 63, by robertmo

User metadata
Rank l33t++
Rank
l33t++
Zeus wrote:

There's also another problem. Let's say we'll use DX12 as a target API, but will DX1-7 games be still compatible after that period of time with Windows 10?

Well he already answered his question himself 😉

Zeus wrote:
You're missing a simple fact that wrapper is not an emulator. Who needs a wrapper that wraps let's say to DirectX 14 if none of […]
Show full quote

You're missing a simple fact that wrapper is not an emulator. Who needs a wrapper that wraps let's say to
DirectX 14 if none of these games that use it work anymore?

You're also missing a fact that success of Windows XP (along with DirectX 9) is unprecedented in the whole Windows history. Did you forgot when Microsoft released DirectX 9? It was 2002! And still, it will be supported in Windows 8 (thus, for at least next 3 years).

This means DirectX 9 offers the widest range of operating systems (thus, compatibility with old games) and graphics cards (thus, user base). DirectX 11 cuts down everything by 70%.

DirectX 9 -> DirectX 11 wrapper won't be needed since DirectX 9 will be supported in Windows 8.
And in DirectX 14 era there won't be any sense in using Glide or early DX API wrappers. You will use a Virtual Machine with Windows XP and DirectX 9 support then.

Reply 42 of 63, by Sol_HSA

User metadata
Rank Member
Rank
Member

Little update.. the wrapper generator is taking shape; current output is around 320k of code. There's still a few nasty functions to figure out, namely those where one interface returns another (but does not create them), like when a texture is queried for the ddraw interface that was used to create it, or surfaces returning attached surfaces, etc.

But some of the stuff at least works now..

myDirectDrawCreate
myIDirectDraw ctor
myIDirectDraw::QueryInterface(REFIID, LPVOID FAR *); -> return [0]
Interface Query: {B3A6F3E0-2B43-11CF-A2DE-00AA00B93356}
myIDirectDraw2 ctor
Wrapped: IDirectDraw2
myIDirectDraw2::Release(); -> return [0]
Ref count zero, calling dtor
myIDirectDraw2 dtor
myIDirectDraw::SetCooperativeLevel(HWND[00000000], DWORD[8]); -> return [0]
myIDirectDraw::CreateSurface(LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *, IUnknown FAR *); -> return [0]
myIDirectDrawSurface ctor
Wrapped surface.
myIDirectDrawSurface::QueryInterface(REFIID, LPVOID FAR *); -> return [0]
Interface Query: {DA044E00-69B2-11D0-A1D5-00AA00B8DFBB}
myIDirectDrawSurface3 ctor
Wrapped: IDirectDrawSurface3
myIDirectDrawSurface::QueryInterface(REFIID, LPVOID FAR *); -> return [0]
Interface Query: {0B2B8630-AD35-11D0-8EA6-00609797EA5B}
myIDirectDrawSurface4 ctor
Wrapped: IDirectDrawSurface4
myIDirectDrawSurface::Release(); -> return [0]
Ref count zero, calling dtor
myIDirectDrawSurface dtor
myIDirectDraw::Release(); -> return [0]
Ref count zero, calling dtor
myIDirectDraw dtor
myDirectDrawCreateEx
Interface Query: {15E65EC0-3B9C-11D2-B92F-00609797EA5B}
myIDirectDraw7 ctor
Wrapped: IDirectDraw7
myIDirectDraw7::Release(); -> return [0]
Ref count zero, calling dtor
myIDirectDraw7 dtor
myDirectDrawCreate
myIDirectDraw ctor
myIDirectDraw::QueryInterface(REFIID, LPVOID FAR *); -> return [0]
Interface Query: {B3A6F3E0-2B43-11CF-A2DE-00AA00B93356}
myIDirectDraw2 ctor
Wrapped: IDirectDraw2
myIDirectDraw2::Release(); -> return [0]
Ref count zero, calling dtor
myIDirectDraw2 dtor
myIDirectDraw::SetCooperativeLevel(HWND[00000000], DWORD[8]); -> return [0]
myIDirectDraw::CreateSurface(LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *, IUnknown FAR *); -> return [0]
myIDirectDrawSurface ctor
Wrapped surface.
myIDirectDrawSurface::QueryInterface(REFIID, LPVOID FAR *); -> return [0]
Interface Query: {DA044E00-69B2-11D0-A1D5-00AA00B8DFBB}
myIDirectDrawSurface3 ctor
Wrapped: IDirectDrawSurface3
myIDirectDrawSurface::QueryInterface(REFIID, LPVOID FAR *); -> return [0]
Interface Query: {0B2B8630-AD35-11D0-8EA6-00609797EA5B}
myIDirectDrawSurface4 ctor
Wrapped: IDirectDrawSurface4
myIDirectDrawSurface::Release(); -> return [0]
Ref count zero, calling dtor
myIDirectDrawSurface dtor
myIDirectDraw::Release(); -> return [0]
Ref count zero, calling dtor
Show last 84 lines
myIDirectDraw dtor
myDirectDrawCreateEx
Interface Query: {15E65EC0-3B9C-11D2-B92F-00609797EA5B}
myIDirectDraw7 ctor
Wrapped: IDirectDraw7
myIDirectDraw7::Release(); -> return [0]
Ref count zero, calling dtor
myIDirectDraw7 dtor
myDirectDrawEnumerate
myDirectDrawCreate
myIDirectDraw ctor
myIDirectDraw::QueryInterface(REFIID, LPVOID FAR *); -> return [0]
Interface Query: {9C59509A-39BD-11D1-8C4A-00C04FD930C5}
myIDirectDraw4 ctor
Wrapped: IDirectDraw4
myIDirectDraw::Release(); -> return [0]
Ref count zero, calling dtor
myIDirectDraw dtor
myIDirectDraw4::GetDeviceIdentifier(LPDDDEVICEIDENTIFIER, DWORD[0]); -> return [0]
myIDirectDraw4::GetCaps(LPDDCAPS, LPDDCAPS); -> return [0]
myIDirectDraw4::GetAvailableVidMem(LPDDSCAPS2, LPDWORD, LPDWORD); -> return [0]
myIDirectDraw4::GetAvailableVidMem(LPDDSCAPS2, LPDWORD, LPDWORD); -> return [0]
myIDirectDraw4::QueryInterface(REFIID, LPVOID FAR *); -> return [0]
Interface Query: {BB223240-E72B-11D0-A9B4-00AA00C0993E}
myIDirect3D3 ctor
Wrapped: IDirect3D3
myIDirect3D3::EnumDevices(LPD3DENUMDEVICESCALLBACK, LPVOID); -> return [0]
myIDirect3D3::Release(); -> return [1]
myIDirectDraw4::EnumDisplayModes(DWORD[0], LPDDSURFACEDESC2, LPVOID, LPDDENUMMODESCALLBACK2); -> return [0]
myIDirectDraw4::RestoreDisplayMode(); -> return [0]
myIDirectDraw4::Release(); -> return [0]
Ref count zero, calling dtor
myIDirectDraw4 dtor
myDirectDrawEnumerate
myDirectDrawCreate
myIDirectDraw ctor
myIDirectDraw::QueryInterface(REFIID, LPVOID FAR *); -> return [0]
Interface Query: {9C59509A-39BD-11D1-8C4A-00C04FD930C5}
myIDirectDraw4 ctor
Wrapped: IDirectDraw4
myIDirectDraw::Release(); -> return [0]
Ref count zero, calling dtor
myIDirectDraw dtor
myIDirectDraw4::GetDeviceIdentifier(LPDDDEVICEIDENTIFIER, DWORD[0]); -> return [0]
myIDirectDraw4::GetCaps(LPDDCAPS, LPDDCAPS); -> return [0]
myIDirectDraw4::GetAvailableVidMem(LPDDSCAPS2, LPDWORD, LPDWORD); -> return [0]
myIDirectDraw4::GetAvailableVidMem(LPDDSCAPS2, LPDWORD, LPDWORD); -> return [0]
myIDirectDraw4::QueryInterface(REFIID, LPVOID FAR *); -> return [0]
Interface Query: {BB223240-E72B-11D0-A9B4-00AA00C0993E}
myIDirect3D3 ctor
Wrapped: IDirect3D3
myIDirect3D3::EnumDevices(LPD3DENUMDEVICESCALLBACK, LPVOID); -> return [0]
myIDirect3D3::Release(); -> return [1]
myIDirectDraw4::EnumDisplayModes(DWORD[0], LPDDSURFACEDESC2, LPVOID, LPDDENUMMODESCALLBACK2); -> return [0]
myIDirectDraw4::RestoreDisplayMode(); -> return [0]
myIDirectDraw4::Release(); -> return [0]
Ref count zero, calling dtor
myIDirectDraw4 dtor
myDirectDrawCreate
myIDirectDraw ctor
myIDirectDraw::QueryInterface(REFIID, LPVOID FAR *); -> return [0]
Interface Query: {9C59509A-39BD-11D1-8C4A-00C04FD930C5}
myIDirectDraw4 ctor
Wrapped: IDirectDraw4
myIDirectDraw::Release(); -> return [0]
Ref count zero, calling dtor
myIDirectDraw dtor
myIDirectDraw4::TestCooperativeLevel(); -> return [0]
myIDirectDraw4::RestoreAllSurfaces(); -> return [0]
myIDirectDraw4::SetCooperativeLevel(HWND[0aa526aa], DWORD[19]); -> return [0]
myIDirectDraw4::SetDisplayMode(DWORD[1024], DWORD[768], DWORD[16], DWORD[0], DWORD[0]); -> return [0]
myIDirectDraw4::CreateSurface(LPDDSURFACEDESC2, LPDIRECTDRAWSURFACE4 FAR *, IUnknown FAR *); -> return [0]
myIDirectDrawSurface4 ctor
Wrapped surface.
myIDirectDrawSurface4::GetAttachedSurface(LPDDSCAPS2, LPDIRECTDRAWSURFACE4 FAR *);
**** NOT IMPLEMENTED
myIDirectDrawSurface4::Release(); -> return [0]
Ref count zero, calling dtor
myIDirectDrawSurface4 dtor
myIDirectDraw4::RestoreDisplayMode(); -> return [0]
myIDirectDraw4::Release(); -> return [0]
Ref count zero, calling dtor
myIDirectDraw4 dtor

As a reminder, the current target is just to make a pass-through wrapper that doesn't actually affect the functionality, but generates logs. This can then be used as a starting point of all sorts of hacks.

http://iki.fi/sol - my schtuphh

Reply 43 of 63, by Sol_HSA

User metadata
Rank Member
Rank
Member
Stiletto wrote:

Zeus of nGlide shared with me:

Well, it's not a lack of interest that's holding us back in creating DX1-7 wrapper, but a perspective of spending 7 years (and maybe even more) before the wrapper became 99% compatible.

My goal isn't to be 100% compatible, but to primarily enable other people to hack ddraw/d3d more easily, and after that goal, to get, maybe, 3dvision working with crimson skies =)

Baby steps.

http://iki.fi/sol - my schtuphh

Reply 44 of 63, by Sol_HSA

User metadata
Rank Member
Rank
Member

Now I managed to run CS with the wrapper so that the splash screen, intro videos, menus work (with some graphical glitches), but I get a crash when entering the game itself. csfix naturally fixes all of the above problems, but does something strange itself and chaining my wrapper with csfix doesn't work =)

And no, still haven't gotten replies from Timeslip regarding this. But I did get a 100k-line log, which I'm NOT pasting on this forum =)

http://iki.fi/sol - my schtuphh

Reply 45 of 63, by Sol_HSA

User metadata
Rank Member
Rank
Member

One curious thing about the log.. the only thing the game uses dx7 that far is..

myDirectDrawCreateEx
Interface Query: {15E65EC0-3B9C-11D2-B92F-00609797EA5B}
myIDirectDraw7 ctor
Wrapped: IDirectDraw7
myIDirectDraw7::Release(); -> return [0]
Ref count zero, calling dtor
myIDirectDraw7 dtor

It does do plenty of stuff with d3d3, though.. and apparently if d3d8.dll isn't in the system, it just gives a popup asking to update directx. It apparently never USES d3d8.dll for anything.

I'm kinda starting to wonder if this is actually a dx3 game that has been stamped with dx7 for marketing purposes.. of course, it's still possible the ingame proper is dx7, since I can't get that far.

http://iki.fi/sol - my schtuphh

Reply 47 of 63, by Sol_HSA

User metadata
Rank Member
Rank
Member

Added more self-defensive code to the wrapper, basically trying to wrap all incoming pointers from various interfaces like getPalette, but the crimsonskies->mywrapper->csfix->directx chain still crashes. Sigh.

http://iki.fi/sol - my schtuphh

Reply 49 of 63, by Sol_HSA

User metadata
Rank Member
Rank
Member

Progress: managed to get further with cs->mywrapper->csfix->dx chain. Now crashes in the same place as with cs->mywrapper->dx .. 🙁

http://iki.fi/sol - my schtuphh

Reply 51 of 63, by Sol_HSA

User metadata
Rank Member
Rank
Member

Spent some time refactoring wrapper generation code to be simpler, and the generalizations I did to delete ~600 lines of code apparently fixed the bug, since now I get to the ingame! Yay!

And based on the logs I generated, it does seem that crimson skies is definitely not a directx7 game. At least on the graphics side.

http://iki.fi/sol - my schtuphh

Reply 52 of 63, by Sol_HSA

User metadata
Rank Member
Rank
Member

I've posted a link to binaries on https://github.com/jarikomppa/dxwrapper - and that project (the pass-through wrapper) is now pretty much complete.

http://iki.fi/sol - my schtuphh

Reply 53 of 63, by Sol_HSA

User metadata
Rank Member
Rank
Member

Pondering whether I should bother learning dx9 or to use OpenGL as the back-end.. if I used gl1.x (which should be more than enough), I could use gldirect to handle the directx transform. On the other hand, a direct dx9 output would be cleaner, and some stuff (like render states) should, more or less, go through as is. Maybe.

Anyway, whichever way I'll go, the directshow/directmedia will cause headaches, so I started looking at the logs trying to figure out how it's used. I don't see the directshow calls (and I'm considering wrapping them just for that), and a frame of video currently looks like..

[      +8ms] myIDirect3DDevice3::BeginScene(); -> return 0
[ +7ms] myIDirect3DDevice3::SetTextureStageState(DWORD 0, D3DTEXTURESTAGESTATETYPE, DWORD 1); -> return 0
[ +8ms] myIDirect3DDevice3::SetTextureStageState(DWORD 0, D3DTEXTURESTAGESTATETYPE, DWORD 1); -> return 0
[ +9ms] myIDirect3DViewport3::SetViewport2(LPD3DVIEWPORT2 0xa17504); -> return 0
[ +8ms] myIDirectDrawSurface::Lock(LPRECT 0x0, LPDDSURFACEDESC 0x910fcd4, DWORD 1, HANDLE); -> return 0
[ +8ms] myIDirectDrawSurface::Unlock(LPVOID 0x589b360); -> return 0
[ +8ms] myIDirectDrawSurface4::Blt(LPRECT 0x327c64c, LPDIRECTDRAWSURFACE4 0x2a08d58, LPRECT 0x0, DWORD 16777216, LPDDBLTFX 0x0); -> return 0
[ +12ms] myIDirect3DDevice3::SetTextureStageState(DWORD 0, D3DTEXTURESTAGESTATETYPE, DWORD 2); -> return 0
[ +8ms] myIDirect3DDevice3::SetTextureStageState(DWORD 0, D3DTEXTURESTAGESTATETYPE, DWORD 2); -> return 0
[ +9ms] myIDirect3DDevice3::EndScene(); -> return 0
[ +8ms] myIDirectDrawSurface4::Flip(LPDIRECTDRAWSURFACE4 0x0, DWORD 0); -> return 0

..which is downright mysterious with all those texture stages, but crimson skies seems to do all sorts of stupid things anyway, so they may be leftovers from some experiment..

http://iki.fi/sol - my schtuphh

Reply 54 of 63, by aqrit

User metadata
Rank Member
Rank
Member

DDraw centric ramblings
that you may or may not find interesting.

SetPrivateData() solves almost all problems tracking object lifetimes.
Tracking surfaces can be offloaded completely.

Clippers and palettes that are implicitly released...
( wrapper interface never receives a release call that returns "0" )
If we dds->SetPrivateData( IWrapClipper, DDSPD_IUNKNOWNPOINTER ) when attaching a clipper/palette to a surface,
the release method of the clipper/palette wrapper will be explicitly called when a surface is destroyed
if the surface was holding the last reference to the clipper/palette object this call will return "0"

SetPrivateData was introduced in DX4 but a dds1 can query up for a dds4
call SetPrivateData then release the dds4 interface...
The dds1 interface will call the release method of the wrapper when dds1 is destroyed.

note:
the wrapper interface doesn't need its own separate ref counting, it is still just a pass-thru to the real object

Reply 55 of 63, by Sol_HSA

User metadata
Rank Member
Rank
Member
aqrit wrote:

Clippers and palettes that are implicitly released...
( wrapper interface never receives a release call that returns "0" )

Didn't know that, but I suppose we can live with a few gigabytes of leaks today before having problems.. =)

aqrit wrote:

the wrapper interface doesn't need its own separate ref counting, it is still just a pass-thru to the real object

Yep, the pass-through wrapper just uses the real object's ref count.

http://iki.fi/sol - my schtuphh

Reply 56 of 63, by Pinkertonius

User metadata
Rank Newbie
Rank
Newbie

Registered just to let you know that for years I have been keeping an eye out for this type of wrapper. Hope you can make it work but if not, at least it's an interesting to see the process involved at trying to do it.

Reply 57 of 63, by Sol_HSA

User metadata
Rank Member
Rank
Member
Pinkertonius wrote:

Registered just to let you know that for years I have been keeping an eye out for this type of wrapper. Hope you can make it work but if not, at least it's an interesting to see the process involved at trying to do it.

Well, don't hold your breath - even if I get CS to work, I can't promise it'll work for other games.

http://iki.fi/sol - my schtuphh

Reply 58 of 63, by Abiteseri

User metadata
Rank Newbie
Rank
Newbie

I found this post while looking for a directx to opengl wrapper so I could double wrap various games -- though not expecting much 😉

(( Insert lengthy rant about nvidia slicing out working code from their stereoscopic driver here ))

I just wanted to say thank you for working on this. Regardless of where it goes from here, it's uplifting to know that someone with experience has interest in such a project, and I wish you great luck and success! I'll be following closely! 😎 😀

Reply 59 of 63, by neofox

User metadata
Rank Newbie
Rank
Newbie

Im having a problem with windows 8 not running my older games that use direct x 7, it will run but the screen will be completely black but i can still hear sound. I looked this issue up it said something to do with older direct x programs using mixed direct x call and not being allow to draw on the screen by something in windows 8, will this wrapper help me fix this issue?