Revision 9d0869b6

b/pc-bios/vgabios.diff
1
Index: Makefile
2
===================================================================
3
RCS file: /sources/vgabios/vgabios/Makefile,v
4
retrieving revision 1.17
5
diff -u -w -r1.17 Makefile
6
--- Makefile	6 Mar 2005 13:06:47 -0000	1.17
7
+++ Makefile	14 Jun 2006 00:51:06 -0000
8
@@ -22,7 +22,7 @@
9
 cirrus-bios: vgabios-cirrus.bin vgabios-cirrus.debug.bin
10
 
11
 clean:
12
-	/bin/rm -f  biossums *.o *.s *.ld86 \
13
+	/bin/rm -f  biossums vbetables-gen vbetables.h *.o *.s *.ld86 \
14
           temp.awk.* vgabios*.orig _vgabios_* _vgabios-debug_* core vgabios*.bin vgabios*.txt $(RELEASE).bin *.bak
15
 
16
 dist-clean: clean
17
@@ -79,3 +79,9 @@
18
 
19
 biossums: biossums.c
20
 	$(CC) -o biossums biossums.c
21
+
22
+vbetables-gen: vbetables-gen.c
23
+	$(CC) -o vbetables-gen vbetables-gen.c
24
+
25
+vbetables.h: vbetables-gen
26
+	./vbetables-gen > $@
1 27
Index: clext.c
2 28
===================================================================
3 29
RCS file: /sources/vgabios/vgabios/clext.c,v
4 30
retrieving revision 1.10
5 31
diff -u -w -r1.10 clext.c
6 32
--- clext.c	25 Mar 2006 10:19:15 -0000	1.10
7
+++ clext.c	13 Jun 2006 16:47:23 -0000
33
+++ clext.c	14 Jun 2006 00:51:06 -0000
8 34
@@ -544,6 +544,13 @@
9 35
 cirrus_set_video_mode_extended:
10 36
   call cirrus_switch_mode
......
72 98
 cirrus_extbios_handlers:
73 99
   ;; 80h
74 100
   dw cirrus_extbios_80h
101
Index: vbe.c
102
===================================================================
103
RCS file: /sources/vgabios/vgabios/vbe.c,v
104
retrieving revision 1.48
105
diff -u -w -r1.48 vbe.c
106
--- vbe.c	26 Dec 2005 19:50:26 -0000	1.48
107
+++ vbe.c	14 Jun 2006 00:51:07 -0000
108
@@ -118,21 +118,114 @@
109
 .word VBE_VESA_MODE_END_OF_LIST
110
 #endif
111
 
112
+  .align 2
113
 vesa_pm_start:
114
   dw vesa_pm_set_window - vesa_pm_start
115
-  dw vesa_pm_set_display_strt - vesa_pm_start
116
+  dw vesa_pm_set_display_start - vesa_pm_start
117
   dw vesa_pm_unimplemented - vesa_pm_start
118
-  dw 0
119
+  dw vesa_pm_io_ports_table - vesa_pm_start
120
+vesa_pm_io_ports_table:
121
+  dw VBE_DISPI_IOPORT_INDEX
122
+  dw VBE_DISPI_IOPORT_INDEX + 1
123
+  dw VBE_DISPI_IOPORT_DATA
124
+  dw VBE_DISPI_IOPORT_DATA + 1
125
+  dw 0xffff
126
+  dw 0xffff
127
 
128
   USE32
129
 vesa_pm_set_window:
130
-  mov ax, #0x4f05
131
-  int #0x10
132
+  cmp  bx, #0x00
133
+  je  vesa_pm_set_display_window1
134
+  mov  ax, #0x0100
135
+  ret
136
+vesa_pm_set_display_window1:
137
+  mov  ax, dx
138
+  push dx
139
+  push ax
140
+  mov  dx, # VBE_DISPI_IOPORT_INDEX
141
+  mov  ax, # VBE_DISPI_INDEX_BANK
142
+  out  dx, ax
143
+  pop  ax
144
+  mov  dx, # VBE_DISPI_IOPORT_DATA
145
+  out  dx, ax
146
+  pop  dx
147
+  mov  ax, #0x004f
148
   ret
149
 
150
 vesa_pm_set_display_start:
151
-  mov ax, #0x4f07
152
-  int #0x10
153
+  cmp  bl, #0x80
154
+  je   vesa_pm_set_display_start1
155
+  cmp  bl, #0x00
156
+  je   vesa_pm_set_display_start1
157
+  mov  ax, #0x0100
158
+  ret
159
+vesa_pm_set_display_start1:
160
+; convert offset to (X, Y) coordinate 
161
+; (would be simpler to change Bochs VBE API...)
162
+  push eax
163
+  push ecx
164
+  push edx
165
+  push esi
166
+  push edi
167
+  shl edx, #16
168
+  and ecx, #0xffff
169
+  or ecx, edx
170
+  shl ecx, #2
171
+  mov eax, ecx
172
+
173
+  push eax
174
+  mov  dx, # VBE_DISPI_IOPORT_INDEX
175
+  mov  ax, # VBE_DISPI_INDEX_VIRT_WIDTH
176
+  out  dx, ax
177
+  mov  dx, # VBE_DISPI_IOPORT_DATA
178
+  in   ax, dx
179
+  movzx ecx, ax
180
+
181
+  mov  dx, # VBE_DISPI_IOPORT_INDEX
182
+  mov  ax, # VBE_DISPI_INDEX_BPP
183
+  out  dx, ax
184
+  mov  dx, # VBE_DISPI_IOPORT_DATA
185
+  in   ax, dx
186
+  movzx esi, ax
187
+  pop  eax
188
+
189
+  add esi, #7
190
+  shr esi, #3
191
+  imul ecx, esi
192
+  xor edx, edx
193
+  div ecx
194
+  mov edi, eax
195
+  mov eax, edx
196
+  xor edx, edx
197
+  div esi
198
+
199
+  push dx
200
+  push ax
201
+  mov  dx, # VBE_DISPI_IOPORT_INDEX
202
+  mov  ax, # VBE_DISPI_INDEX_X_OFFSET
203
+  out  dx, ax
204
+  pop  ax
205
+  mov  dx, # VBE_DISPI_IOPORT_DATA
206
+  out  dx, ax
207
+  pop  dx
208
+
209
+  mov  ax, di
210
+  push dx
211
+  push ax
212
+  mov  dx, # VBE_DISPI_IOPORT_INDEX
213
+  mov  ax, # VBE_DISPI_INDEX_Y_OFFSET
214
+  out  dx, ax
215
+  pop  ax
216
+  mov  dx, # VBE_DISPI_IOPORT_DATA
217
+  out  dx, ax
218
+  pop  dx
219
+
220
+  pop edi
221
+  pop esi
222
+  pop edx
223
+  pop ecx
224
+  pop eax
225
+  mov  ax, #0x004f
226
   ret
227
 
228
 vesa_pm_unimplemented:
229
@@ -835,6 +928,64 @@
230
 ASM_END
231
 
232
 
233
+Bit16u vbe_biosfn_read_video_state_size()
234
+{
235
+    return 9 * 2;
236
+}
237
+
238
+void vbe_biosfn_save_video_state(ES, BX)
239
+     Bit16u ES; Bit16u BX;
240
+{
241
+    Bit16u enable, i;
242
+
243
+    outw(VBE_DISPI_IOPORT_INDEX,VBE_DISPI_INDEX_ENABLE);
244
+    enable = inw(VBE_DISPI_IOPORT_DATA);
245
+    write_word(ES, BX, enable);
246
+    BX += 2;
247
+    if (!(enable & VBE_DISPI_ENABLED)) 
248
+        return;
249
+    for(i = VBE_DISPI_INDEX_XRES; i <= VBE_DISPI_INDEX_Y_OFFSET; i++) {
250
+        if (i != VBE_DISPI_INDEX_ENABLE) {
251
+            outw(VBE_DISPI_IOPORT_INDEX, i);
252
+            write_word(ES, BX, inw(VBE_DISPI_IOPORT_DATA));
253
+            BX += 2;
254
+        }
255
+    }
256
+}
257
+
258
+
259
+void vbe_biosfn_restore_video_state(ES, BX)
260
+     Bit16u ES; Bit16u BX;
261
+{
262
+    Bit16u enable, i;
263
+
264
+    enable = read_word(ES, BX);
265
+    BX += 2;
266
+    
267
+    if (!(enable & VBE_DISPI_ENABLED)) {
268
+        outw(VBE_DISPI_IOPORT_INDEX,VBE_DISPI_INDEX_ENABLE);
269
+        outw(VBE_DISPI_IOPORT_DATA, enable);
270
+    } else {
271
+        outw(VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_XRES);
272
+        outw(VBE_DISPI_IOPORT_DATA, read_word(ES, BX));
273
+        BX += 2;
274
+        outw(VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_YRES);
275
+        outw(VBE_DISPI_IOPORT_DATA, read_word(ES, BX));
276
+        BX += 2;
277
+        outw(VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_BPP);
278
+        outw(VBE_DISPI_IOPORT_DATA, read_word(ES, BX));
279
+        BX += 2;
280
+        outw(VBE_DISPI_IOPORT_INDEX,VBE_DISPI_INDEX_ENABLE);
281
+        outw(VBE_DISPI_IOPORT_DATA, enable);
282
+
283
+        for(i = VBE_DISPI_INDEX_BANK; i <= VBE_DISPI_INDEX_Y_OFFSET; i++) {
284
+            outw(VBE_DISPI_IOPORT_INDEX, i);
285
+            outw(VBE_DISPI_IOPORT_DATA, read_word(ES, BX));
286
+            BX += 2;
287
+        }
288
+    }
289
+}
290
+
291
 /** Function 04h - Save/Restore State
292
  * 
293
  * Input:
294
@@ -849,10 +1000,48 @@
295
  *              BX      = Number of 64-byte blocks to hold the state buffer (if DL=00h)
296
  * 
297
  */
298
-void vbe_biosfn_save_restore_state(AX, DL, CX, ES, BX)
299
+void vbe_biosfn_save_restore_state(AX, CX, DX, ES, BX)
300
+Bit16u *AX; Bit16u CX; Bit16u DX; Bit16u ES; Bit16u *BX;
301
 {
302
-}
303
+    Bit16u ss=get_SS();
304
+    Bit16u result, val;
305
 
