Page 10 of 14

Re: Direct3D 11 via DDraw.dll

Posted: Fri Jan 11, 2019 3:34 pm
by JeremyaFr
Thanks. It's a good idea. :thumbs:

Re: Direct3D 11 via DDraw.dll

Posted: Sat Jan 12, 2019 3:14 pm
by JeremyaFr
HELP
Direct3D11_texture_format_16.zip
Hello,
Can someone execute this test on a Windows 7 machine?

On Windows 10, I get:
OS = Microsoft Windows 10 Famille

FeatureLevel = FeatureLevel91

B8G8R8A8UNorm Format Support = Texture2D, Texture3D, TextureCube, ShaderLoad, ShaderSample, Mip, MipAutogen, RenderTarget, Blendable, CpuLockable, MultisampleResolve, Display, MultisampleRenderTarget, BackBufferCast, VideoProcessorOutput, VideoProcessorInput
B4G4R4A4UNorm Format Support = Texture2D, TextureCube, ShaderLoad, ShaderSample, Mip, CpuLockable
B5G5R5A1UNorm Format Support = Texture2D, TextureCube, ShaderLoad, ShaderSample, Mip, CpuLockable
B5G6R5UNorm Format Support = Texture2D, TextureCube, ShaderLoad, ShaderSample, Mip, MipAutogen, RenderTarget, Blendable, CpuLockable, MultisampleResolve, MultisampleRenderTarget

FeatureLevel = FeatureLevel100

B8G8R8A8UNorm Format Support = Buffer, InputAssemblerVertexBuffer, Texture1D, Texture2D, Texture3D, TextureCube, ShaderLoad, ShaderSample, Mip, MipAutogen, RenderTarget, Blendable, CpuLockable, MultisampleResolve, Display, CastWithinBitLayout, MultisampleRenderTarget, MultisampleLoad, BackBufferCast, VideoProcessorOutput, VideoProcessorInput
B4G4R4A4UNorm Format Support = Texture1D, Texture2D, Texture3D, TextureCube, ShaderLoad, ShaderSample, Mip, MipAutogen, RenderTarget, Blendable, CpuLockable, MultisampleResolve, MultisampleRenderTarget, MultisampleLoad
B5G5R5A1UNorm Format Support = Texture1D, Texture2D, Texture3D, TextureCube, ShaderLoad, ShaderSample, Mip, MipAutogen, RenderTarget, Blendable, CpuLockable, MultisampleResolve, MultisampleRenderTarget, MultisampleLoad
B5G6R5UNorm Format Support = Texture1D, Texture2D, Texture3D, TextureCube, ShaderLoad, ShaderSample, Mip, MipAutogen, RenderTarget, Blendable, CpuLockable, MultisampleResolve, MultisampleRenderTarget, MultisampleLoad
It is to see which textures formats are supported, specialy the 16-bpp formats.

Re: Direct3D 11 via DDraw.dll

Posted: Sat Jan 12, 2019 3:36 pm
by Darksaber
Here you go
OS = Microsoft Windows 7 Ultimate

FeatureLevel = FeatureLevel91

B8G8R8A8UNorm Format Support = Texture2D, Texture3D, TextureCube, ShaderLoad, ShaderSample, Mip, MipAutogen, RenderTarget, Blendable, CpuLockable, MultisampleResolve, Display, MultisampleRenderTarget, BackBufferCast, VideoProcessorOutput
B4G4R4A4UNorm Format Support = Texture2D, TextureCube, ShaderLoad, ShaderSample, Mip, CpuLockable
B5G5R5A1UNorm Format Support = Texture2D, TextureCube, ShaderLoad, ShaderSample, Mip, CpuLockable
B5G6R5UNorm Format Support = Texture2D, TextureCube, ShaderLoad, ShaderSample, Mip, MipAutogen, RenderTarget, Blendable, CpuLockable, MultisampleResolve, MultisampleRenderTarget

FeatureLevel = FeatureLevel100

B8G8R8A8UNorm Format Support = Buffer, InputAssemblerVertexBuffer, Texture1D, Texture2D, Texture3D, TextureCube, ShaderLoad, ShaderSample, Mip, MipAutogen, RenderTarget, Blendable, CpuLockable, MultisampleResolve, Display, CastWithinBitLayout, MultisampleRenderTarget, MultisampleLoad, BackBufferCast
B4G4R4A4UNorm Format Support = none
B5G5R5A1UNorm Format Support = none
B5G6R5UNorm Format Support = none

Press any key to continue

Re: Direct3D 11 via DDraw.dll

Posted: Sat Jan 12, 2019 3:42 pm
by JeremyaFr
Thanks

