Here is the 10 second fix:
[url]http://www.bitpatch.com/downloads/war2_ddraw_test2.zip[/url] ([url]http://www.bitpatch.com/downloads/war2_ddraw_test2.zip[/url])
it uses hot-patching to hook some font functions to disable anti-aliasing.
the build with d3d
[url]http://www.bitpatch.com/downloads/war2_ddraw_test3.zip[/url] ([url]http://www.bitpatch.com/downloads/war2_ddraw_test3.zip[/url])
it adds an alt+enter shortcut to flip between windowed and fullscreen views.
edit: alt+enter seems to crash currently if used on the battle.net screen :(
edit: it is also missing one of the kludges to redraw the screen ... so yeah WIP
[url]http://www.bitpatch.com/downloads/war2_ddraw_test4.zip[/url]
This *barely tested* build should have a nice speed up ( not measured ) from using a pixel shader.
It has some additional system requirements but I'm guessing everyone should still be able to run it.
Here is a "pass-thru" version for Win8 and Win10 users, who aren't happy with the full version.
[url]http://www.bitpatch.com/downloads/war2_ddraw_minimal.zip[/url] ([url]http://www.bitpatch.com/downloads/war2_ddraw_minimal.zip[/url])
Seems to also work for StarCraft!
noSeems to also work for StarCraft!
Great, you playing on USeast?
Sent from my Motorola DynaTAC 8000X using Tapatalk
noSeems to also work for StarCraft!
Great, you playing on USeast?
Sent from my Motorola DynaTAC 8000X using Tapatalk
Fixing the staff is possible??!!
however. the screen is somehow a bit blurry. hurts eyes :S.GDI takes the liberty of doing antialiasing around text when drawing in 32-bit color depth.
What's the license for your source code?GPLv2 is good
however. the screen is somehow a bit blurry. hurts eyes :S.
Try this?don't bother.
QuoteTry this?don't bother.
Here is the 10 second fix:
[url]http://www.bitpatch.com/downloads/war2_ddraw_test2.zip[/url] ([url]http://www.bitpatch.com/downloads/war2_ddraw_test2.zip[/url])
it uses hot-patching to hook some font functions to disable anti-aliasing.
which makes it a lot more invasive than the version in OP.
Also need to try live streaming software with this DLL. It's quite possible it will be blinking also, i'll check that later. I never tried to stream videos... So would be great if someone experienced in live streaming check that faster.
But here's the bug still exists while making SS in-chat: it saves cyan screen in-chat to PCX. That is a declared behaviour and works the same on all the checked systems.But here's a way to bypass broken SS in-chat: You can use Alt-PrtSrc instead of PrtSrc, then screenshot will be copied to clipboard instead of PCX-file, then you can Alt-Tab, run "mspaint" or any other graphics editor and paste (Ctrl-V) the clipboard content.
Hey do you guys think this fixed the banner bug? So we can use the animated ones now?
C/C++ standard library?why would you want to?
hook the DirectDraw functions in memory at a later point in time(after the loading screen) rather than make a redirect DLL?anything is possible... IMO it is best to hook DirectDrawCreate at the very beginning then redirect internally between real and emulated functions. Using a "ddraw.dll" file is optional, if one wants to inject some other way. A full answer to this question would be a long essay :p
too slow for competitive playThe game(s) actually do all their ddraw drawing in software.
Here is the 10 second fix:
[url]http://www.bitpatch.com/downloads/war2_ddraw_test2.zip[/url] ([url]http://www.bitpatch.com/downloads/war2_ddraw_test2.zip[/url])
If starcraft mixes GDI and DDraw "in-game" then things don't look too good. The mixed gdi and ddraw areas are the frustrating part of this patch...
however. the screen is somehow a bit blurry. hurts eyes :S.
put the shadow was gone, the clarity was the same as was on the original library. Thank you.
Looks like you're talking about the same thing, can you see that on my screenshots in my 1-st post here? I didn't see any problems with fonts on my ss. I'm not careful or it didn't appear for me?
FTP link brokeworks perfect for me...
oh the link works in firefox withoutthis?
"ftp://"
:P
ok. i have it. lets try it.
Right half is with ddraw2 that aqrit posted earlier.ah, thx, i'll look at that more careful...
I havent check if it is same when playing, will be back.
Not sure if that could help, but maybe to use an idea from cpu savior? [url]http://forum.war2.ru/index.php/topic,409.0.html[/url] ([url]http://forum.war2.ru/index.php/topic,409.0.html[/url])
The idea was to add sleep 1ms in each gdi drawing loop or w/e.
If it redraws mixed ddraw+GDI millions times per second, it causes CPU utilization. If you add timeout into the graphics loop, if will free the CPU.
Another idea is to enforce your code 1 time of 1000, not every time. Then interface will be fixed not in realtime but with a little delay.
__asm{
mov eax, pvBmpBits
pcmpeqw xmm0,xmm0
psllw xmm0,1
packsswb xmm0,xmm0
mov ecx, 640*480/128
lbl_loop:
movntdq 0[eax], xmm0;
movntdq 16[eax], xmm0;
movntdq 32[eax], xmm0;
movntdq 48[eax], xmm0;
movntdq 64[eax], xmm0;
movntdq 80[eax], xmm0;
movntdq 96[eax], xmm0;
movntdq 112[eax], xmm0;
add eax,128
dec ecx
jnz lbl_loop
}
1. Does "in-game" Broodwar have any open SDlgDialog windows?I have no idea, and don't know how to check. My best guess is probably yes when you click on the menu button.
2. For Each SDlgDialog window GdiTransparentBlt color converts the same 640x480 from 8bpp to 32bpp each time... Would it be faster to color convert once then GdiTransparentBlt out to all the windows?Not a graphics programmer, but to check if anything is faster, you would profile the code.
3. Would it be faster to GdiTransparentBlt only the changed portions of the screen instead of the entire screen to every window... Unfortunately the game locks the entire screen so we don't immediately know where changes occur. However, since we know every unchanged scan line will be all 0xFE bytes... it should be possible to do a quick hash of a scan line to know if anything on that line has changed... which would allow us to quickly determine a bounding rect around changes which we could then intersect with the window rects thus allowing us to move much fewer bytes around.Updating only parts of the screen is what modern video encoding libraries and game developers do nowadays so it should be faster. Maybe it's even faster to just check the first few bytes of a line for 0xFE bytes instead of hashing the whole line, what would go wrong if this assumption is incorrect?
4. The only thing we can do for "ddraw only mode" is switch to uploading to video memory with a real API, not GDI. But that means when switching from "mixed mode gdi/ddraw" to "ddraw only" we need to clear any gdi stuff... can we just paint the main window with a NULL_BRUSH or do we have to destroy and re-create the main window?Are you suggesting to interpret the DirectDraw calls and use something like OpenGL or DirectX to draw to the screen instead?
for( i = 0; i < 640 * 480 / 4; i++ ) p [ i ] = 0xFEFEFEFE;
compiles to mov eax, 0xfefefefeh
mov ecx, 640*480/4
lea edi, pvBmpBits
rep stosd
or w/eTested on 8.1 and it seems to work perfectly.
Could be i have my standdard laptop screen with duplicate settings to my 55 inch NEC monitor lol
Here's another problem reported from newbie: a notebook (he didn't call a model), resolution 1366х786 , win 8.1.He needs to configure the scaling options for his graphics card. There's instructions on Google for this.
He got fresh war2 at 1/4 of screen, also your ddraw.dll didn't resolve the problem.
But another project called ddhack10 helped him.
At the same time ddhack10 is unplayable as known, but maybe there's something to get from that project and to add to war2_ddraw_test to ToSceen?
Also, to everyone: please, notify us if you have the same problem with war2_ddraw_test2. Need to have a system to test.
He needs to configure the scaling options for his graphics card. There's instructions on Google for this.But why did ddhack10 helped him?
there is currently no fix to scale windows 10 full screenThe issue is not due to the OS, but instead your graphics card settings.
ive looked
there is currently no fix to scale windows 10 full screenThe issue is not due to the OS, but instead your graphics card settings.
ive looked
there is currently no fix to scale windows 10 full screen
ive looked
Intel: [url]http://teamwindows8.com/2012/11/how-to-run-full-screen-games-in-windows-8/[/url] ([url]http://teamwindows8.com/2012/11/how-to-run-full-screen-games-in-windows-8/[/url])
Nvidia: [url]http://us.battle.net/en/forum/topic/18300189156[/url] ([url]http://us.battle.net/en/forum/topic/18300189156[/url])
AMD: [url]http://support.amd.com/en-us/kb-articles/Pages/UnableToSetGPUScaling.aspx[/url] ([url]http://support.amd.com/en-us/kb-articles/Pages/UnableToSetGPUScaling.aspx[/url])
A lot of graphics cards are smart enough to automatically lower the resolution and either scale the game to fullscreen or leave black bars on the sides to maintain aspect ratio.
for (int i = 0; i < 480; i++) // for each scanlineand it averages 320 microseconds for the entire loop from a data set of 59,404 calls.
color_convert(&dib_bits[i * 640], bmi.palette, (DWORD*)(((BYTE*)rc.pBits) + (rc.Pitch * i)), 640 / 4);
Could you write some pseudo code or even C++ code for color_convert()
void __cdecl
color_convert( BYTE* src, RGBQUAD* pal, DWORD* dst, DWORD cnt )
{
do{
dst[0] = pal[src[0]];
dst[1] = pal[src[1]];
dst[2] = pal[src[2]];
dst[3] = pal[src[3]];
dst = &dst[4];
src = &src[4];
} while( --cnt );
}
I'm still interested in moving code onto multiple threads.don't ... the next item on my todo list is:
use d3d shader to color convert.
[url]http://www.bitpatch.com/downloads/war2_ddraw_test4.zip[/url] ([url]http://www.bitpatch.com/downloads/war2_ddraw_test4.zip[/url])
This *barely tested* build should have a nice speed up ( not measured ) from using a pixel shader.
It has some additional system requirements but I'm guessing everyone should still be able to run it.
I got another unpleasant bug with test4:This doesn't happen on Windows 10 using BW.........but why are you even testing with Windows XP?
Situation:
- war2 is running with ddraw.dll
- several more applications also running
- i alt-tab out of war2 to my desktop (so, war2 window is minimized)
then i try to click to any other application in my taskbar and it temporary switches into war2 windows, that causes turn to black screen, then back and then opens window of application i clicked to.
The situation happens only if i click to the task bar.
If i use alt-tab instead or switching cascaded windows on my desktop, it never activates war2 screen.
Checked on winxp x64.
Never happened if delete ddraw.dll.
true, windows xp doesnt need any version edits to run properlyI got another unpleasant bug with test4:This doesn't happen on Windows 10 using BW.........but why are you even testing with Windows XP?
Situation:
- war2 is running with ddraw.dll
- several more applications also running
- i alt-tab out of war2 to my desktop (so, war2 window is minimized)
then i try to click to any other application in my taskbar and it temporary switches into war2 windows, that causes turn to black screen, then back and then opens window of application i clicked to.
The situation happens only if i click to the task bar.
If i use alt-tab instead or switching cascaded windows on my desktop, it never activates war2 screen.
Checked on winxp x64.
Never happened if delete ddraw.dll.
only have the code executed when not in-game since there aren't any graphical bugs in-game?This would be pointless on Vista and Win7. On Win8 and Win10 it could be be done... but is there a confirmed reason to do so?
set_palette function... from a data set of 13,911 calls.I might need to clean-up this function if it is getting called in-game.
XP alt+tabthat is fairly strange behavior... does it happen only while on the bnet screens or does it also happen when alt-tabbing out from single player campaign?
ClearType fonts (x-post)I haven't tested but...
but why are you even testing with Windows XP?I test everything related to war2 on every version since XP. Some people even asked me why loader is not woking on win 95...
true, windows xp doesnt need any version edits to run properlyXP sometimes also had a problem with palette in war2. (Not sure if it was some driver or anything else). Also not sure if this dll fixes that for winxp, but i think it should.
that is fairly strange behavior... does it happen only while on the bnet screens or does it also happen when alt-tabbing out from single player campaign?It happens even on the main menu screen.
Quote (selected)It'd guarantee no additional lag from this DLL(even though from my testing, your latest update seems flawless to me).
only have the code executed when not in-game since there aren't any graphical bugs in-game?
This would be pointless on Vista and Win7. On Win8 and Win10 it could be be done... but is there a confirmed reason to do so?
Quote (selected)The calls were recorded from the time when the game's process is started until a minute or so after playing an actual game so I don't know how many, if any of those calls are being called in-game.
set_palette function... from a data set of 13,911 calls.
I might need to clean-up this function if it is getting called in-game.
Quote from: xboi209 on January 02, 2016, 06:08:15 PMWell the DLL isn't intended for anything older than Windows Vista so it makes completely no sense to include it on Windows XP computers because the best it can do is slow down the game, even if not very noticeable.
but why are you even testing with Windows XP?
I test everything related to war2 on every version since XP. Some people even asked me why loader is not woking on win 95...
That behaviour means that something goes wrong with that dll. At least need to understand what it is and why it causes such behaviour for winxp and if that can cause something in win7-8-10...
I have never ever had a problem with War2 on WinXP on this computer, but after getting the latest requested update, I do.
After having run War2 properly for the last 10 years on this machine, I can't now. I don't know what you did but for WinXP it was bad. Please don't do this to WinXP computers.
([url]http://i.imgur.com/VfHqrcp.png[/url])
I have never ever had a problem with War2 on WinXP on this computer, but after getting the latest requested update, I do.
After having run War2 properly for the last 10 years on this machine, I can't now. I don't know what you did but for WinXP it was bad. Please don't do this to WinXP computers.
([url]http://i.imgur.com/VfHqrcp.png[/url])
this problem is newly created. It never existed previously ever
I got winxp put on this computer well after win7 was released, because I knew winxp worked best with War2. That has now changed :X
nooo!
I have Win7 enterprise edition at work and I haev to say they really got win7 right. win98, winxp, win7 are all pretty solid but i DONT want to get anywhere near 8 or 10
ive seen windows 10 somewhere im sure. i just want the damn tiles to go away forever so i can use the desktop properly!!!
So I am on my new computer which has windows 10. There are major glitches in the chat channel. I am a computer scrub and find the initial instructions hard to follow. Can anyone clear up/help me fix these issues/installation procedures please!
Just put the dll in your war2 folder and done.
[url]http://www.bitpatch.com/downloads/war2_ddraw_test4.zip[/url]
This *barely tested* build should have a nice speed up ( not measured ) from using a pixel shader.
It has some additional system requirements but I'm guessing everyone should still be able to run it.
I have never ever had a problem with War2 on WinXP on this computer, but after getting the latest requested update, I do.
After having run War2 properly for the last 10 years on this machine, I can't now. I don't know what you did but for WinXP it was bad. Please don't do this to WinXP computers.
([url]http://i.imgur.com/VfHqrcp.png[/url])
this problem is newly created. It never existed previously ever
I got winxp put on this computer well after win7 was released, because I knew winxp worked best with War2. That has now changed :X
then i try to click to any other application in my taskbar and it temporary switches into war2 windows, that causes turn to black screen, then back and then opens window of application i clicked to.
The situation happens only if i click to the task bar.
If i use alt-tab instead or switching cascaded windows on my desktop, it never activates war2 screen.
Checked on winxp x64.
Yeah have some weird things happen to me. Sometime when I alt tab then go back to war2 the game will crash, also sometimes when I alt tab the game will no be in full screen it will have my normal desktop resolutions and war 2 on the left at its resolution. Nothing big though thanks for the work.
The minimal version is not suitable for use on Win7 or below.
So I am on my new computer which has windows 10. There are major glitches in the chat channel. I am a computer scrub and find the initial instructions hard to follow. Can anyone clear up/help me fix these issues/installation procedures please!
That's sad to exclude fixes for win7. Is that necessary to exclude that win7 code to improve the performance?It wasn't done for performance, it was done mostly for compatibility with mcalauncher. All Win8 and Win10 need is the menu fix, so just a menu fix gives people less things to complain about. Also it still annoys me that I need to manually issue redraw calls when a window is destroyed... so I was playing with that.
Are there any performance problems with previous version in war2 or in starcraft only?sc1 has faster mouse scroll which makes low fps more noticeable... but there are no sc1 only features.
So, looks like we got several problems with version 4. but there were ok in version 3It is not clear what version (if any) are being used by Blid, tupac, or MaStA{hR}.
test3 has known issues...
broken screenshots,
broken bnet screens,
broken alt + enter,
poor performance,
not recommended.
It wasn't done for performance, it was done mostly for compatibility with mcalauncher. All Win8 and Win10 need is the menu fix, so just a menu fix gives people less things to complain about. Also it still annoys me that I need to manually issue redraw calls when a window is destroyed... so I was playing with that.
iL what version did you push with the client update if you did?
It wasn't done for performance, it was done mostly for compatibility with mcalauncher.Surely it can't be the launcher itself causing a problem, it's probably one of its options.
feature from mca64launcher ... to chat while being alt+tabbed out of starcraftare more likely to work.
([url]http://s16.postimg.org/94uz36gph/alttab.png[/url])
Ill try the newest fix and see if it still happends
([url]http://s16.postimg.org/94uz36gph/alttab.png[/url])
Ill try the newest fix and see if it still happends
tupac, would be good if you find a way to get an address where war2 have been crashed.
Most likely if you press "Debug" button on clean windows it will be useless, i think you should install some kind of debugger (some kind of IDE or third-party debugger) to look into stack trace.
Maybe it will help aqrit to catch an error.
Unfortunately i never had war2 crashes with any of aqrit's versions, so i can't try to catch that myself.
simple keep alt tabing i get this most time when im in game lobby.Still hope on your report about stack trace with some kind of debugger... Of course if you can reproduce that crash..
I'll try out the minimal with a fresh install of 4.0.1. See if it still happend then I'll go from there.Just keep your OS where you can reproduce that crash plz. The main question is not to just resolve an error on you own computer, but to catch the situations where war2 crashes with ddraw.
Alternativerly you have all these other post mortem debugger:
Adplus
ProcDump
DebugDiag
PROGRAM VERSION: 2.0.2.0
COMPUTER NAME: P*************
USER NAME: ************
TIME: 02/16/16 00:34:06.250
INFO:
Exception code: C0000005 ACCESS_VIOLATION
Fault address: 5FD43AEB 01:00072AEB C:\WINDOWS\SYSTEM32\igdumdim32.dll
Registers:
EAX:00000000
EBX:00000000
ECX:E9E9EBEF
EDX:005CD980
ESI:00647150
EDI:0019EBCC
CS:EIP:0023:5FD43AEB
SS:ESP:002B:0019EB1C EBP:0019EBA0
DS:002B ES:002B FS:0053 GS:002B
Flags:00010246
Call stack:
Address Frame Logical addr Module
5FD43AEB 0019EBA0 0001:00072AEB C:\WINDOWS\SYSTEM32\igdumdim32.dll
65C375F7 0019EC10 0001:000465F7 C:\WINDOWS\system32\ddraw.dll
65C3739E 0019EC2C 0001:0004639E C:\WINDOWS\system32\ddraw.dll
65C36F39 0019ECA8 0001:00045F39 C:\WINDOWS\system32\ddraw.dll
65C3279F 0019ECC8 0001:0004179F C:\WINDOWS\system32\ddraw.dll
65C30910 0019ED00 0001:0003F910 C:\WINDOWS\system32\ddraw.dll
6DA78CDE 0019ED20 0001:00057CDE C:\WINDOWS\system32\apphelp.dll
6DA80A50 0019ED40 0001:0005FA50 C:\WINDOWS\system32\apphelp.dll
10001284 0019ED54 0001:00000284 C:\War2anti\ddraw.dll
Stack bytes:
0x0019eb1c: 88 82 5c 00 40 3f d4 5f 78 ec 19 00 10 00 00 00 ..\.@?._x.......
0x0019eb2c: cc eb 19 00 00 00 00 00 b0 71 64 00 90 d9 5c 00 .........qd...\.
0x0019eb3c: 00 00 00 00 00 00 00 00 00 00 00 00 80 d9 5c 00 ..............\.
0x0019eb4c: 17 ae a6 ed 6c eb 19 00 9e 73 c3 65 00 00 00 00 ....l....s.e....
0x0019eb5c: c0 bf 5f 00 3c ec 19 00 00 00 00 00 a0 c0 5f 00 .._.<........._.
0x0019eb6c: f8 eb 19 00 8e 70 c2 65 38 1c c7 65 00 00 00 00 .....p.e8..e....
0x0019eb7c: a0 c0 5f 00 00 00 00 00 78 ec 19 00 00 00 00 00 .._.....x.......
0x0019eb8c: c0 bf 5f 00 a4 eb 19 00 fb e1 c1 65 88 82 5c 00 .._........e..\.
0x0019eb9c: d8 89 f0 20 10 ec 19 00 f7 75 c3 65 80 d9 5c 00 ... .....u.e..\.
0x0019ebac: cc eb 19 00 78 ec 19 00 f8 2e 5c 00 c0 bf 5f 00 ....x.....\..._.
0x0019ebbc: 0e 00 00 00 58 7f 59 00 88 82 5c 00 00 00 00 00 ....X.Y...\.....
0x0019ebcc: 50 71 64 00 00 00 00 00 00 00 00 00 00 00 00 00 Pqd.............
0x0019ebdc: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0019ebec: 00 00 00 00 00 00 00 00 00 00 00 00 80 00 00 00 ................
0x0019ebfc: 14 ec 19 00 b2 2a a3 6d 00 00 00 00 0c ed 19 00 .....*.m........
0x0019ec0c: 57 af a6 ed 2c ec 19 00 9e 73 c3 65 58 7f 59 00 W...,....s.eX.Y.
0x0019ec1c: f8 2e 5c 00 c0 bf 5f 00 cf a8 a6 ed 5c ec 19 00 ..\..._.....\...
0x0019ec2c: a8 ec 19 00 39 6f c3 65 78 ec 19 00 60 ed 19 00 ....9o.ex...`...
0x0019ec3c: c0 bf 5f 00 40 df 5b 00 48 49 59 00 00 00 00 00 .._.@.[.HIY.....
0x0019ec4c: 98 12 5c 00 03 00 0e 00 c0 56 5b 00 0e 00 00 00 ..\......V[.....
0x0019ec5c: 80 ec 19 00 a9 b4 99 77 00 00 59 00 40 9b 40 09 .......w..Y.@.@.
0x0019ec6c: 30 4b 5c 00 f8 48 59 00 00 00 00 00 b0 76 5c 00 0K\..HY......v\.
0x0019ec7c: c0 bf 5f 00 00 00 00 00 00 00 00 00 00 00 00 00 .._.............
0x0019ec8c: 00 00 00 00 00 00 00 00 48 c1 5f 00 00 00 00 00 ........H._.....
0x0019ec9c: 00 00 00 00 00 00 00 00 43 a8 a6 ed c8 ec 19 00 ........C.......
0x0019ecac: 9f 27 c3 65 f8 b5 5f 00 c0 bf 5f 00 f8 b5 5f 00 .'.e.._..._..._.
0x0019ecbc: 90 16 ef e1 a0 c0 5f 00 b0 76 5c 00 00 ed 19 00 ......_..v\.....
0x0019eccc: 10 09 c3 65 eb a9 a6 ed b0 07 c3 65 00 00 00 00 ...e.......e....
0x0019ecdc: f8 b5 5f 00 c0 bf 5f 00 f8 b5 5f 00 d0 ec 19 00 .._..._..._.....
0x0019ecec: 28 e5 19 00 34 f0 19 00 f0 74 c0 65 a3 f3 79 88 (...4....t.e..y.
0x0019ecfc: fe ff ff ff 20 ed 19 00 de 8c a7 6d f8 b5 5f 00 .... ......m.._.
0x0019ed0c: 60 ed 19 00 00 00 00 00 58 6c 59 00 b0 07 c3 65 `.......XlY....e
0x0019ed1c: 44 17 ef e1 40 ed 19 00 50 0a a8 6d 50 c6 59 00 D...@...P..mP.Y.
0x0019ed2c: 60 ed 19 00 b0 07 c3 65 c2 01 76 88 20 ee 19 00 `......e..v. ...
0x0019ed3c: 24 17 ef e1 54 ed 19 00 84 12 00 10 50 c6 59 00 $...T.......P.Y.
0x0019ed4c: 60 ed 19 00 00 00 00 00 01 00 00 00 62 34 01 15 `...........b4..
0x0019ed5c: 40 21 00 10 00 00 00 00 02 00 00 00 e7 f2 00 15 @!..............
0x0019ed6c: 00 00 00 00 48 c1 5f 00 01 00 00 00 b8 00 23 02 ....H._.......#.
0x0019ed7c: 00 00 00 00 00 00 00 00 35 1e 04 bc 00 00 00 00 ........5.......
0x0019ed8c: 48 c1 5f 00 00 00 00 00 01 00 00 00 00 00 00 00 H._.............
0x0019ed9c: 01 00 00 00 20 ee 19 00 02 00 00 00 80 01 00 00 .... ...........
0x0019edac: f0 ff ff ff f0 ff ff ff ec ed 19 00 4b df ca 75 ............K..u
0x0019edbc: d9 ee 00 15 90 ee 19 00 80 02 00 00 04 29 24 02 .............)$.
0x0019edcc: b8 08 f8 01 88 ee 19 00 55 00 00 00 00 00 00 00 ........U.......
0x0019eddc: 00 00 00 00 00 00 00 00 20 00 cc 00 10 ee 19 00 ........ .......
0x0019edec: 98 00 23 02 03 30 00 00 00 00 00 00 d0 9a 03 15 ..#..0..........
0x0019edfc: 10 1c 01 e5 9c 08 f8 01 2a 0c 9e 00 10 00 00 00 ........*.......
0x0019ee0c: 00 00 00 00 0a 00 00 00 ae 01 00 00 40 ee 19 00 ............@...
Code bytes:
0x5fd43aeb: 83 79 08 01 74 18 8b 41 10 25 00 80 e0 04 f7 d8 .y..t..A.%......
Debugging in Visual Studio with the symbols file would be most preferrable.
Debugging in Visual Studio with the symbols file would be most preferrable.
You need symbols to make any debug output useful. Without them you'll just get a garbled up mess. Compile it with debugging symbols enabled.I cant because when it crashes i loose control of windows and cant use software after...
I cant because the broken war2 makes my mouse and window, bugged out so if i get the app open i cant click anythingYes, when you get war2 crashed you press debug and then you are not able to use your GUI. I made my experiments with war2 loading in window mode. (That will not a goal for this situation).
10001284 0019ED54 0001:00000284 C:\War2anti\ddraw.dllMore precisely, it's already broken here, so need to look to the previous address (not listed in stack trace).
0x0019ebfc: 14 ec 19 00 b2 2a a3 6d 00 00 00 00 0c ed 19 00 .....*.m........So location for previous call located here:
0x0019ec0c: 57 af a6 ed 2c ec 19 00 9e 73 c3 65 58 7f 59 00 W...,....s.eX.Y.So, i'd look into aqrit's ddraw.dll, into function begin at 0019ec2c to check what happens there before call to 0019ed0c
Debugging in Visual Studio with the symbols file would be most preferrable.If anybody can make symbols for current ddraw.dll, and explain how to enable it for degubbing that file, that would be appreciated.
Code:Also, tupac, what version did you use for that log?
a new minimal version for Win8/10 was uploaded (same url) on the 20th
I plan on re-writing the main version again...
goals:
1. remove redraw kludge
2. real full-screen mode
3. switch to D3D9Ex or D3D11 for triple buffering with vsync
The "vista platform update for SP2" back ported DX11 but it isn't clear to me if the Win7 DX9Ex FLIPEX stuff was also back ported at the same time.
10001284 0019ED54 0001:00000284 C:\War2anti\ddraw.dllthe return address doesn't line up for the current version...?
the return address doesn't line up for the current version...?Checked also, 1284 point to the middle of operand, looks like different version.
if the local ddraw.dll loaded at address 0x10000000 then the return address should be 0x10001288 not 0x10001284 ?
Also, can you attach your ddraw.dll you used for that? (Not sure if aqrit rebuilt that dll and updated the link recently).Looks like exactly what i talked about: you dl'ed file, got an error, and after that aqrit rebuild ddraw and reupload it to the same url. So your dump is useless without your dll.
Use this DLL: [url]http://www.mediafire.com/download/pf5q8jh9yysatfh/ddraw_xboi_debug.zip[/url] ([url]http://www.mediafire.com/download/pf5q8jh9yysatfh/ddraw_xboi_debug.zip[/url])
Put the .pdb in the same folder as the DLL. When W2 crashes, you should click on the Debug button from the dialog that pops up and open with Visual Studio. If not, try ctrl+alt+del to open the task manager, go to the processes tab, right click on the W2 process, and click Create a dump file and/or click Debug.
------------------------------------------------------
PROGRAM VERSION: 2.0.2.0
COMPUTER NAME: POWERMACHINE
USER NAME:
TIME: 02/19/16 13:05:38.103
INFO:
Exception code: C0000005 ACCESS_VIOLATION
Fault address: 72433204 01:00042204 C:\WINDOWS\system32\ddraw.dll
Registers:
EAX:00000000
EBX:00004000
ECX:00853E68
EDX:80808080
ESI:00853E68
EDI:80808080
CS:EIP:0023:72433204
SS:ESP:002B:0019EA38 EBP:0019EA80
DS:002B ES:002B FS:0053 GS:002B
Flags:00210246
Call stack:
Address Frame Logical addr Module
72433204 0019EA80 0001:00042204 C:\WINDOWS\system32\ddraw.dll
7242B47D 0019EAB4 0001:0003A47D C:\WINDOWS\system32\ddraw.dll
75CB84F3 0019EAE0 0001:000374F3 C:\WINDOWS\SYSTEM32\USER32.dll
75C96C40 0019EB88 0001:00015C40 C:\WINDOWS\SYSTEM32\USER32.dll
75C96820 0019EBE8 0001:00015820 C:\WINDOWS\SYSTEM32\USER32.dll
75C9D169 0019EC28 0001:0001C169 C:\WINDOWS\SYSTEM32\USER32.dll
779D8E76 0019EC94 0001:00077E76 C:\WINDOWS\SYSTEM32\ntdll.dll
75C9CBC4 0019ECCC 0001:0001BBC4 C:\WINDOWS\SYSTEM32\USER32.dll
15010DC9 004AD984 0001:0000FDC9 C:\War2Combat401\Storm.dll
Stack bytes:
0x0019ea38: 78 ad 7c 00 a0 7c 7a 00 58 ea 7c 00 1c 2b 43 72 x.|..|z.X.|..+Cr
0x0019ea48: 01 00 00 00 60 30 7d 00 7c ba 42 72 01 00 00 00 ....`0}.|.Br....
0x0019ea58: fa 0d cd 00 78 ad 7c 00 58 ea 7c 00 01 00 00 00 ....x.|.X.|.....
0x0019ea68: 40 7a 7a 00 00 00 00 00 60 30 7d 00 01 00 00 00 @zz.....`0}.....
0x0019ea78: 00 00 00 00 01 00 00 00 b4 ea 19 00 7d b4 42 72 ............}.Br
0x0019ea88: 00 00 00 00 01 00 00 00 20 b0 42 72 00 00 00 00 ........ .Br....
0x0019ea98: 70 17 00 00 00 00 00 00 3e 11 00 00 d0 ef 45 00 p.......>.....E.
0x0019eaa8: 00 00 00 00 51 70 4d 35 00 00 00 00 e0 ea 19 00 ....QpM5........
0x0019eab8: f3 84 cb 75 fa 0d cd 00 1c 00 00 00 00 00 00 00 ...u............
0x0019eac8: 70 17 00 00 00 00 00 00 cd ab ba dc 70 17 00 00 p...........p...
0x0019ead8: 20 b0 42 72 00 00 00 00 88 eb 19 00 40 6c c9 75 .Br........@l.u
0x0019eae8: 20 b0 42 72 fa 0d cd 00 1c 00 00 00 00 00 00 00 .Br............
0x0019eaf8: 70 17 00 00 96 c8 8a 35 00 00 00 00 00 00 00 40 p......5.......@
0x0019eb08: 1c 00 00 00 24 00 00 00 01 00 00 00 00 00 00 00 ....$...........
0x0019eb18: 00 00 00 00 30 00 00 00 ff ff ff ff ff ff ff ff ....0...........
0x0019eb28: 18 6b c9 75 00 00 00 00 00 00 00 00 00 00 00 00 .k.u............
0x0019eb38: 00 00 00 00 20 b0 42 72 00 00 00 00 00 00 00 00 .... .Br........
0x0019eb48: 00 00 00 00 f8 09 a2 00 00 00 00 00 00 00 00 00 ................
0x0019eb58: 01 00 00 00 00 00 00 00 00 00 00 00 fa 0d cd 00 ................
0x0019eb68: 00 00 00 00 96 c8 8a 35 00 00 00 00 68 e4 19 00 .......5....h...
0x0019eb78: d8 eb 19 00 f0 e5 cb 75 36 08 42 40 00 00 00 00 .......u6.B@....
0x0019eb88: e8 eb 19 00 20 68 c9 75 20 b0 42 72 00 00 00 00 .... h.u .Br....
0x0019eb98: 1c 00 00 00 00 00 00 00 70 17 00 00 00 80 25 00 ........p.....%.
0x0019eba8: 01 00 00 00 f6 c8 8a 35 00 00 00 00 90 ad 9e 77 .......5.......w
0x0019ebb8: 01 00 00 00 11 00 00 00 00 00 00 00 00 00 00 00 ................
0x0019ebc8: fa 0d cd 00 00 00 00 00 ac eb 19 00 68 e4 19 00 ............h...
0x0019ebd8: 38 ec 19 00 f0 e5 cb 75 16 08 42 40 fe ff ff ff 8......u..B@....
0x0019ebe8: 28 ec 19 00 69 d1 c9 75 00 02 c7 00 00 00 00 00 (...i..u........
0x0019ebf8: 1c 00 00 00 00 00 00 00 70 17 00 00 20 b0 42 72 ........p... .Br
0x0019ec08: ec ec 19 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0019ec18: f0 ee 85 00 00 00 00 00 00 00 00 00 36 cf 8a 35 ............6..5
0x0019ec28: 94 ec 19 00 76 8e 9d 77 44 ec 19 00 20 00 00 00 ....v..wD... ...
0x0019ec38: a0 ef 19 00 c0 8d 9d 77 68 ec 19 00 00 02 c7 00 .......wh.......
0x0019ec48: 00 00 00 00 1c 00 00 00 00 00 00 00 70 17 00 00 ............p...
0x0019ec58: 20 b0 42 72 90 ad 9e 77 00 00 00 00 1c 89 cb 75 .Br...w.......u
0x0019ec68: ce cd c9 75 ec ec 19 00 00 00 00 00 00 00 00 00 ...u............
0x0019ec78: 00 00 00 00 01 00 00 00 d0 c1 c7 00 00 80 25 00 ..............%.
0x0019ec88: 00 05 10 01 ec ec 19 00 00 00 00 00 cc ec 19 00 ................
0x0019ec98: c4 cb c9 75 00 00 00 00 00 00 00 00 01 00 00 00 ...u............
0x0019eca8: 01 00 00 00 f0 08 7a 00 f2 04 c1 00 e0 fc ca 75 ......z........u
0x0019ecb8: ac 8b cb 75 00 00 00 00 d0 c1 c7 00 00 80 25 00 ...u..........%.
0x0019ecc8: b0 c0 00 01 84 d9 4a 00 c9 0d 01 15 ec ec 19 00 ......J.........
0x0019ecd8: 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 ................
0x0019ece8: f2 04 c1 00 14 fd ca 75 f2 04 c1 00 b0 c0 00 00 .......u........
0x0019ecf8: f2 04 c1 00 84 d9 4a 00 78 13 01 15 f2 04 c1 00 ......J.x.......
0x0019ed08: 70 13 01 15 84 d9 4a 00 f0 08 7a 00 50 f6 19 00 p.....J...z.P...
0x0019ed18: 6e 00 00 00 75 7d 00 19 00 00 40 00 78 ad 04 19 n...u}....@.x...
0x0019ed28: f0 08 7a 00 80 c0 00 19 50 f6 19 00 e0 29 cb 75 ..z.....P....).u
Code bytes:
0x72433204: f6 47 04 02 0f 95 c1 f6 c2 20 0f 94 c0 84 c8 75 .G....... .....u
ddraw.dllHm, well, the same file...
i cant use task manager, or use visual studio or i wouldtry ProcDump: https://technet.microsoft.com/en-us/sysinternals/dd996900.aspx
15010DC9 004AD984 0001:0000FDC9 C:\War2Combat401\Storm.dllhm, ddraw.dll is not represented at all, what does it mean?...
That is a common false positive for anything that manipulates memory in a non-standard'ish fashion.I see, but that will alienate most ordinary users. They prefer to not use something detected as virus.
Tupac, there is actually a fix for the control issue in my bot. You can take a look at it this and make your own version of it. All it does is change the state of the war2 window to minimized which in turn gives you control over windows again so you can access whatever is behind war2 window. I ran into the same problem and this was the quick-fix I came up with:
'There is a weird bug that causes War2 to Maximize incorrectly when it's in a Non-War2 Game screen such as BNE Chat, Login screen, etc. You cant minimize anything with mouse or keys, so this fixes that bug. This forces War2 into minimized state. It will eventually fix itself when games are started, etc. -Lance
Sub MinimizeWar2()
oAutoIt.WinSetState "Warcraft II", "", 6
End Sub
ddraw.dll
Hm, well, the same file...
But wrong return address, why?..
Maybe stack rewritten already? But looks almost properly.
Can you try on the same config to compare dumps?i cant use task manager, or use visual studio or i would
try ProcDump: [url]https://technet.microsoft.com/en-us/sysinternals/dd996900.aspx[/url] ([url]https://technet.microsoft.com/en-us/sysinternals/dd996900.aspx[/url])
procdump.exe -e -w -ma -x . "Warcraft II BNE.exe"
That will autogenegate .dmp-file in war2 directory on crash.
You have to start war2 directly without any loaders, so you should mount/insert war2 cd before.15010DC9 004AD984 0001:0000FDC9 C:\War2Combat401\Storm.dll
hm, ddraw.dll is not represented at all, what does it mean?...That is a common false positive for anything that manipulates memory in a non-standard'ish fashion.
I see, but that will alienate most ordinary users. They prefer to not use something detected as virus.
Also, previous version are not detected, so maybe injection mechanizm have been changed?
Not a problem while it's still in a test stage.
OKAY FOUND HUGE BUG!!!!Nice!
CLICK LADDER THEN ALT TAB REAL FAST. Look like war2 is window mode... but when i click join or create it goes full screen again.. This is what happens when the game crashes..... HIT LADDER THE ALT TAB REAL FAST IT LOOK LIKE WINDOW MODE..........
Tupac, if you use AutoIt, like the bot, you dont have to create a batch file. You can bind it to a hotkey and that will solve the issue. you wont be able to move the war2 window around, but you will break the cursor out of the window which will allow you to move other windows and they WILL be placed over the top of the war2 window which is your goal so that you can read debug info. See the "6" at the end of the line, there are 32 states that you can try, 6 happened to be the one that worked for me, but one of them may work for you, play with them all. When alt-tabbing caused the war2 window to get stuck in the top left corner and the cursor could not be grabbed, there were only 2 fixes. Change the window state and then alt-tab back into the game, or create a game and then alt-tab back into the game. I use both methods in the bot. AutoIt just makes it quick and easy to bind a window state change to a hotkey which is why I suggest it as a quick fix.No it don't work like I have the mouse out easy.
Sub MinimizeWar2()I just tried autoit, had to change it to WinSetState("Warcraft II", "", 6) (not sure if that syntax means something)
oAutoIt.WinSetState "Warcraft II", "", 6
End Sub
Anyone seen this bug on Win10? Does it always happen?
([url]http://i.imgur.com/jgvYJFz.png[/url])
Many times
Yes, the offset. Okay, thanks. Is it win8/10 specific? Never happens on my Win7 computer.
Anyone seen this bug on Win10? Does it always happen?
([url]http://i.imgur.com/jgvYJFz.png[/url])
can someone if on help me figure this out. how to fix the problem I'm just not getting it =(Just download the file extract it to desktop copy that .dll file then paste into your warcraft 2 folder. Done.
ok I dled it I opened the folder now what do I do I'm sorry I'm being a pain in the ass tupacDownload it try to open it? It's a zip files so you need to extract it to desktop, etc. Then put the .dll into the war2 folder. Done go play.
that time it worked I guess I was just doing it wrong the 1st few 100 times lol thanks againLol maybe you didn't extract it last time lol
Both versions have the same bug.. alt+tab chat crashthe minimal version is doing basically nothing...
full is slower than minimalThat whole part of the full version should be ported to a d3d shader instead of trying to use SIMD
merge both projects: full and minimalThe full version changes color-depth the minimal version is a study of how DWM broke the game.
comments or questionsI'll answer questions...
the minimal version is doing basically nothing...Sorry, i've been wrong.
I can add some checks to the user32/GDI function calls, but I thought they were fairly safe even when they fail.
If we cared...??? to get the minimal version to not crash on XP we just need to forward the dds->Restore function.I see: 0, //Restore, // 0x6C
I can add some checks to the user32/GDI function calls, but I thought they were fairly safe even when they fail.I'd actually prefer some checks with logging any impossible situation...
The full version changes color-depth the minimal version is a study of how DWM broke the game.I looked into your projects for a long time, but i still didn't understand how it works. Your programming experience is MUCH higher than mine...
There is an overlap between the two if the user doesn't support SSE2, but if that section is ported to a d3d shader then the overlap would be cut from the code.
They should not be merged.
Then you used SSE2 just to make that converts 8->32bpp faster. And then you used d3d shaders to make it work faster, but on systems not supporting SSE2, right?
Is there any chance you include the possibility to launch WC2 in windowed mode officially? Found a ddraw.dll that has windowed mode by configuring it via ddraw.ini but includes all the glitches that have been fixed by the ddraw.dll in this thread.In the color fix for win 8 and 10 minimal just hit alt + enter.
I cleaned up some of the code, updated project files for Visual Studio 2015, enabled optimizations, added better error messages, and created a fallback CreateDevice() call so that the DLL could work on a wider variety of systems. Windows XP not supported (could easily be supported if you change a compiler option).
Source code included.
And SOS Aqrit, I don't know why but Korean text is broken in StarCraft.
Yeah I saw that mentioned on teamliquid or whatever it's called. Those people should be able to make their own color fix idk though.And SOS Aqrit, I don't know why but Korean text is broken in StarCraft.
Uh?
Sent from my Motorola DynaTAC 8000X using Tapatalk
thx again man back on 7...thought i could live without the window mode but i cant :P works great!Yeah I totally agree with you there. Very hand for development, etc.
thx again man back on 7...thought i could live without the window mode but i cant :P works great!Yeah I totally agree with you there. Very hand for development, etc.
It also causes my 2nd monitor to go black when I alt tab for a few seconds in and out. Had my laptop running to my 55in NEC monitor. Another reason I use window mode ;)
so pick one of the following:I wouldn't really know how to do any of that without some really specific details :/
A) hook some gdi calls so the gdi surface is 8bpp
B) color convert the data as it is moved between the 32bpp gdi surface and the 8bpp ddraw surface
C) output the text straight to the 32bpp d3d surface
D) replace the whole function with custom "draw string" code
> Could you tell me how to fix the Korean text using invasive hooking?
[url]http://www.teamliquid.net/forum/viewpost.php?post_id=25568672[/url] ([url]http://www.teamliquid.net/forum/viewpost.php?post_id=25568672[/url])
IIRC, the game creates an offscreen gdi surface the same color depth as the display
it draws the korean text to that surface using gdi
then it just does a straight memcpy of those bits to the (8bpp) ddraw surface.
it all happens around the GetBitmapBits() call
so pick one of the following:
A) hook some gdi calls so the gdi surface is 8bpp
B) color convert the data as it is moved between the 32bpp gdi surface and the 8bpp ddraw surface
C) output the text straight to the 32bpp d3d surface
D) replace the whole function with custom "draw string" code
> Regarding #2, how easy would it be to lock the 32bpp surface?
we DON'T want to lock the 32bpp surface.
instead we want to remove all calls to color_convert() and multiblt()
...
If you really want to lock the 32bpp surface... IIRC, the previous versions did it so check the git commit history.
> profiled the code
seems to be missing :p
but this project is not at the optimization stage...
it still has other fundamental issues :-/
Assuming the palette code gets optimized...
then the only thing going on in-game really is the mapping between video memory and system memory for the 8bpp texture? I don't know much about it and the docs seems vague on what is actually going on behind the scenes...
You can try using different texture creation flags, or different color format for the 32bpp surface or something, idk.
One could switch between exclusive mode in-game then pop back to normal mode on the menu...
which kinda leads to what I was saying about hooking WM_DRAWITEM/PAINT because (afaik) thats the only way to stay in exclusive mode 100% of the time.
/random
I was wondering awhile ago, if one flipped the GDI primary to the ddraw back buffer... could it be accessed simultaneous by ddraw and gdi? I suspect that behavior has also been broken, though.
> windowed mode
if the drawing was fixed in the 1.17 (alpha?) couldn't one just use dxwnd again?
Just tried war2 with all versions of ddraw.dll on my computer: core i5-4460, win7 x64, integrated video adapter (generic vga).Why would you test them of windows 7? This is a Windows 8.1, 10, etc fix.
Dxdiag shows directx 11.
Test2 works fine. Test3 and test4 causes ddraw error. Test4 minimal causes black screen. (Also test4 causes a kaspersky antivirus false-positive: win32 trojan-generic).
I just planned to use something working with windowed mode by alt-enter (test 3 and test 4 should work, as i remember).
So, looks like all these tests are still far from production. Need some final product from tests.
Otherwise i can't implement it to new combat.
Why would you test them of windows 7? This is a Windows 8.1, 10, etc fix.Because i try everything everywhere.
forked the ddraw and made a release with fps limiter for those having performance issues
https://github.com/FunkyFr3sh/Aqrit-DDraw-Hack/releases
Latest version comes now with a resizable window, It does also remember the window position now and comes with a new settings file with additional settings for fine tuning.Wow! Even 2 days ago, right after i looked into GOG Diablo release, i began to look into ddraw to maybe rewrite it myself!
This ddraw is meant to be used for online games onlyThat will be very interesting to look, how you released a resizable window with GDI elements for bnet-chat. I thought about that, but i still didn't make even a 1-st step that way...
What i liked in GOG ideas: using current resolution, to not switch the game to 640x480 or w/e. That's great and very pleasant. What i disliked: that works for single player only, now for bnet chat.
UPD: also another interesting question:
which aqrit version it based on?
test2, test3, test4?
As i don't see d3d shaders, i'd suppose it's test2? Not so quick as test4 which supports d3d, but compatible with all videocards?
@fois, i looked into your repositories and see one forked from narzoul/DDrawCompat. I also looked into narzoul's thing, to adapt it to war2. I like their coding style and lots complicated bugfixes. What do you think about to use fork from DDrawCompat for war2?
omg! best performance love it!!!!
omg!!!!!!! like omg i need some beer!!!! thanks for the options!!!! i can use my little widgets!!
1 more thing,i have a dosbox that uses, i think its called scalers, im not sure..like 2x eagle2xsai,mame stuff..that makes the graphics almost perfect but no biggie cool as hell!
nice!!! kinda "hot wax" look
looks great,and plays well, im going with 800x600 not the best hardware here.
my .jpg doesnt give justice lol.
I was just playing around with cnc-ddraw and I think I got it finally working on bnet for online games...Is it designed to x2-x3-xN resolution only? I use 1600x1200 and i tried it, it shows a picture looks like 640x480*2 with a black border around.
If someone wants to give it a try, extract cnc-ddraw.zip into your game folder. (It's attached below)
This one is preconfigured for scaling with xBR shader, it might show you the most beautiful warcraft 2 you have ever seen :)
This config runs at double resolution (or more), which is 1280x960. Will work fine if your monitor supports high resolutions such as 1920x1080 or above, otherwise you can't really use it with this config. Scaling via xBR requires somewhat good hardware with OpenGL 3.0 support.
Report from one of our gamers: sometimes (not possible to repeat) mouse becomes blocked. Most likely when exiting from the game to bnet chat. Most likely in window mode. Possibly after alt-tab. Not sure. Not after every game.
Questions from me:
Is that possible to make bnet-chat also movable and resizable in window mode?
Is that possible to repair printscreen (instead of alt-printscreen) in bnet-chat mode?
1 more bug from me: after i exit the game, top banner apperared with broken palette. That happened in full-screen. Alt-enter didn't help. Chat have been ok.
Is it designed to x2-x3-xN resolution only? I use 1600x1200 and i tried it, it shows a picture looks like 640x480*2 with a black border around.
At the same time, everything looks perfect, except very small bnet-chat in top-left corner of the screen.
Also, as i understand, this version doesn't support windows mode, fullscreen only, is it?
Movable bnet might be possible, but someone has to do some research and find out how exactly the bnet window works. I tried to move it before and it just crashed the game, don't really know yet why it didn't work.I see, i just thought it could be easy to hook some GDI functions to change their coords "on the fly". If that crashed the game, so, ok, not a big deal...
Resizable bnet is too difficult cause it creates multiple windows and layers them on top of each other and it creates buttons and other stuff that would need to be resized one by one too. I don't think anyone will get that done in perfection.
I didn't notice any palette issues yet with the banner, but I will try to pay more attention to it. I know aqrit made one palette entry transparent for his bnet trick, maybe the banner was using it and that's why it looked weird..I see, i just got a quick look onto your ddraw yesterday. I plan to use it as the main ddraw for war2, so i'll check everything carefully next times.
The example settings file I included was set up for integer scaling (2x 3x...) because I wanted to show how awesome the xBR shader looks :)Wow! That works for me! Thanks! I tried to use different options yesterday, but i didn't know how to do what i want.
You can remove the xBR shader, just set "shader=" and then "boxing=false", now it will work with any resolution just like the gog ddraw does.
It works in window mode too, you have to set "fullscreen=false" and "windowed=true", but I didn't optimize it for windowed mode yet like I did with test2, that means you will see 2 windows on the screen when you open bnet (It's easy to fix it though)
BTW, I tested test2, my updated test2 and cnc-ddraw on linux with latest combat edition and it worked nice :) The installer would need a little modification to make it perfect though, not sure if you're interested on mac/linux, but I could give you the code for inno setup if you need it.Sure! I'm interested to populate combat everywhere: on all windows, on linux, mac - that would be perfect!
Here is how it looks https://cdn.discordapp.com/attachments/452933261266518016/558568420405411850/unknown.png
[Files]
Source: Resources\cnc-ddraw.dll; DestDir: "{app}"; DestName: "ddraw.dll"; Flags: ignoreversion; MinVersion: 5.1sp3
[Registry]
Root: HKCU; Subkey: Software\Wine\AppDefaults\Warcraft II BNE.exe\DllOverrides; ValueType: string; ValueName: "ddraw"; ValueData: "native, builtin"; Check: RunsOnWine
[code]
function GetModuleHandleA(lpLibFileName: PAnsiChar): THandle;
external 'GetModuleHandleA@kernel32.dll stdcall';
function GetProcAddress(Module: THandle; ProcName: PAnsiChar): Longword;
external 'GetProcAddress@kernel32.dll stdcall';
function RunsOnWine: boolean;
begin
Result := GetProcAddress(GetModuleHandleA('ntdll.dll'), 'wine_get_version')<> 0;
end;
You don't need to add any checks, cnc-ddraw for example will check if opengl is supported on its own, if not then it will switch to GDI automatically. Updated test2 also doesn't need any checks.Then need to test opengl version with no opengl support...
I compiled both with visual studio 2017, that means you need to have at least win xp service pack 3, you can check the MinVersion like this:Yes, i see, i also built both with visual studio 2017.
The example settings file I included was set up for integer scaling (2x 3x...) because I wanted to show how awesome the xBR shader looks :)Is there an additional description for all the possible parameters?
You can remove the xBR shader, just set "shader=" and then "boxing=false", now it will work with any resolution just like the gog ddraw does.
It works in window mode too, you have to set "fullscreen=false" and "windowed=true", but I didn't optimize it for windowed mode yet like I did with test2, that means you will see 2 windows on the screen when you open bnet (It's easy to fix it though)
Blocked as in the mouse can't leave the window? In the menus i wanted the mouse to be free and in game we need it locked so you can scroll around, that's why I made it so a right-click will lock the mouse into the window.Sorry, wrong info:
Maybe he did a right-click in the menus and it locked it? Ctrl+Tab can unlock the cursor btw
Thanks a lot for wine code! Added it and rebuilt 3 en and 3 ru versions (still didn't change ddraws to your versions as i need to check them carefully before).
Also, is that work fine under XP? As i remember, aqrit didn't recommend to use his ddraws for xp, as war2 works fine under XP without any ddraws.
So, did you try XP with your ddraws?
I use MinVersion: 6.0;
Is there an additional description for all the possible parameters?
It's quite difficult to understand things even for me, after reading the source code, so i think it will be much more difficult for ordinary players.
...
10. to add graphics utility to configure options, similar to GoG's one. Not sure we really need that, but maybe something already exists?
1. What is maintas and boxing? Which one is required/better and when or no one? As i see from source, they exclude each other.
2. What maxfps would be the best for war2?
3. Which set of mouse options are optimal for war2?
4. How to understand which renderer is used as auto? Are there any logs anywhere?
When i use auto, looks like d3d or w/e applied, as when i select opengl, that looks different.
5. If renderer is selected as opengl, but opengl is not supported - will gdi be used? Or some unknown error appears?
6. I want to start war2 in fullscreen mode with resolution similar to my default screen resolution. And alt-enter to window mode as something small, like 640x480 or configurable. Is that possbile or need to be updated?
7. GoG contains parameters: anisotropic, antialiasing, gamma. Do they have any analogs here?
8. When i use width=0 height=0 it works as my default resolution with renderer auto, but not works the same with opengl. For opengl i have to write width=1600 height=1200
9. ddraw.ini contains bnetHack option, but no that option in the source code. Is it different build there is binary code?
Sorry, wrong info:
mouse have not been blocked, but looks like pointer appears behind the screen, became invisible (working though). Usually can be fixed by creating/joining the game and then returning back. But sometimes - that doesn't help.
Nice! Is it on the website already? Will do a test run to make sure it works..Sure, i updated it on ftp! Didn't update version of file, war2combat is still 4.3.3 since several more releases...
You don't actually need it on XP for compatibility reasons, but now they're useful because we have windowed mode and stretching. I Always test everything on XP and 10, so yeah, it works fine :)Yes, the main reason is window mode. Also some palette troubles happened in XP also. Nice to see you test it on XP also!
No, only what is written inside of ddraw.ini. Normally you don't have to change any settings, unless you're wanting to change something specific like the mouse speed or scaling.I see, np, i'll try to understand that myself asking you. Looks like you understand that ddraw-gdi-dib-opengl-d3d things very well! I still continue looking into the source code and not understand what each command means and what effect it causes...
There are some config programs already available that can change the cnc-ddraw settings, but they're for other games and have game specific settings so we can't use them directly (We could modify them, but they need the .NET framework 2.0).I see, i don't think we need to do something with that right now.
war2 needs at least 60 FPS, but it's no problem to set it higher. I usually set it to the double of what the game needs to get less input lag.I tried it with 1600x1200x32, used cubic.glsl shader as the most beatiful for me and with default 125 fps, and looks like it lagged on my core i5 processor. Then i decreased fps to 30 or w/e and lags disappeared. So, i think fps can be important.
For war2 we only need GDI, cause it's the fastest on low resolutions. OpenGL is only useful if you enable stretching cause it can apply shaders for better image quality. There are also shaders that can apply other effects without stretching (e.g. make the image brighter).You mean a war2 resolution or screen one? Because i used opengl to scale war2 to 1600x1200x32. I didn't test cnc-GDI for such resolution. Should i?
That is currently not possible, it will switch to windowed mode but the window will be stretched and big... But it's a good idea, I have to think about a solution for this...Yes, as i understand, there's only 1 current resolution for both fullscreen and windows mode. So, my idea is to set 1600x1200x32 (similar as default monitor in windows) to enjoy fast alt-tab between war2 and windows without switch videomode. And need another resolution for window mode.
You can do all that via shader= too. Each shader has a different effect.I see. I don't think that's important to make it "same as in GOG", just asked. So, i see they also should use some kind on shaders also.
gog's scaling looks blurry like this "shader=Shaders\cubic.glsl"
Oh, are you sure you had 'fullscreen=true' set? That should always work with 0,0 on all renderers.Hm, i've been sure yesterday when i checked. But now looks like everything is fine. resolution is auto: 0x0x0, fullscreen=true, windowed=false, boxing=false, shader=Shaders\cubic.glsl, renderer=opengl, and everything works fine!
The cnc-ddraw I linked here was a new test build, you have to switch the branch from "master" to "diablo_warcraft2" to see the new code.Ah, i ddin't see that, thx!
Here is a direct link to the code of the new branch https://github.com/CnCNet/cnc-ddraw/archive/diablo_warcraft2.zip
I will do some testing. So this was the new test2 or cnc-ddraw? It only happens in windowed mode?It was test2. That is a floating error, so he have no idea when is happened, but most likely in windowed mode. If you have no idea what is can be, then np.
fois is a beast
Sure, i updated it on ftp! Didn't update version of file, war2combat is still 4.3.3 since several more releases...
In versions en/ru lite/full/std.
Yes, the main reason is window mode. Also some palette troubles happened in XP also. Nice to see you test it on XP also!
My main test comp in win7.
BTW, one of our testers still uses XP SP2, no way to update it to SP3 for some reasons. As i understand, need to rebuild ddraws with vstudio 2015 to use it on XP SP2, is that a good idea?
I see, i don't think we need to do something with that right now.
But for future i think that could be useful to make that module configurable.
Are there source codes for that framework 2.0 settings config utilities?
I'm about CNC ddraw most likely, i agree there's almost nothing to configure in arqit's ddraw.
I tried it with 1600x1200x32, used cubic.glsl shader as the most beatiful for me and with default 125 fps, and looks like it lagged on my core i5 processor. Then i decreased fps to 30 or w/e and lags disappeared. So, i think fps can be important.
maybe would be good to write logs somewhere like ddraw.log or war2_ddraw.log, for debug purposes? Then people can send that reports to you, to let you look and check what happens on their side.
Gonna make the game working with these ddraws on any pc first and then maybe next we'll have to look into the hosting issues...
Just tested it on Linux Mint 19, works great now!
If anyone is interested, for Mint 19 and the latest ubuntu versions you'll have to type one command:
sudo apt install wine-stable wine32 fonts-wine
That's it, just download the installer now and run it.
I recorded a video of it too: [url]https://drive.google.com/file/d/1_Bt1Q49XGUJ75xLUJvz-ltgS3V32nbxp/view[/url] ([url]https://drive.google.com/file/d/1_Bt1Q49XGUJ75xLUJvz-ltgS3V32nbxp/view[/url])
I think 2015 also supports only XP SP3, you probably need a very old version like VS 2008 or 2010. But I also included a makefile for gcc, this one should work even on win 2000, I attach a gcc build to this post if someone wants to try it.
I try to put something together :)
1600x1200x32 with 125 fps might not work on intel graphics cards, so yeah, lower FPS can help in case you don't have a AMD/Nvidia card.
Yeah that's possible, I got debug code that you can enable in debug.h. But usually only useful for crashes (It's also very slow...)
Wow! Fixing hosting - network functions hooking? Would be very interesting to look! I just began to look into world of dll, but you are very experienced in that!
Hmm... I read somewhere 2015 supports SP2, but maybe they are wrong. At the same time looks like your current dll works on XP SP2...
I don't want to ask you about some additional work with makefiles or w/e. But is it compatible with gcc? I always have porblems when i try to build something developed for some version of visual studio on different version, or especially on another compiler. So, i have all visual studios since 6.0 installed on my computer and select version for each project.
Oh, 1 more thing to look:
warvideo.
Warvideo with aqrit ddraws saves video with blinking. Looks like something with switching surfaces in ddraw, broken sync between them or w/e.
So, can you please look if there is a simple way to fix it?
Yeah, I have done some testing already using a wsock32 proxy dll, it should work fine. I have a plan for it, but didn't start working on it yet, just wanted to know if my wsock32 idea could in theory work :)That looks like one of the most important project for our game! Right after ddraw!
Well, if it works on SP2 then it's all good I guess! I never actually tried if it works on SP2 myself, was only reading the microsoft documentation about itThat's great! If we get a feedback for winXP with SP1/2 or with no SP, we can always try to rebuild it.
makefile is already included btw, should work fine.
I never used this yet, is the source code for it available? Might be interesting to put a recorder into the ddraw, using x264 codec... I have to think about that :DNot sure x264 will be better than it works now, it uses it's own codec, but warvideo can still be a very interesting thing. Check PM...
That looks like one of the most important project for our game! Right after ddraw!
I thought to try to do something like lat trick (udp ping to other players to let them connect the game). So, if you need that player ip list to send UDP pings, let me know to give them to you (as a php-page from the server i think).
That's great! If we get a feedback for winXP with SP1/2 or with no SP, we can always try to rebuild it.
As i understand, build it with gcc and makefile should not cause any problems with work somewhere? Like windows 10 or anywhere else?
Of course, i think if some code will on more systems (like oldest winxp or win2000) and works the same on others, it's always better!
Oh, I think I can do it without any ip list, thanks. Don't think there is any need to do any kind of changes on the serverSo, i don't understand how you plan to make such fix. Anyways, will be interesting to look if you release it.
Yeah please let me know if you find someone who tested it on SP1/SP2, I never tried it myself and it's kinda interesting to know.Yes, one of our active testers use XP SP2, he is quite smart guy and do thing carefully. So it some bugs can happen on his computer, he will report that.
I used to build cnc-ddraw with gcc all the time, I think I switched to visual studio on version 1.3.0.0 of cnc-ddraw (The performance is better with the VS build).Is that an archive winxp-cnc-ddraw.zip you attached 2 messages ago? Looks like that works worse than original: "blackscreen instead of bne in fullscreen, blue line in windowed mode".
So yeah, it works fine on any version of windows including 10, it's just a bit slower
[ddraw]
Windowed=No
MaintainAspectRatio=Yes
AlwaysOnTop=Yes
ShowWindowFrame=Yes
Width=640
Height=480
PosX=-32000
PosY=-32000
And autogenerated file is:[ddraw]
PosX=##saved from last resize/move
PosY=##saved from last resize/move
Windowed=No
ShowWindowFrame=Yes
Width=##saved from last resize/move
Height=##saved from last resize/move
So, my question is: which ini-file is better?Is that an archive winxp-cnc-ddraw.zip you attached 2 messages ago? Looks like that works worse than original: "blackscreen instead of bne in fullscreen, blue line in windowed mode".
Why the performance differences? VS compiler makes better optimizations? I think performance is more important than old XP releases then.
Another question about 0.1.5.2 release from github:
New (Optional) settings file "war2_ddraw.ini"
So, my question is: which ini-file is better?
Should i include war2_ddraw.ini with ddraw.dll when installing war2combat with ddraw or just use ddraw.dll itself, with autogerenated ini?
Another words: what does options "MaintainAspectRatio=Yes" and "AlwaysOnTop=Yes" do? I tried both and didn't find any differences.
I just fixed that, it will generate the exact same file now https://github.com/FunkyFr3sh/Aqrit-DDraw-Hack/releasesoh, i see, you are quick!
For MaintainAspectRatio, try to run the game in a window and resize it, you will see what happens! AlwaysOnTop can be tested in windowed mode too, try to place another window on top of the game window when it's enabled
For MaintainAspectRatio, try to run the game in a window and resize it, you will see what happens! AlwaysOnTop can be tested in windowed mode too, try to place another window on top of the game window when it's enabledi see, so, your newly configured default options will be the best!
is there a working ddraw for windows mode ? so i can stream.Both of them do. Aqrit and CnC.
Download it here: [url]https://www.videohelp.com/download/UScreenCapture2015.zip?r=hswlrskmwcK[/url] ([url]https://www.videohelp.com/download/UScreenCapture2015.zip?r=hswlrskmwcK[/url]) and modify the link here: [url]http://en.war2.ru/tutorials/how-to-live-stream-warcraft-2/[/url] ([url]http://en.war2.ru/tutorials/how-to-live-stream-warcraft-2/[/url]) to point to the server.war2.en location. The mouse plugin is already on our server, but uscreencapture is not.
Bug detected: aqrit version.
not sure how that worked in test2, but here's it:
start war2, join bnet part, press printscreen. Save file dialog appears.
Then alt-tab to windows, return back to war2, and that dialog hides under the screen or w/e.
After that chat works as before, but when you try to create/join game, it shows background screen only, with no game.
Only alt-f4 helps to exit the whole war2 application.
Tried without ddraw: after alt-tab save dialog still here.
hmm not working on war2combat44 standard install. still leaves screen on multiscreen setups
cnc has a bug for me when i alt tab and alt tab back to the game..it loses a catch function and u cant type with keyboard.
just a good stable ru release as its what i give to all the gog users when they pop up,blizzard and other game companies are pushing that place to grow to compete with steam.
New release for windowed mode users -> Battle.net lobby is not locked to the top left anymore and can now be moved around the screen
[url]https://github.com/FunkyFr3sh/Aqrit-DDraw-Hack/releases[/url] ([url]https://github.com/FunkyFr3sh/Aqrit-DDraw-Hack/releases[/url])
Config program was updated too [url]http://forum.war2.ru/index.php/topic,5015.0.html[/url] ([url]http://forum.war2.ru/index.php/topic,5015.0.html[/url])
Fixed some bugs that were reported, please re-download!
"AntiAliasedFonts=Yes", you can enable it if you prefer the look of it.
Oh, lol, quick response :)
I personally prefer real fonts w/o additional processing, but some people (Vity, Ragner, etc...) will happy to use this option.No need to have multiple ddraws just for that
Still need some option to restrict switching to fullscreen and back,
to block accidental mode switching when someone prefer to play all the time windowed OR all the time fullscreen.
something like:
"AllowModeSwitching=Yes/No" or "IgnoreAltEnter=Yes/No"
...
1.6.3 same bug as previous test:
when finally switches to desktop (by "windows" key or some another hotkey)
and clicked on _another program icon_ in taskbar, somehow that switching back to war2, not to clicked program.
but i clearly NOT clicked on "war2 button" in taskbar.
Why need to use test4 behavior for Alt-Tab?
1.6.2 version was better in this part.
3) The most annoying one, can hurt gameplay: Sometimes, depending on how you click on the window (maybe depends if mouse locked or not, have to click on it after focusing), alt key stays locked and pressing "Enter" to chat switches between window or fullscreen mode. So you can be playing in fullscreen, building tower, press enter to chat and suddenly it changes to window mode and wastes a few seconds where you can't play.
3.a) Does this mean mouse should just be auto locked and alt key assumed to be off by default instead of caught like that? Why the need to click twice?
And would it be possible to change options so sound plays while the window doesn't have focus?
About all the other problems you reported, I can't reproduce any of them. What OS are you using?
Or report the problems so they can be fixed
Is there a way to ignore "Doubleclicking" on window header, so let window keep its normal size? Especially because no way to return in previous size. :/
Being in game Main menu and clicking "close" on window button resulting absolutely "lost/hang" mouse, hotkeys still working. Current solution: alt+enter then back to previous.
New version is out with double click on title bar disabled.Good news.
i didn't notice anything wrong with it, except same drawing bug in "resources" field after game type changing.
here is one common remark for both new 164 and old 163
in regular windows mode:
need to press alt+tab twice to set focus on desktop
when using DISABLEDWM compatibility parameter:
all ok, once to switch to desktop from fullscreen back and forth
But there is also bad news.
Some "laggy graphics" and black-screen issues reported by some players for 163 and almost same with 164.
Don't know about "black screen", but sad thing that last version not having "laggy graphics" problem is 1.6.2. :(
Also, when testing there is a problem how to distinguish fast several different versions 0.1.6.3 for example,
maybe let resulting dll file size grow with every change by at least NN bytes? :)
On what version on windows does that happen?w7-64, but this is not a big problem.
When does the blackscreen happen? Right when you start the game or while playingYes, sometimes at game start, screen keeps black (win10)
any difference between 0.1.6.6 and 0.1.6.7 related to laggy graphics?Ok, we will test it
@Available Any news? Does 0.1.6.7 work? Might have to release a new combat 4.6.1 soon with the fixed version...So that I can emulate like the old CRT monitor from the current modern monitors. The texture looks a bit unsmooth when increase from the original 640 with modern monitors. Why do CRT shows smooth display even though with larger resolutions?
@Muz Why would you want to do that? The game would still run at 640x480, the ddraw can only upscale it to 1024x768
Does 0.1.6.7 work? Might have to release a new combat 4.6.1 soon with the fixed version..Yes, 1.6.7 works good with win7.
Does 0.1.6.7 work? Might have to release a new combat 4.6.1 soon with the fixed version..Yes, 1.6.7 works good with win7.
Which of those configs should I put it in? ddraw.ini or war2_ddraw.ini? Did you make the config using Visual Studio? Which ddraw file should I use?
Notice the two screenshots, the original is 640 and the other is stretch larger than 640, which is close to 1024. Why the larger screenshot, looks a bit pixelated and unsmooth?
(https://i.postimg.cc/1nrFh32p/warcraft-2.jpg) (https://postimg.cc/1nrFh32p)
(https://i.postimg.cc/kD78NWRw/warcraft-2-2.jpg) (https://postimg.cc/kD78NWRw)
I have a question, how to set 640x480 in Windowed mode, and 1024x768 in Full Screen mode?
I have a question, how to set 640x480 in Windowed mode, and 1024x768 in Full Screen mode?
Windowed mode is already 640,
but if you fked it up, drag window border resize window to minimal possible = 640.
About 1024 (why?)
Use opengl-> fullscreen, then manually edit ddraw.ini file:
width=1024
height=768
To emulate CRTs...No need to do ugly scaling then. Even worst CRT was much better quality that scaled to 1024.