306
+    result = 0x4f;
307
+    switch(GET_DL()) {
308
+    case 0x00:
309
+        val = biosfn_read_video_state_size2(CX);
310
+#ifdef DEBUG
311
+        printf("VGA state size=%x\n", val);
312
+#endif
313
+        if (CX & 8)
314
+            val += vbe_biosfn_read_video_state_size();
315
+        write_word(ss, BX, val);
316
+        break;
317
+    case 0x01:
318
+        val = read_word(ss, BX);
319
+        val = biosfn_save_video_state(CX, ES, val);
320
+#ifdef DEBUG
321
+        printf("VGA save_state offset=%x\n", val);
322
+#endif
323
+        if (CX & 8)
324
+            vbe_biosfn_save_video_state(ES, val);
325
+        break;
326
+    case 0x02:
327
+        val = read_word(ss, BX);
328
+        val = biosfn_restore_video_state(CX, ES, val);
329
+#ifdef DEBUG
330
+        printf("VGA restore_state offset=%x\n", val);
331
+#endif
332
+        if (CX & 8)
333
+            vbe_biosfn_restore_video_state(ES, val);
334
+        break;
335
+    default:
336
+        // function failed
337
+        result = 0x100;
338
+        break;
339
+    }
340
+    write_word(ss, AX, result);
341
+}
342
 
343
 /** Function 05h - Display Window Control
344
  * 
345
@@ -1090,7 +1279,7 @@
346
  */
347
 ASM_START
348
 vbe_biosfn_return_protected_mode_interface:
349
-  test bx, bx
350
+  test bl, bl
351
   jnz _fail
352
   mov di, #0xc000
353
   mov es, di
75 354
Index: vbe.h
76 355
===================================================================
77 356
RCS file: /sources/vgabios/vgabios/vbe.h,v
78 357
retrieving revision 1.24
79 358
diff -u -w -r1.24 vbe.h
80 359
--- vbe.h	9 May 2004 20:31:31 -0000	1.24
81
+++ vbe.h	13 Jun 2006 16:47:24 -0000
82
@@ -193,6 +193,10 @@
360
+++ vbe.h	14 Jun 2006 00:51:07 -0000
361
@@ -14,7 +14,7 @@
362
 void vbe_biosfn_return_controller_information(AX, ES, DI);
363
 void vbe_biosfn_return_mode_information(AX, CX, ES, DI);
364
 void vbe_biosfn_set_mode(AX, BX, ES, DI);
365
-void vbe_biosfn_save_restore_state(AX, DL, CX, ES, BX); 
366
+void vbe_biosfn_save_restore_state(AX, CX, DX, ES, BX);
367
 void vbe_biosfn_set_get_palette_data(AX);
368
 void vbe_biosfn_return_protected_mode_interface(AX);
369
 
370
@@ -151,6 +151,12 @@
371
    Bit8u  Reserved[189];
372
 } ModeInfoBlock;
373
 
374
+typedef struct ModeInfoListItem
375
+{
376
+        Bit16u                  mode;
377
+        ModeInfoBlockCompact    info;
378
+} ModeInfoListItem;
379
+
380
 // VBE Return Status Info
381
 // AL
382
 #define VBE_RETURN_STATUS_SUPPORTED                      0x4F
383
@@ -193,6 +199,10 @@
83 384
 #define VBE_VESA_MODE_1280X1024X1555                     0x119
84 385
 #define VBE_VESA_MODE_1280X1024X565                      0x11A
85 386
 #define VBE_VESA_MODE_1280X1024X888                      0x11B
......
90 391
 
91 392
 // BOCHS/PLEX86 'own' mode numbers
92 393
 #define VBE_OWN_MODE_320X200X8888                        0x140
93
@@ -202,6 +206,12 @@
394
@@ -202,6 +212,12 @@
94 395
 #define VBE_OWN_MODE_1024X768X8888                       0x144
95 396
 #define VBE_OWN_MODE_1280X1024X8888                      0x145
96 397
 #define VBE_OWN_MODE_320X200X8                           0x146
......
103 404
 
104 405
 #define VBE_VESA_MODE_END_OF_LIST                        0xFFFF
105 406
 
106
@@ -259,7 +269,7 @@
407
@@ -259,7 +275,7 @@
107 408
 //        like 0xE0000000
108 409
 
109 410
 
......
112 413
 
113 414
   #define VBE_DISPI_BANK_ADDRESS          0xA0000
114 415
   #define VBE_DISPI_BANK_SIZE_KB          64
115
Index: vbetables.h
416
Index: vgabios.c
116 417
===================================================================
117
RCS file: /sources/vgabios/vgabios/vbetables.h,v
118
retrieving revision 1.24
119
diff -u -w -r1.24 vbetables.h
120
--- vbetables.h	22 Jul 2004 18:37:29 -0000	1.24
121
+++ vbetables.h	13 Jun 2006 16:47:24 -0000
122
@@ -14,46 +14,29 @@
123
         ModeInfoBlockCompact    info;
124
 } ModeInfoListItem;
418
RCS file: /sources/vgabios/vgabios/vgabios.c,v
419
retrieving revision 1.64
420
diff -u -w -r1.64 vgabios.c
421
--- vgabios.c	25 Mar 2006 10:19:16 -0000	1.64
422
+++ vgabios.c	14 Jun 2006 00:51:07 -0000
423
@@ -109,8 +109,8 @@
424
 static void biosfn_write_string();
425
 static void biosfn_read_state_info();
426
 static void biosfn_read_video_state_size();
427
-static void biosfn_save_video_state();
428
-static void biosfn_restore_video_state();
429
+static Bit16u biosfn_save_video_state();
430
+static Bit16u biosfn_restore_video_state();
431
 extern Bit8u video_save_pointer_table[];
432
 
433
 // This is for compiling with gcc2 and gcc3
434
@@ -748,12 +748,7 @@
435
           vbe_biosfn_set_mode(&AX,BX,ES,DI);
436
           break;
437
          case 0x04:
438
-          //FIXME
439
-#ifdef DEBUG
440
-          unimplemented();
441
-#endif
442
-          // function failed
443
-          AX=0x100;
444
+          vbe_biosfn_save_restore_state(&AX, CX, DX, ES, &BX);
445
           break;
446
          case 0x09:
447
           //FIXME
448
@@ -3138,23 +3133,215 @@
449
 }
125 450
 
126
-// FIXME: check all member variables to be correct for the different modi
127
-// FIXME: add more modi
128
 static ModeInfoListItem mode_info_list[]=
451
 // --------------------------------------------------------------------------------------------
