Index: /trunk/src/VBox/Devices/Graphics/BIOS/vbe.c
===================================================================
--- /trunk/src/VBox/Devices/Graphics/BIOS/vbe.c	(revision 69046)
+++ /trunk/src/VBox/Devices/Graphics/BIOS/vbe.c	(revision 69047)
@@ -38,9 +38,4 @@
  * of the LGPL is applied is otherwise unspecified.
  */
-
-// Use VBE new dynamic mode list.  Note that without this option, no
-// checks are currently done to make sure that modes fit into the
-// framebuffer!
-#define VBE_NEW_DYN_LIST
 
 #include <inttypes.h>
@@ -169,5 +164,4 @@
 }
 
-#ifdef VBE_NEW_DYN_LIST
 uint8_t in_byte(uint16_t port, uint16_t addr)
 {
@@ -175,5 +169,4 @@
     return inb(port);
 }
-#endif
 
 /* Display "chip" identification helpers. */
@@ -207,5 +200,4 @@
 
 /* Find the offset of the desired mode, given its number. */
-#ifdef VBE_NEW_DYN_LIST
 static uint16_t mode_info_find_mode(uint16_t mode, Boolean using_lfb)
 {
@@ -246,25 +238,4 @@
     return 0;
 }
-#else
-static ModeInfoListItem* mode_info_find_mode(uint16_t mode, Boolean using_lfb)
-{
-    ModeInfoListItem    *cur_info = &mode_info_list;
-
-    while (cur_info->mode != VBE_VESA_MODE_END_OF_LIST)
-    {
-        if (cur_info->mode == mode)
-        {
-            if (!using_lfb)
-                return cur_info;
-            else if (cur_info->info.ModeAttributes & VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE)
-                return cur_info;
-            else
-                cur_info++;
-        } else
-            cur_info++;
-    }
-    return 0;
-}
-#endif
 
 #ifndef VBOX
@@ -303,10 +274,6 @@
     uint16_t            cur_mode = 0;
     uint16_t            cur_ptr=34;
-#ifdef VBE_NEW_DYN_LIST
     uint16_t            cur_info_ofs;
     uint16_t            sig, vmode;
-#else
-    ModeInfoListItem    *cur_info = &mode_info_list;
-#endif
     uint16_t            max_bpp = dispi_get_max_bpp();
     VbeInfoBlock __far  *info_block;
@@ -314,5 +281,4 @@
     info_block = ES :> (VbeInfoBlock *)DI;
 
-#ifdef VBE_NEW_DYN_LIST
     /* Read VBE Extra Data signature */
     sig = in_word(VBE_EXTRA_PORT, 0);
@@ -326,5 +292,4 @@
     }
     cur_info_ofs = sizeof(VBEHeader);
-#endif
     status = *AX;
 
@@ -384,5 +349,4 @@
     }
 
-#ifdef VBE_NEW_DYN_LIST
     do
     {
@@ -406,21 +370,4 @@
     // Add vesa mode list terminator
     write_word(ES, DI + cur_ptr, vmode);
-#else
-    do
-    {
-        if (cur_info->info.BitsPerPixel <= max_bpp) {
-#ifdef VGA_DEBUG
-            printf("VBE found mode %x => %x\n", cur_info->mode,cur_mode);
-#endif
-            write_word(ES, DI + cur_ptr, cur_info->mode);
-            cur_mode++;
-            cur_ptr += 2;
-        }
-        cur_info++;
-    } while (cur_info->mode != VBE_VESA_MODE_END_OF_LIST);
-
-    // Add vesa mode list terminator
-    write_word(ES, DI + cur_ptr, cur_info->mode);
-#endif // VBE_NEW_DYN_LIST
     *AX = 0x004F;
 }
