Jump to content


Photo

DDraw Fix (For Slowdowns/Stuttering)


  • Please log in to reply
117 replies to this topic

#1 aqrit

aqrit
  • Member
  • 132 posts

Posted 22 April 2011 - 12:47 PM

PST-Drawfix initializes the DirectDraw object to use the Hardware Emulation Layer for all features.
Running the game using HEL causes mouse cursor artifacts to appear in fullscreen mode, that is also fixed by this patch.

DirectDraw Emulation may not work on any OS before Windows XP
 
http://bitpatch.com/ie_ddrawfix.html

newer versions of wined3d can be found
http://adolfintel.co...3d/index.frag 

 Here is the thread containing other solutions:
How to deal with the DDraw problems of PST and other IE games

------------------------------------------
old info
Attached File  pst-drawfix_weidu.zip   620.3K   21551 downloads

*Note: pst-drawfix has been reported to introduce minor flashes/glitches when casting spells
the best alternative to my patch IMO...
open wined3d.exe inside of 7zip
and extract libwine.dll, wined3d.dll, and ddraw.dll from $SYSDIR into your torment folder
( adds a few seconds to the game's startup time, but worth it. )

Edited by aqrit, 06 August 2015 - 02:49 PM.


#2 Kaeloree

Kaeloree

    Head Molder

  • Administrator
  • 9198 posts

Posted 22 April 2011 - 03:34 PM

Un-spammed, since this isn't spam :) Sorry aqrit!

#3 ghostdog

ghostdog
  • Modder
  • 556 posts

Posted 23 April 2011 - 07:52 AM

Interesting, I'll give it a try. Thanks aqrit !

#4 -i30817-

-i30817-
  • Guest

Posted 25 April 2011 - 05:59 AM

Could you try to find out why the fixpack is crashing in wine as per this thread:
http://www.shsforums...winn-is-retire/

I could test it.

#5 -i30817-

-i30817-
  • Guest

Posted 25 April 2011 - 12:25 PM

Uh. The new wine version has stacktraces again (finally) and i found the bug on wine. It appeared random probably because of some weird non-deterministic c behavior.

Basically,

Original code:
if (!(dc->hSelf = alloc_gdi_handle( &dc->header, magic, &dc_funcs )))
    {
        HeapFree( GetProcessHeap(), 0, dc );
        dc = NULL;
    }
    dc->nulldrv.hdc = dc->hSelf;

What i did

    if (!(dc->hSelf = alloc_gdi_handle( &dc->header, magic, &dc_funcs )))
    {
        HeapFree( GetProcessHeap(), 0, dc );
        dc = NULL;
    }else {
    dc->nulldrv.hdc = dc->hSelf;
    }

Kinda retarded.

#6 -i30817-

-i30817-
  • Guest

Posted 25 April 2011 - 12:32 PM

Opps, my mistake. The tree was not updated.

#7 aqrit

aqrit
  • Member
  • 132 posts

Posted 30 April 2011 - 03:18 PM

does anyone know if the offsets would be different for the 2-cd version of the game?

#8 ghostdog

ghostdog
  • Modder
  • 556 posts

Posted 06 May 2011 - 06:57 AM

Ok, I just gave it a try. It doesn't seem to work correctly for me. When I just use the second patch for the ddraw emulation it works with the usual cursor trails problem. The trail fix however completely distorts the start screen and it's impossible to even start/load the game. Maybe it's the fact that I'm using winXP.

#9 aqrit

aqrit
  • Member
  • 132 posts

Posted 06 May 2011 - 12:41 PM

Thanks for taking a look ghostdog,
this fix is _apparently_ incompatible with the bigg's Widescreen mod.
( It appears that the bigg's Widescreen mod breaks windowed mode for PS:T as well? )

but my 'fix' at least shows that it is something in sub_8300E4 that is misbehaving

The fix works on XP with a vanilla v1.1 (4-cd) install

p.s.
http://www.gibberlings3.net/ is currently down so it took me awhile to git everything

#10 ghostdog

ghostdog
  • Modder
  • 556 posts

Posted 07 May 2011 - 07:15 AM

Yeah I believe it's an issue with the widescreen mod, the windowed mod doesn't seem to work.

#11 aqrit

aqrit
  • Member
  • 132 posts

Posted 30 May 2011 - 06:34 AM

A quick way to get my fix working with the WideScreen Mode
is to update the hard coded screen resolutions in the (windowed mode) function that I'm redirecting program flow thru.

(4-cd file version: 1, 0, 0, 1)
offset: 00430545
original data: 80 02 00 00 (640.)
patch data: --your widescreen mod X resolution (in hex)--

offset: 0043054C
original data: E0 01 00 00 (480.)
patch data: --your widescreen mod Y resolution (in hex)--

Edited by aqrit, 30 May 2011 - 06:52 AM.


#12 aqrit

aqrit
  • Member
  • 132 posts

Posted 01 June 2011 - 06:04 AM

the WideScreen mod either installs for Windowed mode or Fullscreen mode... NOT both (which seems extremely odd)
it goes out and checks torment.ini for FullScreen="?" to decide which it is going to install for :(
so the WideScreen mod does work for windowed mode if you have the game set to windowed mode when you install the widescreen mode ->
(but then it won't work for fullscreen mode...)

#13 ghostdog

ghostdog
  • Modder
  • 556 posts

Posted 02 June 2011 - 09:36 AM

That's interesting. I thought windowed mode didn't work with the widescreen mod, period.

#14 aqrit

aqrit
  • Member
  • 132 posts

Posted 07 June 2011 - 07:24 PM

http://forums.gibber...showtopic=17993

Unfortunately, the guy who did the research for BG1 (and PST) told me that it's not possible to allow both fullscreen scrolling and windowed mode; as such, I'm afraid there's no solution available.

It seems to work for me but I'm in no real position to dispute.

anyways... *bump* rolled a Patcher (see OP)

#15 -Ryza-

-Ryza-
  • Guest

Posted 13 June 2011 - 07:53 AM

Worked for me perfectly, this finally fixes all my graphics problems with PT.
Win7 64bit BTW, and fully modded according to this link.
Big THANKS!

#16 -Ryza-

-Ryza-
  • Guest

Posted 13 June 2011 - 07:55 AM

Also, I have the 2 CD version. (sorry for double post)

#17 aqrit

aqrit
  • Member
  • 132 posts

Posted 13 June 2011 - 10:09 AM

Excellent =)

Can anyone with the 2-CD version please post the offsets displayed by the patcher?
( right-click on the listbox then select "Copy All" )

anyways... here is another testimonial :P

#18 ghostdog

ghostdog
  • Modder
  • 556 posts

Posted 14 June 2011 - 04:10 AM

It works like a charm for both 4CD and 2CD versions ! Great job !

2CD offsets :

v1.0a by aqrit ( www.aqrit.cjb.net )
OS: 5.1

Loading File: C:\Games\Torment2CD\torment.exe
Detected: 2-CD version
DDraw Emulation patch is currently disabled
Cursor trail fix is currently disabled
ddraw_emu offset: 0x00428D6F
cursor_trail offset: 0x00430D2C
workaround_x offset: 0x004311A5
workaround_y offset: 0x004311AC
windowed_x offset: 0x0042F88A
windowed_y offset: 0x0042F891
core_x offset: 0x003CABC1
core_y offset: 0x003CABC8
Select your options then click the 'Apply' button.


I'll pin this thread.

Aqrit, when you feel that the patch is final, you should edit the first post and the title to make it a bit more clear what this is all about. Then I'll unpin the d3dwindower thread, which is more or less obsolete now.

Edited by ghostdog, 14 June 2011 - 04:22 AM.


#19 MrRiddick

MrRiddick
  • Member
  • 1 posts

Posted 17 June 2011 - 01:03 PM

Yes! it works perfect!!! 2-CD version + WinXP + GeForce4MX 440 + ForceWare 93.71 + Ultimate WeiDU Fixpack and no widescreen fix (I have normal 4:3 CRT display, no shitty 16:9 LCD)
Thank you very much, I really hate d3dwindower way or microsoft app compability tool (cursor is not fixed + I need additional 100MB for M$ as usual cause it needs .NET 3.5 blah blah blah)

PS

v1.0a by aqrit ( www.aqrit.cjb.net )
OS: 5.1

Loading File: E:\Planescape - Torment\torment.exe
Detected: 2-CD version
DDraw Emulation patch is currently enabled
Cursor trail fix is currently enabled
ddraw_emu offset: 0x00428D6F
cursor_trail offset: 0x00430D2C
workaround_x offset: 0x004311A5
workaround_y offset: 0x004311AC
windowed_x offset: 0x0042F88A
windowed_y offset: 0x0042F891
core_x offset: 0x003CABC1
core_y offset: 0x003CABC8
Select your options then click the 'Apply' button.



PPS patch says that I should enable software mirroring but I see no difference with or without it

Edited by MrRiddick, 17 June 2011 - 01:52 PM.


#20 i30817

i30817
  • Member
  • 611 posts

Posted 18 June 2011 - 05:24 AM

This should probably go into the fixpack if it's really universal no?