452
-static void biosfn_read_video_state_size (CX,ES,BX) Bit16u CX;Bit16u ES;Bit16u BX;
453
+// --------------------------------------------------------------------------------------------
454
+static Bit16u biosfn_read_video_state_size2 (CX) 
455
+     Bit16u CX;
129 456
 {
130
-        {
131
-                VBE_VESA_MODE_640X400X8,
132
-                {
133
-/*typedef struct ModeInfoBlock
134
-{*/
135
-// Mandatory information for all VBE revisions
136
-   /*Bit16u ModeAttributes*/            VBE_MODE_ATTRIBUTE_SUPPORTED |
137
-                                        VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE |
138
-                                        VBE_MODE_ATTRIBUTE_COLOR_MODE |
139
-#ifdef VBE_HAVE_LFB
140
-                                        VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE |
141
-#endif
142
-                                        VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
143
-   /*Bit8u  WinAAttributes*/            VBE_WINDOW_ATTRIBUTE_RELOCATABLE |
144
-                                        VBE_WINDOW_ATTRIBUTE_READABLE |
145
-                                        VBE_WINDOW_ATTRIBUTE_WRITEABLE,
146
+{ 0x0100, /* 640x400x8 */
147
+{ /*Bit16u ModeAttributes*/ VBE_MODE_ATTRIBUTE_SUPPORTED | VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE | VBE_MODE_ATTRIBUTE_COLOR_MODE | VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE | VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
148
+/*Bit8u  WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | VBE_WINDOW_ATTRIBUTE_READABLE | VBE_WINDOW_ATTRIBUTE_WRITEABLE,
149
    /*Bit8u  WinBAttributes*/            0,
150
    /*Bit16u WinGranularity*/            VBE_DISPI_BANK_SIZE_KB,
151
    /*Bit16u WinSize*/                   VBE_DISPI_BANK_SIZE_KB,
152
    /*Bit16u WinASegment*/               VGAMEM_GRAPH,
153
-   /*Bit16u WinBSegment*/               0,
154
+/*Bit16u WinBSegment*/ 0x0000,
155
    /*Bit32u WinFuncPtr*/                0,
156
    /*Bit16u BytesPerScanLine*/          640,
157
-// Mandatory information for VBE 1.2 and above
158
    /*Bit16u XResolution*/               640,
159
    /*Bit16u YResolution*/               400,
160
    /*Bit8u  XCharSize*/                 8,
161
    /*Bit8u  YCharSize*/                 16,
162
    /*Bit8u  NumberOfPlanes*/            1,
163
    /*Bit8u  BitsPerPixel*/              8,
164
-   /*Bit8u  NumberOfBanks*/             4, // 640x400/64kb == 4
165
+/*Bit8u  NumberOfBanks*/ 4,
166
    /*Bit8u  MemoryModel*/               VBE_MEMORYMODEL_PACKED_PIXEL,
167
    /*Bit8u  BankSize*/                  0,
168
-   /*Bit8u  NumberOfImagePages*/        15,
169
+/*Bit8u  NumberOfImagePages*/ 0,
170
    /*Bit8u  Reserved_page*/             0,
171
-// Direct Color fields (required for direct/6 and YUV/7 memory models)
172
    /*Bit8u  RedMaskSize*/               0,
173
    /*Bit8u  RedFieldPosition*/          0,
174
    /*Bit8u  GreenMaskSize*/             0,
175
@@ -63,15 +46,9 @@
176
    /*Bit8u  RsvdMaskSize*/              0,
177
    /*Bit8u  RsvdFieldPosition*/         0,
178
    /*Bit8u  DirectColorModeInfo*/       0,
179
-// Mandatory information for VBE 2.0 and above
180
-#ifdef VBE_HAVE_LFB
181
    /*Bit32u PhysBasePtr*/               VBE_DISPI_LFB_PHYSICAL_ADDRESS,
182
-#else
183
-   /*Bit32u PhysBasePtr*/               0,
184
-#endif
185
    /*Bit32u OffScreenMemOffset*/        0,
186
    /*Bit16u OffScreenMemSize*/          0,
187
-// Mandatory information for VBE 3.0 and above
188
    /*Bit16u LinBytesPerScanLine*/       640,
189
    /*Bit8u  BnkNumberOfPages*/          0,
190
    /*Bit8u  LinNumberOfPages*/          0,
191
@@ -84,45 +61,28 @@
192
    /*Bit8u  LinRsvdMaskSize*/           0,
193
    /*Bit8u  LinRsvdFieldPosition*/      0,
194
    /*Bit32u MaxPixelClock*/             0,
195
-/*} ModeInfoBlock;*/
196
-                }
197
-        },
198
-
199
-        {
200
-                VBE_VESA_MODE_640X480X8,
201
-                {
202
-/*typedef struct ModeInfoBlock
203
-{*/
204
-// Mandatory information for all VBE revisions
205
-   /*Bit16u ModeAttributes*/            VBE_MODE_ATTRIBUTE_SUPPORTED |
206
-                                        VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE |
207
-                                        VBE_MODE_ATTRIBUTE_COLOR_MODE |
208
-#ifdef VBE_HAVE_LFB
209
-                                        VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE |
210
-#endif
211
-                                        VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
212
-   /*Bit8u  WinAAttributes*/            VBE_WINDOW_ATTRIBUTE_READABLE |
213
-                                        VBE_WINDOW_ATTRIBUTE_WRITEABLE,
214
+} },
215
+{ 0x0101, /* 640x480x8 */
216
+{ /*Bit16u ModeAttributes*/ VBE_MODE_ATTRIBUTE_SUPPORTED | VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE | VBE_MODE_ATTRIBUTE_COLOR_MODE | VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE | VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
217
+/*Bit8u  WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | VBE_WINDOW_ATTRIBUTE_READABLE | VBE_WINDOW_ATTRIBUTE_WRITEABLE,
218
    /*Bit8u  WinBAttributes*/            0,
219
    /*Bit16u WinGranularity*/            VBE_DISPI_BANK_SIZE_KB,
220
    /*Bit16u WinSize*/                   VBE_DISPI_BANK_SIZE_KB,
221
    /*Bit16u WinASegment*/               VGAMEM_GRAPH,
222
-   /*Bit16u WinBSegment*/               0,
223
+/*Bit16u WinBSegment*/ 0x0000,
224
    /*Bit32u WinFuncPtr*/                0,
225
    /*Bit16u BytesPerScanLine*/          640,
226
-// Mandatory information for VBE 1.2 and above
227
    /*Bit16u XResolution*/               640,
228
    /*Bit16u YResolution*/               480,
229
    /*Bit8u  XCharSize*/                 8,
230
    /*Bit8u  YCharSize*/                 16,
231
    /*Bit8u  NumberOfPlanes*/            1,
232
    /*Bit8u  BitsPerPixel*/              8,
233
-   /*Bit8u  NumberOfBanks*/             5, // 640x480/64kb == 5
234
+/*Bit8u  NumberOfBanks*/ 5,
235
    /*Bit8u  MemoryModel*/               VBE_MEMORYMODEL_PACKED_PIXEL,
236
    /*Bit8u  BankSize*/                  0,
237
-   /*Bit8u  NumberOfImagePages*/        11,
238
+/*Bit8u  NumberOfImagePages*/ 0,
239
    /*Bit8u  Reserved_page*/             0,
240
-// Direct Color fields (required for direct/6 and YUV/7 memory models)
241
    /*Bit8u  RedMaskSize*/               0,
242
    /*Bit8u  RedFieldPosition*/          0,
243
    /*Bit8u  GreenMaskSize*/             0,
244
@@ -132,15 +92,9 @@
245
    /*Bit8u  RsvdMaskSize*/              0,
246
    /*Bit8u  RsvdFieldPosition*/         0,
247
    /*Bit8u  DirectColorModeInfo*/       0,
248
-// Mandatory information for VBE 2.0 and above
249
-#ifdef VBE_HAVE_LFB
250
    /*Bit32u PhysBasePtr*/               VBE_DISPI_LFB_PHYSICAL_ADDRESS,
251
-#else
252
-   /*Bit32u PhysBasePtr*/               0,
253
-#endif
254
    /*Bit32u OffScreenMemOffset*/        0,
255
    /*Bit16u OffScreenMemSize*/          0,
256
-// Mandatory information for VBE 3.0 and above
257
    /*Bit16u LinBytesPerScanLine*/       640,
258
    /*Bit8u  BnkNumberOfPages*/          0,
259
    /*Bit8u  LinNumberOfPages*/          0,
260
@@ -153,44 +107,28 @@
261
    /*Bit8u  LinRsvdMaskSize*/           0,
262
    /*Bit8u  LinRsvdFieldPosition*/      0,
263
    /*Bit32u MaxPixelClock*/             0,
264
-/*} ModeInfoBlock;*/
265
-                }
266
-        },
267
-
268
-        {
269
-                VBE_VESA_MODE_800X600X4,
270
-                {
271
-/*typedef struct ModeInfoBlock
272
-{*/
273
-// Mandatory information for all VBE revisions
274
-   /*Bit16u ModeAttributes*/            VBE_MODE_ATTRIBUTE_SUPPORTED |
275
-                                        VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE |
276
-                                        VBE_MODE_ATTRIBUTE_TTY_BIOS_SUPPORT |
277
-                                        VBE_MODE_ATTRIBUTE_COLOR_MODE |
278
-                                        VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
279
-   /*Bit8u  WinAAttributes*/            VBE_WINDOW_ATTRIBUTE_RELOCATABLE |
280
-                                        VBE_WINDOW_ATTRIBUTE_READABLE |
281
-                                        VBE_WINDOW_ATTRIBUTE_WRITEABLE,
282
+} },
283
+{ 0x0102, /* 800x600x4 */
284
+{ /*Bit16u ModeAttributes*/ VBE_MODE_ATTRIBUTE_SUPPORTED | VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE | VBE_MODE_ATTRIBUTE_COLOR_MODE | VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE | VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
285
+/*Bit8u  WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | VBE_WINDOW_ATTRIBUTE_READABLE | VBE_WINDOW_ATTRIBUTE_WRITEABLE,
286
    /*Bit8u  WinBAttributes*/            0,
287
    /*Bit16u WinGranularity*/            VBE_DISPI_BANK_SIZE_KB,
288
    /*Bit16u WinSize*/                   VBE_DISPI_BANK_SIZE_KB,
289
    /*Bit16u WinASegment*/               VGAMEM_GRAPH,
290
-   /*Bit16u WinBSegment*/               0,
291
+/*Bit16u WinBSegment*/ 0x0000,
292
    /*Bit32u WinFuncPtr*/                0,
293
    /*Bit16u BytesPerScanLine*/          100,
294
-// Mandatory information for VBE 1.2 and above
295
    /*Bit16u XResolution*/               800,
296
    /*Bit16u YResolution*/               600,
297
    /*Bit8u  XCharSize*/                 8,
298
    /*Bit8u  YCharSize*/                 16,
299
    /*Bit8u  NumberOfPlanes*/            4,
300
    /*Bit8u  BitsPerPixel*/              4,
301
-   /*Bit8u  NumberOfBanks*/             16,
302
+/*Bit8u  NumberOfBanks*/ 1,
303
    /*Bit8u  MemoryModel*/               VBE_MEMORYMODEL_PLANAR,
304
    /*Bit8u  BankSize*/                  0,
305
-   /*Bit8u  NumberOfImagePages*/        15,
306
+/*Bit8u  NumberOfImagePages*/ 0,
307
    /*Bit8u  Reserved_page*/             0,
308
-// Direct Color fields (required for direct/6 and YUV/7 memory models)
309
    /*Bit8u  RedMaskSize*/               0,
310
    /*Bit8u  RedFieldPosition*/          0,
311
    /*Bit8u  GreenMaskSize*/             0,
312
@@ -200,11 +138,9 @@
313
    /*Bit8u  RsvdMaskSize*/              0,
314
    /*Bit8u  RsvdFieldPosition*/         0,
315
    /*Bit8u  DirectColorModeInfo*/       0,
316
-// Mandatory information for VBE 2.0 and above
317
-   /*Bit32u PhysBasePtr*/               0,
318
+/*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS,
319
    /*Bit32u OffScreenMemOffset*/        0,
320
    /*Bit16u OffScreenMemSize*/          0,
321
-// Mandatory information for VBE 3.0 and above
322
    /*Bit16u LinBytesPerScanLine*/       100,
323
    /*Bit8u  BnkNumberOfPages*/          0,
324
    /*Bit8u  LinNumberOfPages*/          0,
325
@@ -217,46 +153,28 @@
326
    /*Bit8u  LinRsvdMaskSize*/           0,
327
    /*Bit8u  LinRsvdFieldPosition*/      0,
328
    /*Bit32u MaxPixelClock*/             0,
329
-/*} ModeInfoBlock;*/
330
-                }
331
-        },
332
-
333
-        {
334
-                VBE_VESA_MODE_800X600X8,
335
-                {
336
-/*typedef struct ModeInfoBlock
337
-{*/
338
-// Mandatory information for all VBE revisions
339
-   /*Bit16u ModeAttributes*/            VBE_MODE_ATTRIBUTE_SUPPORTED |
340
-                                        VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE |
341
-                                        VBE_MODE_ATTRIBUTE_COLOR_MODE |
342
-#ifdef VBE_HAVE_LFB
343
-                                        VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE |
344
-#endif
345
-                                        VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
346
-   /*Bit8u  WinAAttributes*/            VBE_WINDOW_ATTRIBUTE_RELOCATABLE |
347
-                                        VBE_WINDOW_ATTRIBUTE_READABLE |
348
-                                        VBE_WINDOW_ATTRIBUTE_WRITEABLE,
349
+} },
350
+{ 0x0103, /* 800x600x8 */
351
+{ /*Bit16u ModeAttributes*/ VBE_MODE_ATTRIBUTE_SUPPORTED | VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE | VBE_MODE_ATTRIBUTE_COLOR_MODE | VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE | VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
352
+/*Bit8u  WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | VBE_WINDOW_ATTRIBUTE_READABLE | VBE_WINDOW_ATTRIBUTE_WRITEABLE,
353
    /*Bit8u  WinBAttributes*/            0,
354
    /*Bit16u WinGranularity*/            VBE_DISPI_BANK_SIZE_KB,
355
    /*Bit16u WinSize*/                   VBE_DISPI_BANK_SIZE_KB,
356
    /*Bit16u WinASegment*/               VGAMEM_GRAPH,
357
-   /*Bit16u WinBSegment*/               0,
358
+/*Bit16u WinBSegment*/ 0x0000,
359
    /*Bit32u WinFuncPtr*/                0,
360
    /*Bit16u BytesPerScanLine*/          800,
361
-// Mandatory information for VBE 1.2 and above
362
    /*Bit16u XResolution*/               800,
363
    /*Bit16u YResolution*/               600,
364
    /*Bit8u  XCharSize*/                 8,
365
    /*Bit8u  YCharSize*/                 16,
366
    /*Bit8u  NumberOfPlanes*/            1,
367
    /*Bit8u  BitsPerPixel*/              8,
368
-   /*Bit8u  NumberOfBanks*/             8, // 800x600/64kb == 8
369
+/*Bit8u  NumberOfBanks*/ 8,
370
    /*Bit8u  MemoryModel*/               VBE_MEMORYMODEL_PACKED_PIXEL,
371
    /*Bit8u  BankSize*/                  0,
372
-   /*Bit8u  NumberOfImagePages*/        7,
373
+/*Bit8u  NumberOfImagePages*/ 0,
374
    /*Bit8u  Reserved_page*/             0,
375
-// Direct Color fields (required for direct/6 and YUV/7 memory models)
376
    /*Bit8u  RedMaskSize*/               0,
377
    /*Bit8u  RedFieldPosition*/          0,
378
    /*Bit8u  GreenMaskSize*/             0,
379
@@ -266,15 +184,9 @@
380
    /*Bit8u  RsvdMaskSize*/              0,
381
    /*Bit8u  RsvdFieldPosition*/         0,
382
    /*Bit8u  DirectColorModeInfo*/       0,
383
-// Mandatory information for VBE 2.0 and above
384
-#ifdef VBE_HAVE_LFB
385
    /*Bit32u PhysBasePtr*/               VBE_DISPI_LFB_PHYSICAL_ADDRESS,
386
-#else
387
-   /*Bit32u PhysBasePtr*/               0,
388
-#endif
389
    /*Bit32u OffScreenMemOffset*/        0,
390
    /*Bit16u OffScreenMemSize*/          0,
391
-// Mandatory information for VBE 3.0 and above
392
    /*Bit16u LinBytesPerScanLine*/       800,
393
    /*Bit8u  BnkNumberOfPages*/          0,
394
    /*Bit8u  LinNumberOfPages*/          0,
395
@@ -287,46 +199,28 @@
396
    /*Bit8u  LinRsvdMaskSize*/           0,
397
    /*Bit8u  LinRsvdFieldPosition*/      0,
398
    /*Bit32u MaxPixelClock*/             0,
399
-/*} ModeInfoBlock;*/
400
-                }
401
-        },
402
-
403
-        {
404
-                VBE_VESA_MODE_1024X768X8,
405
-                {
406
-/*typedef struct ModeInfoBlock
407
-{*/
408
-// Mandatory information for all VBE revisions
409
-   /*Bit16u ModeAttributes*/            VBE_MODE_ATTRIBUTE_SUPPORTED |
410
-                                        VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE |
411
-                                        VBE_MODE_ATTRIBUTE_COLOR_MODE |
412
-#ifdef VBE_HAVE_LFB
413
-                                        VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE |
414
-#endif
415
-                                        VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
416
-   /*Bit8u  WinAAttributes*/            VBE_WINDOW_ATTRIBUTE_RELOCATABLE |
417
-                                        VBE_WINDOW_ATTRIBUTE_READABLE |
418
-                                        VBE_WINDOW_ATTRIBUTE_WRITEABLE,
419
+} },
420
+{ 0x0105, /* 1024x768x8 */
421
+{ /*Bit16u ModeAttributes*/ VBE_MODE_ATTRIBUTE_SUPPORTED | VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE | VBE_MODE_ATTRIBUTE_COLOR_MODE | VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE | VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
422
+/*Bit8u  WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | VBE_WINDOW_ATTRIBUTE_READABLE | VBE_WINDOW_ATTRIBUTE_WRITEABLE,
423
    /*Bit8u  WinBAttributes*/            0,
424
    /*Bit16u WinGranularity*/            VBE_DISPI_BANK_SIZE_KB,
425
    /*Bit16u WinSize*/                   VBE_DISPI_BANK_SIZE_KB,
426
    /*Bit16u WinASegment*/               VGAMEM_GRAPH,
427
-   /*Bit16u WinBSegment*/               0,
428
+/*Bit16u WinBSegment*/ 0x0000,
429
    /*Bit32u WinFuncPtr*/                0,
430
    /*Bit16u BytesPerScanLine*/          1024,
431
-// Mandatory information for VBE 1.2 and above
432
    /*Bit16u XResolution*/               1024,
433
    /*Bit16u YResolution*/               768,
434
    /*Bit8u  XCharSize*/                 8,
435
    /*Bit8u  YCharSize*/                 16,
436
    /*Bit8u  NumberOfPlanes*/            1,
437
    /*Bit8u  BitsPerPixel*/              8,
438
-   /*Bit8u  NumberOfBanks*/             12, // 1024x768/64kb == 12
439
+/*Bit8u  NumberOfBanks*/ 12,
440
    /*Bit8u  MemoryModel*/               VBE_MEMORYMODEL_PACKED_PIXEL,
441
    /*Bit8u  BankSize*/                  0,
442
-   /*Bit8u  NumberOfImagePages*/        3,
443
+/*Bit8u  NumberOfImagePages*/ 0,
444
    /*Bit8u  Reserved_page*/             0,
445
-// Direct Color fields (required for direct/6 and YUV/7 memory models)
446
    /*Bit8u  RedMaskSize*/               0,
447
    /*Bit8u  RedFieldPosition*/          0,
448
    /*Bit8u  GreenMaskSize*/             0,
449
@@ -336,15 +230,9 @@
450
    /*Bit8u  RsvdMaskSize*/              0,
451
    /*Bit8u  RsvdFieldPosition*/         0,
452
    /*Bit8u  DirectColorModeInfo*/       0,
453
-// Mandatory information for VBE 2.0 and above
454
-#ifdef VBE_HAVE_LFB
455
    /*Bit32u PhysBasePtr*/               VBE_DISPI_LFB_PHYSICAL_ADDRESS,
456
-#else
457
-   /*Bit32u PhysBasePtr*/               0,
458
-#endif
459
    /*Bit32u OffScreenMemOffset*/        0,
460
    /*Bit16u OffScreenMemSize*/          0,
461
-// Mandatory information for VBE 3.0 and above
462
    /*Bit16u LinBytesPerScanLine*/       1024,
463
    /*Bit8u  BnkNumberOfPages*/          0,
464
    /*Bit8u  LinNumberOfPages*/          0,
465
@@ -357,116 +245,74 @@
466
    /*Bit8u  LinRsvdMaskSize*/           0,
467
    /*Bit8u  LinRsvdFieldPosition*/      0,
468
    /*Bit32u MaxPixelClock*/             0,
469
-/*} ModeInfoBlock;*/
470
-                }
471
-        },
472
-
473
-        {
474
-                VBE_VESA_MODE_640X480X1555,
475
-                {
476
-/*typedef struct ModeInfoBlock
477
-{*/
478
-// Mandatory information for all VBE revisions
479
-   /*Bit16u ModeAttributes*/            VBE_MODE_ATTRIBUTE_SUPPORTED |
480
-                                        VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE |
481
-                                        VBE_MODE_ATTRIBUTE_COLOR_MODE |
482
-#ifdef VBE_HAVE_LFB
483
-                                        VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE |
484
-#endif
485
-                                        VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
486
-   /*Bit8u  WinAAttributes*/            VBE_WINDOW_ATTRIBUTE_RELOCATABLE |
487
-                                        VBE_WINDOW_ATTRIBUTE_READABLE |
488
-                                        VBE_WINDOW_ATTRIBUTE_WRITEABLE,
489
+} },
490
+{ 0x0107, /* 1280x1024x8 */
491
+{ /*Bit16u ModeAttributes*/ VBE_MODE_ATTRIBUTE_SUPPORTED | VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE | VBE_MODE_ATTRIBUTE_COLOR_MODE | VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE | VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
492
+/*Bit8u  WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | VBE_WINDOW_ATTRIBUTE_READABLE | VBE_WINDOW_ATTRIBUTE_WRITEABLE,
493
    /*Bit8u  WinBAttributes*/            0,
494
    /*Bit16u WinGranularity*/            VBE_DISPI_BANK_SIZE_KB,
495
    /*Bit16u WinSize*/                   VBE_DISPI_BANK_SIZE_KB,
496
    /*Bit16u WinASegment*/               VGAMEM_GRAPH,
497
-   /*Bit16u WinBSegment*/               0,
498
+/*Bit16u WinBSegment*/ 0x0000,
499
    /*Bit32u WinFuncPtr*/                0,
500
-   /*Bit16u BytesPerScanLine*/          640*2,
501
-// Mandatory information for VBE 1.2 and above
502
-   /*Bit16u XResolution*/               640,
503
-   /*Bit16u YResolution*/               480,
504
+/*Bit16u BytesPerScanLine*/ 1280,
505
+/*Bit16u XResolution*/ 1280,
506
+/*Bit16u YResolution*/ 1024,
507
    /*Bit8u  XCharSize*/                 8,
508
    /*Bit8u  YCharSize*/                 16,
509
    /*Bit8u  NumberOfPlanes*/            1,
510
-   /*Bit8u  BitsPerPixel*/              15,
511
-   /*Bit8u  NumberOfBanks*/             1,
512
-   /*Bit8u  MemoryModel*/               VBE_MEMORYMODEL_DIRECT_COLOR,
513
+/*Bit8u  BitsPerPixel*/ 8,
514
+/*Bit8u  NumberOfBanks*/ 20,
515
+/*Bit8u  MemoryModel*/ VBE_MEMORYMODEL_PACKED_PIXEL,
516
    /*Bit8u  BankSize*/                  0,
517
-   /*Bit8u  NumberOfImagePages*/        5,
518
+/*Bit8u  NumberOfImagePages*/ 0,
519
    /*Bit8u  Reserved_page*/             0,
520
-// Direct Color fields (required for direct/6 and YUV/7 memory models)
521
-   /*Bit8u  RedMaskSize*/               5,
522
-   /*Bit8u  RedFieldPosition*/          10,
523
-   /*Bit8u  GreenMaskSize*/             5,
524
-   /*Bit8u  GreenFieldPosition*/        5,
525
-   /*Bit8u  BlueMaskSize*/              5,
526
+/*Bit8u  RedMaskSize*/ 0,
527
+/*Bit8u  RedFieldPosition*/ 0,
528
+/*Bit8u  GreenMaskSize*/ 0,
529
+/*Bit8u  GreenFieldPosition*/ 0,
530
+/*Bit8u  BlueMaskSize*/ 0,
531
    /*Bit8u  BlueFieldPosition*/         0,
532
-   /*Bit8u  RsvdMaskSize*/              1,
533
-   /*Bit8u  RsvdFieldPosition*/         15,
534
+/*Bit8u  RsvdMaskSize*/ 0,
535
+/*Bit8u  RsvdFieldPosition*/ 0,
536
    /*Bit8u  DirectColorModeInfo*/       0,
537
-// Mandatory information for VBE 2.0 and above
538
-#ifdef VBE_HAVE_LFB
539
    /*Bit32u PhysBasePtr*/               VBE_DISPI_LFB_PHYSICAL_ADDRESS,
540
-#else
541
-   /*Bit32u PhysBasePtr*/               0,
542
-#endif
543
    /*Bit32u OffScreenMemOffset*/        0,
544
    /*Bit16u OffScreenMemSize*/          0,
545
-// Mandatory information for VBE 3.0 and above
546
-   /*Bit16u LinBytesPerScanLine*/       640*2,
547
+/*Bit16u LinBytesPerScanLine*/ 1280,
548
    /*Bit8u  BnkNumberOfPages*/          0,
549
    /*Bit8u  LinNumberOfPages*/          0,
550
-   /*Bit8u  LinRedMaskSize*/            5,
551
-   /*Bit8u  LinRedFieldPosition*/       10,
552
+/*Bit8u  LinRedMaskSize*/ 0,
553
+/*Bit8u  LinRedFieldPosition*/ 0,
554
    /*Bit8u  LinGreenMaskSize*/          0,
555
-   /*Bit8u  LinGreenFieldPosition*/     5,
556
-   /*Bit8u  LinBlueMaskSize*/           5,
557
+/*Bit8u  LinGreenFieldPosition*/ 0,
558
+/*Bit8u  LinBlueMaskSize*/ 0,
559
    /*Bit8u  LinBlueFieldPosition*/      0,
560
-   /*Bit8u  LinRsvdMaskSize*/           1,
561
-   /*Bit8u  LinRsvdFieldPosition*/      15,
562
+/*Bit8u  LinRsvdMaskSize*/ 0,
563
+/*Bit8u  LinRsvdFieldPosition*/ 0,
564
    /*Bit32u MaxPixelClock*/             0,
565
-/*} ModeInfoBlock;*/
566
-                }
567
-        },
568
-
569
-        {
570
-                VBE_VESA_MODE_800X600X1555,
571
-                {
572
-/*typedef struct ModeInfoBlock
573
-{*/
574
-// Mandatory information for all VBE revisions
575
-   /*Bit16u ModeAttributes*/            VBE_MODE_ATTRIBUTE_SUPPORTED |
576
-                                        VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE |
577
-                                        VBE_MODE_ATTRIBUTE_COLOR_MODE |
578
-#ifdef VBE_HAVE_LFB
579
-                                        VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE |
580
-#endif
581
-                                        VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
582
-   /*Bit8u  WinAAttributes*/            VBE_WINDOW_ATTRIBUTE_RELOCATABLE |
583
-                                        VBE_WINDOW_ATTRIBUTE_READABLE |
584
-                                        VBE_WINDOW_ATTRIBUTE_WRITEABLE,
585
+} },
586
+{ 0x010d, /* 320x200x15 */
587
+{ /*Bit16u ModeAttributes*/ VBE_MODE_ATTRIBUTE_SUPPORTED | VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE | VBE_MODE_ATTRIBUTE_COLOR_MODE | VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE | VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
588
+/*Bit8u  WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | VBE_WINDOW_ATTRIBUTE_READABLE | VBE_WINDOW_ATTRIBUTE_WRITEABLE,
589
    /*Bit8u  WinBAttributes*/            0,
590
    /*Bit16u WinGranularity*/            VBE_DISPI_BANK_SIZE_KB,
591
    /*Bit16u WinSize*/                   VBE_DISPI_BANK_SIZE_KB,
592
    /*Bit16u WinASegment*/               VGAMEM_GRAPH,
593
-   /*Bit16u WinBSegment*/               0,
594
+/*Bit16u WinBSegment*/ 0x0000,
595
    /*Bit32u WinFuncPtr*/                0,
596
-   /*Bit16u BytesPerScanLine*/          800*2,
597
-// Mandatory information for VBE 1.2 and above
598
-   /*Bit16u XResolution*/               800,
599
-   /*Bit16u YResolution*/               600,
600
+/*Bit16u BytesPerScanLine*/ 640,
601
+/*Bit16u XResolution*/ 320,
602
+/*Bit16u YResolution*/ 200,
603
    /*Bit8u  XCharSize*/                 8,
604
    /*Bit8u  YCharSize*/                 16,
605
    /*Bit8u  NumberOfPlanes*/            1,
606
    /*Bit8u  BitsPerPixel*/              15,
607
-   /*Bit8u  NumberOfBanks*/             1,
608
+/*Bit8u  NumberOfBanks*/ 2,
609
    /*Bit8u  MemoryModel*/               VBE_MEMORYMODEL_DIRECT_COLOR,
610
    /*Bit8u  BankSize*/                  0,
611
-   /*Bit8u  NumberOfImagePages*/        3,
612
+/*Bit8u  NumberOfImagePages*/ 0,
613
    /*Bit8u  Reserved_page*/             0,
614
-// Direct Color fields (required for direct/6 and YUV/7 memory models)
615
    /*Bit8u  RedMaskSize*/               5,
616
    /*Bit8u  RedFieldPosition*/          10,
617
    /*Bit8u  GreenMaskSize*/             5,
618
@@ -476,16 +322,10 @@
619
    /*Bit8u  RsvdMaskSize*/              1,
620
    /*Bit8u  RsvdFieldPosition*/         15,
621
    /*Bit8u  DirectColorModeInfo*/       0,
622
-// Mandatory information for VBE 2.0 and above
623
-#ifdef VBE_HAVE_LFB
624
    /*Bit32u PhysBasePtr*/               VBE_DISPI_LFB_PHYSICAL_ADDRESS,
625
-#else
626
-   /*Bit32u PhysBasePtr*/               0,
627
-#endif
628
    /*Bit32u OffScreenMemOffset*/        0,
629
    /*Bit16u OffScreenMemSize*/          0,
630
-// Mandatory information for VBE 3.0 and above
631
-   /*Bit16u LinBytesPerScanLine*/       800*2,
632
+/*Bit16u LinBytesPerScanLine*/ 640,
633
    /*Bit8u  BnkNumberOfPages*/          0,
634
    /*Bit8u  LinNumberOfPages*/          0,
635
    /*Bit8u  LinRedMaskSize*/            5,
636
@@ -497,256 +337,166 @@
637
    /*Bit8u  LinRsvdMaskSize*/           1,
638
    /*Bit8u  LinRsvdFieldPosition*/      15,
639
    /*Bit32u MaxPixelClock*/             0,
640
-/*} ModeInfoBlock;*/
641
-                }
642
-        },
643
-
644
-        {
645
-                VBE_VESA_MODE_1024X768X1555,
646
-                {
647
-/*typedef struct ModeInfoBlock
648
-{*/
649
-// Mandatory information for all VBE revisions
650
-   /*Bit16u ModeAttributes*/            VBE_MODE_ATTRIBUTE_SUPPORTED |
651
-                                        VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE |
652
-                                        VBE_MODE_ATTRIBUTE_COLOR_MODE |
653
-#ifdef VBE_HAVE_LFB
654
-                                        VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE |
655
-#endif
656
-                                        VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
657
-   /*Bit8u  WinAAttributes*/            VBE_WINDOW_ATTRIBUTE_RELOCATABLE |
658
-                                        VBE_WINDOW_ATTRIBUTE_READABLE |
659
-                                        VBE_WINDOW_ATTRIBUTE_WRITEABLE,
660
+} },
661
+{ 0x010e, /* 320x200x16 */
662
+{ /*Bit16u ModeAttributes*/ VBE_MODE_ATTRIBUTE_SUPPORTED | VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE | VBE_MODE_ATTRIBUTE_COLOR_MODE | VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE | VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
663
+/*Bit8u  WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | VBE_WINDOW_ATTRIBUTE_READABLE | VBE_WINDOW_ATTRIBUTE_WRITEABLE,
664
    /*Bit8u  WinBAttributes*/            0,
665
    /*Bit16u WinGranularity*/            VBE_DISPI_BANK_SIZE_KB,
666
    /*Bit16u WinSize*/                   VBE_DISPI_BANK_SIZE_KB,
667
    /*Bit16u WinASegment*/               VGAMEM_GRAPH,
668
-   /*Bit16u WinBSegment*/               0,
669
+/*Bit16u WinBSegment*/ 0x0000,
670
    /*Bit32u WinFuncPtr*/                0,
671
-   /*Bit16u BytesPerScanLine*/          1024*2,
672
-// Mandatory information for VBE 1.2 and above
673
-   /*Bit16u XResolution*/               1024,
674
-   /*Bit16u YResolution*/               768,
675
+/*Bit16u BytesPerScanLine*/ 640,
676
+/*Bit16u XResolution*/ 320,
677
+/*Bit16u YResolution*/ 200,
678
    /*Bit8u  XCharSize*/                 8,
679
    /*Bit8u  YCharSize*/                 16,
680
    /*Bit8u  NumberOfPlanes*/            1,
681
-   /*Bit8u  BitsPerPixel*/              15,
682
-   /*Bit8u  NumberOfBanks*/             1,
683
+/*Bit8u  BitsPerPixel*/ 16,
684
+/*Bit8u  NumberOfBanks*/ 2,
685
    /*Bit8u  MemoryModel*/               VBE_MEMORYMODEL_DIRECT_COLOR,
686
    /*Bit8u  BankSize*/                  0,
687
-   /*Bit8u  NumberOfImagePages*/        1,
688
+/*Bit8u  NumberOfImagePages*/ 0,
689
    /*Bit8u  Reserved_page*/             0,
690
-// Direct Color fields (required for direct/6 and YUV/7 memory models)
691
    /*Bit8u  RedMaskSize*/               5,
692
-   /*Bit8u  RedFieldPosition*/          10,
693
-   /*Bit8u  GreenMaskSize*/             5,
694
+/*Bit8u  RedFieldPosition*/ 11,
695
+/*Bit8u  GreenMaskSize*/ 6,
696
    /*Bit8u  GreenFieldPosition*/        5,
697
    /*Bit8u  BlueMaskSize*/              5,
698
    /*Bit8u  BlueFieldPosition*/         0,
699
-   /*Bit8u  RsvdMaskSize*/              1,
700
-   /*Bit8u  RsvdFieldPosition*/         15,
701
+/*Bit8u  RsvdMaskSize*/ 0,
702
+/*Bit8u  RsvdFieldPosition*/ 0,
703
    /*Bit8u  DirectColorModeInfo*/       0,
704
-// Mandatory information for VBE 2.0 and above
705
-#ifdef VBE_HAVE_LFB
706
    /*Bit32u PhysBasePtr*/               VBE_DISPI_LFB_PHYSICAL_ADDRESS,
707
-#else
708
-   /*Bit32u PhysBasePtr*/               0,
709
-#endif
710
    /*Bit32u OffScreenMemOffset*/        0,
711
    /*Bit16u OffScreenMemSize*/          0,
712
-// Mandatory information for VBE 3.0 and above
713
-   /*Bit16u LinBytesPerScanLine*/       1024*2,
714
+/*Bit16u LinBytesPerScanLine*/ 640,
715
    /*Bit8u  BnkNumberOfPages*/          0,
716
    /*Bit8u  LinNumberOfPages*/          0,
717
    /*Bit8u  LinRedMaskSize*/            5,
718
-   /*Bit8u  LinRedFieldPosition*/       10,
719
-   /*Bit8u  LinGreenMaskSize*/          5,
720
+/*Bit8u  LinRedFieldPosition*/ 11,
721
+/*Bit8u  LinGreenMaskSize*/ 6,
722
    /*Bit8u  LinGreenFieldPosition*/     5,
723
    /*Bit8u  LinBlueMaskSize*/           5,
724
    /*Bit8u  LinBlueFieldPosition*/      0,
725
-   /*Bit8u  LinRsvdMaskSize*/           1,
726
-   /*Bit8u  LinRsvdFieldPosition*/      15,
727
+/*Bit8u  LinRsvdMaskSize*/ 0,
728
+/*Bit8u  LinRsvdFieldPosition*/ 0,
729
    /*Bit32u MaxPixelClock*/             0,
730
-/*} ModeInfoBlock;*/
731
-                }
732
-        },
733
-
734
-        {
735
-                VBE_VESA_MODE_640X480X565,
736
-                {
737
-/*typedef struct ModeInfoBlock
738
-{*/
739
-// Mandatory information for all VBE revisions
740
-   /*Bit16u ModeAttributes*/            VBE_MODE_ATTRIBUTE_SUPPORTED |
741
-                                        VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE |
742
-                                        VBE_MODE_ATTRIBUTE_COLOR_MODE |
743
-#ifdef VBE_HAVE_LFB
744
-                                        VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE |
745
-#endif
746
-                                        VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
747
-   /*Bit8u  WinAAttributes*/            VBE_WINDOW_ATTRIBUTE_RELOCATABLE |
748
-                                        VBE_WINDOW_ATTRIBUTE_READABLE |
749
-                                        VBE_WINDOW_ATTRIBUTE_WRITEABLE,
750
+} },
751
+{ 0x010f, /* 320x200x24 */
752
+{ /*Bit16u ModeAttributes*/ VBE_MODE_ATTRIBUTE_SUPPORTED | VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE | VBE_MODE_ATTRIBUTE_COLOR_MODE | VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE | VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
753
+/*Bit8u  WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | VBE_WINDOW_ATTRIBUTE_READABLE | VBE_WINDOW_ATTRIBUTE_WRITEABLE,
754
    /*Bit8u  WinBAttributes*/            0,
755
    /*Bit16u WinGranularity*/            VBE_DISPI_BANK_SIZE_KB,
756
    /*Bit16u WinSize*/                   VBE_DISPI_BANK_SIZE_KB,
757
    /*Bit16u WinASegment*/               VGAMEM_GRAPH,
758
-   /*Bit16u WinBSegment*/               0,
759
+/*Bit16u WinBSegment*/ 0x0000,
760
    /*Bit32u WinFuncPtr*/                0,
761
-   /*Bit16u BytesPerScanLine*/          640*2,
762
-// Mandatory information for VBE 1.2 and above
763
-   /*Bit16u XResolution*/               640,
764
-   /*Bit16u YResolution*/               480,
765
+/*Bit16u BytesPerScanLine*/ 960,
766
+/*Bit16u XResolution*/ 320,
767
+/*Bit16u YResolution*/ 200,
768
    /*Bit8u  XCharSize*/                 8,
769
    /*Bit8u  YCharSize*/                 16,
770
    /*Bit8u  NumberOfPlanes*/            1,
771
-   /*Bit8u  BitsPerPixel*/              16,
772
-   /*Bit8u  NumberOfBanks*/             1,
773
+/*Bit8u  BitsPerPixel*/ 24,
774
+/*Bit8u  NumberOfBanks*/ 3,
775
    /*Bit8u  MemoryModel*/               VBE_MEMORYMODEL_DIRECT_COLOR,
776
    /*Bit8u  BankSize*/                  0,
777
-   /*Bit8u  NumberOfImagePages*/        5,
778
+/*Bit8u  NumberOfImagePages*/ 0,
779
    /*Bit8u  Reserved_page*/             0,
780
-// Direct Color fields (required for direct/6 and YUV/7 memory models)
781
-   /*Bit8u  RedMaskSize*/               5,
782
-   /*Bit8u  RedFieldPosition*/          11,
783
-   /*Bit8u  GreenMaskSize*/             6,
784
-   /*Bit8u  GreenFieldPosition*/        5,
785
-   /*Bit8u  BlueMaskSize*/              5,
786
+/*Bit8u  RedMaskSize*/ 8,
787
+/*Bit8u  RedFieldPosition*/ 16,
788
+/*Bit8u  GreenMaskSize*/ 8,
789
+/*Bit8u  GreenFieldPosition*/ 8,
790
+/*Bit8u  BlueMaskSize*/ 8,
791
    /*Bit8u  BlueFieldPosition*/         0,
792
    /*Bit8u  RsvdMaskSize*/              0,
793
    /*Bit8u  RsvdFieldPosition*/         0,
794
    /*Bit8u  DirectColorModeInfo*/       0,
795
-// Mandatory information for VBE 2.0 and above
796
-#ifdef VBE_HAVE_LFB
797
    /*Bit32u PhysBasePtr*/               VBE_DISPI_LFB_PHYSICAL_ADDRESS,
798
-#else
799
-   /*Bit32u PhysBasePtr*/               0,
800
-#endif
801
    /*Bit32u OffScreenMemOffset*/        0,
802
    /*Bit16u OffScreenMemSize*/          0,
803
-// Mandatory information for VBE 3.0 and above
804
-   /*Bit16u LinBytesPerScanLine*/       640*2,
805
+/*Bit16u LinBytesPerScanLine*/ 960,
806
    /*Bit8u  BnkNumberOfPages*/          0,
807
    /*Bit8u  LinNumberOfPages*/          0,
808
-   /*Bit8u  LinRedMaskSize*/            5,
809
-   /*Bit8u  LinRedFieldPosition*/       11,
810
-   /*Bit8u  LinGreenMaskSize*/          6,
811
-   /*Bit8u  LinGreenFieldPosition*/     5,
812
-   /*Bit8u  LinBlueMaskSize*/           5,
813
+/*Bit8u  LinRedMaskSize*/ 8,
814
+/*Bit8u  LinRedFieldPosition*/ 16,
815
+/*Bit8u  LinGreenMaskSize*/ 8,
816
+/*Bit8u  LinGreenFieldPosition*/ 8,
817
+/*Bit8u  LinBlueMaskSize*/ 8,
818
    /*Bit8u  LinBlueFieldPosition*/      0,
819
    /*Bit8u  LinRsvdMaskSize*/           0,
820
    /*Bit8u  LinRsvdFieldPosition*/      0,
821
    /*Bit32u MaxPixelClock*/             0,
822
-/*} ModeInfoBlock;*/
823
-                }
824
-        },
825
-
826
-        {
827
-                VBE_VESA_MODE_800X600X565,
828
-                {
829
-/*typedef struct ModeInfoBlock
830
-{*/
831
-// Mandatory information for all VBE revisions
832
-   /*Bit16u ModeAttributes*/            VBE_MODE_ATTRIBUTE_SUPPORTED |
833
-                                        VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE |
834
-                                        VBE_MODE_ATTRIBUTE_COLOR_MODE |
835
-#ifdef VBE_HAVE_LFB
836
-                                        VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE |
837
-#endif
838
-                                        VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
839
-   /*Bit8u  WinAAttributes*/            VBE_WINDOW_ATTRIBUTE_RELOCATABLE |
840
-                                        VBE_WINDOW_ATTRIBUTE_READABLE |
841
-                                        VBE_WINDOW_ATTRIBUTE_WRITEABLE,
842
+} },
843
+{ 0x0110, /* 640x480x15 */
844
+{ /*Bit16u ModeAttributes*/ VBE_MODE_ATTRIBUTE_SUPPORTED | VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE | VBE_MODE_ATTRIBUTE_COLOR_MODE | VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE | VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
845
+/*Bit8u  WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | VBE_WINDOW_ATTRIBUTE_READABLE | VBE_WINDOW_ATTRIBUTE_WRITEABLE,
846
    /*Bit8u  WinBAttributes*/            0,
847
    /*Bit16u WinGranularity*/            VBE_DISPI_BANK_SIZE_KB,
848
    /*Bit16u WinSize*/                   VBE_DISPI_BANK_SIZE_KB,
849
    /*Bit16u WinASegment*/               VGAMEM_GRAPH,
850
-   /*Bit16u WinBSegment*/               0,
851
+/*Bit16u WinBSegment*/ 0x0000,
852
    /*Bit32u WinFuncPtr*/                0,
853
-   /*Bit16u BytesPerScanLine*/          800*2,
854
-// Mandatory information for VBE 1.2 and above
855
-   /*Bit16u XResolution*/               800,
856
-   /*Bit16u YResolution*/               600,
857
+/*Bit16u BytesPerScanLine*/ 1280,
858
+/*Bit16u XResolution*/ 640,
859
+/*Bit16u YResolution*/ 480,
860
    /*Bit8u  XCharSize*/                 8,
861
    /*Bit8u  YCharSize*/                 16,
862
    /*Bit8u  NumberOfPlanes*/            1,
863
-   /*Bit8u  BitsPerPixel*/              16,
864
-   /*Bit8u  NumberOfBanks*/             1,
865
+/*Bit8u  BitsPerPixel*/ 15,
866
+/*Bit8u  NumberOfBanks*/ 10,
867
    /*Bit8u  MemoryModel*/               VBE_MEMORYMODEL_DIRECT_COLOR,
868
    /*Bit8u  BankSize*/                  0,
869
-   /*Bit8u  NumberOfImagePages*/        3,
870
+/*Bit8u  NumberOfImagePages*/ 0,
871
    /*Bit8u  Reserved_page*/             0,
872
-// Direct Color fields (required for direct/6 and YUV/7 memory models)
873
    /*Bit8u  RedMaskSize*/               5,
874
-   /*Bit8u  RedFieldPosition*/          11,
875
-   /*Bit8u  GreenMaskSize*/             6,
876
+/*Bit8u  RedFieldPosition*/ 10,
877
+/*Bit8u  GreenMaskSize*/ 5,
878
    /*Bit8u  GreenFieldPosition*/        5,
879
    /*Bit8u  BlueMaskSize*/              5,
880
    /*Bit8u  BlueFieldPosition*/         0,
881
-   /*Bit8u  RsvdMaskSize*/              0,
882
-   /*Bit8u  RsvdFieldPosition*/         0,
883
+/*Bit8u  RsvdMaskSize*/ 1,
884
+/*Bit8u  RsvdFieldPosition*/ 15,
885
    /*Bit8u  DirectColorModeInfo*/       0,
886
-// Mandatory information for VBE 2.0 and above
887
-#ifdef VBE_HAVE_LFB
888
    /*Bit32u PhysBasePtr*/               VBE_DISPI_LFB_PHYSICAL_ADDRESS,
889
-#else
890
-   /*Bit32u PhysBasePtr*/               0,
891
-#endif
892
    /*Bit32u OffScreenMemOffset*/        0,
893
    /*Bit16u OffScreenMemSize*/          0,
894
-// Mandatory information for VBE 3.0 and above
895
-   /*Bit16u LinBytesPerScanLine*/       800*2,
896
+/*Bit16u LinBytesPerScanLine*/ 1280,
897
    /*Bit8u  BnkNumberOfPages*/          0,
898
    /*Bit8u  LinNumberOfPages*/          0,
899
    /*Bit8u  LinRedMaskSize*/            5,
900
-   /*Bit8u  LinRedFieldPosition*/       11,
901
-   /*Bit8u  LinGreenMaskSize*/          6,
902
+/*Bit8u  LinRedFieldPosition*/ 10,
903
+/*Bit8u  LinGreenMaskSize*/ 5,
904
    /*Bit8u  LinGreenFieldPosition*/     5,
905
    /*Bit8u  LinBlueMaskSize*/           5,
906
    /*Bit8u  LinBlueFieldPosition*/      0,
907
-   /*Bit8u  LinRsvdMaskSize*/           0,
908
-   /*Bit8u  LinRsvdFieldPosition*/      0,
909
+/*Bit8u  LinRsvdMaskSize*/ 1,
910
+/*Bit8u  LinRsvdFieldPosition*/ 15,
911
    /*Bit32u MaxPixelClock*/             0,
912
-/*} ModeInfoBlock;*/
913
-                }
914
-        },
915
-
916
-        {
917
-                VBE_VESA_MODE_1024X768X565,
918
-                {
919
-/*typedef struct ModeInfoBlock
920
-{*/
921
-// Mandatory information for all VBE revisions
922
-   /*Bit16u ModeAttributes*/            VBE_MODE_ATTRIBUTE_SUPPORTED |
923
-                                        VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE |
924
-                                        VBE_MODE_ATTRIBUTE_COLOR_MODE |
925
-#ifdef VBE_HAVE_LFB
926
-                                        VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE |
927
-#endif
928
-                                        VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
929
-   /*Bit8u  WinAAttributes*/            VBE_WINDOW_ATTRIBUTE_RELOCATABLE |
930
-                                        VBE_WINDOW_ATTRIBUTE_READABLE |
931
-                                        VBE_WINDOW_ATTRIBUTE_WRITEABLE,
932
+} },
933
+{ 0x0111, /* 640x480x16 */
934
+{ /*Bit16u ModeAttributes*/ VBE_MODE_ATTRIBUTE_SUPPORTED | VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE | VBE_MODE_ATTRIBUTE_COLOR_MODE | VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE | VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
935
+/*Bit8u  WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | VBE_WINDOW_ATTRIBUTE_READABLE | VBE_WINDOW_ATTRIBUTE_WRITEABLE,
936
    /*Bit8u  WinBAttributes*/            0,
937
    /*Bit16u WinGranularity*/            VBE_DISPI_BANK_SIZE_KB,
938
    /*Bit16u WinSize*/                   VBE_DISPI_BANK_SIZE_KB,
939
    /*Bit16u WinASegment*/               VGAMEM_GRAPH,
940
-   /*Bit16u WinBSegment*/               0,
941
+/*Bit16u WinBSegment*/ 0x0000,
942
    /*Bit32u WinFuncPtr*/                0,
943
-   /*Bit16u BytesPerScanLine*/          1024*2,
944
-// Mandatory information for VBE 1.2 and above
945
-   /*Bit16u XResolution*/               1024,
946
-   /*Bit16u YResolution*/               768,
947
+/*Bit16u BytesPerScanLine*/ 1280,
948
+/*Bit16u XResolution*/ 640,
949
+/*Bit16u YResolution*/ 480,
950
    /*Bit8u  XCharSize*/                 8,
951
    /*Bit8u  YCharSize*/                 16,
952
    /*Bit8u  NumberOfPlanes*/            1,
953
    /*Bit8u  BitsPerPixel*/              16,
954
-   /*Bit8u  NumberOfBanks*/             1,
955
+/*Bit8u  NumberOfBanks*/ 10,
956
    /*Bit8u  MemoryModel*/               VBE_MEMORYMODEL_DIRECT_COLOR,
957
    /*Bit8u  BankSize*/                  0,
958
-   /*Bit8u  NumberOfImagePages*/        1,
959
+/*Bit8u  NumberOfImagePages*/ 0,
960
    /*Bit8u  Reserved_page*/             0,
961
-// Direct Color fields (required for direct/6 and YUV/7 memory models)
962
    /*Bit8u  RedMaskSize*/               5,
963
    /*Bit8u  RedFieldPosition*/          11,
964
    /*Bit8u  GreenMaskSize*/             6,
965
@@ -756,16 +506,10 @@
966
    /*Bit8u  RsvdMaskSize*/              0,
967
    /*Bit8u  RsvdFieldPosition*/         0,
968
    /*Bit8u  DirectColorModeInfo*/       0,
969
-// Mandatory information for VBE 2.0 and above
970
-#ifdef VBE_HAVE_LFB
971
    /*Bit32u PhysBasePtr*/               VBE_DISPI_LFB_PHYSICAL_ADDRESS,
972
-#else
973
-   /*Bit32u PhysBasePtr*/               0,
974
-#endif
975
    /*Bit32u OffScreenMemOffset*/        0,
976
    /*Bit16u OffScreenMemSize*/          0,
977
-// Mandatory information for VBE 3.0 and above
978
-   /*Bit16u LinBytesPerScanLine*/       1024*2,
979
+/*Bit16u LinBytesPerScanLine*/ 1280,
980
    /*Bit8u  BnkNumberOfPages*/          0,
981
    /*Bit8u  LinNumberOfPages*/          0,
982
    /*Bit8u  LinRedMaskSize*/            5,
983
@@ -777,46 +521,28 @@
984
    /*Bit8u  LinRsvdMaskSize*/           0,
985
    /*Bit8u  LinRsvdFieldPosition*/      0,
986
    /*Bit32u MaxPixelClock*/             0,
987
-/*} ModeInfoBlock;*/
988
-                }
989
-        },
990
-
991
-        {
992
-                VBE_VESA_MODE_640X480X888,
993
-                {
994
-/*typedef struct ModeInfoBlock
995
-{*/
996
-// Mandatory information for all VBE revisions
997
-   /*Bit16u ModeAttributes*/            VBE_MODE_ATTRIBUTE_SUPPORTED |
998
-                                        VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE |
999
-                                        VBE_MODE_ATTRIBUTE_COLOR_MODE |
1000
-#ifdef VBE_HAVE_LFB
1001
-                                        VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE |
1002
-#endif
1003
-                                        VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
1004
-   /*Bit8u  WinAAttributes*/            VBE_WINDOW_ATTRIBUTE_RELOCATABLE |
1005
-                                        VBE_WINDOW_ATTRIBUTE_READABLE |
1006
-                                        VBE_WINDOW_ATTRIBUTE_WRITEABLE,
1007
+} },
1008
+{ 0x0112, /* 640x480x24 */
1009
+{ /*Bit16u ModeAttributes*/ VBE_MODE_ATTRIBUTE_SUPPORTED | VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE | VBE_MODE_ATTRIBUTE_COLOR_MODE | VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE | VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
1010
+/*Bit8u  WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | VBE_WINDOW_ATTRIBUTE_READABLE | VBE_WINDOW_ATTRIBUTE_WRITEABLE,
1011
    /*Bit8u  WinBAttributes*/            0,
1012
    /*Bit16u WinGranularity*/            VBE_DISPI_BANK_SIZE_KB,
1013
    /*Bit16u WinSize*/                   VBE_DISPI_BANK_SIZE_KB,
1014
    /*Bit16u WinASegment*/               VGAMEM_GRAPH,
1015
-   /*Bit16u WinBSegment*/               0,
1016
+/*Bit16u WinBSegment*/ 0x0000,
1017
    /*Bit32u WinFuncPtr*/                0,
1018
-   /*Bit16u BytesPerScanLine*/          640*3,
1019
-// Mandatory information for VBE 1.2 and above
1020
+/*Bit16u BytesPerScanLine*/ 1920,
1021
    /*Bit16u XResolution*/               640,
1022
    /*Bit16u YResolution*/               480,
1023
    /*Bit8u  XCharSize*/                 8,
1024
    /*Bit8u  YCharSize*/                 16,
1025
    /*Bit8u  NumberOfPlanes*/            1,
1026
    /*Bit8u  BitsPerPixel*/              24,
1027
-   /*Bit8u  NumberOfBanks*/             1,
1028
+/*Bit8u  NumberOfBanks*/ 15,
1029
    /*Bit8u  MemoryModel*/               VBE_MEMORYMODEL_DIRECT_COLOR,
1030
    /*Bit8u  BankSize*/                  0,
1031
-   /*Bit8u  NumberOfImagePages*/        3,
1032
+/*Bit8u  NumberOfImagePages*/ 0,
1033
    /*Bit8u  Reserved_page*/             0,
1034
-// Direct Color fields (required for direct/6 and YUV/7 memory models)
1035
    /*Bit8u  RedMaskSize*/               8,
1036
    /*Bit8u  RedFieldPosition*/          16,
1037
    /*Bit8u  GreenMaskSize*/             8,
1038
@@ -826,16 +552,10 @@
1039
    /*Bit8u  RsvdMaskSize*/              0,
1040
    /*Bit8u  RsvdFieldPosition*/         0,
1041
    /*Bit8u  DirectColorModeInfo*/       0,
1042
-// Mandatory information for VBE 2.0 and above
1043
-#ifdef VBE_HAVE_LFB
1044
    /*Bit32u PhysBasePtr*/               VBE_DISPI_LFB_PHYSICAL_ADDRESS,
1045
-#else
1046
-   /*Bit32u PhysBasePtr*/               0,
1047
-#endif
1048
    /*Bit32u OffScreenMemOffset*/        0,
1049
    /*Bit16u OffScreenMemSize*/          0,
1050
-// Mandatory information for VBE 3.0 and above
1051
-   /*Bit16u LinBytesPerScanLine*/       640*3,
1052
+/*Bit16u LinBytesPerScanLine*/ 1920,
1053
    /*Bit8u  BnkNumberOfPages*/          0,
1054
    /*Bit8u  LinNumberOfPages*/          0,
1055
    /*Bit8u  LinRedMaskSize*/            8,
1056
@@ -847,186 +567,764 @@
1057
    /*Bit8u  LinRsvdMaskSize*/           0,
1058
    /*Bit8u  LinRsvdFieldPosition*/      0,
1059
    /*Bit32u MaxPixelClock*/             0,
1060
-/*} ModeInfoBlock;*/
1061
-                }
1062
-        },
1063
-
1064
-        {
1065
-                VBE_VESA_MODE_800X600X888,
1066
-                {
1067
-/*typedef struct ModeInfoBlock
1068
-{*/
1069
-// Mandatory information for all VBE revisions
1070
-   /*Bit16u ModeAttributes*/            VBE_MODE_ATTRIBUTE_SUPPORTED |
1071
-                                        VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE |
1072
-                                        VBE_MODE_ATTRIBUTE_COLOR_MODE |
1073
-#ifdef VBE_HAVE_LFB
1074
-                                        VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE |
1075
-#endif
1076
-                                        VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
1077
-   /*Bit8u  WinAAttributes*/            VBE_WINDOW_ATTRIBUTE_RELOCATABLE |
1078
-                                        VBE_WINDOW_ATTRIBUTE_READABLE |
1079
-                                        VBE_WINDOW_ATTRIBUTE_WRITEABLE,
1080
+} },
1081
+{ 0x0113, /* 800x600x15 */
1082
+{ /*Bit16u ModeAttributes*/ VBE_MODE_ATTRIBUTE_SUPPORTED | VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE | VBE_MODE_ATTRIBUTE_COLOR_MODE | VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE | VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
1083
+/*Bit8u  WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | VBE_WINDOW_ATTRIBUTE_READABLE | VBE_WINDOW_ATTRIBUTE_WRITEABLE,
1084
    /*Bit8u  WinBAttributes*/            0,
1085
    /*Bit16u WinGranularity*/            VBE_DISPI_BANK_SIZE_KB,
1086
    /*Bit16u WinSize*/                   VBE_DISPI_BANK_SIZE_KB,
1087
    /*Bit16u WinASegment*/               VGAMEM_GRAPH,
1088
-   /*Bit16u WinBSegment*/               0,
1089
+/*Bit16u WinBSegment*/ 0x0000,
1090
    /*Bit32u WinFuncPtr*/                0,
1091
-   /*Bit16u BytesPerScanLine*/          800*3,
1092
-// Mandatory information for VBE 1.2 and above
1093
+/*Bit16u BytesPerScanLine*/ 1600,
1094
    /*Bit16u XResolution*/               800,
1095
    /*Bit16u YResolution*/               600,
1096
    /*Bit8u  XCharSize*/                 8,
1097
    /*Bit8u  YCharSize*/                 16,
1098
    /*Bit8u  NumberOfPlanes*/            1,
1099
-   /*Bit8u  BitsPerPixel*/              24,
1100
-   /*Bit8u  NumberOfBanks*/             1,
1101
+/*Bit8u  BitsPerPixel*/ 15,
1102
+/*Bit8u  NumberOfBanks*/ 15,
1103
    /*Bit8u  MemoryModel*/               VBE_MEMORYMODEL_DIRECT_COLOR,
1104
    /*Bit8u  BankSize*/                  0,
1105
-   /*Bit8u  NumberOfImagePages*/        1,
1106
+/*Bit8u  NumberOfImagePages*/ 0,
1107
    /*Bit8u  Reserved_page*/             0,
1108
-// Direct Color fields (required for direct/6 and YUV/7 memory models)
1109
-   /*Bit8u  RedMaskSize*/               8,
1110
-   /*Bit8u  RedFieldPosition*/          16,
1111
-   /*Bit8u  GreenMaskSize*/             8,
1112
-   /*Bit8u  GreenFieldPosition*/        8,
1113
-   /*Bit8u  BlueMaskSize*/              8,
1114
+/*Bit8u  RedMaskSize*/ 5,
1115
+/*Bit8u  RedFieldPosition*/ 10,
1116
+/*Bit8u  GreenMaskSize*/ 5,
1117
+/*Bit8u  GreenFieldPosition*/ 5,
1118
+/*Bit8u  BlueMaskSize*/ 5,
1119
    /*Bit8u  BlueFieldPosition*/         0,
1120
-   /*Bit8u  RsvdMaskSize*/              0,
1121
-   /*Bit8u  RsvdFieldPosition*/         0,
1122
+/*Bit8u  RsvdMaskSize*/ 1,
1123
+/*Bit8u  RsvdFieldPosition*/ 15,
1124
    /*Bit8u  DirectColorModeInfo*/       0,
1125
-// Mandatory information for VBE 2.0 and above
1126
-#ifdef VBE_HAVE_LFB
1127
    /*Bit32u PhysBasePtr*/               VBE_DISPI_LFB_PHYSICAL_ADDRESS,
1128
-#else
1129
-   /*Bit32u PhysBasePtr*/               0,
1130
-#endif
1131
    /*Bit32u OffScreenMemOffset*/        0,
1132
    /*Bit16u OffScreenMemSize*/          0,
1133
-// Mandatory information for VBE 3.0 and above
1134
-   /*Bit16u LinBytesPerScanLine*/       800*3,
1135
+/*Bit16u LinBytesPerScanLine*/ 1600,
1136
    /*Bit8u  BnkNumberOfPages*/          0,
1137
    /*Bit8u  LinNumberOfPages*/          0,
1138
-   /*Bit8u  LinRedMaskSize*/            8,
1139
-   /*Bit8u  LinRedFieldPosition*/       16,
1140
-   /*Bit8u  LinGreenMaskSize*/          8,
1141
-   /*Bit8u  LinGreenFieldPosition*/     8,
1142
-   /*Bit8u  LinBlueMaskSize*/           8,
1143
+/*Bit8u  LinRedMaskSize*/ 5,
1144
+/*Bit8u  LinRedFieldPosition*/ 10,
1145
+/*Bit8u  LinGreenMaskSize*/ 5,
1146
+/*Bit8u  LinGreenFieldPosition*/ 5,
1147
+/*Bit8u  LinBlueMaskSize*/ 5,
1148
    /*Bit8u  LinBlueFieldPosition*/      0,
1149
-   /*Bit8u  LinRsvdMaskSize*/           0,
1150
-   /*Bit8u  LinRsvdFieldPosition*/      0,
1151
+/*Bit8u  LinRsvdMaskSize*/ 1,
1152
+/*Bit8u  LinRsvdFieldPosition*/ 15,
1153
    /*Bit32u MaxPixelClock*/             0,
1154
-/*} ModeInfoBlock;*/
1155
-                }
1156
-        },
1157
-
1158
-        {
1159
-                VBE_VESA_MODE_1024X768X888,
1160
-                {
1161
-/*typedef struct ModeInfoBlock
1162
-{*/
1163
-// Mandatory information for all VBE revisions
1164
-   /*Bit16u ModeAttributes*/            VBE_MODE_ATTRIBUTE_SUPPORTED |
1165
-                                        VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE |
1166
-                                        VBE_MODE_ATTRIBUTE_COLOR_MODE |
1167
-#ifdef VBE_HAVE_LFB
1168
-                                        VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE |
1169
-#endif
1170
-                                        VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
1171
-   /*Bit8u  WinAAttributes*/            VBE_WINDOW_ATTRIBUTE_RELOCATABLE |
1172
-                                        VBE_WINDOW_ATTRIBUTE_READABLE |
1173
-                                        VBE_WINDOW_ATTRIBUTE_WRITEABLE,
1174
+} },
1175
+{ 0x0114, /* 800x600x16 */
1176
+{ /*Bit16u ModeAttributes*/ VBE_MODE_ATTRIBUTE_SUPPORTED | VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE | VBE_MODE_ATTRIBUTE_COLOR_MODE | VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE | VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
1177
+/*Bit8u  WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | VBE_WINDOW_ATTRIBUTE_READABLE | VBE_WINDOW_ATTRIBUTE_WRITEABLE,
1178
    /*Bit8u  WinBAttributes*/            0,
1179
    /*Bit16u WinGranularity*/            VBE_DISPI_BANK_SIZE_KB,
1180
    /*Bit16u WinSize*/                   VBE_DISPI_BANK_SIZE_KB,
1181
    /*Bit16u WinASegment*/               VGAMEM_GRAPH,
1182
-   /*Bit16u WinBSegment*/               0,
1183
+/*Bit16u WinBSegment*/ 0x0000,
1184
    /*Bit32u WinFuncPtr*/                0,
1185
-   /*Bit16u BytesPerScanLine*/          1024*3,
1186
-// Mandatory information for VBE 1.2 and above
1187
-   /*Bit16u XResolution*/               1024,
1188
-   /*Bit16u YResolution*/               768,
1189
+/*Bit16u BytesPerScanLine*/ 1600,
1190
+/*Bit16u XResolution*/ 800,
1191
+/*Bit16u YResolution*/ 600,
1192
    /*Bit8u  XCharSize*/                 8,
1193
    /*Bit8u  YCharSize*/                 16,
1194
    /*Bit8u  NumberOfPlanes*/            1,
1195
-   /*Bit8u  BitsPerPixel*/              24,
1196
-   /*Bit8u  NumberOfBanks*/             1,
1197
+/*Bit8u  BitsPerPixel*/ 16,
1198
+/*Bit8u  NumberOfBanks*/ 15,
1199
    /*Bit8u  MemoryModel*/               VBE_MEMORYMODEL_DIRECT_COLOR,
1200
    /*Bit8u  BankSize*/                  0,
1201
    /*Bit8u  NumberOfImagePages*/        0,
1202
    /*Bit8u  Reserved_page*/             0,
1203
-// Direct Color fields (required for direct/6 and YUV/7 memory models)
1204
-   /*Bit8u  RedMaskSize*/               8,
1205
-   /*Bit8u  RedFieldPosition*/          16,
1206
-   /*Bit8u  GreenMaskSize*/             8,
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff