VMware Communities
bobrpggamer
Contributor
Contributor

forcing VGA desktop resolution in Windows XP

Hey, I have Workstation Pro 12.5 and I cannot adjust my desktop display to a typical MS-DOS VGA or SVGA resolution.

I need to be at 640x480 - 1024x768 to see my Dosbox games run correctly and starting my games at fullscreen on my hosts native resolution of 1920x1080 the game display will be a small box and usually off to the left somehow and view option do not help as my display will somehow revert back to 1920x1080 when using stretch guest. strangely I can run dosbox in my windows 10 host OS and my display will scale but not in workstation 12.5. I can use Windows 2000 and get the desired SVGA desktop display of say 800x600 without having to switch view options at all and it stays at the desired location.

So I would like to know how to force Workstation to display at a fixed resolution. I have tried the VMX file itself with:

scsi0:0.fileName = "Windows XP Home Edition-0-000002.vmdk"

scsi0:0.redo = ""

svga.autodetect = "FALSE"

svga.maxWidth = "1024"

svga.maxHeight = "768"

svga.vramSize = "134217728"

But it always resets itself to my native display of 1920x1080 when I try to stretch the view in the view menu.

0 Kudos
1 Reply
BigAlUK
Contributor
Contributor

Depending upon your VM Guest, there are several additional things that affect the resolutions available and the startup resolution.

You have already noted the part that provides the basic capabilities limits (in so far as the svga.xxxxx settings in the .VMX file are concerned).  But to quickly cover it again:

svga.autodetect = "FALSE" This turns off the ability to automatically adjust the SVGA VRAM and resolution and colour bit depth to match the HOST-provided display environment.
svga.maxWidth = "1024" This determines the maximum theoretical display width
svga.maxHeight = "768"This determines the maximum theoretical display height
svga.vramSize = "134217728" Determines the max theoretical VRAM to emulate/allocate (width x height x 4 bytes). Probably only an issue if you have set it too small, or have used more than 16MB in a WorkStation Hardware Version 6 VMX file.  This value being too big is not such an issue.
WS HWVersion6 default is 16MB, WS HWVersion7 default is 128MB
svga.spoof16bbpHost="TRUE" This determines  whether the maximum colour depth is 16 bits or 32 bits.  You will need this if you are using DirectX on Windows 9X. 

          
Once you have done this edit to a powered-down VM, you can power up the VM and do some more tweaking - which will depend upon the Guest OS .  I will assume here that it is Windows 98 or Windows ME.  I know that Windows NT4 has a different registry organization and data format to these, but the concept is essentially similar.  You can scrub the existing entries for SVGA driver's resolution and use your own "preferred" resolutions.  This will mean that, after a reboot, these will be the resolutions offered (unless restricted by the VMX file or the SVGA driver).

REGEDIT4

; Clear all the pre-existing SVGA modes

[-HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class\DISPLAY\0000\MODES]

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class\DISPLAY\0000\MODES\16\1024,768]

@="4:3 XGA High-Colour"

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class\DISPLAY\0000\MODES\8\1024,768]

@="4:3 XGA 256-Colour"

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class\DISPLAY\0000\MODES\16\800,600]

@="4:3 SVGA High-Colour"

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class\DISPLAY\0000\MODES\8\800,600]

@="4:3 SVGA 256-Colour"

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class\DISPLAY\0000\MODES\16\640,480]

@="4:3 VGA High-Colour"

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class\DISPLAY\0000\MODES\8\640,480]

@="4:3 VGA 256-Colour"



Finally, you can (if you want) provide for far higher resolutions - both in the VMX and in the REG file -  but these will NOT be offered via the OS unless the MONITOR is marked as being capable.  To impose that limit, you can create a Monitor.INF file (or similar name like MyLowResMonitor.INF) and install that as your display monitor for the OS.  A simple one is shown below.  It is ultimately this INF file that determines what the "default" resolution (and maximum) will be that the OS allows.  As a result, the VMX edits merely make sure VMware is expecting them and can support them, and the REG file provides options within that range.  These are (if you like) establishing the hardware ability of your emulated video card.  The INF file, however, actually sets the limit that the OS will attempt based on the display screen, not the card.  So enforcing all three of these things is highly recommended.  Interestingly, it does mean that if you are using a different monitor, you can just change the INF file, if the "card emulation" is already covering those higher resolutions.

; Custom monitor information file - generated by PowerStrip 3.0, 04/08/2019

; Copyright (c) 1995-2005, EnTech Taiwan.

; Web: http://www.entechtaiwan.com

[Version]

Signature="$CHICAGO$"

Class=Monitor

ClassGUID={4d36e96e-e325-11ce-bfc1-08002be10318}

Provider=%MFG%

[Manufacturer]

%MFG%=MonMfg

[MonMfg]

%MODEL%=Mon.Install

[Mon.Install]

DelReg=DEL_CURRENT_REG

AddReg=Mon.AddReg,RES,DPMS

[Mon.AddReg]

HKR,%MODE%,Mode1,,%RANGE%

[DEL_CURRENT_REG]

HKR,MODES

HKR,,MaxResolution

HKR,,DPMS

[RES]

HKR,,MaxResolution,,%MAXRES%

[DPMS]

HKR,,DPMS,,0

[Strings]

MFG="VMWare"

MODEL="This is my special XGA monitor"

MAXRES="1024,768"

MODE="MODES\640,480"

RANGE="30.0-75.0,50.0-85.0,+,+"

So does this all work?  Well, I used this mechanism to create the display resolution of High-Colour 2560 x 1440 for my Dell U2713HM monitor on a guest Windows ME virtual machine.  So I'd say: yes, it works.  Even the DirextX 9 diagnostics, even for 3D.


By the way - don't go lower than 640x480 on Windows 9X, as this wasn't really supported.  On my Windows ME guest system the display collapsed if I uses 640x400 (Extended EGA) or 640x360 (EGA).  Apparently Windows XP was intended to run on at least an SVGA system (800x600), so don't be surprised if trying VGA (640x480) on XP causes issues.

0 Kudos