Re: Direct3D 11 via DDraw.dll

Posted: Wed Jan 16, 2019 5:12 pm
by JeremyaFr
UPDATE
Hello,
I've updated my ddraw.dll v1.3.6.

The changes are:
  • Improve performance
  • Add support for 16-bpp textures
https://github.com/JeremyAnsel/xwa_ddra ... tag/v1.3.6

Re: Direct3D 11 via DDraw.dll

Posted: Wed Jan 16, 2019 9:15 pm
by Justagai
JeremyaFr wrote:
Wed Jan 16, 2019 5:12 pm
UPDATE
Hello,
I've updated my ddraw.dll v1.3.6.

The changes are:
  • Improve performance
  • Add support for 16-bpp textures
https://github.com/JeremyAnsel/xwa_ddra ... tag/v1.3.6
Great job! :D :thumbs:

Re: Direct3D 11 via DDraw.dll

Posted: Mon Jan 21, 2019 1:04 am
by Bman
Thanks Jeremy. 16-bpp = 2^16 power = 65K. Does this apply to .opt files only? I was going to test with a HD .dat image but the XWADatEditor converts imported images to 256/8-bit indexed colors. :-)

Re: Direct3D 11 via DDraw.dll

Posted: Tue Jan 22, 2019 7:57 pm
by Reimar
The 16 bit textures is purely a performance thing.
The game draws the starfield, HUD etc. as 16-bit (RGB565). Before the ddraw.dll had to convert that data to 32-bit (RGBA8888) using the CPU before uploading it to the GPU, causing enough CPU-load to make hitting 60 fps or more hard in some cases. The change can now skip that conversion step if your graphics card supports the 16-bit format directly.

Re: Direct3D 11 via DDraw.dll

Posted: Tue Jan 22, 2019 8:34 pm
by Darksaber
I think you all need to work together, to produce a definitive product exclusively for XWA instead of working apart and people not knowing which DDraw to download and use, it's bloody confusing!

Re: Direct3D 11 via DDraw.dll

Posted: Tue Jan 22, 2019 10:17 pm
by Reimar
I am not 100% happy with the current setup and there might be a good point in a bit closer cooperation, but we are working together, I did the initial implementation of that optimization and JeremyaFr finished it, and I am regularly merging his changes.
But I have support for Gamepads and for the other games in the series, which results in a couple of issues more for some people. And testing and debug with all the diverse systems out there simply isn't easy or quickly done.
I guess we could declare JeremyaFr's the stable branch and mine the development branch (at least for now that seems not too far from the truth?) if that reduces confusion...

Re: Direct3D 11 via DDraw.dll

Posted: Fri Jan 25, 2019 5:10 am
by Justagai
Reimar wrote:
Tue Jan 22, 2019 10:17 pm
I guess we could declare JeremyaFr's the stable branch and mine the development branch (at least for now that seems not too far from the truth?) if that reduces confusion...
I suppose for XWA this works, but there doesn't seem to be an alternative for the rest of the games in the series. Well there are alternatives like dg_voodoo and such but these custom ddraws work far better as they are specialized.

Re: Direct3D 11 via DDraw.dll

Posted: Fri Feb 15, 2019 10:38 am
by Justagai
I can safely say now that Reimar's ddraw is in pretty good shape. Well done!

Re: Direct3D 11 via DDraw.dll

Posted: Sun Mar 10, 2019 2:34 pm
by Trevor
Been reading about other HD remakes using new engines and how you have managed to do some amazing things whilst remaining in the current engine...

So, just a thought:
I had previously suggested* that to properly use re-shade for light bloom one would need to reduce the brightness of all objects in XWA down to a 0-220 range so that lights (using the 220-255 range) could bloom without text and "white" objects blooming all the time.
Now, it was pointed out this would not happen because it would take too long however I've just thought, could draw and d3d11 do this automatically?

This would give XWA a more correct HD feel since the correct elements would now bloom using re-shade or if bloom was implemented directly in d3d11
Actually, I'm not sure if reshade works with draw as its flickering all the time in any menu (although it seems fine in flight)

Trev

*
Trevor » Tue Aug 18, 2015 9:13 pm wrote: Doing a bit of research on these post fx filters someone would really need to go through everything in the game and make sure that all colour luminosities are brought into a smaller range (say for example 32<luminosity<224)

This would allow the post fx filter to only apply bloom to 'bright' images. ( 224 - 255, eg, the whites of engine exhausts)

The dark areas will appear to have more detailed shadow effects, without normal dark areas being too dark in 'normal' light.

The reason for this luminosity compression is because XWA does not have real HDR so we need to simulate it.

