Warcraft II Forum

Help & Support => Support Requests => Topic started by: Muz on November 13, 2016, 09:47:51 PM

Title: Force change resolution
Post by: Muz on November 13, 2016, 09:47:51 PM
Does anyone know how to change Warcraft 2 resolution? The game by default is 640x480. Does anyone know how to hack the game or change the settings, so that it runs in custom resolution, 1024x768 for example.
Title: Re: Force change resolution
Post by: Delete mine too on November 14, 2016, 07:51:53 AM
Window mode will allow you to make the window res your setting but actual war2 no.

I have seen someone on YouTube do it but it seems like more of a cheat because the user can see so much more.
Title: Re: Force change resolution
Post by: Muz on November 16, 2016, 08:41:38 AM
can u show me the clip?
Title: Re: Force change resolution
Post by: mousEtopher on November 16, 2016, 10:22:57 AM
are you sure it wasn't wargus? changing resolution is easy there
Title: Re: Force change resolution
Post by: Delete mine too on November 16, 2016, 10:27:18 AM
Yes search warcraft 2 big screen on youtube.
Title: Re: Force change resolution
Post by: Igognito on November 16, 2016, 11:49:49 AM
Wow can we get the code of that utility???

Perhaps we can improve it to make it playable at a higher resolution (Well it appears it works only at 1280x960. But that would be a great upgrade for war2!
Title: Re: Force change resolution
Post by: Delete mine too on November 16, 2016, 12:53:29 PM
You can search for 640 480 in a hex editor or whatever it is. I think you need to multiply by 2 or something like that.


IL knows this person or is the author. I saw some screenshots buried in the server somewhere.
Title: Re: Force change resolution
Post by: Delete mine too on November 16, 2016, 01:58:00 PM
Easycompany brother give this a shot ;)

