Game Resolution

General Mech2 related Developments go here. Discussions welcome!

Moderator: Skyfaller

Forum rules
If you are writing a guide please do not post it here! Post in the Dev FAQ section please.
User avatar
Skyfaller
Clan 2nd MechWarrior
Clan 2nd MechWarrior
Posts: 991
Joined: Sat Apr 12, 2008 2:58 am
Location: Germany
Contact:

Game Resolution

Post by Skyfaller » Wed Jun 25, 2008 7:49 am

I know with the 3DFX emulators it is possible to change the screen resolution to anything you want. Köntzä's patch allows you to do the same for Mercs/Win. Are there any possibilities to play with higher resolutions? I suppose it's possible for MW2:31stCC/Win, but what about the DOS versions?
Download MechVM

If you have problems with MechVM, please attach the files MechVM.cfg and install-report.txt from the folder where MechVM installed your game.

User avatar
Sir MMPD Radick
Clan Nova Captain
Clan Nova Captain
Posts: 1614
Joined: Tue Jan 22, 2008 10:07 am

Re: Game Resolution

Post by Sir MMPD Radick » Wed Jun 25, 2008 8:16 am

could be, but i dunno how unfortuneatly.
I would assume that it would be theoretically possible in DOS, but I have never heard of a DOS app running higher than 1024.
James 3:5-10: My Reminder
And the tongue is a fire, a world of iniquity: so is the tongue among our members, that it defileth the whole body. Out of the same mouth proceedeth blessing and cursing. My brethren, these things ought not so to be.

User avatar
Skyfaller
Clan 2nd MechWarrior
Clan 2nd MechWarrior
Posts: 991
Joined: Sat Apr 12, 2008 2:58 am
Location: Germany
Contact:

Re: Game Resolution

Post by Skyfaller » Wed Jun 25, 2008 10:06 am

I've attached a tiny VESA testing tool I wrote about 13 years ago. Unfortunately, it is in German and no longer runs stable. However, you can start it, then press "g". It will present a list of graphics resolutions to test, and you may press 2-5 to display various test screens. The program demonstrates that higher resolutions are possible in VESA, but I don't know whether we can set up MW2 to make use of it. The CPU power simply wasn't there to test.

Sorry that the tool is in German, but I never thought I would upload it to a website back then.
Download MechVM

If you have problems with MechVM, please attach the files MechVM.cfg and install-report.txt from the folder where MechVM installed your game.

User avatar
Sir MMPD Radick
Clan Nova Captain
Clan Nova Captain
Posts: 1614
Joined: Tue Jan 22, 2008 10:07 am

Re: Game Resolution

Post by Sir MMPD Radick » Wed Jun 25, 2008 10:12 am

what attachment?
James 3:5-10: My Reminder
And the tongue is a fire, a world of iniquity: so is the tongue among our members, that it defileth the whole body. Out of the same mouth proceedeth blessing and cursing. My brethren, these things ought not so to be.

User avatar
Skyfaller
Clan 2nd MechWarrior
Clan 2nd MechWarrior
Posts: 991
Joined: Sat Apr 12, 2008 2:58 am
Location: Germany
Contact:

Re: Game Resolution

Post by Skyfaller » Wed Jun 25, 2008 11:41 am

Sorry, must've forgotten to hit the upload button ...

I'll post it after the soccer game Germany-Turkey.
Download MechVM

If you have problems with MechVM, please attach the files MechVM.cfg and install-report.txt from the folder where MechVM installed your game.

User avatar
Skyfaller
Clan 2nd MechWarrior
Clan 2nd MechWarrior
Posts: 991
Joined: Sat Apr 12, 2008 2:58 am
Location: Germany
Contact:

Re: Game Resolution

Post by Skyfaller » Wed Jun 25, 2008 2:37 pm

Alright, we defeated Turkey after a hard-fought match. They took the lead early in the game, but we overtook them in the second half. The game became very exciting again when they made the 2:2 in the 80. minute, but Germany scored another goal before the game ended after the regular 90 minutes. Now Germany is playing for the European Championship on Sunday!

So much for soccer. I hope the firefighters get the fires in California under control.

OK, I forgot to zip the EXE. Have fun!
Attachments
FRACTAL.zip
(17.11 KiB) Downloaded 354 times
Download MechVM

If you have problems with MechVM, please attach the files MechVM.cfg and install-report.txt from the folder where MechVM installed your game.

User avatar
Skyfaller
Clan 2nd MechWarrior
Clan 2nd MechWarrior
Posts: 991
Joined: Sat Apr 12, 2008 2:58 am
Location: Germany
Contact:

Re: Game Resolution

Post by Skyfaller » Sat Jun 28, 2008 3:46 am

The resolution is controlled by the file MW2SND.CFG for the DOS versions (31stCC, GBL and Mercs, all tested).
It contains the file name of the DLL to choose the correct resolution:

MCGA.DLL for 320x200
VESA480.DLL for 640x480
VESA768.DLL for 1024x768

