Direct3D 11 via DDraw.dll

A Forum dedicated to the Suggestion, Creation and Editing of XWA Dynamic Link Library Files

Moderator: JeremyaFr

Re: Direct3D 11 via DDraw.dll

User avatar
ual002
XWAU Member
Posts: 983
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Thu Jul 25, 2019 11:19 am

I suspected as such, and to really stress test I had a huge mission, with a very populated hangar. Eventually, it just stopped crashing. And at that stage I was only adding stuff to the mission. I'm not sure what it was in the end.
Image Image Image Image Image

Bman
Lieutenant Commander
Posts: 1167
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Thu Jul 25, 2019 10:53 pm

It shouldn't crash. I have a boat load of Tie's, other craft, and some misc objects in Dreadnaught hangar et al, and they run fine. Sometimes a little choppy, but moving droids might have some effect. You might want to check a few of your hook .cfg files and increase values.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

User avatar
Driftwood
Admiral (Moderator)
Posts: 2174
Joined: Wed Oct 22, 2003 11:01 pm
Contact:

Post by Driftwood » Sat Jan 04, 2020 3:04 am

Not sure what DDraw I'm running currently, I'm not sure what latest is for all the graphics upgrades/head tracking is offhand.
Screenshot 2020-01-03 18.59.41.png
Screenshot 2020-01-03 19.00.39.png

Code: Select all

Fault bucket 1437280813446396162, type 1
Event Name: APPCRASH
Response: Not available
Cab Id: 0

Problem signature:
P1: XwingAlliance.exe
P2: 2.0.0.2
P3: 3765a9b7
P4: KERNELBASE.dll
P5: 10.0.18362.535
P6: 5bd9df62
P7: e06d7363
P8: 001135d2
P9: 
P10: 

Attached files:
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER5A5F.tmp.dmp
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER5BB8.tmp.WERInternalMetadata.xml
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER5BD8.tmp.xml
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER5BE6.tmp.csv
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER5C15.tmp.txt

These files may be available here:
\\?\C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_XwingAlliance.ex_e8871ae03baae8a99a32d66863f5e3e350572a5b_35d6de86_8addac3d-6893-4d60-acc6-0a7785e98b88

Analysis symbol: 
Rechecking for solution: 0
Report Id: 78157b1a-fbbf-4fe2-be40-e6381aaa287f
Report Status: 268435456
Hashed bucket: 65125e0fba6f65ae03f23f48e7f4f902
Cab Guid: 0

Code: Select all

Application: XwingAlliance.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: exception code e06d7363, exception address 759335D2
Stack:

Code: Select all

Faulting application name: XwingAlliance.exe, version: 2.0.0.2, time stamp: 0x3765a9b7
Faulting module name: KERNELBASE.dll, version: 10.0.18362.535, time stamp: 0x5bd9df62
Exception code: 0xe06d7363
Fault offset: 0x001135d2
Faulting process id: 0x45f4
Faulting application start time: 0x01d5c2ab36618dbc
Faulting application path: C:\Program Files (x86)\Steam\steamapps\common\Star Wars X-Wing Alliance STEAM - UCPv2.6 Imperial\XwingAlliance.exe
Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
Report Id: 63e2693f-2a99-443f-a8be-1cd01423ed08
Faulting package full name: 
Faulting package-relative application ID: 
You do not have the required permissions to view the files attached to this post.

User avatar
blue_max
XWAU Member
Posts: 2293
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Sat Jan 04, 2020 6:32 am

If you're running the VR mod, try setting "dynamic_cockpit_enabled = 0" in Dynamic_Cockpit.cfg, "ssao_enabled = 0" in SSAO.cfg and "bloom_enabled = 0" in Bloom.cfg. Also, the VR mod is not compatible with MSAA, so try setting "EnableMultisamplingAntialiasing = 0" in ddraw.cfg. What are your resolution settings?

Another way to tell which ddraw you're running is by looking at the size of ddraw.dll. Jeremy's is about 254Kb and the VR mod is ~713Kb.

Note to self: I should *really* change the manifest for the VR mod so that it's easier to tell them apart :P

User avatar
Driftwood
Admiral (Moderator)
Posts: 2174
Joined: Wed Oct 22, 2003 11:01 pm
Contact:

Post by Driftwood » Sat Jan 04, 2020 5:31 pm

I'm guessing that I'm using an outdated version of Jeremya's then.

What's the current (stable) ddraw.dll for all the graphics updates?

User avatar
JeremyaFr
XWAU Member
Posts: 3918
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sat Jan 04, 2020 7:43 pm

Jeremy's version is stable.
Reimar's version is in RC state.
blue_max version is WIP.