@@ -439,9 +386,5 @@
 {
     uint16_t            result = 0x0100;
-#ifdef VBE_NEW_DYN_LIST
     uint16_t            cur_info_ofs;
-#else
-    ModeInfoListItem    *cur_info;
-#endif
     Boolean             using_lfb;
     uint8_t             win_attr;
@@ -454,19 +397,12 @@
     CX = (CX & 0x1ff);
 
-#ifdef VBE_NEW_DYN_LIST
     cur_info_ofs = mode_info_find_mode(CX, using_lfb);
 
     if (cur_info_ofs) {
         uint16_t    i;
-#else
-    cur_info = mode_info_find_mode(CX, using_lfb);
-
-    if (cur_info != 0) {
-#endif
 #ifdef VGA_DEBUG
         printf("VBE found mode %x\n",CX);
 #endif
         memsetb(ES, DI, 0, 256);    // The mode info size is fixed
-#ifdef VBE_NEW_DYN_LIST
         for (i = 0; i < sizeof(ModeInfoBlockCompact); i++) {
             uint8_t b;
@@ -475,7 +411,4 @@
             write_byte(ES, DI + i, b);
         }
-#else
-        memcpyb(ES, DI, 0xc000, &(cur_info->info), sizeof(ModeInfoBlockCompact));
-#endif
         win_attr = read_byte(ES, DI + offsetof(ModeInfoBlock, WinAAttributes));
         if (win_attr & VBE_WINDOW_ATTRIBUTE_RELOCATABLE) {
@@ -512,9 +445,5 @@
 {
     uint16_t            result;
-#ifdef VBE_NEW_DYN_LIST
     uint16_t            cur_info_ofs;
-#else
-    ModeInfoListItem    *cur_info;
-#endif
     Boolean             using_lfb;
     uint8_t             no_clear;
@@ -541,5 +470,4 @@
     }
 
-#ifdef VBE_NEW_DYN_LIST
     cur_info_ofs = mode_info_find_mode(BX, using_lfb);
 
@@ -557,39 +485,16 @@
         printf("\txres%x yres%x bpp%x\n", xres, yres, bpp);
 #endif
-#else
-    cur_info = mode_info_find_mode(BX, using_lfb);
-
-    if (cur_info != 0)
-    {
-#ifdef VGA_DEBUG
-        printf("VBE found mode %x, setting:\n", BX);
-        printf("\txres%x yres%x bpp%x\n",
-                cur_info->info.XResolution,
-                cur_info->info.YResolution,
-                cur_info->info.BitsPerPixel);
-#endif
-#endif // VBE_NEW_DYN_LIST
 
         // first disable current mode (when switching between vesa modi)
         dispi_set_enable(VBE_DISPI_DISABLED);
 
-#ifdef VBE_NEW_DYN_LIST
         if (bpp == 4)
-#else
-        if (cur_info->info.BitsPerPixel == 4)
-#endif
         {
             biosfn_set_video_mode(0x6a);
         }
 
-#ifdef VBE_NEW_DYN_LIST
         dispi_set_bpp(bpp);
         dispi_set_xres(xres);
         dispi_set_yres(yres);
-#else
-        dispi_set_bpp(cur_info->info.BitsPerPixel);
-        dispi_set_xres(cur_info->info.XResolution);
-        dispi_set_yres(cur_info->info.YResolution);
-#endif
         dispi_set_bank(0);
         dispi_set_enable(VBE_DISPI_ENABLED | no_clear | lfb_flag);
Index: /trunk/src/VBox/Devices/Graphics/DevVGA.cpp
===================================================================
--- /trunk/src/VBox/Devices/Graphics/DevVGA.cpp	(revision 69046)
+++ /trunk/src/VBox/Devices/Graphics/DevVGA.cpp	(revision 69047)
@@ -65,8 +65,4 @@
 #define VGASTATE2DEVINS(pVgaState)    ((pVgaState)->CTX_SUFF(pDevIns))
 
-/** Check that the video modes fit into virtual video memory.
- * Only works when VBE_NEW_DYN_LIST is defined! */
-#define VRAM_SIZE_FIX
-
 /** Check buffer if an VRAM offset is within the right range or not. */
 #if defined(IN_RC) || defined(VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0)
@@ -134,5 +130,5 @@
 #include "DevVGA.h"
 
-#if defined(VBE_NEW_DYN_LIST) && defined(IN_RING3) && !defined(VBOX_DEVICE_STRUCT_TESTCASE)
+#if defined(IN_RING3) && !defined(VBOX_DEVICE_STRUCT_TESTCASE)
 # include "DevVGAModes.h"
 # include <stdio.h> /* sscan */
@@ -3703,5 +3699,4 @@
 #ifdef IN_RING3
 
-# ifdef VBE_NEW_DYN_LIST
 /**
  * @callback_method_impl{FNIOMIOPORTOUT,
@@ -3770,5 +3765,4 @@
     return rc;
 }
-# endif /* VBE_NEW_DYN_LIST */
 
 
@@ -6024,5 +6018,4 @@
     PDMDEV_CHECK_VERSIONS_RETURN_QUIET(pDevIns);
 
-#ifdef VBE_NEW_DYN_LIST
     PVGASTATE   pThis = PDMINS_2_DATA(pDevIns, PVGASTATE);
     LogFlow(("vgaR3Destruct:\n"));
@@ -6050,5 +6043,4 @@
         pThis->pbVBEExtraData = NULL;
     }
-#endif /* VBE_NEW_DYN_LIST */
     if (pThis->pbVgaBios)
     {
@@ -6117,5 +6109,4 @@
     int         rc;
     unsigned    i;
-#ifdef VBE_NEW_DYN_LIST
     uint32_t    cCustomModes;
     uint32_t    cyReduction;
@@ -6124,5 +6115,4 @@
     ModeInfoListItem *pCurMode;
     unsigned    cb;
-#endif
     PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);
     PVGASTATE   pThis = PDMINS_2_DATA(pDevIns, PVGASTATE);
@@ -6711,6 +6701,4 @@
     AssertLogRelRCReturn(rc, rc);
 
-#ifdef VBE_NEW_DYN_LIST
-
     uint16_t maxBiosXRes;
     rc = CFGMR3QueryU16Def(pCfg, "MaxBiosXRes", &maxBiosXRes, UINT16_MAX);
@@ -6750,8 +6738,4 @@
     pVBEDataHdr->cbData = cb;
 
-# ifndef VRAM_SIZE_FIX
-    pCurMode = memcpy(pVBEDataHdr + 1, &mode_info_list, sizeof(mode_info_list));
-    pCurMode = (ModeInfoListItem *)((uintptr_t)pCurMode + sizeof(mode_info_list));
-# else  /* VRAM_SIZE_FIX defined */
     pCurMode = (ModeInfoListItem *)(pVBEDataHdr + 1);
     for (i = 0; i < MODE_INFO_SIZE; i++)
@@ -6774,5 +6758,4 @@
         pCurMode++;
     }
-# endif  /* VRAM_SIZE_FIX defined */
 
     /*
@@ -6783,12 +6766,4 @@
         ModeInfoListItem *pDefMode = mode_info_list;
         Log(("vgaR3Construct: cyReduction=%u\n", cyReduction));
-# ifndef VRAM_SIZE_FIX
-        for (i = 0; i < MODE_INFO_SIZE; i++, pCurMode++, pDefMode++)
-        {
-            *pCurMode = *pDefMode;
-            pCurMode->mode += 0x30;
-            pCurMode->info.YResolution -= cyReduction;
-        }
-# else  /* VRAM_SIZE_FIX defined */
         for (i = 0; i < MODE_INFO_SIZE; i++, pDefMode++)
         {
@@ -6809,5 +6784,4 @@
             pCurMode++;
         }
-# endif  /* VRAM_SIZE_FIX defined */
     }
 
@@ -6841,5 +6815,4 @@
                 }
                 cbPitch = calc_line_pitch(cBits, cx);
-# ifdef VRAM_SIZE_FIX
                 if (cy * cbPitch >= pThis->vram_size)
                 {
@@ -6848,5 +6821,4 @@
                     return VERR_VGA_INVALID_CUSTOM_MODE;
                 }
-# endif  /* VRAM_SIZE_FIX defined */
                 MMR3HeapFree(pszExtraData);
 
@@ -6913,5 +6885,4 @@
     if (RT_FAILURE(rc))
         return rc;
-#endif /* VBE_NEW_DYN_LIST */
 
     /*
Index: /trunk/src/VBox/Devices/Graphics/DevVGA.h
===================================================================
--- /trunk/src/VBox/Devices/Graphics/DevVGA.h	(revision 69046)
+++ /trunk/src/VBox/Devices/Graphics/DevVGA.h	(revision 69047)
@@ -43,9 +43,4 @@
 /** Use VBE bytewise I/O. Only needed for Windows Longhorn/Vista betas and backwards compatibility. */
 #define VBE_BYTEWISE_IO
-
-/** Use VBE new dynamic mode list.
- * If this is not defined, no checks are carried out to see if the modes all
- * fit into the framebuffer! See the VRAM_SIZE_FIX define. */
-#define VBE_NEW_DYN_LIST
 
 #ifdef VBOX
@@ -382,11 +377,7 @@
     uint8_t                     cbWriteVBEData;
     uint8_t                     cbWriteVBEIndex;
-#  ifdef VBE_NEW_DYN_LIST
     /** VBE Extra Data write address one byte buffer */
     uint8_t                     cbWriteVBEExtraAddress;
     uint8_t                     Padding5;
-#  else
-    uint8_t                     Padding5[2];
-#  endif
 # endif
 
@@ -396,5 +387,4 @@
     vga_retrace_s               retrace_state;
 
-# ifdef VBE_NEW_DYN_LIST
     /** The VBE BIOS extra data. */
     R3PTRTYPE(uint8_t *)        pbVBEExtraData;
@@ -404,5 +394,4 @@
     uint16_t                    u16VBEExtraAddress;
     uint16_t                    Padding7[2];
-# endif
 
     /** The BIOS logo data. */
@@ -499,5 +488,4 @@
 #endif
 
-#ifdef VBE_NEW_DYN_LIST
 /**
  * VBE Bios Extra Data structure.
@@ -528,6 +516,4 @@
  * @remark duplicated in vbe.h. */
 #define VBE_PRINTF_PORT      0x3b7
-
-#endif /* VBE_NEW_DYN_LIST */
 
 #if !defined(VBOX) || defined(IN_RING3)
Index: /trunk/src/VBox/Devices/Graphics/DevVGAModes.h
===================================================================
--- /trunk/src/VBox/Devices/Graphics/DevVGAModes.h	(revision 69046)
+++ /trunk/src/VBox/Devices/Graphics/DevVGAModes.h	(revision 69047)
@@ -18,6 +18,4 @@
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
-
-#ifdef VBE_NEW_DYN_LIST
 
 #include <VBoxVideoVBE.h>
@@ -192,4 +190,2 @@
 
 #define MODE_INFO_SIZE ( sizeof(mode_info_list) / sizeof(ModeInfoListItem) )
-
-#endif /* VBE_NEW_DYN_LIST */