If we decompiled the DLLs, we could create a new DLL that would allow for other resolutions.
While I tested this, I noticed that the Jump Jet recharge and missile self-hits are worsened in smaller resolutions.
If you're running into that problem, it may help to increase the resolution to 1024x768 and use FarPatcher to increase the viewing distance:
viewtopic.php?f=18&t=177
Download MechVM

If you have problems with MechVM, please attach the files MechVM.cfg and install-report.txt from the folder where MechVM installed your game.

User avatar
Skyfaller
Clan 2nd MechWarrior
Clan 2nd MechWarrior
Posts: 991
Joined: Sat Apr 12, 2008 2:58 am
Location: Germany
Contact:

Re: Game Resolution

Post by Skyfaller » Sat Jun 28, 2008 9:42 am

I've attached a patcher that lets MW2 DOS run in other resolutions, but it doesn't quite work yet. For resolutions higher with more than 768 lines, the lines beyond the 768th are cut off. It works for resolution 800x600. The screenshots are OK, but what I see in the sim is incomplete.

Here's the manual process:
Use MW2's Combat Variables screen to choose resolution 1024x768. Now, use fractal.exe as shown above to pick a screen resolution. The first column gives the VESA screen mode number, the second and third give the horizontal and vertical resolutions. Now, hex-edit VFX\VESA768.dll. Enter the VESA mode number at offsets 504Bh and 50F0h, and enter the horizontal and vertical resolutions at offsets 2240h and 2244h. Remember that the values using Intel byte ordering, so the low byte is placed before the high byte.

Now enter the horizontal resolution minus one at the following offsets:
2488h, 24ACh, 24B3h, 3754h, 3778h, 377Fh, 4F6Bh

And enter the vertical resolution minus one at the following offsets:
24BEh, 24E2, 24E9h, 378Ah, 37AEh, 37B5h

The attached tool should automate the process. Changing the value at 50C1 changes the visible part of the window, but does not enlarge it. Perhaps I'm changing one value too much.Ideas?
Attachments
MW20000.GIF
GBL screenshot
MW20000.GIF (48.38 KiB) Viewed 10539 times
_MWSetRes.zip
Patcher
(13.03 KiB) Downloaded 368 times
MW20000.GIF
MW2 screenshot
MW20000.GIF (39.73 KiB) Viewed 10375 times
Download MechVM

If you have problems with MechVM, please attach the files MechVM.cfg and install-report.txt from the folder where MechVM installed your game.

User avatar
Skyfaller
Clan 2nd MechWarrior
Clan 2nd MechWarrior
Posts: 991
Joined: Sat Apr 12, 2008 2:58 am
Location: Germany
Contact:

Re: Game Resolution

Post by Skyfaller » Sun Jun 29, 2008 11:53 pm

It's possible to patch Vesa480.dll in the same manner:

1AC0h: Horizontal resolution
1AC4h: Vertical resolution
2FFFh: Horizontal resolution minus one
3035h: Vertical resolution minus one
47EBh: Horizonal resolution minus one
48CBh, 4959h, 4970h: VESA mode number

These are the minimal changes to bring about the resolution change. However, the effect is similar:
the upper half of the screen is intact, the lower half is missing. I estimate that instead of 768
lines, I can see 480 lines. This does not even change after patching all
479=>(new vertical resolution minus 1), 480=>(new vertical resolution).

As much as I understand the rendering process, the MW2 sim seems to render at any resolution
you want. The screenshots prove this. However, there is some part in the software that
copies this internal rendering output to the graphics card, and that is where the error occurs.
Moreover, I cannot find the limit inside vesa480.dll or vesa768.dll, so it must in one of
the other exe or dll files. Perhaps there is a table that lists max. resolutions for the various
dll's. I will look for that later.

As a side note, the sim uses smaller fonts and bitmaps when you use resolutions the old
sim does not kow, and some on-screen menu contents do not fit into the frame.
Download MechVM

If you have problems with MechVM, please attach the files MechVM.cfg and install-report.txt from the folder where MechVM installed your game.

User avatar
Skyfaller
Clan 2nd MechWarrior
Clan 2nd MechWarrior
Posts: 991
Joined: Sat Apr 12, 2008 2:58 am
Location: Germany
Contact:

Re: Game Resolution

Post by Skyfaller » Mon Jun 30, 2008 12:31 am

I had another idea: what if I rename the dll before patching and point MW2SND.CFG to the correct file?
If MW2 takes the line limit from a table with dll names, that table would no longer apply, or MW2
would choose the wrong resolution. However, the limits (768 or 480 lines) remained unchanged.

I've attached a new version of the patcher that will create VESAXXX.DLL from VESA768.DLL and points
MW2SND.CFG to use it.
Attachments
_MWSETRES.zip
Patcher prototype; fully in English
(13.11 KiB) Downloaded 440 times
Download MechVM

If you have problems with MechVM, please attach the files MechVM.cfg and install-report.txt from the folder where MechVM installed your game.

Post Reply