VOGONS


DirectDraw Wrapper

Topic actions

Reply 80 of 101, by jclampy

User metadata
Rank Newbie
Rank
Newbie

WinXP32bit, ATI4670HD, P4EE 3.4Ghz
Video Driver VSync = Always ON

Testing Game "Hisoayu - Dreampainter"
Game normally can only be played fullscreen and has no option's for playing in an windowed mode.

Trying Game For First Time:
Desktop set at resolution with 75Hz
Using nothing at all
Game fullscreen 640x480@75Hz
Runs at 75FPS which is too fast, bullets move across screen too fast for level 1. 😉
NO 'screen tearing'.

Playing Fullscreen:
Desktop set at resolution with 75Hz
Aqrit ddraw.dll with FakeVsync = 1 and FakeVsyncInterval = 17 and ShowFPS = 15
Game fullscreen 640x480@75Hz
Runs at 59-60FPS which is correct speed. 😉
NO 'screen tearing'.

Playing Windowed:
Desktop set at resolution with 1152x864@75Hz
DXWind_v2_01_100 with 'DirectX7' and 'Emulation=None' ticked and x=50 y=50 w=1024 h=768
Aqrit ddraw.dll with FakeVsync = 1 and FakeVsyncInterval = 17 and ShowFPS = 15
Game windowed 1024x768 inside desktop resolution 1152x864@75Hz
Runs at 59-60FPS which is correct speed. 😉
NO 'screen tearing'.

There are more efficient ways to have set this up.
This test was to show that under extreme cirumstances you can still get perfect gameplay.

1280x960 desktop with game in 1276x916 window also worked.

Reply 81 of 101, by jclampy

User metadata
Rank Newbie
Rank
Newbie

I am testing a game called 'Another Zero'. It appears that the game is suppose to run at 40FPS. Also, when you load the game a message box pops up in Japanese with yes/no options and then after you leave that the game goes fullscreen and begins.

Because of that message box DXGL and D3DWindower have major problems when the game goes fullscreen. DXWind only has a minor issue where the screen borders edges which are suppose to be black become transparent instead. If you do move the DXWind game window around then the image gets distorted, so don't do this and no problem. Aqrit's ddraw.dll has none of these problems at all, although it unfortunately can't help out D3DWindower or DXWind if used in combination.

Getting back to the 40FPS; I was thinking of FakeVsyncInterval = 25 (1000/25=40) but I am not sure your ddraw.dll has been made to do that?
As a test I tried FakeVsyncInterval = 50 (1000/50=20) but the framerate didn't go any lower.
In fact setting FakeVsyncInterval to 0/5/10/16/17/20/25/30/50 had no effect at all, framerate was always 40FPS. So, maybe this is being locked by the game and is unchangeable?

So, my question for this post is; "Has your FakeVsyncInterval setting got a maximum and minimum cap and what is it? Or can we go as high or low as we want as long as the game is not locking the framerate internally some how?"

This is an old freeware game, the original authors website went offline around 2002 but can be found at the "wayback internet archives".
If you want to try this game, your best bet is to search in Google "Another Zero Download (Arcade action Game)".

Reply 82 of 101, by cloudstr

User metadata
Rank Newbie
Rank
Newbie

I set FakeVsyncInterval = 1000 in ts2000 and it drop to 1 FPS. Sweet!

Reply 83 of 101, by jclampy

User metadata
Rank Newbie
Rank
Newbie
cloudstr wrote:

I set FakeVsyncInterval = 1000 in ts2000 and it drop to 1 FPS. Sweet!

No difference with 'Another Zero', game must lock the framerate somehow. Wonder if there is a way to overide it?

Also tried another game called 'GanGan Extend' and problem was the opposite. First in the game's options menu you need to change 'Flame' (which should have been 'Frames') to 'FREE' to 'unlock' the framerate. Then I end up getting 65FPS. I have tried alot of things to try and cap it to 60FPS but no luck yet. Anybody finds a solution, would be appreciated.

If you want to try here is some info: http://freegame.on.arena.ne.jp/rank/game/ganganextend.html
Here is authors webpage with download: http://www.geocities.co.jp/SiliconValley-Bay/1604/
His website is made using Adobe Flash. You need to go through 'Enter', 1st one is with intro video, 2nd one goes straight to menu. Go into second menu option 'Bullet', then the second option 'GanGan Extend'. Page should change and show 'Download' button. File is extend.lzh you can use winrar or 7zip compression software to extract.