http://www.unknowncheats.me/forum/direct3d/71928-widescreen-hack.html (http://www.unknowncheats.me/forum/direct3d/71928-widescreen-hack.html)
Title: Re: Force change resolution
Post by: shesycompany on November 16, 2016, 04:59:28 PM
kk i will,cool if it works!currently drinking though fucking hot cold weather got me the sniffles :(

i didnt find shiti was changing to 320x240.. dos version (maywork)..i tried 800x600 also..
need lambchops<-----------
just make sure i was doing it right 640 dec to hex 280----->then inputed as 082 correctall !? :P

i tried storm dll but crashed using it.


Lambchops Lambchops Lambchops!!!! everyone say it 3 times in a mirror maybe he will come on!

patthenespunk has good insiders blizzard has forsaken war1 and 2 it is ours..i think mike matei told him about a user requesting it....as i told pat about the avs lol ,dont forget we got a sc2 modder he has to be close a shit to a tc
Title: Re: Force change resolution
Post by: Muz on November 16, 2016, 08:29:53 PM
I've tried 1024x768 on the HEX editor, don't work bit though, still shows up as 640x480.
Title: Re: Force change resolution
Post by: shesycompany on November 16, 2016, 08:37:23 PM
yeah idk how they got it....take for example a .cfg file will be text..tribes ascend i use to play with e-300 amd way below the req's at 640..and the examples i seen u'd jut open on txt file no use to change with a hex.


there is a way* dosbox with limited 98..it would be compatable as long as dosbox is and has all scales..just getting that bitch networked they all disappered.
 they may have just been using dosbox bne i got it...good luck bridging and finding the ne2000 drivers
Title: Re: Force change resolution
Post by: shesycompany on November 16, 2016, 08:53:18 PM
http://www.youtube.com/watch?v=6PILur4NCh0 (http://www.youtube.com/watch?v=6PILur4NCh0) there it is
Title: Re: Force change resolution
Post by: shesycompany on November 16, 2016, 09:03:58 PM
they on gow..which tells me they played' war2 :P here is dosbox's whiched id use asap
(http://i67.tinypic.com/35izyoj.jpg)

which after reading a tutorial ..they used a hex to change text :o..i bombed the exe nothing storm crashes
Title: Re: Force change resolution
Post by: shesycompany on November 16, 2016, 09:25:41 PM
which looks like a job for aqrit...but they on normal speed which is saying drawing the 640x480's is taking a toll on the cpu power of 2008 i dont think this dude hexed this out :P

ive seen this way before this,i think it was a russian that did it as i remeber being shown when i was in kali.
Title: Re: Force change resolution
Post by: shesycompany on November 16, 2016, 09:49:21 PM
dxwnd and the original bne i cant test it :( gone back drinkging

https://www.google.com/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&ved=0ahUKEwiZ06vF5K7QAhWBUyYKHYTxBx0QjBwIBA&url=http%3A%2F%2Fforum.war2.ru%2Findex.php%3Faction%3Ddlattach%3Btopic%3D897.0%3Battach%3D238&psig=AFQjCNGLGsbSMOzcSIxa-w87_Kih27aFgw&ust=1479437479094810&cad=rjt (https://www.google.com/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&ved=0ahUKEwiZ06vF5K7QAhWBUyYKHYTxBx0QjBwIBA&url=http%3A%2F%2Fforum.war2.ru%2Findex.php%3Faction%3Ddlattach%3Btopic%3D897.0%3Battach%3D238&psig=AFQjCNGLGsbSMOzcSIxa-w87_Kih27aFgw&ust=1479437479094810&cad=rjt) looooooooooooool should of fugin known!!!!!!!
Title: Re: Force change resolution
Post by: Lambchops on November 17, 2016, 02:03:35 AM
there's lots of parts to this question...

I dont think you will find a "640" and "480" setting for screen resolution.

Those numbers will be around as constant values for various calculations to display the graphics, as the entire game is hard-coded for 640x480 screen res.

As for the actual graphics card display, back then 640x480x256 was mode 257 (0x101)
not much point in searching for that value, as you will get anything that has two 0x01 bytes in a row, but if you want to chase down the GL code that sets the graphics mode and change that value you could try
mode 259= 800x600x256 or mode 261= 1024x768x256 colors.

however you will only end up with either the screen still being displayed in a 640x480 rectangle in the corner, or totally mashed into the first 640*480=307200 (0x4B000)pixels of the screen, depending on the method they use to access the graphics hardware.

All the internals are designed for 640x480, for instance if you read the dword at 0x4D4A94 you'll find a pointer to a 0x4B000 byte buffer that holds the current game screen.... you can do a DIY ss by reading these bytes and the 256x3 byte palette from 0x4AE844 then making a PCX or BMP file out of them.

maybe you could just use a generic image resize and display it at higher res, but you havn't really gained anything doing that - you still really have only 640x480 pixels.

To really change the res, you would have to enlarge the buffer (and any others), and change lots of other stuff.

as and example, if you wanted to display a pixel at certian co-ords you would use:
buffer_address + X+ (Y*screen_width)

so for say the location {333,122} you might do ptrScrBuff + 333 + (122*640)

..but in 800x600 you would need ptrScrBuff+333+(122*800), except I think you'll find LOTS of places where the 640 is hard coded... idk never tried to find them. so if you change the display mode and enlarge the buffer to 800x600= 0x75300 bytes, then lots of things... probably the GRP decode routine for starters... would still calculate 333+(122*640), so instead of {333,122} you end up at  {13,98}... then the next row of pixels could end up on the other side of the screen etc.

Not a small job, but I'd love to see it done  :)







Title: Re: Force change resolution
Post by: Lambchops on November 17, 2016, 02:16:19 AM
i didnt find shiti was changing to 320x240.. dos version (maywork)..i tried 800x600 also..
need lambchops<-----------
just make sure i was doing it right 640 dec to hex 280----->then inputed as 082 correctall !? :P

hehe. Yes 640 = 0x280

in hex byte display (a la hex editor) the byte order is reversed so as a dword it would be 80:02:00:00


Title: Re: Force change resolution
Post by: Delete mine too on November 17, 2016, 07:45:24 AM
Damn! :)

Okay so their is a referenced string for display adapter you can find with cheat engine, etc. Change that also!

Also another tip! Try to hex ddraw.dll!
Title: Re: Force change resolution
Post by: Lambchops on November 17, 2016, 11:12:22 AM
Damn! :)

Okay so their is a referenced string for display adapter you can find with cheat engine, etc. Change that also!

Also another tip! Try to hex ddraw.dll!

Actually, now I look at it, bne is just using standard windows gdi stuff. The DOS version would use interrupt 16 and mode 257. But wc2.exe and storm.dll only import graphics stuff from GDI32.dll and USER32.dll, so its all just device contexts...

ddraw.dll (directX) isn't imported by anything, in the traditional way. It's being dynamically loaded by one of the sneaky little embedded code modules blizz use. It seems they only use:

CreateBackSurface
SetPalette
CreatePrimarySurface
SetDisplayMode
DirectDrawCreate

Which is just a very basic set of initialization routines. Also there's a help message in there for the event where it can't use directX, telling you to set your desktop to 640x480x256.

There's a few calls to GetDesktopWindow followed by GetDC, this gets the device context of the windows desktop (being the top level window), so it looks like its, in effect just resizing the desktop to 640x480 then writing directly to it. Possibly. At lot of it relates to dialog boxes and stuff, hard to tell without spending more time. Anyway, anyone who understands standard windows GDI programming should be able to have a go at it...

( all the other stuff still applies, just the 257 code may or may not be what directX uses )

------edit:
Code: [Select]
HRESULT SetDisplayMode(
                         dwWidth,
                         dwHeight,
                         dwBPP,
                         dwRefreshRate,
                         dwFlags       );

... so bne is a wonder of modern technology  ;D
Title: Re: Force change resolution
Post by: Lambchops on November 23, 2016, 05:36:03 PM
There's a few calls to GetDesktopWindow followed by GetDC, this gets the device context of the windows desktop (being the top level window), so it looks like its, in effect just resizing the desktop to 640x480 then writing directly to it. Possibly. At lot of it relates to dialog boxes and stuff, hard to tell without spending more time.


Was having a look at other threads and found this desktop SS from USA~Archer. I get a similar issue when I am alt-tabbed and I disconnect from the network, but seeing it side-by-side with the window is helpful.

(http://forum.war2.ru/index.php?action=dlattach;topic=897.0;attach=236)

After seeing this I would guess the reasons would be:

 - WC2 was originally written for DOS. When they made BNE they needed to port the display code for windows, so somebody came up with the bit of DirectX code to change the display to 640x480x256 and provide a handle to it, so the original dos code could use that.

 - The basic channel screen frame etc. uses this handle, but the code that writes the text and dialog boxes etc. to the screen was done seperately, and that is what is being done with the calls I mentioned above.

This is what is happening in this SS. The borders etc. are being written to the DC of the window, but the text is being written directly to the desktop so its appearing in the top-left 640x480 section of the desktop, regardless of the position of the window.

Anyway, the point is I would guess that replacing all (or perhaps most of) the calls to GetDesktopWindow with calls to GetActiveWindow could fix this problem. If not, then converting the co-ords with either ClientToScreen or MapWindowPoints should work, but this would be a little bit trickier to patch as it isn't a straight 1:1 replacement.









Title: Re: Force change resolution
Post by: iL on November 24, 2016, 04:19:58 PM
ddraw.dll (directX) isn't imported by anything, in the traditional way. It's being dynamically loaded by one of the sneaky little embedded code modules blizz use. It seems they only use:

CreateBackSurface
SetPalette
CreatePrimarySurface
SetDisplayMode
DirectDrawCreate

That would be probably interesting to look into ddraw.dll source codes from aqrit, this thread: http://forum.war2.ru/index.php/topic,1790.0.html (http://forum.war2.ru/index.php/topic,1790.0.html)
He uses handlers for many ddraw functions. At least these fucntions should rewritten i think.
Title: Re: Force change resolution
Post by: shesycompany on September 16, 2019, 02:06:16 AM
lol omg ty easy to my past self fuck that e-300 was the machine play tribes fuking muz what happend to that kid..ahh i cant help but like easy that 100% compatable motherfucker