VirtualBox

Ticket #10389 (new defect)

Opened 2 years ago

Last modified 18 months ago

Custom VESA mode does not work for 8bit resolution

Reported by: rcs-34 Owned by:
Priority: major Component: other
Version: VirtualBox 4.1.10 Keywords: VESA, Custom mode, 8bit, 1920x1200
Cc: Guest type: Linux
Host type: Linux

Description

I'm trying to add custom VESA mode 1920x1200x8. I'm using command

VBoxManage setextradata "Modest" "CustomVideoMode1" "1920x1200x8"

and the line

<ExtraDataItem name="CustomVideoMode1" value="1920x1200x8"/>

is created in Modest.vbox correctly. However, when I try to start the virtual machine VB gives me the

VERR_VGA_INVALID_CUSTOM_MODE

error. Note, that 1920x1200x16 and 1920x1200x24 work very fine, but I'm interested in 8bit colors.

Change History

comment:1 Changed 18 months ago by rcs-34

Well, I have fixed it myself. in src/VBox/Devices/Graphics/DevVGA.cpp (KKK) :

...
if (RT_SUCCESS(rc))
            {
                ModeInfoListItem *pDefMode = mode_info_list;
                unsigned int cx, cy, cBits, cParams, j;
                uint16_t u16DefMode;

                cParams = sscanf(pszExtraData, "%ux%ux%u", &cx, &cy, &cBits);
                /*KKK*/
                if (    cParams != 3
                    ||  (cBits != 8 && cBits != 16 && cBits != 24 && cBits != 32))
                {
         ...

                /* Use defaults from max@bpp mode. */
                switch (cBits)
                {
                    /*KKK*/
                    case 8:
                        u16DefMode = VBE_VESA_MODE_1024X768X8;
                        break;

                    case 16:
Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use