I think these old games are quite cool and at the least have some interesting features if you enjoy the SHMUP genre. I kind of look at these 'issues' not the individual games, because there will most probably be other games that also have these issues and would be good to find solutions if possible.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
There is another SHMUP called 'Beautiful World' which by default was running at 40FPS which felt slow so I changed some settings in Aqrit.cfg

FakeVsync = 1
FakeVsyncInterval = 16
NoVideoMemory = 1

The 'NoVideoMemory=1' unlocked the framerate. Video card VSync enabled didn't cap it to 60Hz refresh rate which was a shame.

'FakeVsyncInterval = 17' capped the framerate to 53FPS
'FakeVsyncInterval = 16' capped the framerate to 57FPS
'FakeVsyncInterval = 15' capped the framerate to 63FPS

I then tried 'NoVideoMemory = 2' and 'FakeVsyncInterval = 15' which resulted in 59-60FPS.
Noticed now that the screen flickers/blinks every now and again though. Unfortunately changing monitor to 75Hz or disabling video card VSync had no effect. I'll PM Aqrit a .log incase it is the video mode the game is running in, maybe he might have an idea.

Reply 84 of 101, by cloudstr

User metadata
Rank Newbie
Rank
Newbie

You may want to try this config:
FakeVsync=2
FakeVsyncInterval=19
SingleProcAffinity=1

Then use D3DWindower and enable:
Use DDraw Flip Blt
DDraw Blt Wait

Reply 85 of 101, by jclampy

User metadata
Rank Newbie
Rank
Newbie

Ok, tested your settings with TS2000.

This worked better on my computer though;
Aqrit ddraw.dll
FakeVsync=1
FakeVsyncInterval=0
SingleProcAffinity=0 (maybe you need 1 for your CPU, no difference for me)

D3DWindower
Use DDraw Flip Blt ticked (All other three Blt options UNTICKED)
DDraw Colour Emulate ticked
DDraw Colour Convert ticked
DDraw Emulate UNTICKED
Use Foreground Control ticked
and make sure DLL points to your D3dHook.dll

Worked fine here with neglible slow down on replays instead of cutting framerate in half.
Main Menu 30-31FPS
Playing Game 60-61FPS
NO 'screen tearing'

Reply 86 of 101, by cloudstr

User metadata
Rank Newbie
Rank
Newbie

Ok. Set FakeVsync=1 always give me screen tearing with any value of FakeVsyncInterval.

Reply 87 of 101, by jclampy

User metadata
Rank Newbie
Rank
Newbie

Hmm, that is interesting.

So if you put FakeVsync=0 I guess it must work the same as when you put FakeVsync=2 am I right?

What refresh rate do you have your desktop/monitor at while you are playing TS2000?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
My initial research on the internet about the Intel GMA950 someone said that VSync was always enabled, but with your response I am thinking maybe VSync is actually disabled on your computer.
Can you tell me do you usually encounter 'screen tearing' when you watch video or play games. For example Direct3D DirectX8 or DirectX9 games? Some games have a VSync setting and if they were set Enabled then you wouldn't see 'screen tearing' but I am wondering about those games that don't have a VSync setting.

Basically, whatever VSync setting your video chip is set to should hopefully overide whatever a video player or game setting would be. But this is not guaranteed, because even my card has a default setting which will not overide if I want to.

But I can't prove this is the cause of your issue because I have not been able to reproduce it on my computer but I will keep trying.

Maybe somebody else with an Intel GMA950 can shed some light?

Last edited by jclampy on 2012-12-31, 07:45. Edited 1 time in total.

Reply 88 of 101, by jclampy

User metadata
Rank Newbie
Rank
Newbie

Some info from Aqrit;

Being able to specify an output resolution: Changing the resolution has all the same problems as adding windowed mode. You just […]
Show full quote

Being able to specify an output resolution:
Changing the resolution has all the same problems as adding windowed mode. You just can't increase the resolution, you also have to hook the mouse cursor. It may happen some day in the distant future.

FakeVsyncInterval has a min of 1 and a max of 4294967294

Look for an adjustable refresh rate in the next major version.

I plan on adding a ForceVsync option in the next major release
hopefully a lot of these issues will be resolved.

Reply 89 of 101, by cloudstr

User metadata
Rank Newbie
Rank
Newbie

Good new. Can't wait for next ver.

Reply 90 of 101, by Stiletto

