Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - aqrit

Pages: 1 2 [3]
31
Server.War2.ru / Re: War2 graphics for Win Vista/7/8/8.1/10/2012 fixed
« on: December 15, 2015, 01:38:49 AM »
@xboi
I'll sink some time into this project since there seems to be some interest now...
Hold off on any threading changes... there are still lots of bigger issues.

1. Does "in-game" Broodwar have any open SDlgDialog windows?

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?

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.

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?

32
Server.War2.ru / Re: War2 graphics for Win Vista/7/8/8.1/10/2012 fixed
« on: December 14, 2015, 05:53:07 PM »
its erasing 307200 bytes ( 76800 dwords ), is this the problem with how your using memset?

anyways... this would probably beat out the library function anyways.
Code: [Select]
__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
}

It could be done on a separate thread because we don't need the surface again until the next dd->Lock call.

33
Server.War2.ru / Re: War2 graphics for Win Vista/7/8/8.1/10/2012 fixed
« on: December 13, 2015, 04:37:23 PM »
Quote
C/C++ standard library?
why would you want to?
rename DllEntryPoint to DllMain then set the appropriate linker options.

Quote
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

Quote
too slow for competitive play
The game(s) actually do all their ddraw drawing in software.
They only uses ddraw as a way to copy "the output" to video memory.

War2 does not use GDI in-game (I assume). So plain ddraw only output could be ported away from the emulated ddraw and to anything one wants... The patch current uses GDI for "in-game" "output", which is notoriously slow(?)... Using OpenGL, Direct2D, Direct3D, D3DKMT,  or (insert favorite graphics api here ) would probably be faster at the needed tasks: DMA, color conversion, and optionally updating only the dirty rectangles. We could even switch back and use real ddraw in-game on Win8 and Win10.

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... as GDI can not be easily redirected. I don't know how well the other APIs would mix with GDI, they might have the same compatibility problems as ddraw. Which forces us to keep using GDI to do output...  However, one could try different GDI functions like MaskBlt instead of GdiTransparentBlt or try blitting only dirty rectangles instead of the whole screen, etc.. One could also try to beat GDIs performance by doing color converstion and detecting dirty rects by hand using SSE2, thread tiling, etc.

The performance of FindWindowEx is unknown. The function could probably be replaced, if needed.

34
Server.War2.ru / Re: War2 graphics for Win Vista/7/8/8.1/10/2012 fixed
« on: December 13, 2015, 12:16:45 PM »
@Lightbringer
It is probably possible to turn of Anti-Aliasing system wide...
but I don't know if what you linked does that or not.

@Blid
More invasive makes it more likely to trip anti-cheat and anti-virus.
It also makes it a bit fragile, for example it won't work on some versions of Windows.

@tupac
I've done size-able windowed modes for games in the past... I currently have no interest in doing that for war2.  DxWnd is probably the best bet for that.

The banner bug might be fixed. Not having the screen in 8bpp should prevent a lot of outside interference. Also not using ddraw's 'built-in' 256 colors compatibility hack might help as well. I'm too lazy to setup a pvpgn server to test.

I am not accepting donations.

35
Server.War2.ru / Re: War2 graphics for Win Vista/7/8/8.1/10/2012 fixed
« on: December 13, 2015, 01:28:23 AM »
Quote
Try this?
don't bother.
Here is the 10 second fix:
http://www.bitpatch.com/downloads/war2_ddraw_test2.zip
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.

36
Server.War2.ru / Re: War2 graphics for Win Vista/7/8/8.1/10/2012 fixed
« on: December 12, 2015, 01:44:30 PM »
Quote
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.
It might be possible to correct with copious WM_SETFONT messages?

Quote
What's the license for your source code?
GPLv2 is good

37
Mods & Development / Re: Window Mode for WarCraft 2!
« on: September 29, 2015, 02:16:46 AM »
-_-

38
Support Requests / Re: War2Combat on Windows 10
« on: May 09, 2015, 05:14:51 AM »
my post over here would be a win8 fix.
[http:] //forum.war2.ru/index.php/topic,897.msg12196.html#msg12196
just set 640x480 on the "Warcraft II BNE.exe" compatibility tab for now.

---

the next step IMO would be to intercept GDI and USER in addition to DDRAW.
Replace all Window Device Contexts with Memory Device Contexts to allow GDI drawing to be redirected to an offscreen bitmap.

I've ported over the system window classes from Wine to avoid the need to hook system modules.
However, my attempts to redirect GDI output isn't currently working.
Anybody interested in helping?



39
Mods & Development / Re: Window Mode for WarCraft 2!
« on: April 23, 2015, 03:21:42 AM »
Can't really use WineD3D on Windows because it likes to ONLY use ~16 colors in 256 color mode :(

However,
[http:] //www.bitpatch.com/downloads/war2_ddraw_test.zip
is basically the same idea as what is done with the wine patch for War2BNE.

It attempts to ports the game to 32bpp and defeat DWM Desktop Composition.
I haven't yet added fullscreen back to it... because I don't like the Transparent Blit concept this uses.

in-game screens-shots should work normally except there won't be a screen flash when a ss is taken...  Screen-shots of the Battle.net screen won't work, instead use Alt+PRTSC and paste it into mspaint.

40
Mods & Development / Re: A new guy with his old ideas
« on: March 16, 2015, 05:19:20 PM »
afaik, it just means that wargus can rip game assets from the BNE CD instead of requiring the DOS CD

41
Mods & Development / Re: A new guy with his old ideas
« on: March 14, 2015, 09:53:25 PM »
Wargus seems to have some dev activity:

http://bazaar.launchpad.net/~stratagus/wargus/trunk/changes/

I've got/had a couple ( embarrassing ) lines of code in wargus  8)


fixed link -mouse

Pages: 1 2 [3]