VOGONS


DirectDraw Wrapper

Topic actions

First post, by aqrit

User metadata
Rank Member
Rank
Member

I've slapped together a proxy dll to make it more convenient to tweak some ddraw stuff

http://bitpatch.com/ddwrapper.html

Force Direct Draw Emulation
Disable High Dpi Scaling
Limit Processor Affinity
BLT Mirroring
Fake Vsync
No Video Memory
Stolen palette fix ( dwAppHackFlags )

Enjoy!

Note: This is for DirectDraw only games.
It will not work if any Direct3D is used.

Last edited by aqrit on 2013-10-16, 06:26. Edited 2 times in total.

Reply 1 of 101, by F2bnp

User metadata
Rank l33t
Rank
l33t

So this basically translates DirectDraw calls to Direct 3D? Or OpenGL?
Either way, it would be fantastic news for old games not working properly in modern systems! I don't have the time to test it out, but thanks for this anyway 😁

Reply 5 of 101, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Short version: it changes certain flags when programs call directx, which results in more compatible behaviour.
long version: it does more, but read the source, it's included.

Water flows down the stream
How to ask questions the smart way!

Reply 7 of 101, by Sune Salminen

User metadata
Rank Member
Rank
Member

This is cool.

There's a reference to "Axis & Allies: Iron Blitz" in the source but I'm guessing there must be several other games from the late 90's that'll work or work better on modern Windows using your wrapper.

Do you have a list of titles? I don't know any DDRAW-only games.

If you prefer to keep a it a secret and let people discover this for themselves that's fine with me though! 🤐

Last edited by Sune Salminen on 2012-03-05, 04:54. Edited 2 times in total.

Reply 8 of 101, by aqrit

User metadata
Rank Member
Rank
Member

the reference to Iron blitz is for a bug that I have not fixed 🙁
however, I have created a patch for Iron Blitz ( that isn't done yet ) but should be enough to get it running. here

The fixes should be fairly generic
I don't have a list of ddraw games

Force Direct Draw Emulation + Fake Vsync should be tried for any ddraw game that doesn't run, is glitched, or runs too slow
( used it to get Cyber Gladiators running the other day )

Limit Process Affinity - is not for a ddraw issue but it is useful to have applied to games of the ddraw era ( smack videos played by Axis & Allies )

Blt Mirroring is used by infinity engine games like Baldur's Gate 2

Full swap flipping - fixes a issue with Planescape: Torment

Stolen palette fix - works for Diablo: Hellfire but may not work for other games such as Epic40k: Final Liberation

Reply 10 of 101, by theHellDog

User metadata
Rank Newbie
Rank
Newbie

If it were possible to use it with «Wine» — had be great! 😀
I play to «The Hell» (Diablo I Mod) from Linux and had tired always to use monkey patched «Wine» for normal game.

It is possible to write that cross-dll's for wine and native windows system?

Reply 12 of 101, by theHellDog

User metadata
Rank Newbie
Rank
Newbie
DosFreak wrote:

Why not just fix Wine?

If you had wrote the patch, that will be accepted by «wine team»… 😎
That's «monkey patch» allows you to play game, but not well:

  • Can not be used last version of wine.
  • Wine sources should be patched and builded manually. (But for that i have own ebuild) + Time, spent for compilation.
  • Games still contain some problems/artifacts.

Reply 16 of 101, by aqrit

User metadata
Rank Member
Rank
Member

for Wine set ColorFix = 0 in the config file
( edits an internal ddraw struct ... defined by a wine header )

Nothing here will help get Diablo 1 running in Wine

The only patch that might be of interest for Wine is the
RedundantFlip. ( not needed on my PC ) Might be caused in wine by a buggy driver?

I'm not very familiar with Wine so to make sure the proxy dll was loading I just renamed the dll then hex edited the IAT of the target game

Reply 17 of 101, by theHellDog

User metadata
Rank Newbie
Rank
Newbie
wd wrote:

Did you try? Why shouldn't it work?

Yes. See backtrace…
As Aqrit wrote — problem in "ColorFix" option.
With ColorFix = 0 — game launches successfully, but he doesn't have positive effect for Diablo I. 😒

aqrit wrote:

I'm not very familiar with Wine so to make sure the proxy dll was loading I just renamed the dll then hex edited the IAT of the target game

I'll checked — dll been loaded successfully.

Attachments

  • Filename
    backtrace.txt
    File size
    5.94 KiB
    Downloads
    206 downloads
    File license
    Fair use/fair dealing exception

Reply 18 of 101, by aqrit

User metadata
Rank Member
Rank
Member

Still around HellDog?

The Wine Appdb for Diablo has 'that' patch for the current source (check the comments)

I've added a similar hack to the proxy dll which leaves Hellfire
still broken but it gets the menu's back ( kinda ) while still retaining the intro movies

set Wine_Diablo = 1 in the config file

---

other changes:

ColorFix now defaults to off

Now wraps the clipper object to keep it from crashing when it gets passed a wrapped directdraw object

Reply 19 of 101, by Micha

User metadata
Rank Newbie
Rank
Newbie

Hi, this wrapper is a great thing, i use it for "Horse and muskets ". Would it maybe be possible to
update it for "open general" . At the moment the game does not start with the wrapper.
http://sourceforge.net/apps/mediawiki/opengen … title=Main_Page. By the way, has this
wrapper a antialising effect ?
A big thank you for this outstanding work.