vgabios.diff 102 KB
Newer Older
1
2
Index: clext.c
===================================================================
3
RCS file: /sources/vgabios/vgabios/clext.c,v
4
5
6
retrieving revision 1.10
diff -u -w -r1.10 clext.c
--- clext.c	25 Mar 2006 10:19:15 -0000	1.10
7
+++ clext.c	13 Jun 2006 16:47:23 -0000
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
@@ -544,6 +544,13 @@
 cirrus_set_video_mode_extended:
   call cirrus_switch_mode
   pop ax ;; mode
+  test al, #0x80
+  jnz cirrus_set_video_mode_extended_1
+  push ax
+  mov ax, #0xffff ; set to 0xff to keep win 2K happy
+  call cirrus_clear_vram
+  pop ax
+cirrus_set_video_mode_extended_1:
   and al, #0x7f
 
   push ds
@@ -1011,6 +1018,13 @@
   jnz cirrus_vesa_02h_3
   call cirrus_enable_16k_granularity
 cirrus_vesa_02h_3:
+  test bx, #0x8000 ;; no clear
+  jnz cirrus_vesa_02h_4
+  push ax
+  xor ax,ax
+  call cirrus_clear_vram
+  pop ax
+cirrus_vesa_02h_4:
   pop ax
   push ds
 #ifdef CIRRUS_VESA3_PMINFO
@@ -1479,6 +1493,38 @@
   pop  bx
38
39
   ret
 
40
41
42
43
+cirrus_clear_vram:
+  pusha
+  push es
+  mov si, ax
44
+
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
+  call cirrus_enable_16k_granularity
+  call cirrus_extbios_85h
+  shl al, #2
+  mov bl, al
+  xor ah,ah
+cirrus_clear_vram_1:
+  mov al, #0x09
+  mov dx, #0x3ce
+  out dx, ax
+  push ax
+  mov cx, #0xa000
+  mov es, cx
+  xor di, di
+  mov ax, si
+  mov cx, #8192
+  cld
+  rep 
+      stosw
+  pop ax
+  inc ah
+  cmp ah, bl
+  jne cirrus_clear_vram_1
67
+
68
69
70
+  pop es
+  popa
+  ret
71
+
72
73
74
 cirrus_extbios_handlers:
   ;; 80h
   dw cirrus_extbios_80h
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Index: vbe.h
===================================================================
RCS file: /sources/vgabios/vgabios/vbe.h,v
retrieving revision 1.24
diff -u -w -r1.24 vbe.h
--- vbe.h	9 May 2004 20:31:31 -0000	1.24
+++ vbe.h	13 Jun 2006 16:47:24 -0000
@@ -193,6 +193,10 @@
 #define VBE_VESA_MODE_1280X1024X1555                     0x119
 #define VBE_VESA_MODE_1280X1024X565                      0x11A
 #define VBE_VESA_MODE_1280X1024X888                      0x11B
+#define VBE_VESA_MODE_1600X1200X8                        0x11C
+#define VBE_VESA_MODE_1600X1200X1555                     0x11D
+#define VBE_VESA_MODE_1600X1200X565                      0x11E
+#define VBE_VESA_MODE_1600X1200X888                      0x11F
 
 // BOCHS/PLEX86 'own' mode numbers
 #define VBE_OWN_MODE_320X200X8888                        0x140
@@ -202,6 +206,12 @@
 #define VBE_OWN_MODE_1024X768X8888                       0x144
 #define VBE_OWN_MODE_1280X1024X8888                      0x145
 #define VBE_OWN_MODE_320X200X8                           0x146
+#define VBE_OWN_MODE_1600X1200X8888                      0x147
+#define VBE_OWN_MODE_1152X864X8                          0x148
+#define VBE_OWN_MODE_1152X864X1555                       0x149
+#define VBE_OWN_MODE_1152X864X565                        0x14a
+#define VBE_OWN_MODE_1152X864X888                        0x14b
+#define VBE_OWN_MODE_1152X864X8888                       0x14c
 
 #define VBE_VESA_MODE_END_OF_LIST                        0xFFFF
 
@@ -259,7 +269,7 @@
 //        like 0xE0000000
 
 
-  #define VBE_DISPI_TOTAL_VIDEO_MEMORY_MB 4
+  #define VBE_DISPI_TOTAL_VIDEO_MEMORY_MB 8
 
   #define VBE_DISPI_BANK_ADDRESS          0xA0000
   #define VBE_DISPI_BANK_SIZE_KB          64
Index: vbetables.h
===================================================================
RCS file: /sources/vgabios/vgabios/vbetables.h,v
retrieving revision 1.24
diff -u -w -r1.24 vbetables.h
--- vbetables.h	22 Jul 2004 18:37:29 -0000	1.24
+++ vbetables.h	13 Jun 2006 16:47:24 -0000
@@ -14,46 +14,29 @@
         ModeInfoBlockCompact    info;
 } ModeInfoListItem;
 
-// FIXME: check all member variables to be correct for the different modi
-// FIXME: add more modi
 static ModeInfoListItem mode_info_list[]=
 {
-        {
-                VBE_VESA_MODE_640X400X8,
-                {
-/*typedef struct ModeInfoBlock
-{*/
-// Mandatory information for all VBE revisions
-   /*Bit16u ModeAttributes*/            VBE_MODE_ATTRIBUTE_SUPPORTED |
-                                        VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE |
-                                        VBE_MODE_ATTRIBUTE_COLOR_MODE |
-#ifdef VBE_HAVE_LFB
-                                        VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE |
-#endif
-                                        VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
-   /*Bit8u  WinAAttributes*/            VBE_WINDOW_ATTRIBUTE_RELOCATABLE |
-                                        VBE_WINDOW_ATTRIBUTE_READABLE |
-                                        VBE_WINDOW_ATTRIBUTE_WRITEABLE,
+{ 0x0100, /* 640x400x8 */
+{ /*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,
+/*Bit8u  WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | VBE_WINDOW_ATTRIBUTE_READABLE | VBE_WINDOW_ATTRIBUTE_WRITEABLE,
    /*Bit8u  WinBAttributes*/            0,
    /*Bit16u WinGranularity*/            VBE_DISPI_BANK_SIZE_KB,
    /*Bit16u WinSize*/                   VBE_DISPI_BANK_SIZE_KB,
    /*Bit16u WinASegment*/               VGAMEM_GRAPH,
-   /*Bit16u WinBSegment*/               0,
+/*Bit16u WinBSegment*/ 0x0000,
    /*Bit32u WinFuncPtr*/                0,
    /*Bit16u BytesPerScanLine*/          640,
-// Mandatory information for VBE 1.2 and above
    /*Bit16u XResolution*/               640,
    /*Bit16u YResolution*/               400,
    /*Bit8u  XCharSize*/                 8,
    /*Bit8u  YCharSize*/                 16,
    /*Bit8u  NumberOfPlanes*/            1,
    /*Bit8u  BitsPerPixel*/              8,
-   /*Bit8u  NumberOfBanks*/             4, // 640x400/64kb == 4
+/*Bit8u  NumberOfBanks*/ 4,
    /*Bit8u  MemoryModel*/               VBE_MEMORYMODEL_PACKED_PIXEL,
    /*Bit8u  BankSize*/                  0,
-   /*Bit8u  NumberOfImagePages*/        15,
+/*Bit8u  NumberOfImagePages*/ 0,
    /*Bit8u  Reserved_page*/             0,
-// Direct Color fields (required for direct/6 and YUV/7 memory models)
    /*Bit8u  RedMaskSize*/               0,
    /*Bit8u  RedFieldPosition*/          0,
    /*Bit8u  GreenMaskSize*/             0,
@@ -63,15 +46,9 @@
    /*Bit8u  RsvdMaskSize*/              0,
    /*Bit8u  RsvdFieldPosition*/         0,
    /*Bit8u  DirectColorModeInfo*/       0,
-// Mandatory information for VBE 2.0 and above
-#ifdef VBE_HAVE_LFB
    /*Bit32u PhysBasePtr*/               VBE_DISPI_LFB_PHYSICAL_ADDRESS,
-#else
-   /*Bit32u PhysBasePtr*/               0,
-#endif
    /*Bit32u OffScreenMemOffset*/        0,
    /*Bit16u OffScreenMemSize*/          0,
-// Mandatory information for VBE 3.0 and above
    /*Bit16u LinBytesPerScanLine*/       640,
    /*Bit8u  BnkNumberOfPages*/          0,
    /*Bit8u  LinNumberOfPages*/          0,
@@ -84,45 +61,28 @@
    /*Bit8u  LinRsvdMaskSize*/           0,
    /*Bit8u  LinRsvdFieldPosition*/      0,
    /*Bit32u MaxPixelClock*/             0,
-/*} ModeInfoBlock;*/
-                }
-        },
-
-        {
-                VBE_VESA_MODE_640X480X8,
-                {
-/*typedef struct ModeInfoBlock
-{*/
-// Mandatory information for all VBE revisions
-   /*Bit16u ModeAttributes*/            VBE_MODE_ATTRIBUTE_SUPPORTED |
-                                        VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE |
-                                        VBE_MODE_ATTRIBUTE_COLOR_MODE |
-#ifdef VBE_HAVE_LFB
-                                        VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE |
-#endif
-                                        VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
-   /*Bit8u  WinAAttributes*/            VBE_WINDOW_ATTRIBUTE_READABLE |
-                                        VBE_WINDOW_ATTRIBUTE_WRITEABLE,
+} },
+{ 0x0101, /* 640x480x8 */
+{ /*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,
+/*Bit8u  WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | VBE_WINDOW_ATTRIBUTE_READABLE | VBE_WINDOW_ATTRIBUTE_WRITEABLE,
    /*Bit8u  WinBAttributes*/            0,
    /*Bit16u WinGranularity*/            VBE_DISPI_BANK_SIZE_KB,
    /*Bit16u WinSize*/                   VBE_DISPI_BANK_SIZE_KB,
    /*Bit16u WinASegment*/               VGAMEM_GRAPH,
-   /*Bit16u WinBSegment*/               0,
+/*Bit16u WinBSegment*/ 0x0000,
    /*Bit32u WinFuncPtr*/                0,
    /*Bit16u BytesPerScanLine*/          640,
-// Mandatory information for VBE 1.2 and above
    /*Bit16u XResolution*/               640,
    /*Bit16u YResolution*/               480,
    /*Bit8u  XCharSize*/                 8,
    /*Bit8u  YCharSize*/                 16,
    /*Bit8u  NumberOfPlanes*/            1,
    /*Bit8u  BitsPerPixel*/              8,
-   /*Bit8u  NumberOfBanks*/             5, // 640x480/64kb == 5
+/*Bit8u  NumberOfBanks*/ 5,
    /*Bit8u  MemoryModel*/               VBE_MEMORYMODEL_PACKED_PIXEL,
    /*Bit8u  BankSize*/                  0,
-   /*Bit8u  NumberOfImagePages*/        11,
+/*Bit8u  NumberOfImagePages*/ 0,
    /*Bit8u  Reserved_page*/             0,
-// Direct Color fields (required for direct/6 and YUV/7 memory models)
    /*Bit8u  RedMaskSize*/               0,
    /*Bit8u  RedFieldPosition*/          0,
    /*Bit8u  GreenMaskSize*/             0,
@@ -132,15 +92,9 @@
    /*Bit8u  RsvdMaskSize*/              0,
    /*Bit8u  RsvdFieldPosition*/         0,
    /*Bit8u  DirectColorModeInfo*/       0,
-// Mandatory information for VBE 2.0 and above
-#ifdef VBE_HAVE_LFB
    /*Bit32u PhysBasePtr*/               VBE_DISPI_LFB_PHYSICAL_ADDRESS,
-#else
-   /*Bit32u PhysBasePtr*/               0,
-#endif
    /*Bit32u OffScreenMemOffset*/        0,
    /*Bit16u OffScreenMemSize*/          0,
-// Mandatory information for VBE 3.0 and above
    /*Bit16u LinBytesPerScanLine*/       640,
    /*Bit8u  BnkNumberOfPages*/          0,
    /*Bit8u  LinNumberOfPages*/          0,
@@ -153,44 +107,28 @@
    /*Bit8u  LinRsvdMaskSize*/           0,
    /*Bit8u  LinRsvdFieldPosition*/      0,
    /*Bit32u MaxPixelClock*/             0,
-/*} ModeInfoBlock;*/
-                }
-        },
-
-        {
-                VBE_VESA_MODE_800X600X4,
-                {
-/*typedef struct ModeInfoBlock
-{*/
-// Mandatory information for all VBE revisions
-   /*Bit16u ModeAttributes*/            VBE_MODE_ATTRIBUTE_SUPPORTED |
-                                        VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE |
-                                        VBE_MODE_ATTRIBUTE_TTY_BIOS_SUPPORT |
-                                        VBE_MODE_ATTRIBUTE_COLOR_MODE |
-                                        VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
-   /*Bit8u  WinAAttributes*/            VBE_WINDOW_ATTRIBUTE_RELOCATABLE |
-                                        VBE_WINDOW_ATTRIBUTE_READABLE |
-                                        VBE_WINDOW_ATTRIBUTE_WRITEABLE,
+} },
+{ 0x0102, /* 800x600x4 */
+{ /*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,
+/*Bit8u  WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | VBE_WINDOW_ATTRIBUTE_READABLE | VBE_WINDOW_ATTRIBUTE_WRITEABLE,
    /*Bit8u  WinBAttributes*/            0,
    /*Bit16u WinGranularity*/            VBE_DISPI_BANK_SIZE_KB,
    /*Bit16u WinSize*/                   VBE_DISPI_BANK_SIZE_KB,
    /*Bit16u WinASegment*/               VGAMEM_GRAPH,
-   /*Bit16u WinBSegment*/               0,
+/*Bit16u WinBSegment*/ 0x0000,
    /*Bit32u WinFuncPtr*/                0,
    /*Bit16u BytesPerScanLine*/          100,
-// Mandatory information for VBE 1.2 and above
    /*Bit16u XResolution*/               800,
    /*Bit16u YResolution*/               600,
    /*Bit8u  XCharSize*/                 8,
    /*Bit8u  YCharSize*/                 16,
    /*Bit8u  NumberOfPlanes*/            4,
    /*Bit8u  BitsPerPixel*/              4,
-   /*Bit8u  NumberOfBanks*/             16,
+/*Bit8u  NumberOfBanks*/ 1,
    /*Bit8u  MemoryModel*/               VBE_MEMORYMODEL_PLANAR,
    /*Bit8u  BankSize*/                  0,
-   /*Bit8u  NumberOfImagePages*/        15,
+/*Bit8u  NumberOfImagePages*/ 0,
    /*Bit8u  Reserved_page*/             0,
-// Direct Color fields (required for direct/6 and YUV/7 memory models)
    /*Bit8u  RedMaskSize*/               0,
    /*Bit8u  RedFieldPosition*/          0,
    /*Bit8u  GreenMaskSize*/             0,
@@ -200,11 +138,9 @@
    /*Bit8u  RsvdMaskSize*/              0,
    /*Bit8u  RsvdFieldPosition*/         0,
    /*Bit8u  DirectColorModeInfo*/       0,
-// Mandatory information for VBE 2.0 and above
-   /*Bit32u PhysBasePtr*/               0,
+/*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS,
    /*Bit32u OffScreenMemOffset*/        0,
    /*Bit16u OffScreenMemSize*/          0,
-// Mandatory information for VBE 3.0 and above
    /*Bit16u LinBytesPerScanLine*/       100,
    /*Bit8u  BnkNumberOfPages*/          0,
    /*Bit8u  LinNumberOfPages*/          0,
@@ -217,46 +153,28 @@
    /*Bit8u  LinRsvdMaskSize*/           0,
    /*Bit8u  LinRsvdFieldPosition*/      0,
    /*Bit32u MaxPixelClock*/             0,
-/*} ModeInfoBlock;*/
-                }
-        },
-
-        {
-                VBE_VESA_MODE_800X600X8,
-                {
-/*typedef struct ModeInfoBlock
-{*/
-// Mandatory information for all VBE revisions
-   /*Bit16u ModeAttributes*/            VBE_MODE_ATTRIBUTE_SUPPORTED |
-                                        VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE |
-                                        VBE_MODE_ATTRIBUTE_COLOR_MODE |
-#ifdef VBE_HAVE_LFB
-                                        VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE |
-#endif
-                                        VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
-   /*Bit8u  WinAAttributes*/            VBE_WINDOW_ATTRIBUTE_RELOCATABLE |
-                                        VBE_WINDOW_ATTRIBUTE_READABLE |
-                                        VBE_WINDOW_ATTRIBUTE_WRITEABLE,
+} },
+{ 0x0103, /* 800x600x8 */
+{ /*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,
+/*Bit8u  WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | VBE_WINDOW_ATTRIBUTE_READABLE | VBE_WINDOW_ATTRIBUTE_WRITEABLE,
    /*Bit8u  WinBAttributes*/            0,
    /*Bit16u WinGranularity*/            VBE_DISPI_BANK_SIZE_KB,
    /*Bit16u WinSize*/                   VBE_DISPI_BANK_SIZE_KB,
    /*Bit16u WinASegment*/               VGAMEM_GRAPH,
-   /*Bit16u WinBSegment*/               0,
+/*Bit16u WinBSegment*/ 0x0000,
    /*Bit32u WinFuncPtr*/                0,
    /*Bit16u BytesPerScanLine*/          800,
-// Mandatory information for VBE 1.2 and above
    /*Bit16u XResolution*/               800,
    /*Bit16u YResolution*/               600,
    /*Bit8u  XCharSize*/                 8,
    /*Bit8u  YCharSize*/                 16,
    /*Bit8u  NumberOfPlanes*/            1,
    /*Bit8u  BitsPerPixel*/              8,
-   /*Bit8u  NumberOfBanks*/             8, // 800x600/64kb == 8
+/*Bit8u  NumberOfBanks*/ 8,
    /*Bit8u  MemoryModel*/               VBE_MEMORYMODEL_PACKED_PIXEL,
    /*Bit8u  BankSize*/                  0,
-   /*Bit8u  NumberOfImagePages*/        7,
+/*Bit8u  NumberOfImagePages*/ 0,
    /*Bit8u  Reserved_page*/             0,
-// Direct Color fields (required for direct/6 and YUV/7 memory models)
    /*Bit8u  RedMaskSize*/               0,
    /*Bit8u  RedFieldPosition*/          0,
    /*Bit8u  GreenMaskSize*/             0,
@@ -266,15 +184,9 @@
    /*Bit8u  RsvdMaskSize*/              0,
    /*Bit8u  RsvdFieldPosition*/         0,
    /*Bit8u  DirectColorModeInfo*/       0,
-// Mandatory information for VBE 2.0 and above
-#ifdef VBE_HAVE_LFB
    /*Bit32u PhysBasePtr*/               VBE_DISPI_LFB_PHYSICAL_ADDRESS,
-#else
-   /*Bit32u PhysBasePtr*/               0,
-#endif
    /*Bit32u OffScreenMemOffset*/        0,
    /*Bit16u OffScreenMemSize*/          0,
-// Mandatory information for VBE 3.0 and above
    /*Bit16u LinBytesPerScanLine*/       800,
    /*Bit8u  BnkNumberOfPages*/          0,
    /*Bit8u  LinNumberOfPages*/          0,
@@ -287,46 +199,28 @@
    /*Bit8u  LinRsvdMaskSize*/           0,
    /*Bit8u  LinRsvdFieldPosition*/      0,
    /*Bit32u MaxPixelClock*/             0,
-/*} ModeInfoBlock;*/
-                }
-        },
-
-        {
-                VBE_VESA_MODE_1024X768X8,
-                {
-/*typedef struct ModeInfoBlock
-{*/
-// Mandatory information for all VBE revisions
-   /*Bit16u ModeAttributes*/            VBE_MODE_ATTRIBUTE_SUPPORTED |
-                                        VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE |
-                                        VBE_MODE_ATTRIBUTE_COLOR_MODE |
-#ifdef VBE_HAVE_LFB
-                                        VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE |
-#endif
-                                        VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
-   /*Bit8u  WinAAttributes*/            VBE_WINDOW_ATTRIBUTE_RELOCATABLE |
-                                        VBE_WINDOW_ATTRIBUTE_READABLE |
-                                        VBE_WINDOW_ATTRIBUTE_WRITEABLE,
+} },
+{ 0x0105, /* 1024x768x8 */
+{ /*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,
+/*Bit8u  WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | VBE_WINDOW_ATTRIBUTE_READABLE | VBE_WINDOW_ATTRIBUTE_WRITEABLE,
    /*Bit8u  WinBAttributes*/            0,
    /*Bit16u WinGranularity*/            VBE_DISPI_BANK_SIZE_KB,
    /*Bit16u WinSize*/                   VBE_DISPI_BANK_SIZE_KB,
    /*Bit16u WinASegment*/               VGAMEM_GRAPH,
-   /*Bit16u WinBSegment*/               0,
+/*Bit16u WinBSegment*/ 0x0000,
    /*Bit32u WinFuncPtr*/                0,
    /*Bit16u BytesPerScanLine*/          1024,
-// Mandatory information for VBE 1.2 and above
    /*Bit16u XResolution*/               1024,
    /*Bit16u YResolution*/               768,
    /*Bit8u  XCharSize*/                 8,
    /*Bit8u  YCharSize*/                 16,
    /*Bit8u  NumberOfPlanes*/            1,
    /*Bit8u  BitsPerPixel*/              8,
-   /*Bit8u  NumberOfBanks*/             12, // 1024x768/64kb == 12
+/*Bit8u  NumberOfBanks*/ 12,
    /*Bit8u  MemoryModel*/               VBE_MEMORYMODEL_PACKED_PIXEL,
    /*Bit8u  BankSize*/                  0,
-   /*Bit8u  NumberOfImagePages*/        3,
+/*Bit8u  NumberOfImagePages*/ 0,
    /*Bit8u  Reserved_page*/             0,
-// Direct Color fields (required for direct/6 and YUV/7 memory models)
    /*Bit8u  RedMaskSize*/               0,
    /*Bit8u  RedFieldPosition*/          0,
    /*Bit8u  GreenMaskSize*/             0,
@@ -336,15 +230,9 @@
    /*Bit8u  RsvdMaskSize*/              0,
    /*Bit8u  RsvdFieldPosition*/         0,
    /*Bit8u  DirectColorModeInfo*/       0,
-// Mandatory information for VBE 2.0 and above
-#ifdef VBE_HAVE_LFB
    /*Bit32u PhysBasePtr*/               VBE_DISPI_LFB_PHYSICAL_ADDRESS,
-#else
-   /*Bit32u PhysBasePtr*/               0,
-#endif
    /*Bit32u OffScreenMemOffset*/        0,
    /*Bit16u OffScreenMemSize*/          0,
-// Mandatory information for VBE 3.0 and above
    /*Bit16u LinBytesPerScanLine*/       1024,
    /*Bit8u  BnkNumberOfPages*/          0,
    /*Bit8u  LinNumberOfPages*/          0,
@@ -357,116 +245,74 @@
    /*Bit8u  LinRsvdMaskSize*/           0,
    /*Bit8u  LinRsvdFieldPosition*/      0,
    /*Bit32u MaxPixelClock*/             0,
-/*} ModeInfoBlock;*/
-                }
-        },
-
-        {
-                VBE_VESA_MODE_640X480X1555,
-                {
-/*typedef struct ModeInfoBlock
-{*/
-// Mandatory information for all VBE revisions
-   /*Bit16u ModeAttributes*/            VBE_MODE_ATTRIBUTE_SUPPORTED |
-                                        VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE |
-                                        VBE_MODE_ATTRIBUTE_COLOR_MODE |
-#ifdef VBE_HAVE_LFB
-                                        VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE |
-#endif
-                                        VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
-   /*Bit8u  WinAAttributes*/            VBE_WINDOW_ATTRIBUTE_RELOCATABLE |
-                                        VBE_WINDOW_ATTRIBUTE_READABLE |
-                                        VBE_WINDOW_ATTRIBUTE_WRITEABLE,
+} },
+{ 0x0107, /* 1280x1024x8 */
+{ /*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,
+/*Bit8u  WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | VBE_WINDOW_ATTRIBUTE_READABLE | VBE_WINDOW_ATTRIBUTE_WRITEABLE,
    /*Bit8u  WinBAttributes*/            0,
    /*Bit16u WinGranularity*/            VBE_DISPI_BANK_SIZE_KB,
    /*Bit16u WinSize*/                   VBE_DISPI_BANK_SIZE_KB,
    /*Bit16u WinASegment*/               VGAMEM_GRAPH,
-   /*Bit16u WinBSegment*/               0,
+/*Bit16u WinBSegment*/ 0x0000,
    /*Bit32u WinFuncPtr*/                0,
-   /*Bit16u BytesPerScanLine*/          640*2,
-// Mandatory information for VBE 1.2 and above
-   /*Bit16u XResolution*/               640,
-   /*Bit16u YResolution*/               480,
+/*Bit16u BytesPerScanLine*/ 1280,
+/*Bit16u XResolution*/ 1280,
+/*Bit16u YResolution*/ 1024,
    /*Bit8u  XCharSize*/                 8,
    /*Bit8u  YCharSize*/                 16,
    /*Bit8u  NumberOfPlanes*/            1,
-   /*Bit8u  BitsPerPixel*/              15,
-   /*Bit8u  NumberOfBanks*/             1,
-   /*Bit8u  MemoryModel*/               VBE_MEMORYMODEL_DIRECT_COLOR,
+/*Bit8u  BitsPerPixel*/ 8,
+/*Bit8u  NumberOfBanks*/ 20,
+/*Bit8u  MemoryModel*/ VBE_MEMORYMODEL_PACKED_PIXEL,
    /*Bit8u  BankSize*/                  0,
-   /*Bit8u  NumberOfImagePages*/        5,
+/*Bit8u  NumberOfImagePages*/ 0,
    /*Bit8u  Reserved_page*/             0,
-// Direct Color fields (required for direct/6 and YUV/7 memory models)
-   /*Bit8u  RedMaskSize*/               5,
-   /*Bit8u  RedFieldPosition*/          10,
-   /*Bit8u  GreenMaskSize*/             5,
-   /*Bit8u  GreenFieldPosition*/        5,
-   /*Bit8u  BlueMaskSize*/              5,
+/*Bit8u  RedMaskSize*/ 0,
+/*Bit8u  RedFieldPosition*/ 0,
+/*Bit8u  GreenMaskSize*/ 0,
+/*Bit8u  GreenFieldPosition*/ 0,
+/*Bit8u  BlueMaskSize*/ 0,
    /*Bit8u  BlueFieldPosition*/         0,
-   /*Bit8u  RsvdMaskSize*/              1,
-   /*Bit8u  RsvdFieldPosition*/         15,
+/*Bit8u  RsvdMaskSize*/ 0,
+/*Bit8u  RsvdFieldPosition*/ 0,
    /*Bit8u  DirectColorModeInfo*/       0,
-// Mandatory information for VBE 2.0 and above
-#ifdef VBE_HAVE_LFB
    /*Bit32u PhysBasePtr*/               VBE_DISPI_LFB_PHYSICAL_ADDRESS,
-#else
-   /*Bit32u PhysBasePtr*/               0,
-#endif
    /*Bit32u OffScreenMemOffset*/        0,
    /*Bit16u OffScreenMemSize*/          0,
-// Mandatory information for VBE 3.0 and above
-   /*Bit16u LinBytesPerScanLine*/       640*2,
+/*Bit16u LinBytesPerScanLine*/ 1280,
    /*Bit8u  BnkNumberOfPages*/          0,
    /*Bit8u  LinNumberOfPages*/          0,
-   /*Bit8u  LinRedMaskSize*/            5,
-   /*Bit8u  LinRedFieldPosition*/       10,
+/*Bit8u  LinRedMaskSize*/ 0,
+/*Bit8u  LinRedFieldPosition*/ 0,
    /*Bit8u  LinGreenMaskSize*/          0,
-   /*Bit8u  LinGreenFieldPosition*/     5,
-   /*Bit8u  LinBlueMaskSize*/           5,
+/*Bit8u  LinGreenFieldPosition*/ 0,
+/*Bit8u  LinBlueMaskSize*/ 0,
    /*Bit8u  LinBlueFieldPosition*/      0,
-   /*Bit8u  LinRsvdMaskSize*/           1,
-   /*Bit8u  LinRsvdFieldPosition*/      15,
+/*Bit8u  LinRsvdMaskSize*/ 0,
+/*Bit8u  LinRsvdFieldPosition*/ 0,
    /*Bit32u MaxPixelClock*/             0,
-/*} ModeInfoBlock;*/
-                }
-        },
-
-        {
-                VBE_VESA_MODE_800X600X1555,
-                {
-/*typedef struct ModeInfoBlock
-{*/
-// Mandatory information for all VBE revisions
-   /*Bit16u ModeAttributes*/            VBE_MODE_ATTRIBUTE_SUPPORTED |
-                                        VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE |
-                                        VBE_MODE_ATTRIBUTE_COLOR_MODE |
-#ifdef VBE_HAVE_LFB
-                                        VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE |
-#endif
-                                        VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
-   /*Bit8u  WinAAttributes*/            VBE_WINDOW_ATTRIBUTE_RELOCATABLE |
-                                        VBE_WINDOW_ATTRIBUTE_READABLE |
-                                        VBE_WINDOW_ATTRIBUTE_WRITEABLE,
+} },
+{ 0x010d, /* 320x200x15 */
+{ /*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,
+/*Bit8u  WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | VBE_WINDOW_ATTRIBUTE_READABLE | VBE_WINDOW_ATTRIBUTE_WRITEABLE,
    /*Bit8u  WinBAttributes*/            0,
    /*Bit16u WinGranularity*/            VBE_DISPI_BANK_SIZE_KB,
    /*Bit16u WinSize*/                   VBE_DISPI_BANK_SIZE_KB,
    /*Bit16u WinASegment*/               VGAMEM_GRAPH,
-   /*Bit16u WinBSegment*/               0,
+/*Bit16u WinBSegment*/ 0x0000,
    /*Bit32u WinFuncPtr*/                0,
-   /*Bit16u BytesPerScanLine*/          800*2,
-// Mandatory information for VBE 1.2 and above
-   /*Bit16u XResolution*/               800,
-   /*Bit16u YResolution*/               600,
+/*Bit16u BytesPerScanLine*/ 640,
+/*Bit16u XResolution*/ 320,
+/*Bit16u YResolution*/ 200,
    /*Bit8u  XCharSize*/                 8,
    /*Bit8u  YCharSize*/                 16,
    /*Bit8u  NumberOfPlanes*/            1,
    /*Bit8u  BitsPerPixel*/              15,
-   /*Bit8u  NumberOfBanks*/             1,
+/*Bit8u  NumberOfBanks*/ 2,
    /*Bit8u  MemoryModel*/               VBE_MEMORYMODEL_DIRECT_COLOR,
    /*Bit8u  BankSize*/                  0,
-   /*Bit8u  NumberOfImagePages*/        3,
+/*Bit8u  NumberOfImagePages*/ 0,
    /*Bit8u  Reserved_page*/             0,
-// Direct Color fields (required for direct/6 and YUV/7 memory models)
    /*Bit8u  RedMaskSize*/               5,
    /*Bit8u  RedFieldPosition*/          10,
    /*Bit8u  GreenMaskSize*/             5,
@@ -476,16 +322,10 @@
    /*Bit8u  RsvdMaskSize*/              1,
    /*Bit8u  RsvdFieldPosition*/         15,
    /*Bit8u  DirectColorModeInfo*/       0,
-// Mandatory information for VBE 2.0 and above
-#ifdef VBE_HAVE_LFB
    /*Bit32u PhysBasePtr*/               VBE_DISPI_LFB_PHYSICAL_ADDRESS,
-#else
-   /*Bit32u PhysBasePtr*/               0,
-#endif
    /*Bit32u OffScreenMemOffset*/        0,
    /*Bit16u OffScreenMemSize*/          0,
-// Mandatory information for VBE 3.0 and above
-   /*Bit16u LinBytesPerScanLine*/       800*2,
+/*Bit16u LinBytesPerScanLine*/ 640,
    /*Bit8u  BnkNumberOfPages*/          0,
    /*Bit8u  LinNumberOfPages*/          0,
    /*Bit8u  LinRedMaskSize*/            5,
@@ -497,256 +337,166 @@
    /*Bit8u  LinRsvdMaskSize*/           1,
    /*Bit8u  LinRsvdFieldPosition*/      15,
    /*Bit32u MaxPixelClock*/             0,
-/*} ModeInfoBlock;*/
-                }
-        },
-
-        {
-                VBE_VESA_MODE_1024X768X1555,
-                {
-/*typedef struct ModeInfoBlock
-{*/
-// Mandatory information for all VBE revisions
-   /*Bit16u ModeAttributes*/            VBE_MODE_ATTRIBUTE_SUPPORTED |
-                                        VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE |
-                                        VBE_MODE_ATTRIBUTE_COLOR_MODE |
-#ifdef VBE_HAVE_LFB
-                                        VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE |
-#endif
-                                        VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
-   /*Bit8u  WinAAttributes*/            VBE_WINDOW_ATTRIBUTE_RELOCATABLE |
-                                        VBE_WINDOW_ATTRIBUTE_READABLE |
-                                        VBE_WINDOW_ATTRIBUTE_WRITEABLE,
+} },
+{ 0x010e, /* 320x200x16 */
+{ /*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,
+/*Bit8u  WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | VBE_WINDOW_ATTRIBUTE_READABLE | VBE_WINDOW_ATTRIBUTE_WRITEABLE,
    /*Bit8u  WinBAttributes*/            0,
    /*Bit16u WinGranularity*/            VBE_DISPI_BANK_SIZE_KB,
    /*Bit16u WinSize*/                   VBE_DISPI_BANK_SIZE_KB,
    /*Bit16u WinASegment*/               VGAMEM_GRAPH,
-   /*Bit16u WinBSegment*/               0,
+/*Bit16u WinBSegment*/ 0x0000,
    /*Bit32u WinFuncPtr*/                0,
-   /*Bit16u BytesPerScanLine*/          1024*2,
-// Mandatory information for VBE 1.2 and above
-   /*Bit16u XResolution*/               1024,
-   /*Bit16u YResolution*/               768,
+/*Bit16u BytesPerScanLine*/ 640,
+/*Bit16u XResolution*/ 320,
+/*Bit16u YResolution*/ 200,
    /*Bit8u  XCharSize*/                 8,
    /*Bit8u  YCharSize*/                 16,
    /*Bit8u  NumberOfPlanes*/            1,
-   /*Bit8u  BitsPerPixel*/              15,
-   /*Bit8u  NumberOfBanks*/             1,
+/*Bit8u  BitsPerPixel*/ 16,
+/*Bit8u  NumberOfBanks*/ 2,
    /*Bit8u  MemoryModel*/               VBE_MEMORYMODEL_DIRECT_COLOR,
    /*Bit8u  BankSize*/                  0,
-   /*Bit8u  NumberOfImagePages*/        1,
+/*Bit8u  NumberOfImagePages*/ 0,
    /*Bit8u  Reserved_page*/             0,
-// Direct Color fields (required for direct/6 and YUV/7 memory models)
    /*Bit8u  RedMaskSize*/               5,
-   /*Bit8u  RedFieldPosition*/          10,
-   /*Bit8u  GreenMaskSize*/             5,
+/*Bit8u  RedFieldPosition*/ 11,
+/*Bit8u  GreenMaskSize*/ 6,
    /*Bit8u  GreenFieldPosition*/        5,
    /*Bit8u  BlueMaskSize*/              5,
    /*Bit8u  BlueFieldPosition*/         0,
-   /*Bit8u  RsvdMaskSize*/              1,
-   /*Bit8u  RsvdFieldPosition*/         15,
+/*Bit8u  RsvdMaskSize*/ 0,
+/*Bit8u  RsvdFieldPosition*/ 0,
    /*Bit8u  DirectColorModeInfo*/       0,
-// Mandatory information for VBE 2.0 and above
-#ifdef VBE_HAVE_LFB
    /*Bit32u PhysBasePtr*/               VBE_DISPI_LFB_PHYSICAL_ADDRESS,
-#else
-   /*Bit32u PhysBasePtr*/               0,
-#endif
    /*Bit32u OffScreenMemOffset*/        0,
    /*Bit16u OffScreenMemSize*/          0,
-// Mandatory information for VBE 3.0 and above
-   /*Bit16u LinBytesPerScanLine*/       1024*2,
+/*Bit16u LinBytesPerScanLine*/ 640,
    /*Bit8u  BnkNumberOfPages*/          0,
    /*Bit8u  LinNumberOfPages*/          0,
    /*Bit8u  LinRedMaskSize*/            5,
-   /*Bit8u  LinRedFieldPosition*/       10,
-   /*Bit8u  LinGreenMaskSize*/          5,
+/*Bit8u  LinRedFieldPosition*/ 11,
+/*Bit8u  LinGreenMaskSize*/ 6,
    /*Bit8u  LinGreenFieldPosition*/     5,
    /*Bit8u  LinBlueMaskSize*/           5,
    /*Bit8u  LinBlueFieldPosition*/      0,
-   /*Bit8u  LinRsvdMaskSize*/           1,
-   /*Bit8u  LinRsvdFieldPosition*/      15,
+/*Bit8u  LinRsvdMaskSize*/ 0,
+/*Bit8u  LinRsvdFieldPosition*/ 0,
    /*Bit32u MaxPixelClock*/             0,
-/*} ModeInfoBlock;*/
-                }
-        },
-
-        {
-                VBE_VESA_MODE_640X480X565,
-                {
-/*typedef struct ModeInfoBlock
-{*/
-// Mandatory information for all VBE revisions
-   /*Bit16u ModeAttributes*/            VBE_MODE_ATTRIBUTE_SUPPORTED |
-                                        VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE |
-                                        VBE_MODE_ATTRIBUTE_COLOR_MODE |
-#ifdef VBE_HAVE_LFB
-                                        VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE |
-#endif
-                                        VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
-   /*Bit8u  WinAAttributes*/            VBE_WINDOW_ATTRIBUTE_RELOCATABLE |
-                                        VBE_WINDOW_ATTRIBUTE_READABLE |
-                                        VBE_WINDOW_ATTRIBUTE_WRITEABLE,
+} },
+{ 0x010f, /* 320x200x24 */
+{ /*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,
+/*Bit8u  WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | VBE_WINDOW_ATTRIBUTE_READABLE | VBE_WINDOW_ATTRIBUTE_WRITEABLE,
    /*Bit8u  WinBAttributes*/            0,
    /*Bit16u WinGranularity*/            VBE_DISPI_BANK_SIZE_KB,
    /*Bit16u WinSize*/                   VBE_DISPI_BANK_SIZE_KB,
    /*Bit16u WinASegment*/               VGAMEM_GRAPH,
-   /*Bit16u WinBSegment*/               0,
+/*Bit16u WinBSegment*/ 0x0000,
    /*Bit32u WinFuncPtr*/                0,
-   /*Bit16u BytesPerScanLine*/          640*2,
-// Mandatory information for VBE 1.2 and above
-   /*Bit16u XResolution*/               640,
-   /*Bit16u YResolution*/               480,
+/*Bit16u BytesPerScanLine*/ 960,
+/*Bit16u XResolution*/ 320,
+/*Bit16u YResolution*/ 200,
    /*Bit8u  XCharSize*/                 8,
    /*Bit8u  YCharSize*/                 16,
    /*Bit8u  NumberOfPlanes*/            1,
-   /*Bit8u  BitsPerPixel*/              16,
-   /*Bit8u  NumberOfBanks*/             1,
+/*Bit8u  BitsPerPixel*/ 24,
+/*Bit8u  NumberOfBanks*/ 3,
    /*Bit8u  MemoryModel*/               VBE_MEMORYMODEL_DIRECT_COLOR,
    /*Bit8u  BankSize*/                  0,
-   /*Bit8u  NumberOfImagePages*/        5,
+/*Bit8u  NumberOfImagePages*/ 0,
    /*Bit8u  Reserved_page*/             0,
-// Direct Color fields (required for direct/6 and YUV/7 memory models)
-   /*Bit8u  RedMaskSize*/               5,
-   /*Bit8u  RedFieldPosition*/          11,
-   /*Bit8u  GreenMaskSize*/             6,
-   /*Bit8u  GreenFieldPosition*/        5,
-   /*Bit8u  BlueMaskSize*/              5,
+/*Bit8u  RedMaskSize*/ 8,
+/*Bit8u  RedFieldPosition*/ 16,
+/*Bit8u  GreenMaskSize*/ 8,
+/*Bit8u  GreenFieldPosition*/ 8,
+/*Bit8u  BlueMaskSize*/ 8,
    /*Bit8u  BlueFieldPosition*/         0,
    /*Bit8u  RsvdMaskSize*/              0,
    /*Bit8u  RsvdFieldPosition*/         0,
    /*Bit8u  DirectColorModeInfo*/       0,
-// Mandatory information for VBE 2.0 and above
-#ifdef VBE_HAVE_LFB
    /*Bit32u PhysBasePtr*/               VBE_DISPI_LFB_PHYSICAL_ADDRESS,
-#else
-   /*Bit32u PhysBasePtr*/               0,
-#endif
    /*Bit32u OffScreenMemOffset*/        0,
    /*Bit16u OffScreenMemSize*/          0,
-// Mandatory information for VBE 3.0 and above
-   /*Bit16u LinBytesPerScanLine*/       640*2,
+/*Bit16u LinBytesPerScanLine*/ 960,
    /*Bit8u  BnkNumberOfPages*/          0,
    /*Bit8u  LinNumberOfPages*/          0,
-   /*Bit8u  LinRedMaskSize*/            5,
-   /*Bit8u  LinRedFieldPosition*/       11,
-   /*Bit8u  LinGreenMaskSize*/          6,
-   /*Bit8u  LinGreenFieldPosition*/     5,
-   /*Bit8u  LinBlueMaskSize*/           5,
+/*Bit8u  LinRedMaskSize*/ 8,
+/*Bit8u  LinRedFieldPosition*/ 16,
+/*Bit8u  LinGreenMaskSize*/ 8,
+/*Bit8u  LinGreenFieldPosition*/ 8,
+/*Bit8u  LinBlueMaskSize*/ 8,
    /*Bit8u  LinBlueFieldPosition*/      0,
    /*Bit8u  LinRsvdMaskSize*/           0,
    /*Bit8u  LinRsvdFieldPosition*/      0,
    /*Bit32u MaxPixelClock*/             0,
-/*} ModeInfoBlock;*/
-                }
-        },
-
-        {
-                VBE_VESA_MODE_800X600X565,
-                {
-/*typedef struct ModeInfoBlock
-{*/
-// Mandatory information for all VBE revisions
-   /*Bit16u ModeAttributes*/            VBE_MODE_ATTRIBUTE_SUPPORTED |
-                                        VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE |
-                                        VBE_MODE_ATTRIBUTE_COLOR_MODE |
-#ifdef VBE_HAVE_LFB
-                                        VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE |
-#endif
-                                        VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
-   /*Bit8u  WinAAttributes*/            VBE_WINDOW_ATTRIBUTE_RELOCATABLE |
-                                        VBE_WINDOW_ATTRIBUTE_READABLE |
-                                        VBE_WINDOW_ATTRIBUTE_WRITEABLE,
+} },
+{ 0x0110, /* 640x480x15 */
+{ /*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,
+/*Bit8u  WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | VBE_WINDOW_ATTRIBUTE_READABLE | VBE_WINDOW_ATTRIBUTE_WRITEABLE,
    /*Bit8u  WinBAttributes*/            0,
    /*Bit16u WinGranularity*/            VBE_DISPI_BANK_SIZE_KB,
    /*Bit16u WinSize*/                   VBE_DISPI_BANK_SIZE_KB,
    /*Bit16u WinASegment*/               VGAMEM_GRAPH,
-   /*Bit16u WinBSegment*/               0,
+/*Bit16u WinBSegment*/ 0x0000,
    /*Bit32u WinFuncPtr*/                0,
-   /*Bit16u BytesPerScanLine*/          800*2,
-// Mandatory information for VBE 1.2 and above
-   /*Bit16u XResolution*/               800,
-   /*Bit16u YResolution*/               600,
+/*Bit16u BytesPerScanLine*/ 1280,
+/*Bit16u XResolution*/ 640,
+/*Bit16u YResolution*/ 480,
    /*Bit8u  XCharSize*/                 8,
    /*Bit8u  YCharSize*/                 16,
    /*Bit8u  NumberOfPlanes*/            1,
-   /*Bit8u  BitsPerPixel*/              16,
-   /*Bit8u  NumberOfBanks*/             1,
+/*Bit8u  BitsPerPixel*/ 15,
+/*Bit8u  NumberOfBanks*/ 10,
    /*Bit8u  MemoryModel*/               VBE_MEMORYMODEL_DIRECT_COLOR,
    /*Bit8u  BankSize*/                  0,
-   /*Bit8u  NumberOfImagePages*/        3,
+/*Bit8u  NumberOfImagePages*/ 0,
    /*Bit8u  Reserved_page*/             0,
-// Direct Color fields (required for direct/6 and YUV/7 memory models)
    /*Bit8u  RedMaskSize*/               5,
-   /*Bit8u  RedFieldPosition*/          11,
-   /*Bit8u  GreenMaskSize*/             6,
+/*Bit8u  RedFieldPosition*/ 10,
+/*Bit8u  GreenMaskSize*/ 5,
    /*Bit8u  GreenFieldPosition*/        5,
    /*Bit8u  BlueMaskSize*/              5,
    /*Bit8u  BlueFieldPosition*/         0,
-   /*Bit8u  RsvdMaskSize*/              0,
-   /*Bit8u  RsvdFieldPosition*/         0,
+/*Bit8u  RsvdMaskSize*/ 1,
+/*Bit8u  RsvdFieldPosition*/ 15,
    /*Bit8u  DirectColorModeInfo*/       0,
-// Mandatory information for VBE 2.0 and above
-#ifdef VBE_HAVE_LFB
    /*Bit32u PhysBasePtr*/               VBE_DISPI_LFB_PHYSICAL_ADDRESS,
-#else
-   /*Bit32u PhysBasePtr*/               0,
-#endif
    /*Bit32u OffScreenMemOffset*/        0,
    /*Bit16u OffScreenMemSize*/          0,
-// Mandatory information for VBE 3.0 and above
-   /*Bit16u LinBytesPerScanLine*/       800*2,
+/*Bit16u LinBytesPerScanLine*/ 1280,
    /*Bit8u  BnkNumberOfPages*/          0,
    /*Bit8u  LinNumberOfPages*/          0,
    /*Bit8u  LinRedMaskSize*/            5,
-   /*Bit8u  LinRedFieldPosition*/       11,
-   /*Bit8u  LinGreenMaskSize*/          6,
+/*Bit8u  LinRedFieldPosition*/ 10,
+/*Bit8u  LinGreenMaskSize*/ 5,
    /*Bit8u  LinGreenFieldPosition*/     5,
    /*Bit8u  LinBlueMaskSize*/           5,
    /*Bit8u  LinBlueFieldPosition*/      0,
-   /*Bit8u  LinRsvdMaskSize*/           0,
-   /*Bit8u  LinRsvdFieldPosition*/      0,
+/*Bit8u  LinRsvdMaskSize*/ 1,
+/*Bit8u  LinRsvdFieldPosition*/ 15,
    /*Bit32u MaxPixelClock*/             0,
-/*} ModeInfoBlock;*/
-                }
-        },
-
-        {
-                VBE_VESA_MODE_1024X768X565,
-                {
-/*typedef struct ModeInfoBlock
-{*/
-// Mandatory information for all VBE revisions
-   /*Bit16u ModeAttributes*/            VBE_MODE_ATTRIBUTE_SUPPORTED |
-                                        VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE |
-                                        VBE_MODE_ATTRIBUTE_COLOR_MODE |
-#ifdef VBE_HAVE_LFB
-                                        VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE |
-#endif
-                                        VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
-   /*Bit8u  WinAAttributes*/            VBE_WINDOW_ATTRIBUTE_RELOCATABLE |
-                                        VBE_WINDOW_ATTRIBUTE_READABLE |
-                                        VBE_WINDOW_ATTRIBUTE_WRITEABLE,
+} },
+{ 0x0111, /* 640x480x16 */
+{ /*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,
+/*Bit8u  WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | VBE_WINDOW_ATTRIBUTE_READABLE | VBE_WINDOW_ATTRIBUTE_WRITEABLE,
    /*Bit8u  WinBAttributes*/            0,
    /*Bit16u WinGranularity*/            VBE_DISPI_BANK_SIZE_KB,
    /*Bit16u WinSize*/                   VBE_DISPI_BANK_SIZE_KB,
    /*Bit16u WinASegment*/               VGAMEM_GRAPH,
-   /*Bit16u WinBSegment*/               0,
+/*Bit16u WinBSegment*/ 0x0000,
    /*Bit32u WinFuncPtr*/                0,
-   /*Bit16u BytesPerScanLine*/          1024*2,
-// Mandatory information for VBE 1.2 and above
-   /*Bit16u XResolution*/               1024,
-   /*Bit16u YResolution*/               768,
+/*Bit16u BytesPerScanLine*/ 1280,
+/*Bit16u XResolution*/ 640,
+/*Bit16u YResolution*/ 480,
    /*Bit8u  XCharSize*/                 8,
    /*Bit8u  YCharSize*/                 16,
    /*Bit8u  NumberOfPlanes*/            1,
    /*Bit8u  BitsPerPixel*/              16,
-   /*Bit8u  NumberOfBanks*/             1,
+/*Bit8u  NumberOfBanks*/ 10,
    /*Bit8u  MemoryModel*/               VBE_MEMORYMODEL_DIRECT_COLOR,
    /*Bit8u  BankSize*/                  0,
-   /*Bit8u  NumberOfImagePages*/        1,
+/*Bit8u  NumberOfImagePages*/ 0,
    /*Bit8u  Reserved_page*/             0,
-// Direct Color fields (required for direct/6 and YUV/7 memory models)
    /*Bit8u  RedMaskSize*/               5,
    /*Bit8u  RedFieldPosition*/          11,
    /*Bit8u  GreenMaskSize*/             6,
@@ -756,16 +506,10 @@
    /*Bit8u  RsvdMaskSize*/              0,
    /*Bit8u  RsvdFieldPosition*/         0,
    /*Bit8u  DirectColorModeInfo*/       0,
-// Mandatory information for VBE 2.0 and above
-#ifdef VBE_HAVE_LFB
    /*Bit32u PhysBasePtr*/               VBE_DISPI_LFB_PHYSICAL_ADDRESS,
-#else
-   /*Bit32u PhysBasePtr*/               0,
-#endif
    /*Bit32u OffScreenMemOffset*/        0,
    /*Bit16u OffScreenMemSize*/          0,
-// Mandatory information for VBE 3.0 and above
-   /*Bit16u LinBytesPerScanLine*/       1024*2,
+/*Bit16u LinBytesPerScanLine*/ 1280,
    /*Bit8u  BnkNumberOfPages*/          0,
    /*Bit8u  LinNumberOfPages*/          0,
    /*Bit8u  LinRedMaskSize*/            5,
@@ -777,46 +521,28 @@
    /*Bit8u  LinRsvdMaskSize*/           0,
    /*Bit8u  LinRsvdFieldPosition*/      0,
    /*Bit32u MaxPixelClock*/             0,
-/*} ModeInfoBlock;*/
-                }
-        },
-
-        {
-                VBE_VESA_MODE_640X480X888,
-                {
-/*typedef struct ModeInfoBlock
-{*/
-// Mandatory information for all VBE revisions
-   /*Bit16u ModeAttributes*/            VBE_MODE_ATTRIBUTE_SUPPORTED |
-                                        VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE |
-                                        VBE_MODE_ATTRIBUTE_COLOR_MODE |
-#ifdef VBE_HAVE_LFB
For faster browsing, not all history is shown. View entire blame