The new graphic improvements are in blue_max's version. I don't know if there is a stable release.

User avatar
blue_max
XWAU Member
Posts: 2293
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Sat Jan 04, 2020 8:02 pm

JeremyaFr wrote:
Sat Jan 04, 2020 7:43 pm
The new graphic improvements are in blue_max's version. I don't know if there is a stable release.
This would be the most stablest release of the VR mod; but I already know it has a bug in the Dynamic Cockpit when trying to move the HUD:
https://www.dropbox.com/s/2u3blv8ggf9e5 ... 0.zip?dl=0

@Driftwood: Definitely try Jeremy's version first as that's the golden standard.

User avatar
Darksaber
Vice Admiral
Posts: 10931
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Sat Jan 04, 2020 8:27 pm

@Driftwood, if your using Blue Max's Shaders and Dynamic Cockpit you will definitely have to use the latest version of Blue Max's DDraw.dll
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

User avatar
Driftwood
Admiral (Moderator)
Posts: 2174
Joined: Wed Oct 22, 2003 11:01 pm
Contact:

Post by Driftwood » Sat Jan 04, 2020 8:35 pm

blue_max wrote:
Sat Jan 04, 2020 8:02 pm
JeremyaFr wrote:
Sat Jan 04, 2020 7:43 pm
The new graphic improvements are in blue_max's version. I don't know if there is a stable release.
This would be the most stablest release of the VR mod; but I already know it has a bug in the Dynamic Cockpit when trying to move the HUD:
https://www.dropbox.com/s/2u3blv8ggf9e5 ... 0.zip?dl=0

@Driftwood: Definitely try Jeremy's version first as that's the golden standard.
Okay, so I don't have a VR set but I do use TrackIR, I don't believe I use the VR files; as the two versions are different? I had your bloom and shaders enabled at one point, but I'm guessing I reverted to a backed up install at some point due to buggering my install end of last year because the bloom and shader effects are gone. Head tracking still works.

So to ensure I don't break stuff inadvertently right now as it looks like I need to update some stuff, what I would like is a reminder which files I need to have the following:

1. Head Tracking
2. Bloom/Shaders
3. Dynamic cockpit

User avatar
blue_max
XWAU Member
Posts: 2293
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Sat Jan 04, 2020 8:44 pm

Driftwood wrote:
Sat Jan 04, 2020 8:35 pm
Okay, so I don't have a VR set but I do use TrackIR, I don't believe I use the VR files; as the two versions are different?
I don't have a separate version for VR. Everything is stuffed on the same "VR mod ddraw": bloom, SSDO, hyperspace, etc. All of these effects can be activated without VR. Maybe I should use a different name; but I suck at naming things. Suggestions are welcomed :D

For the bug you're reporting, I'd first try Jeremy's ddraw to see if it happens again. Then you can try and enable the "VR mod" again.
1. Head Tracking
This is done in the Hook_Cockpitlook.dll. Since you're a TrackIR user, may I interest you in trying the new hook with 5dof support? I still need someone to help me test that :D
2. Bloom/Shaders
3. Dynamic cockpit
These effects are in the "VR Mod". They are activated by default through the Bloom.cfg and Dynamic_Cockpit.cfg files, respectively.

User avatar
Driftwood
Admiral (Moderator)
Posts: 2174
Joined: Wed Oct 22, 2003 11:01 pm
Contact:

Post by Driftwood » Sat Jan 04, 2020 9:14 pm

Hmm, ok. It makes sense to have everything in one package anyways especially if MP is a concern to reduce version mismatch issues.

Maybe instead of calling it XWA_VR, maybe call it XWA _SHIP

IE: X-Wing Alliance Shader and Human Interface Project.

User avatar
JeremyaFr
XWAU Member
Posts: 3918
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Mon Feb 24, 2020 5:29 pm

UPDATE

Hello,
I've updated the DDraw dll.

I've added support for the d3d hook.

Bman
Lieutenant Commander
Posts: 1167
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Thu Feb 27, 2020 1:40 am

Hi Jeremy,
Thank you for the version xwa_ddraw_d3d11.1.3.8.zip. I'm trying to figure out, so does Blue_Max use your latest ddraw file and add his code to it to utilize the various ongoing projects, or do we use your version and use the xwa_hook_main_no_dinput.zip to use the project files, minus his ddraw.dll file? Maybe that's a question for Blue_Max or perhaps you guys could coordinate future releases so some new feature isn't missing in one version or the other. Just wondering to make things easier and compatible. Thanks.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

User avatar
blue_max
XWAU Member
Posts: 2293
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Thu Feb 27, 2020 5:19 am

I try to keep my version up-to-date with Jeremy's; but I haven't merged his changes yet as they will most likely break the VR mod. Not his fault, it's just going to take a while to merge -- but it will definitely happen :)

