narzoul / DDrawCompat

DirectDraw and Direct3D 1-7 compatibility, performance and visual enhancements for Windows Vista, 7, 8, 10 and 11
BSD Zero Clause License
893 stars 67 forks source link

Battalia blue boxes round sprites #180

Closed Buechnerstod closed 2 months ago

Buechnerstod commented 1 year ago

Hi another wargame - this time an obscure one from 2001 Battalia -https://archive.org/details/wargamer-depot_battalia

in the main 3d game screen the sprites all have their horrible blue boxes around them

if i dont use DDrawcompat the game freezes and crashes, so at least ddrawcompat can help here, just now if you could tell me how i could get rid of the blue boxes that would be good this is the log - hopefully you can help with this one - perhaps the blue box issue is like what i am getting for Napoleon in Italy DDrawCompat-Battalia.log

Buechnerstod commented 1 year ago

this is what the blue boxes issue i mean, looks like. - if i use dgvoodoo instead of ddrawcompat, it removes teh blue box problem but it runs incredibly slowly and i cannot seem to do anything about that Untitled-2

Buechnerstod commented 1 year ago

interestingly if i instead use wineD3D (just putting wined3d.dll and ddraw.dll into the game folder) it gets rid of the blue box issue, but the ground texture is instead missing, all turned white

lol, why oh why cant a fix just fix all the things and not just one thing and then break another!

Buechnerstod commented 1 year ago

hi -do you think you will be able to find the solution of how to remvoe teh ugly sprite boxes for this title?

narzoul commented 1 year ago

Well, I found the problem with color keying in DDrawCompat, but it only fixes normal drivers, it has no effect on D3D9On12 still, and I don't know why. It might be a bug in D3D9On12. Also, part of the ground near the camera is invisible, which is another problem that only happens with D3D9On12, I haven't had time to investigate that yet.

Buechnerstod commented 1 year ago

thanks for that - can i get the ddraw.dll with teh fix for the normal drivers because i put battalia on a virtual winxp and it runs but also has the color sprite box issue there too

On Mon, Jan 9, 2023 at 9:47 AM narzoul @.***> wrote:

Well, I found the problem with color keying in DDrawCompat, but it only fixes normal drivers, it has no effect on D3D9On12 still, and I don't know why. It might be a bug in D3D9On12. Also, part of the ground near the camera is invisible, which is another problem that only happens with D3D9On12, I haven't had time to investigate that yet.

— Reply to this email directly, view it on GitHub https://github.com/narzoul/DDrawCompat/issues/180#issuecomment-1374948334, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5BQD4OF2SZZRYBLOXTVUNLWRM7XNANCNFSM6AAAAAATQKWDM4 . You are receiving this because you authored the thread.Message ID: @.***>

narzoul commented 1 year ago

DDrawCompat doesn't work in XP, nor does it support virtual environments. It requires WDDM drivers to begin with, which XP doesn't support. The fix itself is also in the WDDM part.

Buechnerstod commented 1 year ago

okay no worries

i did find that if i run the game using dgvoodoo that the colour issue is fixed, but it is painfully slow, however if i then run it through Dxwnd with dgvoodoo, the performance is a little better and the colours are fixed (there is htough an annoying cursor stuck in the middle of the screen) See the Video i attached

https://user-images.githubusercontent.com/121831921/211282853-c70da7b1-2109-4d09-80db-7247ac4a42b4.mp4

interesting though also is that with the colours fixed, the foreground texture is all stretched - that spot which looked blank before. this is not how the texture there should be behaving

Buechnerstod commented 1 year ago

hi Narzoul - any chance you can still investigate why there is the issue with d3d9on12 drivers for the color key issue?

narzoul commented 1 year ago

Well, after looking into the code of D3D9On12, I'm pretty convinced texture color keying is not completely implemented, and in its current state apparently it doesn't work at all. I wouldn't hold my breath until they fix it, since texture color keying was removed in DX8 as a feature, and they don't seem to be fixing any DX8 and older API issues for now. I think their focus is on DX9 only. Maybe it will change in the future.

I started to look into workarounds for it in DDrawCompat, but it's a lot of effort to implement, so it's going slowly. I'm not sure if I'll release a "demo" of it at all before the next release, which at the current rate may still be months away.

Buechnerstod commented 1 year ago

Ok, thanks for the update. that is okay, i will just wait.

On Wed, Jan 18, 2023 at 10:14 AM narzoul @.***> wrote:

Well, after looking into the code of D3D9On12, I'm pretty convinced texture color keying is not completely implemented, and in its current state apparently it doesn't work at all. I wouldn't hold my breath until they fix it, since texture color keying was removed in DX8 as a feature, and they don't seem to be fixing any DX8 and older API issues for now. I think their focus is on DX9 only. Maybe it will change in the future.

I started to look into workarounds for it in DDrawCompat, but it's a lot of effort to implement, so it's going slowly. I'm not sure if I'll release a "demo" of it at all before the next release, which at the current rate may still be months away.

— Reply to this email directly, view it on GitHub https://github.com/narzoul/DDrawCompat/issues/180#issuecomment-1386211080, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5BQD4M3XIC2L64DLTJZNFDWS4RVLANCNFSM6AAAAAATQKWDM4 . You are receiving this because you authored the thread.Message ID: @.***>

Buechnerstod commented 1 year ago

okay i found a great fix for Battalia at last - aqrits DDraw wrapper - http://bitpatch.com/ddwrapper.html

posting herre just in case perhaps you can see what his wrapper does-. in the aqrit.cfg i have this setup

RealDDrawPath = AUTO BltMirror = 0 BltNoTearing = 0 ColorFix = 0 DisableHighDpiScaling = 0 FakeVsync = 1 FakeVsyncInterval = 0 ForceBltNoTearing = 0 ForceDirectDrawEmulation = 1 NoVideoMemory = 1 SingleProcAffinity = 0 ShowFPS = 0

narzoul commented 1 year ago

ForceDirectDrawEmulation disables hardware acceleration, which probably forces the game to use software rendering, thus bypassing the D3D9On12 rendering issues. You can do the same with Microsoft Application Compatibility Toolkit, the shim is also called ForceDirectDrawEmulation.

DDrawCompat doesn't support it though and will disable the shim, because it used to cause issues with its hooks a long time ago. I'm not sure if it would still be the case though. I will revisit it.

narzoul commented 8 months ago

I was able to fix the color key issues. No idea about the partially invisible terrain near the camera. It's possible that only the D3D9On12 devs will be able to fix that, I gave up trying for now.

narzoul commented 2 months ago

All issues should be fixed in v0.5.2 now since the new igd9trinity32.dll driver appears to render the terrain also correctly.

Buechnerstod commented 2 months ago

hi thats great, but how do i get the igd9trinity32.dll driver - where does that come from?

narzoul commented 2 months ago

It's part of the Intel GPU drivers. Just make sure your drivers are up to date.