User metadata
Rank l33t++
Rank
l33t++

I can't believe DxWnd is still regularly updated.
https://sourceforge.net/projects/dxwnd/

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

Stiletto

Reply 91 of 101, by aqrit

User metadata
Rank Member
Rank
Member

DxWnd now features compatibility stuff, I believe it has eclipsed my ddwrapper project.

===
Here is a "cleaned up" proxy dll for ddraw that currently "does nothing", if anyone is interested...
https://github.com/aqrit/ddwrapper

Reply 92 of 101, by Stiletto

User metadata
Rank l33t++
Rank
l33t++
aqrit wrote:
DxWnd now features compatibility stuff, I believe it has eclipsed my ddwrapper project. […]
Show full quote

DxWnd now features compatibility stuff, I believe it has eclipsed my ddwrapper project.

===
Here is a "cleaned up" proxy dll for ddraw that currently "does nothing", if anyone is interested...
https://github.com/aqrit/ddwrapper

Thanks. It's hard to stay on top of DirectDraw wrapper development since the authors all seem to be dispersed under "support this game" communities. (It'd be neat if you could all work together. I understand a true general-purpose wrapper is impossible, but still...)

I'd be curious to learn what compatibility issues DxWnd fixes, and if it requires running in a window to fix them, or else has it exceeded its original scope?

Looking like complete list of DirectDraw wrappers that create ddraw.dll replacements is:
- ddhack (sol, danialhorton, pf4spthc) (general purpose, tested on Wing Commander series, Starcraft 1, Warcraft 2, Fallout, Fallout 2, Lands of Lore 2, Age of Empires)
- ddwrapper (aqrit) (general purpose)
- cnc-draw (hifi) (general purpose, tested on Command & Conquer 95, Red Alert, Carmageddon, Starcraft 1)
- WineD3D (general purpose, Wine for Windows)
- DXGL (William Feely) (general purpose)
- ie-ddrawfix (aqrit) (for PlaneScape: Torment and other Icewind Dale engine games, using WineD3D)
- ddraw_(hack_viewport3_clear2) (Zeq) (only for Jedi Knight)
- diablopatch (Strange Bytes) (only for Diablo)
- more?

Other notables:
- dxwrapper (sol) (new, general purpose, auto-generating DirectX wrapper, only passthrough for now)

DirectX wrappers that intercept and hook the APIs called by the game and wrap its DirectDraw graphic calls but do not create ddraw.dll replacements include:
- DxWnd (ghotik) (general purpose)
- D3DWindower (menopem) (general purpose)
- bosloader (ronwarez) (Balls of Steel)
- ddfix (TimeSlip, jermi) (Thief Engine games)
- ie-ddrawfix (aqrit) (for PlaneScape: Torment and other Icewind Dale engine games, not using WineD3D)
- nvidia_ddraw_fix (jlanger) (Tested on Baldur's Gate, Icewind Dale 1/2, PlaneScape: Torment)
- many more?

Any others I should look at listing or corrections to make?

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

Stiletto

Reply 93 of 101, by aqrit

User metadata
Rank Member
Rank
Member

(AFAIK) DxWnd does not require going into windowed mode, ddraw compatibility primarily consists of using the hardware emulation layer for everything then handling any idiosyncratic behaviors. I believe it now has support (under one name or another) for everything that my ddwrapper does. It also goes beyond that with a better palette fix,support for ModeX, etc.

http://www.swordofmoonlight.net/ex/
http://jiridvorak.webpark.cz/
http://forums.qhimm.com/index.php?topic=7248.0

of interest:
http://code.google.com/p/hourglass-win32/
https://subversion.assembla.com/svn/lightning … 3D_DDraw_Proxy/
https://bitbucket.org/trass3r/ddrawproxy/
http://code.google.com/p/direct3d7-wrapper/
http://svn.netlabs.org/repos/odin32/trunk/src/ddraw/
https://github.com/apitrace/apitrace/
http://www.japheth.de/HX.html

( Noted just-in-case someone is looking for code to make a proxy dll )
nvidia_ddraw_fix creates a ddraw.dll under a different name, it patches the game replacing the string "ddraw.dll" with "nvddf.dll".
nvidia_ddraw_fix is meant to handle a "off-by-one" bug in the FillRect method with some old drivers
The bug revolves around... right minus left equals the width (DDraw), not 1 less than the width (GDI).
This bug has been has since been fixed in the drivers, also it wouldn't occur under HEL.

Reply 94 of 101, by Lo Wang

User metadata
Rank Member
Rank
Member

Thank you aqrit for this very useful piece of software.

It actually solved a problem I was having with an old game that does seem to draw the screen somewhat disorderly (causing the image to appear as it were "shaking") when vsync's off (which's a necessary evil in this case), though the fix itself comes exclusively through the "ShowFPS" feature, which, by virtue of it's technical requirements, does present the buffered image in a distinctively more concise manner so that only a gentle tearing line is noticed, but the "shaking", it is gone.