I think Jeremy's ddraw is the golden standard and it's probably better to keep it separate for that reason.

Bman
Lieutenant Commander
Posts: 1167
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Thu Feb 27, 2020 5:59 pm

Thanks Blue Max. Does his version allow us to use your projects then like the bloom effects etc. I assume it doesn't but I would think most peeps will want to utilize all the cool stuff you have developed. It just might get confusing for new people who come along. Thanks for reply.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

User avatar
blue_max
XWAU Member
Posts: 2293
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Thu Feb 27, 2020 6:26 pm

Bman wrote:
Thu Feb 27, 2020 5:59 pm
Thanks Blue Max. Does his version allow us to use your projects then like the bloom effects etc.
Jeremy's ddraw does not implement bloom, or any of the new effects (and this is OK, that way it stays as the golden standard). I haven't actually tried using the new hook with my ddraw; but from looking at the code changes, I think it's going to break.

User avatar
JeremyaFr
XWAU Member
Posts: 3918
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Thu Feb 27, 2020 8:16 pm

Hello,

I've taken a look to the code of your execute buffer method.
It seems that it can be made compatible with my d3d hook with a few changes.

Your code needs access to the vertices and reads the player index variable.
I can modify the d3d hook to keep the vertices in the buffer of the execute buffer. I can also send the player index to the DDraw dll via the execute buffer instructions.
Do you need more data?

User avatar
blue_max
XWAU Member
Posts: 2293
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Thu Feb 27, 2020 11:09 pm

Thanks Jeremy, is the player index related to the vertex/index buffer? I thought that was only used to access the right offset in PlayerDataTable in multiplayer/single player mode. If I understand this correctly, this variable is global and can be accessed from XWA's heap in a specific offset, so no need to include that in the hook (?)

Keeping the vertices/indices in the execute buffer after the map/unmap operation might help, yes. That's one of the things I was thinking I might need to make a copy of anyway. Thanks!

EDIT: One more question, Jeremy: did you batch together any draw calls? From my quick reading of your code, it looks like the answer is no, we still have the same number of draw calls. Just wanted to check.

User avatar
JeremyaFr
XWAU Member
Posts: 3918
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Fri Feb 28, 2020 7:19 pm

About the player index, you're right. The player index is assigned at mission start and doesn't change in-flight. So there is no need to include it in he hook. This variable can be read with its offset.

So the only needed data is the vertices in the execute buffer buffer. Correct me if i'm wrong.

The draw calls are not batched.

User avatar
JeremyaFr
XWAU Member
Posts: 3918
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Fri Feb 28, 2020 7:27 pm

Bman wrote:
Thu Feb 27, 2020 5:59 pm
It just might get confusing for new people who come along.
Hello Bman,
There are currently 3 versions of the DDraw dll:
  • Jeremya: the base version
  • Reimar: this version adds support for the previous games of the serie
  • blue_max: this version adds new effects, dynamic cockpits, VR support
I tink that this is not too confusing.

User avatar
JeremyaFr
XWAU Member
Posts: 3918
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Fri Feb 28, 2020 8:18 pm

UPDATE
Hello,
I've updated the d3d hook and the DDraw dll.

User avatar
blue_max
XWAU Member
Posts: 2293
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Fri Feb 28, 2020 10:54 pm

JeremyaFr wrote:
Fri Feb 28, 2020 7:19 pm
So the only needed data is the vertices in the execute buffer. Correct me if i'm wrong.
Well, that, and the index buffer too. Thanks for modifying the hook, Jeremy! I appreciate your help :)

Bman
Lieutenant Commander
Posts: 1167
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Sat Feb 29, 2020 5:49 am

Thanks Jeremy and Blue Max.. Yeah I was just wondering how to get the best of both versions into one comprehensive ddraw.dll file. I've never compiled dynamic link library files before so I was just wondering if maybe a function or procedure call could be used to reference another hook file. Outside my scope of understanding. Thanks
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

User avatar
JeremyaFr
XWAU Member
Posts: 3918
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sat Feb 29, 2020 1:32 pm

blue_max wrote:
Fri Feb 28, 2020 10:54 pm
Well, that, and the index buffer too. Thanks for modifying the hook, Jeremy! I appreciate your help :)
You're welcome.

I've updated the d3d hook.
Now the ExecuteBuffer buffer contains both vertices and indices, and triangles and render states.

User avatar
JeremyaFr
XWAU Member
Posts: 3918
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sat Apr 11, 2020 12:55 pm

UPDATE

Hello,
I've uploaded DDraw dll v1.3.9.

It includes a new text renderer.

See New Text Renderer WIP

Post Reply