Without doing this, anything past 224 in luminosity will bloom, even text in the hud which is bad.

I applied a similar filter to Delta force Black hawk down but while ingame looked awsome, the text was a huge dissapointment.

Im loving the screenshots though.

Specular highlighting would concentrate the bloom to shiny areas only, but thats only if someone like Jeremy is able to hack that in.

Re: Direct3D 11 via DDraw.dll

Posted: Sun Mar 31, 2019 2:22 pm
by llemon
Trevor wrote:
Sun Mar 10, 2019 2:34 pm
Been reading about other HD remakes using new engines and how you have managed to do some amazing things whilst remaining in the current engine...

So, just a thought:
I had previously suggested* that to properly use re-shade for light bloom one would need to reduce the brightness of all objects in XWA down to a 0-220 range so that lights (using the 220-255 range) could bloom without text and "white" objects blooming all the time.
Now, it was pointed out this would not happen because it would take too long however I've just thought, could draw and d3d11 do this automatically?

This would give XWA a more correct HD feel since the correct elements would now bloom using re-shade or if bloom was implemented directly in d3d11
Actually, I'm not sure if reshade works with draw as its flickering all the time in any menu (although it seems fine in flight)

Trev

*
Trevor » Tue Aug 18, 2015 9:13 pm wrote: Doing a bit of research on these post fx filters someone would really need to go through everything in the game and make sure that all colour luminosities are brought into a smaller range (say for example 32<luminosity<224)

This would allow the post fx filter to only apply bloom to 'bright' images. ( 224 - 255, eg, the whites of engine exhausts)

The dark areas will appear to have more detailed shadow effects, without normal dark areas being too dark in 'normal' light.

The reason for this luminosity compression is because XWA does not have real HDR so we need to simulate it.

Without doing this, anything past 224 in luminosity will bloom, even text in the hud which is bad.

I applied a similar filter to Delta force Black hawk down but while ingame looked awsome, the text was a huge dissapointment.

Im loving the screenshots though.

Specular highlighting would concentrate the bloom to shiny areas only, but thats only if someone like Jeremy is able to hack that in.
It shouldn't take too long to darken all the textures if you have everything extracted. There are tools for automating texture conversion/scaling/anything else you want to do out there. I've thought about using these tools to upscale all this games textures using waifu2x like what some people are doing with gamecube/wii games and it wouldn't be hard to do a brightness adjustment too.

Re: Direct3D 11 via DDraw.dll

Posted: Tue Jul 16, 2019 3:50 pm
by JeremyaFr
UPDATE
Hello,
I've updated my ddraw.dll v1.3.7.

The changes are:
  • Add an option to disable V-Sync
  • Reduce memory usage
https://github.com/JeremyAnsel/xwa_ddra ... tag/v1.3.7

Re: Direct3D 11 via DDraw.dll

