Posted: Thu Apr 04, 2013 5:06 pm Post subject:
DXGL - a re-implementation of DirectX 1-7 on OpenGL 2.x
I just wanted to bring an excellent, open-source project called DXGL, created by Mr. William Feely to your attention, especially to the members of the Ares project. DXGL is a re-implementation of DirectX versions 1-7 using OpenGL 2.x which is 100% binary-compatible with the Windows ddraw DLL.
Disclaimer
I am not the creator of DXGL!! Instead, Mr. William Feely is. If you want to send feedback to him, don't do it here; this is for discussing how it could benefit Ares. If you want to send feedback to William Feely, the creator of DXGL, please do so on the DXGL official forums: https://www.williamfeely.info/phpBB3/
What does DXGL do?
DXGL, using a special, 100% binary-compatible version of ddraw.dll, allows you to make games which, due to using an older version of DirectX (versions 1-7), have graphics issues, such as incorrect palette colors, missing effects, or simply not running at all, run as they should. It also allows for a wide variety of options, such as scaling the in-game resolution to your actual resolution (instead of changing the actual resolution of your monitor), applying antialiasing and anisotropic filtering to 3D objects, and adding additional color depths and monitor resolutions.
Also, in terms of speed, DXGL can also speed up older games since such things as palette functions (creation/destruction, rendering, swapping, etc.), sprite rendering, lighting effects, and other DirectX-based functions are performed on the graphics card via OpenGL.
So what? Yuri's Revenge uses DirectX 8.0.
You're referring to this, right? If so, that information appears to be inaccurate as DXGL actually works on Yuri's Revenge - not well, but it works. If you're not, and the source isn't Wikipedia, please post your info in this topic so I can correct this bit.
Does DXGL work with Yuri's Revenge now?
As of 04/04/2013, the latest version of DXGL runs Yuri's Revenge. However, you won't be playing a game with it, as the menus are very buggy, and when a level loads, everything but the music freezes.
Again, so what? What's so special about this that it should be implemented in Ares?
From a re-implementation standpoint alone, good point. Players could install DXGL separately from Ares without issue. However, when you look at how it re-implements it, therein lies the possibilities. For example, many assets in Yuri's Revenge are palette-based, especially animations. DXGL uses a GLSL shader to handle palettes. Thus, by exploiting how DXGL palettes operates, Ares could add additional parameters for palette handling, such as palette swapping. Palette swapping, if done every frame and fast enough, could result in an image which appears much more colorful than it actually is; such a technique was used for the Game Boy Color version of Cannon Fodder.
04/04/2013: Edited "So what?" section to make its meaning clearer.[/b] 04/05/2013: Clarified that I am not the author of DXGL and added a section on how DXGL could be useful to Ares.[/b] Last edited by Expack on Fri Apr 05, 2013 2:06 pm; edited 2 times in total QUICK_EDIT
Hmm Age of Empires 2 has color problems. Lords of the realm 2 also has some animations playing too fast. Wonder if this could be of help. _________________ Free Tibed!
EA for worst company of the decade! QUICK_EDIT
Red Alert 2 (1.006) started, the video played fine after that the menu takes a while to show up, clicking the buttons makes it freeze for ~15 seconds, Yuri's Revenge (1.001) gave a invisible fatal error.
TS started for me but it was just as painfully slow as RA2 in menus.
DXGL 0.5.0, all on global defaults, and no-cd cracks on all games(the cracks are just the launchers, except for this patch http://www.stuffhost.de/files/cnc/CnCPatcher.htm game exe's are not touched.
Red Alert 2 (1.006) started, the video played fine after that the menu takes a while to show up, clicking the buttons makes it freeze for ~15 seconds, Yuri's Revenge (1.001) gave a invisible fatal error.
TS started for me but it was just as painfully slow as RA2 in menus.
DXGL 0.5.0, all on global defaults, and no-cd cracks on all games(the cracks are just the launchers, except for this patch http://www.stuffhost.de/files/cnc/CnCPatcher.htm game exe's are not touched.
Unless it actually uses DirectX 7.0a like Red Alert 2, Yuri's Revenge not working with DXGL's ddraw.dll is to be expected - the officially-stated DirectX requirement for the expansion is DirectX 8.0, while DXGL only supports up to DirectX 7.
I find it interesting that DXGL actually works with the CnC Patcher. Since, to my understanding, the Patcher makes certain temporary graphics only be created in system RAM instead of VRAM, to me, this issue indicates either missing DirectX functions or a problem in how DXGL handles VRAM-to-RAM copying. Of course, I could very easily be wrong on this.
As for the slowness...without knowing how to debug DXGL's interactions with Red Alert 2 and Tiberian Sun, I don't know what's going on there other than "missing DirectX functions". This, right here, betrays the double-edged sword of DXGL: where DirectX functions are implemented (correctly, of course), things run flawlessly; where they aren't implemented, or implemented completely, things either don't work at all or work poorly. QUICK_EDIT
Red Alert 2 (1.006) started, the video played fine after that the menu takes a while to show up, clicking the buttons makes it freeze for ~15 seconds, Yuri's Revenge (1.001) gave a invisible fatal error.
TS started for me but it was just as painfully slow as RA2 in menus.
DXGL 0.5.0, all on global defaults, and no-cd cracks on all games(the cracks are just the launchers, except for this patch http://www.stuffhost.de/files/cnc/CnCPatcher.htm game exe's are not touched.
Unless it actually uses DirectX 7.0a like Red Alert 2, Yuri's Revenge not working with DXGL's ddraw.dll is to be expected - the officially-stated DirectX requirement for the expansion is DirectX 8.0, while DXGL only supports up to DirectX 7.
I find it interesting that DXGL actually works with the CnC Patcher. Since, to my understanding, the Patcher makes certain temporary graphics only be created in system RAM instead of VRAM, to me, this issue indicates either missing DirectX functions or a problem in how DXGL handles VRAM-to-RAM copying. Of course, I could very easily be wrong on this.
As for the slowness...without knowing how to debug DXGL's interactions with Red Alert 2 and Tiberian Sun, I don't know what's going on there other than "missing DirectX functions". This, right here, betrays the double-edged sword of DXGL: where DirectX functions are implemented (correctly, of course), things run flawlessly; where they aren't implemented, or implemented completely, things either don't work at all or work poorly.
I only tested the menus.
YR disc readme.txt does not have a YR specific DirectX paragraph but only RA2 has
Quote:
1.1. Microsoft DirectX:
Command & Conquer: Red Alert 2 is a Microsoft DirectX application.
Version 7.0 of Microsoft DirectX is included on the CD and you have the
option to install it when Command & Conquer: Red Alert 2 is installed.
Under some early versions of Windows 95, DirectX 7.0 cannot be installed
directly from the Command & Conquer: Red Alert 2 installer. If this occurs,
please run DXSetup.exe located on the CD in the DXSetup folder.
All Microsoft DirectX drivers are located in the DXSetup folder off of the
root of the CD. To reinstall the Microsoft DirectX drivers go into the
DXSetup folder and run DXSetup.exe. You can explore the CD by
choosing the "Explore the CD" option in the AutoPlay title screen. If you
have difficulty running Windows 95/98 after these new Microsoft DirectX
drivers have been installed, please contact your local Microsoft subsidiary,
or write:
EDIT
In the test app
BitFast background and spirtes freeze when i am not moving the mouse, and 3D test's just show a black window
tested on Nvidia 9500 GT, AMD Athlon X2 +4800
Red Alert 2 (1.006) started, the video played fine after that the menu takes a while to show up, clicking the buttons makes it freeze for ~15 seconds, Yuri's Revenge (1.001) gave a invisible fatal error.
TS started for me but it was just as painfully slow as RA2 in menus.
DXGL 0.5.0, all on global defaults, and no-cd cracks on all games(the cracks are just the launchers, except for this patch http://www.stuffhost.de/files/cnc/CnCPatcher.htm game exe's are not touched.
Unless it actually uses DirectX 7.0a like Red Alert 2, Yuri's Revenge not working with DXGL's ddraw.dll is to be expected - the officially-stated DirectX requirement for the expansion is DirectX 8.0, while DXGL only supports up to DirectX 7.
I find it interesting that DXGL actually works with the CnC Patcher. Since, to my understanding, the Patcher makes certain temporary graphics only be created in system RAM instead of VRAM, to me, this issue indicates either missing DirectX functions or a problem in how DXGL handles VRAM-to-RAM copying. Of course, I could very easily be wrong on this.
As for the slowness...without knowing how to debug DXGL's interactions with Red Alert 2 and Tiberian Sun, I don't know what's going on there other than "missing DirectX functions". This, right here, betrays the double-edged sword of DXGL: where DirectX functions are implemented (correctly, of course), things run flawlessly; where they aren't implemented, or implemented completely, things either don't work at all or work poorly.
I only tested the menus.
YR disc readme.txt does not have a YR specific DirectX paragraph but only RA2 has
Quote:
1.1. Microsoft DirectX:
Command & Conquer: Red Alert 2 is a Microsoft DirectX application.
Version 7.0 of Microsoft DirectX is included on the CD and you have the
option to install it when Command & Conquer: Red Alert 2 is installed.
Under some early versions of Windows 95, DirectX 7.0 cannot be installed
directly from the Command & Conquer: Red Alert 2 installer. If this occurs,
please run DXSetup.exe located on the CD in the DXSetup folder.
All Microsoft DirectX drivers are located in the DXSetup folder off of the
root of the CD. To reinstall the Microsoft DirectX drivers go into the
DXSetup folder and run DXSetup.exe. You can explore the CD by
choosing the "Explore the CD" option in the AutoPlay title screen. If you
have difficulty running Windows 95/98 after these new Microsoft DirectX
drivers have been installed, please contact your local Microsoft subsidiary,
or write:
EDIT
In the test app
BitFast background and spirtes freeze when i am not moving the mouse, and 3D test's just show a black window
tested on Nvidia 9500 GT, AMD Athlon X2 +4800
Do you need the DxDiag as well?
I'd report that to the developer via DXGL's Bugzilla bug-reporting system (see my original post); the DxDiag might be useful as an attachment to said bug report. You could also comment on the bug report I made for Red Alert 2: https://www.williamfeely.info/bugzilla/show_bug.cgi?id=16
Also, I was able to test DXGL with Red Alert 2 and Yuri's Revenge on my laptop with its ATI Mobility Radeon HD 5450. I was able to get into the menus for both, with Yuri's Revenge only working when "Change Color Depth" was checked in DXGL's config utility, and had almost exactly the issue you had - except I needed to CTRL+ALT+DELETE out of both and re-enter to get the menu icons to show up. I also tried to test a game, but when a level loaded, it froze shortly after (with the odd exception of the current music track). QUICK_EDIT
I'd report that to the developer via DXGL's Bugzilla bug-reporting system (see my original post); the DxDiag might be useful as an attachment to said bug report. You could also comment on the bug report I made for Red Alert 2: https://www.williamfeely.info/bugzilla/show_bug.cgi?id=16
Can you report it in my name, im not receiving the confirmation email(yahoo).
EDIT Got it
The email has a bug tho
Quote:
To continue creating an account using this email address, visit the
following link by January 3, 1970 at 19:00 EST:
Joined: 22 Nov 2010 Location: Iszkaszentgyorgy, Hungary
Posted: Fri Apr 05, 2013 9:49 am Post subject:
I kinda like what I'm seeing here.
However:
- I see no reasons where would DX 8.0 code be used within YR.
- I amn't much interested in this project, because I amn't a graphics/drawing coder.
- I also don't see any reason why would this have a special interest from Ares's POV.
How this thing could be well than useful if it can replace the deprecated DirectDraw functions for old Win95/98 games played on any post-XP systems. Goodluck with that, btw. _________________ "If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more... QUICK_EDIT
/offtopic
I think Firestorm uses dx7 (even if TS uses 6)
FS readme states it uses DX6, you can't assume just because the DX7 redist are in the CD is a DX7 game, for example Freelancer is a DX8 game and it comes with DX9 redist in the disc,
another example is Emperor Battle For Dune it comes with DX8 and even states it's a DX8 in the readme but uses d3drm.dll (DirectX 7 retained mode) and ddraw.dll (DirectDraw),
Retained mode no longer exists in DirectX8
i discovered this when i tried to add ENB shader hack to it, i checked the loaded dll's and it turned out it uses ddraw and d3drm not d3d8 _________________ Tiberian Dawn, Red Alert, Tiberian Sun ,Red Alert 2,Renegade, Command & Conquer 3,Tiberium and Tiberium Wars and Westwood related image & video archive
https://picasaweb.google.com/113361105083292812413?noredirect=1
Skype live:tomsons26
Don't forget to state who are you otherwise i'll ignore the invite QUICK_EDIT
Joined: 22 Nov 2010 Location: Iszkaszentgyorgy, Hungary
Posted: Fri Apr 05, 2013 3:05 pm Post subject:
Which is pointless IMO.
If you download OS SHP Builder, it already comes with all the palettes RA2 and TS uses. Palswapping to get more colors into the engine doesn't mean anything, because of the fact that modders can already do that. Ares provides features for such out of the box.
Really, this isn't a Game Boy Color with a limited amount of colors visible to the game. The RA2 engine can handle unlimited amount of palettes, it's just WW which set limits to it.
You should at least know what can mods do. _________________ "If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more... QUICK_EDIT
I just stumbled upon this
https://github.com/jarikomppa/dxwrapper The game actually launches and loads, input works, bik's work with it but its really slow, maybe someone could fix it up for YR?
Edit
Read the description it just logs ddraw, but it could be useful to anyone who wants to try to fix YR's performance issues _________________ Tiberian Dawn, Red Alert, Tiberian Sun ,Red Alert 2,Renegade, Command & Conquer 3,Tiberium and Tiberium Wars and Westwood related image & video archive
https://picasaweb.google.com/113361105083292812413?noredirect=1
Skype live:tomsons26
Don't forget to state who are you otherwise i'll ignore the invite QUICK_EDIT
Joined: 22 Nov 2010 Location: Iszkaszentgyorgy, Hungary
Posted: Thu Nov 21, 2013 6:44 pm Post subject:
The performance issues are fixed with the fix ported out from Ares already, AFAIK.
http://www.stuffhost.de/files/cnc/ _________________ "If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more... QUICK_EDIT
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum