Index: /trunk/src/VBox/Devices/Graphics/DevVGA.cpp
===================================================================
--- /trunk/src/VBox/Devices/Graphics/DevVGA.cpp	(revision 481)
+++ /trunk/src/VBox/Devices/Graphics/DevVGA.cpp	(revision 482)
@@ -102,5 +102,5 @@
 #include <VBox/VBoxGuest.h>
 
-#if defined(VBE_NEW_DYN_LIST) && defined(IN_RING3)
+#if defined(VBE_NEW_DYN_LIST) && defined(IN_RING3) && !defined(VBOX_DEVICE_STRUCT_TESTCASE)
 # include "DevVGAModes.h"
 # include <stdio.h> /* sscan */
@@ -113,4 +113,5 @@
 
 
+#ifndef VBOX_DEVICE_STRUCT_TESTCASE
 /*******************************************************************************
 *   Internal Functions                                                         *
@@ -180,5 +181,7 @@
 }
 
+#endif /* !VBOX_DEVICE_STRUCT_TESTCASE */
 #endif /* VBOX */
+#ifndef VBOX_DEVICE_STRUCT_TESTCASE
 
 #ifndef VBOX
@@ -572,5 +575,5 @@
                 break;
             default:
-                val = s->vbe_regs[s->vbe_index]; 
+                val = s->vbe_regs[s->vbe_index];
                 break;
           }
@@ -1300,5 +1303,5 @@
 
         /* line compare */
-        line_compare = s->cr[0x18] | 
+        line_compare = s->cr[0x18] |
             ((s->cr[0x07] & 0x10) << 4) |
             ((s->cr[0x09] & 0x40) << 3);
@@ -1962,4 +1965,5 @@
         }
         /* line compare acts on the displayed lines */
+/** @todo r=bird: why was our change removed? I can't immediately spot and it wasn't mentioned in the commit message... */
         if ((uint32_t)y == s->line_compare)
             addr1 = 0;
@@ -2644,5 +2648,5 @@
 {
     VGAState *s = PDMINS2DATA(pDevIns, PVGASTATE);
-    
+
     NOREF(pvUser);
 
@@ -5023,4 +5027,5 @@
 #endif /* !IN_RING3 */
 #endif /* VBOX */
+#endif /* !VBOX_DEVICE_STRUCT_TESTCASE */
 
 /*
Index: /trunk/src/VBox/Devices/Graphics/DevVGA.h
===================================================================
--- /trunk/src/VBox/Devices/Graphics/DevVGA.h	(revision 481)
+++ /trunk/src/VBox/Devices/Graphics/DevVGA.h	(revision 482)
@@ -180,5 +180,5 @@
          some type changes, and some padding have been added. */
 #define VGA_STATE_COMMON                                                \
-    HCPTRTYPE(uint8_t *) vram_ptrHC;                                    \
+    R3PTRTYPE(uint8_t *) vram_ptrHC;                                    \
     uint32_t vram_size;                                                 \
     uint32_t latch;                                                     \
@@ -203,7 +203,8 @@
     uint8_t palette[768];                                               \
     int32_t bank_offset;                                                \
-    HCPTRTYPE(FNGETBPP *) get_bpp;                                      \
-    HCPTRTYPE(FNGETOFFSETS *) get_offsets;                              \
-    HCPTRTYPE(FNGETRESOLUTION *) get_resolution;                        \
+    int32_t padding0;                                                   \
+    R3PTRTYPE(FNGETBPP *) get_bpp;                                      \
+    R3PTRTYPE(FNGETOFFSETS *) get_offsets;                              \
+    R3PTRTYPE(FNGETRESOLUTION *) get_resolution;                        \
     VGA_STATE_COMMON_BOCHS_VBE                                          \
     /* display refresh support */                                       \
@@ -212,20 +213,21 @@
     uint8_t shift_control;                                              \
     uint8_t double_scan;                                                \
-    uint8_t padding0[2];                                                \
+    uint8_t padding1[2];                                                \
     uint32_t line_offset;                                               \
     uint32_t line_compare;                                              \
     uint32_t start_addr;                                                \
     uint32_t plane_updated;                                             \
-    uint8_t last_cw, last_ch, padding1[2];                              \
+    uint8_t last_cw, last_ch, padding2[2];                              \
     uint32_t last_width, last_height; /* in chars or pixels */          \
     uint32_t last_scr_width, last_scr_height; /* in pixels */           \
     uint32_t last_bpp;                                                  \
-    uint8_t cursor_start, cursor_end, padding2[2];                      \
+    uint8_t cursor_start, cursor_end, padding3[2];                      \
     uint32_t cursor_offset;                                             \
-    HCPTRTYPE(FNRGBTOPIXEL *) rgb_to_pixel;                             \
+    uint32_t padding4;                                                  \
+    R3PTRTYPE(FNRGBTOPIXEL *) rgb_to_pixel;                             \
     /* hardware mouse cursor support */                                 \
     uint32_t invalidated_y_table[VGA_MAX_HEIGHT / 32];                  \
-    HCPTRTYPE(FNCURSORINVALIDATE *) cursor_invalidate;                  \
-    HCPTRTYPE(FNCURSORDRAWLINE *) cursor_draw_line;                     \
+    R3PTRTYPE(FNCURSORINVALIDATE *) cursor_invalidate;                  \
+    R3PTRTYPE(FNCURSORDRAWLINE *) cursor_draw_line;                     \
     /* tell for each page if it has been updated since the last time */ \
     uint32_t last_palette[256];                                         \
@@ -257,5 +259,5 @@
     uint32_t                    au32DirtyBitmap[VGA_VRAM_MAX / PAGE_SIZE / 32];
     /** Pointer to the device instance - HC Ptr. */
-    HCPTRTYPE(PPDMDEVINS)       pDevInsHC;
+    PPDMDEVINSHC                pDevInsHC;
     /* * Pointer to the device instance - GC Ptr. */
     /*GCPTRTYPE(PPDMDEVINS)   pDevInsGC;*/
@@ -266,7 +268,7 @@
     PDMIDISPLAYPORT             Port;
     /** Pointer to base interface of the driver. */
-    PPDMIBASE                   pDrvBase;
+    R3PTRTYPE(PPDMIBASE)        pDrvBase;
     /** Pointer to display connector interface of the driver. */
-    PPDMIDISPLAYCONNECTOR       pDrv;
+    R3PTRTYPE(PPDMIDISPLAYCONNECTOR) pDrv;
     /** Refresh timer handle - HC. */
     PTMTIMERHC                  RefreshTimer;
@@ -274,9 +276,11 @@
     uint32_t                    cMilliesRefreshInterval;
 
+    /** Size of the buffer*/
+    uint32_t                    cbExtVRAM;
     /** Address of external video memory buffer overlaying VRAM. */
-    void *pvExtVRAMHC;
-    /** Size of the buffer*/
-    uint32_t cbExtVRAM;
-
+    R3PTRTYPE(void *)           pvExtVRAMHC;
+#if HC_ARCH_BITS ==32
+    uint32_t                    Alignment0;
+#endif
     /** The PCI device. */
     PCIDEVICE                   Dev;
@@ -296,17 +300,21 @@
     uint8_t                     cbWriteVBEData;
     uint8_t                     cbWriteVBEIndex;
-#ifdef VBE_NEW_DYN_LIST
+# ifdef VBE_NEW_DYN_LIST
     /** VBE Extra Data write address one byte buffer */
     uint8_t                     cbWriteVBEExtraAddress;
-#endif
+    uint8_t                     Padding6;       /**< Alignment padding. */
+# else
+    uint8_t                     Padding6[2];    /**< Alignment padding. */
+# endif
 #endif
 
 #ifdef VBE_NEW_DYN_LIST
+    /** The VBE BIOS extra data. */
+    R3PTRTYPE(uint8_t *)        pu8VBEExtraData;
     /** The size of the VBE BIOS extra data. */
     uint16_t                    cbVBEExtraData;
-    /** The VBE BIOS extra data. */
-    uint8_t                     *pu8VBEExtraData;
     /** The VBE BIOS current memory address. */
     uint16_t                    u16VBEExtraAddress;
+    uint16_t                    Padding7[2];    /**< Alignment padding. */
 #endif
 