Posted: Mon Jul 22, 2019 6:52 pm
by Darksaber
Testing some craft in skirmish and got these crashes, the second crash is to do with DDraw.dll v1.3.7 :(

Code: Select all

- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
  <Provider Name="Application Error" /> 
  <EventID Qualifiers="0">1000</EventID> 
  <Level>2</Level> 
  <Task>100</Task> 
  <Keywords>0x80000000000000</Keywords> 
  <TimeCreated SystemTime="2019-07-22T18:13:23.000000000Z" /> 
  <EventRecordID>468392</EventRecordID> 
  <Channel>Application</Channel> 
  <Computer>Win7</Computer> 
  <Security /> 
  </System>
- <EventData>
  <Data>XwingAlliance.exe</Data> 
  <Data>2.0.0.2</Data> 
  <Data>3765a9b7</Data> 
  <Data>ntdll.dll</Data> 
  <Data>6.1.7601.24499</Data> 
  <Data>5d011861</Data> 
  <Data>c0000005</Data> 
  <Data>00032ed3</Data> 
  <Data>1fa8</Data> 
  <Data>01d540b8ffa136c7</Data> 
  <Data>C:\Program Files (x86)\LucasArts\X-Wing Alliance\XwingAlliance.exe</Data> 
  <Data>C:\Windows\SysWOW64\ntdll.dll</Data> 
  <Data>63d3fc08-acac-11e9-aea4-001d7d002f67</Data> 
  </EventData>
  </Event>

Code: Select all

- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
  <Provider Name="Application Error" /> 
  <EventID Qualifiers="0">1000</EventID> 
  <Level>2</Level> 
  <Task>100</Task> 
  <Keywords>0x80000000000000</Keywords> 
  <TimeCreated SystemTime="2019-07-22T18:16:34.000000000Z" /> 
  <EventRecordID>468396</EventRecordID> 
  <Channel>Application</Channel> 
  <Computer>Win7</Computer> 
  <Security /> 
  </System>
- <EventData>
  <Data>XwingAlliance.exe</Data> 
  <Data>2.0.0.2</Data> 
  <Data>3765a9b7</Data> 
  <Data>DDRAW.dll</Data> 
  <Data>1.3.7.0</Data> 
  <Data>5d2def27</Data> 
  <Data>c0000005</Data> 
  <Data>0000a8e7</Data> 
  <Data>24ec</Data> 
  <Data>01d540b938ea0de2</Data> 
  <Data>C:\Program Files (x86)\LucasArts\X-Wing Alliance\XwingAlliance.exe</Data> 
  <Data>C:\Program Files (x86)\LucasArts\X-Wing Alliance\DDRAW.dll</Data> 
  <Data>d61d7c9e-acac-11e9-aea4-001d7d002f67</Data> 
  </EventData>
  </Event>

Code: Select all

- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
  <Provider Name="Application Error" /> 
  <EventID Qualifiers="0">1000</EventID> 
  <Level>2</Level> 
  <Task>100</Task> 
  <Keywords>0x80000000000000</Keywords> 
  <TimeCreated SystemTime="2019-07-22T18:35:46.000000000Z" /> 
  <EventRecordID>468400</EventRecordID> 
  <Channel>Application</Channel> 
  <Computer>Win7</Computer> 
  <Security /> 
  </System>
- <EventData>
  <Data>XwingAlliance.exe</Data> 
  <Data>2.0.0.2</Data> 
  <Data>3765a9b7</Data> 
  <Data>XwingAlliance.exe</Data> 
  <Data>2.0.0.2</Data> 
  <Data>3765a9b7</Data> 
  <Data>c0000005</Data> 
  <Data>000d332d</Data> 
  <Data>1284</Data> 
  <Data>01d540bc29e17e16</Data> 
  <Data>C:\Program Files (x86)\LucasArts\X-Wing Alliance\XwingAlliance.exe</Data> 
  <Data>C:\Program Files (x86)\LucasArts\X-Wing Alliance\XwingAlliance.exe</Data> 
  <Data>84c32d8a-acaf-11e9-aea4-001d7d002f67</Data> 
  </EventData>
  </Event>

Re: Direct3D 11 via DDraw.dll

Posted: Mon Jul 22, 2019 7:30 pm
by JeremyaFr
Can you try this one:
EDIT: link removed

Re: Direct3D 11 via DDraw.dll

Posted: Mon Jul 22, 2019 7:54 pm
by Darksaber
Nope still crashing

Code: Select all

- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
  <Provider Name="Application Error" /> 
  <EventID Qualifiers="0">1000</EventID> 
  <Level>2</Level> 
  <Task>100</Task> 
  <Keywords>0x80000000000000</Keywords> 
  <TimeCreated SystemTime="2019-07-22T19:49:39.000000000Z" /> 
  <EventRecordID>468411</EventRecordID> 
  <Channel>Application</Channel> 
  <Computer>Win7</Computer> 
  <Security /> 
  </System>
- <EventData>
  <Data>XwingAlliance.exe</Data> 
  <Data>2.0.0.2</Data> 
  <Data>3765a9b7</Data> 
  <Data>XwingAlliance.exe</Data> 
  <Data>2.0.0.2</Data> 
  <Data>3765a9b7</Data> 
  <Data>c0000005</Data> 
  <Data>000e8394</Data> 
  <Data>1268</Data> 
  <Data>01d540c666557764</Data> 
  <Data>C:\Program Files (x86)\LucasArts\X-Wing Alliance\XwingAlliance.exe</Data> 
  <Data>C:\Program Files (x86)\LucasArts\X-Wing Alliance\XwingAlliance.exe</Data> 
  <Data>d6a8c488-acb9-11e9-aea4-001d7d002f67</Data> 
  </EventData>
  </Event>
I'm testing a skirmish flying and awing on my side I have a Acclamator Assault ship vs. Arquitens Light Cruiser

Re: Direct3D 11 via DDraw.dll

Posted: Mon Jul 22, 2019 8:29 pm
by JeremyaFr
OK, I'm able to reproduce the crash.

It seems that the crash is not related to ddraw.dll but to hook_opt_limit.dll.

Two weeks ago, I updated the hook to fix a crash on Linux. It seems that the changes crash the game on Windows.
I will revert the changes.
Meanwhile you can use the previous version of the xwa_hook_opt_limit.

Re: Direct3D 11 via DDraw.dll

Posted: Mon Jul 22, 2019 8:39 pm
by Darksaber
Excellent, that worked, I got blown up, instead of the game crashing :D

Re: Direct3D 11 via DDraw.dll

Posted: Mon Jul 22, 2019 8:49 pm
by JeremyaFr
I've reverted the changes to the opt limit hook.

Re: Direct3D 11 via DDraw.dll

Posted: Wed Jul 24, 2019 8:13 pm
by ual002
I'm still crashing and have updated DDraw.dll and Hook_Opt_Limit. It happens consistently upon death. The hangar I'm using has the Recovery Shuttle turned off but that has never been an issue before.

Code: Select all

Log Name:      Application
Source:        Windows Error Reporting
Date:          7/24/2019 3:10:06 PM
Event ID:      1001
Task Category: None
Level:         Information
Keywords:      Classic
User:          N/A
Computer:      DESKTOP-TGOVR94
Description:
Fault bucket -337681191, type 1
Event Name: APPCRASH
Response: Not available
Cab Id: 0

Problem signature:
P1: XwingAlliance.exe
P2: 2.0.0.2
P3: 3765a9b7
P4: XwingAlliance.exe
P5: 2.0.0.2
P6: 3765a9b7
P7: c0000005
P8: 000315bb
P9: 
P10: 

Attached files:
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER7B1E.tmp.dmp
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER7BDB.tmp.WERInternalMetadata.xml
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER7BEB.tmp.xml
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER7BF9.tmp.csv
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER7C19.tmp.txt

These files may be available here:
\\?\C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_XwingAlliance.ex_4cd02f65f51950e57673ec4e13487667e3efaf4e_35d6de86_2fee7eb8

Analysis symbol: 
Rechecking for solution: 0
Report Id: ba0f00a2-0322-423f-89a6-00057d8e3d1f
Report Status: 268435456
Hashed bucket: 5497f5b3e3589c16893332478c138724
Cab Guid: 0
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Windows Error Reporting" />
    <EventID Qualifiers="0">1001</EventID>
    <Level>4</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2019-07-24T20:10:06.914446200Z" />
    <EventRecordID>8898</EventRecordID>
    <Channel>Application</Channel>
    <Computer>DESKTOP-TGOVR94</Computer>
    <Security />
  </System>
  <EventData>
    <Data>-337681191</Data>
    <Data>1</Data>
    <Data>APPCRASH</Data>
    <Data>Not available</Data>
    <Data>0</Data>
    <Data>XwingAlliance.exe</Data>
    <Data>2.0.0.2</Data>
    <Data>3765a9b7</Data>
    <Data>XwingAlliance.exe</Data>
    <Data>2.0.0.2</Data>
    <Data>3765a9b7</Data>
    <Data>c0000005</Data>
    <Data>000315bb</Data>
    <Data>
    </Data>
    <Data>
    </Data>
    <Data>
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER7B1E.tmp.dmp
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER7BDB.tmp.WERInternalMetadata.xml
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER7BEB.tmp.xml
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER7BF9.tmp.csv
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER7C19.tmp.txt</Data>
    <Data>\\?\C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_XwingAlliance.ex_4cd02f65f51950e57673ec4e13487667e3efaf4e_35d6de86_2fee7eb8</Data>
    <Data>
    </Data>
    <Data>0</Data>
    <Data>ba0f00a2-0322-423f-89a6-00057d8e3d1f</Data>
    <Data>268435456</Data>
    <Data>5497f5b3e3589c16893332478c138724</Data>
    <Data>0</Data>
  </EventData>
</Event>

Re: Direct3D 11 via DDraw.dll

Posted: Wed Jul 24, 2019 8:27 pm
by JeremyaFr
Does it crash with just vanilla XWA + XWAUCP or DSUCP + updated ddraw and hooks?

Re: Direct3D 11 via DDraw.dll

Posted: Wed Jul 24, 2019 9:54 pm
by ual002
Honestly, don't spend too much time on it. It suddenly stopped crashing and my install is a mess of hand made additions at this point.

Re: Direct3D 11 via DDraw.dll

Posted: Thu Jul 25, 2019 7:53 am
by Darksaber
The reason for your crash might have something to do with your PM messages, your adding loads of object in to a hangar, in my experience, if you add too many objects the game crashes, reduce the objects it shouldn't crash, but you might have to get rid of loads of stuff, I don't know, reduce one at a time :D

I'm not sure why it crashes, it might be too many textures or it could be the amount of faces in the models the game has to handle.

I wanted to add a squadron of xwings to a hangar, but it kept crashing, each time I deleted one it still crashed, in the end I had to remove all the xwings :(