That being settled, what are the chances of this nice little app being updated with a new feature that basically handles the framebuffer the way "ShowFPS" does, except the FPS isn't actually displayed/calculated so that this inadvertent fix can be used unobtrusively?

Best regards and sorry for the inconveniences.

"That if thou shalt confess with thy mouth the Lord Jesus, and shalt believe in thine heart that God hath raised him from the dead, thou shalt be saved" - Romans 10:9

Reply 95 of 101, by aqrit

User metadata
Rank Member
Rank
Member

Showfps just Blt's (copies) the number box onto the primary (fake or real) surface, immediately after unlocking or flipping that surface. I wouldn't expect it to have the side-effect you described, unless it is related to the use of the DDBLT_WAIT flag.

I would recommend you try some of the other ddwrapper options and see if they work.
If not try some of the other solutions in this space: dgvoodoo2, dxwnd, DXGL, wined3d

If none of those work, I could change the number box so it is only 1 pixel in size or perhaps even transparent.
What is the name of the game?

Reply 96 of 101, by Lo Wang

User metadata
Rank Member
Rank
Member

Thanks for the reply.

Yes, no other option in the wrapper (or combination of them) actually triggered this beneficial side effect.

The game in question is Diablo II + DirectDraw - vsync (which I forced off directly from the display drivers) on a 32-bit WinXP system.

The reason for going down this path has to do with D2's framerate for single player mode being capped at 25fps. So I've created a new display mode (800x600@50hz) to get rid of the nasty juddering (both 640x480 and 800x600 default to 60hz) and forced 50hz (going any higher with the multiples would have introduced excessive motion blur) with RefreshLock, and having vsync off took care of the stuttering, which's inevitable unless you manage to get a near perfect 50.000hz mode with PowerStrip, but that's not possible on this particular machine.

Your wrapper deals directly with the artifacts (the aforementioned "shaking") byproduct of having vertical synchronization turned off.

The 1 pixel fix would definitely be appreciated.

"That if thou shalt confess with thy mouth the Lord Jesus, and shalt believe in thine heart that God hath raised him from the dead, thou shalt be saved" - Romans 10:9

Reply 97 of 101, by aqrit

User metadata
Rank Member
Rank
Member

interesting, I'll have to see if I can find my copy of Diablo 2 this weekend.
nGlide might be worth checking out as well.

anyways it took me more time to write this post than to alter ShowFPS 😀
http://www.bitpatch.com/downloads/ddwrapper_lowang.zip
link will only be good for 1 week unless I forget to delete it.

enjoy!

Reply 98 of 101, by Lo Wang

User metadata
Rank Member
Rank
Member

Thank you, worked like a charm 😀

I indeed considered nGlide, GLIDE3-to-OpenGL-Wrapper and a couple other similar alternatives, but there's no way to sustain even those miserly 25 fps' when more than a couple enemies show up that have a glow about them. These wrappers are intended for relatively powerful video hardware and this integrated Intel junk from 2009 simply doesn't cut it.

There's also the problem with colored lighting not looking all that good (though it's used subtly and quite effectively on a few things, namely portals), yet at times I swear i couldn't even tell a dungeon from a disco! With ddraw you get a pixel-perfect image without the d3d artifacts and without that rather obtuse choice of lighting.

"That if thou shalt confess with thy mouth the Lord Jesus, and shalt believe in thine heart that God hath raised him from the dead, thou shalt be saved" - Romans 10:9

Reply 99 of 101, by Myloch

User metadata
Rank Oldbie
Rank
Oldbie
aqrit wrote:

DxWnd now features compatibility stuff, I believe it has eclipsed my ddwrapper project.

Believe me, I fixed at least 1 game not working on win7 x64 thanks to your fantastic dll, that latest dxwnd is not even able to run (crash to desktop)

"Gamer & collector for passion, I firmly believe in the preservation and the diffusion of old/rare software, against all personal egoisms"