提交 9d0869b6 编写于 作者: B bellard

fixed VBE protected mode calls - added VGA and VBE save restore support (not...

fixed VBE protected mode calls - added VGA and VBE save restore support (not fully tested) - automatic generation of VBE mode table


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1959 c046a42c-6fe2-441c-8c8c-71466251a162
上级 8fa00e0f
Index: Makefile
===================================================================
RCS file: /sources/vgabios/vgabios/Makefile,v
retrieving revision 1.17
diff -u -w -r1.17 Makefile
--- Makefile 6 Mar 2005 13:06:47 -0000 1.17
+++ Makefile 14 Jun 2006 00:51:06 -0000
@@ -22,7 +22,7 @@
cirrus-bios: vgabios-cirrus.bin vgabios-cirrus.debug.bin
clean:
- /bin/rm -f biossums *.o *.s *.ld86 \
+ /bin/rm -f biossums vbetables-gen vbetables.h *.o *.s *.ld86 \
temp.awk.* vgabios*.orig _vgabios_* _vgabios-debug_* core vgabios*.bin vgabios*.txt $(RELEASE).bin *.bak
dist-clean: clean
@@ -79,3 +79,9 @@
biossums: biossums.c
$(CC) -o biossums biossums.c
+
+vbetables-gen: vbetables-gen.c
+ $(CC) -o vbetables-gen vbetables-gen.c
+
+vbetables.h: vbetables-gen
+ ./vbetables-gen > $@
Index: clext.c
===================================================================
RCS file: /sources/vgabios/vgabios/clext.c,v
retrieving revision 1.10
diff -u -w -r1.10 clext.c
--- clext.c 25 Mar 2006 10:19:15 -0000 1.10
+++ clext.c 13 Jun 2006 16:47:23 -0000
+++ clext.c 14 Jun 2006 00:51:06 -0000
@@ -544,6 +544,13 @@
cirrus_set_video_mode_extended:
call cirrus_switch_mode
......@@ -72,14 +98,289 @@ diff -u -w -r1.10 clext.c
cirrus_extbios_handlers:
;; 80h
dw cirrus_extbios_80h
Index: vbe.c
===================================================================
RCS file: /sources/vgabios/vgabios/vbe.c,v
retrieving revision 1.48
diff -u -w -r1.48 vbe.c
--- vbe.c 26 Dec 2005 19:50:26 -0000 1.48
+++ vbe.c 14 Jun 2006 00:51:07 -0000
@@ -118,21 +118,114 @@
.word VBE_VESA_MODE_END_OF_LIST
#endif
+ .align 2
vesa_pm_start:
dw vesa_pm_set_window - vesa_pm_start
- dw vesa_pm_set_display_strt - vesa_pm_start
+ dw vesa_pm_set_display_start - vesa_pm_start
dw vesa_pm_unimplemented - vesa_pm_start
- dw 0
+ dw vesa_pm_io_ports_table - vesa_pm_start
+vesa_pm_io_ports_table:
+ dw VBE_DISPI_IOPORT_INDEX
+ dw VBE_DISPI_IOPORT_INDEX + 1
+ dw VBE_DISPI_IOPORT_DATA
+ dw VBE_DISPI_IOPORT_DATA + 1
+ dw 0xffff
+ dw 0xffff
USE32
vesa_pm_set_window:
- mov ax, #0x4f05
- int #0x10
+ cmp bx, #0x00
+ je vesa_pm_set_display_window1
+ mov ax, #0x0100
+ ret
+vesa_pm_set_display_window1:
+ mov ax, dx
+ push dx
+ push ax
+ mov dx, # VBE_DISPI_IOPORT_INDEX
+ mov ax, # VBE_DISPI_INDEX_BANK
+ out dx, ax
+ pop ax
+ mov dx, # VBE_DISPI_IOPORT_DATA
+ out dx, ax
+ pop dx
+ mov ax, #0x004f
ret
vesa_pm_set_display_start:
- mov ax, #0x4f07
- int #0x10
+ cmp bl, #0x80
+ je vesa_pm_set_display_start1
+ cmp bl, #0x00
+ je vesa_pm_set_display_start1
+ mov ax, #0x0100
+ ret
+vesa_pm_set_display_start1:
+; convert offset to (X, Y) coordinate
+; (would be simpler to change Bochs VBE API...)
+ push eax
+ push ecx
+ push edx
+ push esi
+ push edi
+ shl edx, #16
+ and ecx, #0xffff
+ or ecx, edx
+ shl ecx, #2
+ mov eax, ecx
+
+ push eax
+ mov dx, # VBE_DISPI_IOPORT_INDEX
+ mov ax, # VBE_DISPI_INDEX_VIRT_WIDTH
+ out dx, ax
+ mov dx, # VBE_DISPI_IOPORT_DATA
+ in ax, dx
+ movzx ecx, ax
+
+ mov dx, # VBE_DISPI_IOPORT_INDEX
+ mov ax, # VBE_DISPI_INDEX_BPP
+ out dx, ax
+ mov dx, # VBE_DISPI_IOPORT_DATA
+ in ax, dx
+ movzx esi, ax
+ pop eax
+
+ add esi, #7
+ shr esi, #3
+ imul ecx, esi
+ xor edx, edx
+ div ecx
+ mov edi, eax
+ mov eax, edx
+ xor edx, edx
+ div esi
+
+ push dx
+ push ax
+ mov dx, # VBE_DISPI_IOPORT_INDEX
+ mov ax, # VBE_DISPI_INDEX_X_OFFSET
+ out dx, ax
+ pop ax
+ mov dx, # VBE_DISPI_IOPORT_DATA
+ out dx, ax
+ pop dx
+
+ mov ax, di
+ push dx
+ push ax
+ mov dx, # VBE_DISPI_IOPORT_INDEX
+ mov ax, # VBE_DISPI_INDEX_Y_OFFSET
+ out dx, ax
+ pop ax
+ mov dx, # VBE_DISPI_IOPORT_DATA
+ out dx, ax
+ pop dx
+
+ pop edi
+ pop esi
+ pop edx
+ pop ecx
+ pop eax
+ mov ax, #0x004f
ret
vesa_pm_unimplemented:
@@ -835,6 +928,64 @@
ASM_END
+Bit16u vbe_biosfn_read_video_state_size()
+{
+ return 9 * 2;
+}
+
+void vbe_biosfn_save_video_state(ES, BX)
+ Bit16u ES; Bit16u BX;
+{
+ Bit16u enable, i;
+
+ outw(VBE_DISPI_IOPORT_INDEX,VBE_DISPI_INDEX_ENABLE);
+ enable = inw(VBE_DISPI_IOPORT_DATA);
+ write_word(ES, BX, enable);
+ BX += 2;
+ if (!(enable & VBE_DISPI_ENABLED))
+ return;
+ for(i = VBE_DISPI_INDEX_XRES; i <= VBE_DISPI_INDEX_Y_OFFSET; i++) {
+ if (i != VBE_DISPI_INDEX_ENABLE) {
+ outw(VBE_DISPI_IOPORT_INDEX, i);
+ write_word(ES, BX, inw(VBE_DISPI_IOPORT_DATA));
+ BX += 2;
+ }
+ }
+}
+
+
+void vbe_biosfn_restore_video_state(ES, BX)
+ Bit16u ES; Bit16u BX;
+{
+ Bit16u enable, i;
+
+ enable = read_word(ES, BX);
+ BX += 2;
+
+ if (!(enable & VBE_DISPI_ENABLED)) {
+ outw(VBE_DISPI_IOPORT_INDEX,VBE_DISPI_INDEX_ENABLE);
+ outw(VBE_DISPI_IOPORT_DATA, enable);
+ } else {
+ outw(VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_XRES);
+ outw(VBE_DISPI_IOPORT_DATA, read_word(ES, BX));
+ BX += 2;
+ outw(VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_YRES);
+ outw(VBE_DISPI_IOPORT_DATA, read_word(ES, BX));
+ BX += 2;
+ outw(VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_BPP);
+ outw(VBE_DISPI_IOPORT_DATA, read_word(ES, BX));
+ BX += 2;
+ outw(VBE_DISPI_IOPORT_INDEX,VBE_DISPI_INDEX_ENABLE);
+ outw(VBE_DISPI_IOPORT_DATA, enable);
+
+ for(i = VBE_DISPI_INDEX_BANK; i <= VBE_DISPI_INDEX_Y_OFFSET; i++) {
+ outw(VBE_DISPI_IOPORT_INDEX, i);
+ outw(VBE_DISPI_IOPORT_DATA, read_word(ES, BX));
+ BX += 2;
+ }
+ }
+}
+
/** Function 04h - Save/Restore State
*
* Input:
@@ -849,10 +1000,48 @@
* BX = Number of 64-byte blocks to hold the state buffer (if DL=00h)
*
*/
-void vbe_biosfn_save_restore_state(AX, DL, CX, ES, BX)
+void vbe_biosfn_save_restore_state(AX, CX, DX, ES, BX)
+Bit16u *AX; Bit16u CX; Bit16u DX; Bit16u ES; Bit16u *BX;
{
-}
+ Bit16u ss=get_SS();
+ Bit16u result, val;
+ result = 0x4f;
+ switch(GET_DL()) {
+ case 0x00:
+ val = biosfn_read_video_state_size2(CX);
+#ifdef DEBUG
+ printf("VGA state size=%x\n", val);
+#endif
+ if (CX & 8)
+ val += vbe_biosfn_read_video_state_size();
+ write_word(ss, BX, val);
+ break;
+ case 0x01:
+ val = read_word(ss, BX);
+ val = biosfn_save_video_state(CX, ES, val);
+#ifdef DEBUG
+ printf("VGA save_state offset=%x\n", val);
+#endif
+ if (CX & 8)
+ vbe_biosfn_save_video_state(ES, val);
+ break;
+ case 0x02:
+ val = read_word(ss, BX);
+ val = biosfn_restore_video_state(CX, ES, val);
+#ifdef DEBUG
+ printf("VGA restore_state offset=%x\n", val);
+#endif
+ if (CX & 8)
+ vbe_biosfn_restore_video_state(ES, val);
+ break;
+ default:
+ // function failed
+ result = 0x100;
+ break;
+ }
+ write_word(ss, AX, result);
+}
/** Function 05h - Display Window Control
*
@@ -1090,7 +1279,7 @@
*/
ASM_START
vbe_biosfn_return_protected_mode_interface:
- test bx, bx
+ test bl, bl
jnz _fail
mov di, #0xc000
mov es, di
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 @@
+++ vbe.h 14 Jun 2006 00:51:07 -0000
@@ -14,7 +14,7 @@
void vbe_biosfn_return_controller_information(AX, ES, DI);
void vbe_biosfn_return_mode_information(AX, CX, ES, DI);
void vbe_biosfn_set_mode(AX, BX, ES, DI);
-void vbe_biosfn_save_restore_state(AX, DL, CX, ES, BX);
+void vbe_biosfn_save_restore_state(AX, CX, DX, ES, BX);
void vbe_biosfn_set_get_palette_data(AX);
void vbe_biosfn_return_protected_mode_interface(AX);
@@ -151,6 +151,12 @@
Bit8u Reserved[189];
} ModeInfoBlock;
+typedef struct ModeInfoListItem
+{
+ Bit16u mode;
+ ModeInfoBlockCompact info;
+} ModeInfoListItem;
+
// VBE Return Status Info
// AL
#define VBE_RETURN_STATUS_SUPPORTED 0x4F
@@ -193,6 +199,10 @@
#define VBE_VESA_MODE_1280X1024X1555 0x119
#define VBE_VESA_MODE_1280X1024X565 0x11A
#define VBE_VESA_MODE_1280X1024X888 0x11B
......@@ -90,7 +391,7 @@ diff -u -w -r1.24 vbe.h
// BOCHS/PLEX86 'own' mode numbers
#define VBE_OWN_MODE_320X200X8888 0x140
@@ -202,6 +206,12 @@
@@ -202,6 +212,12 @@
#define VBE_OWN_MODE_1024X768X8888 0x144
#define VBE_OWN_MODE_1280X1024X8888 0x145
#define VBE_OWN_MODE_320X200X8 0x146
......@@ -103,7 +404,7 @@ diff -u -w -r1.24 vbe.h
#define VBE_VESA_MODE_END_OF_LIST 0xFFFF
@@ -259,7 +269,7 @@
@@ -259,7 +275,7 @@
// like 0xE0000000
......@@ -112,2367 +413,484 @@ diff -u -w -r1.24 vbe.h
#define VBE_DISPI_BANK_ADDRESS 0xA0000
#define VBE_DISPI_BANK_SIZE_KB 64
Index: vbetables.h
Index: vgabios.c
===================================================================
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;
RCS file: /sources/vgabios/vgabios/vgabios.c,v
retrieving revision 1.64
diff -u -w -r1.64 vgabios.c
--- vgabios.c 25 Mar 2006 10:19:16 -0000 1.64
+++ vgabios.c 14 Jun 2006 00:51:07 -0000
@@ -109,8 +109,8 @@
static void biosfn_write_string();
static void biosfn_read_state_info();
static void biosfn_read_video_state_size();
-static void biosfn_save_video_state();
-static void biosfn_restore_video_state();
+static Bit16u biosfn_save_video_state();
+static Bit16u biosfn_restore_video_state();
extern Bit8u video_save_pointer_table[];
// This is for compiling with gcc2 and gcc3
@@ -748,12 +748,7 @@
vbe_biosfn_set_mode(&AX,BX,ES,DI);
break;
case 0x04:
- //FIXME
-#ifdef DEBUG
- unimplemented();
-#endif
- // function failed
- AX=0x100;
+ vbe_biosfn_save_restore_state(&AX, CX, DX, ES, &BX);
break;
case 0x09:
//FIXME
@@ -3138,23 +3133,215 @@
}
-// FIXME: check all member variables to be correct for the different modi
-// FIXME: add more modi
static ModeInfoListItem mode_info_list[]=
// --------------------------------------------------------------------------------------------
-static void biosfn_read_video_state_size (CX,ES,BX) Bit16u CX;Bit16u ES;Bit16u BX;
+// --------------------------------------------------------------------------------------------
+static Bit16u biosfn_read_video_state_size2 (CX)
+ Bit16u CX;
{
- {
- 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
- 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,
+} },
+{ 0x0112, /* 640x480x24 */
+{ /*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*3,
-// Mandatory information for VBE 1.2 and above
+/*Bit16u BytesPerScanLine*/ 1920,
/*Bit16u XResolution*/ 640,
/*Bit16u YResolution*/ 480,
/*Bit8u XCharSize*/ 8,
/*Bit8u YCharSize*/ 16,
/*Bit8u NumberOfPlanes*/ 1,
/*Bit8u BitsPerPixel*/ 24,
- /*Bit8u NumberOfBanks*/ 1,
+/*Bit8u NumberOfBanks*/ 15,
/*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*/ 8,
/*Bit8u RedFieldPosition*/ 16,
/*Bit8u GreenMaskSize*/ 8,
@@ -826,16 +552,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*/ 640*3,
+/*Bit16u LinBytesPerScanLine*/ 1920,
/*Bit8u BnkNumberOfPages*/ 0,
/*Bit8u LinNumberOfPages*/ 0,
/*Bit8u LinRedMaskSize*/ 8,
@@ -847,186 +567,764 @@
/*Bit8u LinRsvdMaskSize*/ 0,
/*Bit8u LinRsvdFieldPosition*/ 0,
/*Bit32u MaxPixelClock*/ 0,
-/*} ModeInfoBlock;*/
- }
- },
-
- {
- VBE_VESA_MODE_800X600X888,
- {
-/*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,
+} },
+{ 0x0113, /* 800x600x15 */
+{ /*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*3,
-// Mandatory information for VBE 1.2 and above
+/*Bit16u BytesPerScanLine*/ 1600,
/*Bit16u XResolution*/ 800,
/*Bit16u YResolution*/ 600,
/*Bit8u XCharSize*/ 8,
/*Bit8u YCharSize*/ 16,
/*Bit8u NumberOfPlanes*/ 1,
- /*Bit8u BitsPerPixel*/ 24,
- /*Bit8u NumberOfBanks*/ 1,
+/*Bit8u BitsPerPixel*/ 15,
+/*Bit8u NumberOfBanks*/ 15,
/*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*/ 8,
- /*Bit8u RedFieldPosition*/ 16,
- /*Bit8u GreenMaskSize*/ 8,
- /*Bit8u GreenFieldPosition*/ 8,
- /*Bit8u BlueMaskSize*/ 8,
+/*Bit8u RedMaskSize*/ 5,
+/*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*3,
+/*Bit16u LinBytesPerScanLine*/ 1600,
/*Bit8u BnkNumberOfPages*/ 0,
/*Bit8u LinNumberOfPages*/ 0,
- /*Bit8u LinRedMaskSize*/ 8,
- /*Bit8u LinRedFieldPosition*/ 16,
- /*Bit8u LinGreenMaskSize*/ 8,
- /*Bit8u LinGreenFieldPosition*/ 8,
- /*Bit8u LinBlueMaskSize*/ 8,
+/*Bit8u LinRedMaskSize*/ 5,
+/*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_1024X768X888,
- {
-/*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,
+} },
+{ 0x0114, /* 800x600x16 */
+{ /*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*3,
-// Mandatory information for VBE 1.2 and above
- /*Bit16u XResolution*/ 1024,
- /*Bit16u YResolution*/ 768,
+/*Bit16u BytesPerScanLine*/ 1600,
+/*Bit16u XResolution*/ 800,
+/*Bit16u YResolution*/ 600,
/*Bit8u XCharSize*/ 8,
/*Bit8u YCharSize*/ 16,
/*Bit8u NumberOfPlanes*/ 1,
- /*Bit8u BitsPerPixel*/ 24,
- /*Bit8u NumberOfBanks*/ 1,
+/*Bit8u BitsPerPixel*/ 16,
+/*Bit8u NumberOfBanks*/ 15,
/*Bit8u MemoryModel*/ VBE_MEMORYMODEL_DIRECT_COLOR,
/*Bit8u BankSize*/ 0,
/*Bit8u NumberOfImagePages*/ 0,
/*Bit8u Reserved_page*/ 0,
-// Direct Color fields (required for direct/6 and YUV/7 memory models)
- /*Bit8u RedMaskSize*/ 8,
- /*Bit8u RedFieldPosition*/ 16,
- /*Bit8u GreenMaskSize*/ 8,
- /*Bit8u GreenFieldPosition*/ 8,
- /*Bit8u BlueMaskSize*/ 8,
+/*Bit8u RedMaskSize*/ 5,
+/*Bit8u RedFieldPosition*/ 11,
+/*Bit8u GreenMaskSize*/ 6,
+/*Bit8u GreenFieldPosition*/ 5,
+/*Bit8u BlueMaskSize*/ 5,
/*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*/ 1024*3,
+/*Bit16u LinBytesPerScanLine*/ 1600,
/*Bit8u BnkNumberOfPages*/ 0,
/*Bit8u LinNumberOfPages*/ 0,
- /*Bit8u LinRedMaskSize*/ 8,
- /*Bit8u LinRedFieldPosition*/ 16,
- /*Bit8u LinGreenMaskSize*/ 8,
- /*Bit8u LinGreenFieldPosition*/ 8,
+/*Bit8u LinRedMaskSize*/ 5,
+/*Bit8u LinRedFieldPosition*/ 11,
+/*Bit8u LinGreenMaskSize*/ 6,
+/*Bit8u LinGreenFieldPosition*/ 5,
+/*Bit8u LinBlueMaskSize*/ 5,
+/*Bit8u LinBlueFieldPosition*/ 0,
+/*Bit8u LinRsvdMaskSize*/ 0,
+/*Bit8u LinRsvdFieldPosition*/ 0,
+/*Bit32u MaxPixelClock*/ 0,
+} },
+{ 0x0115, /* 800x600x24 */
+{ /*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*/ 0x0000,
+/*Bit32u WinFuncPtr*/ 0,
+/*Bit16u BytesPerScanLine*/ 2400,
+/*Bit16u XResolution*/ 800,
+/*Bit16u YResolution*/ 600,
+/*Bit8u XCharSize*/ 8,
+/*Bit8u YCharSize*/ 16,
+/*Bit8u NumberOfPlanes*/ 1,
+/*Bit8u BitsPerPixel*/ 24,
+/*Bit8u NumberOfBanks*/ 22,
+/*Bit8u MemoryModel*/ VBE_MEMORYMODEL_DIRECT_COLOR,
+/*Bit8u BankSize*/ 0,
+/*Bit8u NumberOfImagePages*/ 0,
+/*Bit8u Reserved_page*/ 0,
+/*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,
+/*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS,
+/*Bit32u OffScreenMemOffset*/ 0,
+/*Bit16u OffScreenMemSize*/ 0,
+/*Bit16u LinBytesPerScanLine*/ 2400,
+/*Bit8u BnkNumberOfPages*/ 0,
+/*Bit8u LinNumberOfPages*/ 0,
+/*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,
+} },
+{ 0x0116, /* 1024x768x15 */
+{ /*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*/ 0x0000,
+/*Bit32u WinFuncPtr*/ 0,
+/*Bit16u BytesPerScanLine*/ 2048,
+/*Bit16u XResolution*/ 1024,
+/*Bit16u YResolution*/ 768,
+/*Bit8u XCharSize*/ 8,
+/*Bit8u YCharSize*/ 16,
+/*Bit8u NumberOfPlanes*/ 1,
+/*Bit8u BitsPerPixel*/ 15,
+/*Bit8u NumberOfBanks*/ 24,
+/*Bit8u MemoryModel*/ VBE_MEMORYMODEL_DIRECT_COLOR,
+/*Bit8u BankSize*/ 0,
+/*Bit8u NumberOfImagePages*/ 0,
+/*Bit8u Reserved_page*/ 0,
+/*Bit8u RedMaskSize*/ 5,
+/*Bit8u RedFieldPosition*/ 10,
+/*Bit8u GreenMaskSize*/ 5,
+/*Bit8u GreenFieldPosition*/ 5,
+/*Bit8u BlueMaskSize*/ 5,
+/*Bit8u BlueFieldPosition*/ 0,
+/*Bit8u RsvdMaskSize*/ 1,
+/*Bit8u RsvdFieldPosition*/ 15,
+/*Bit8u DirectColorModeInfo*/ 0,
+/*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS,
+/*Bit32u OffScreenMemOffset*/ 0,
+/*Bit16u OffScreenMemSize*/ 0,
+/*Bit16u LinBytesPerScanLine*/ 2048,
+/*Bit8u BnkNumberOfPages*/ 0,
+/*Bit8u LinNumberOfPages*/ 0,
+/*Bit8u LinRedMaskSize*/ 5,
+/*Bit8u LinRedFieldPosition*/ 10,
+/*Bit8u LinGreenMaskSize*/ 5,
+/*Bit8u LinGreenFieldPosition*/ 5,
+/*Bit8u LinBlueMaskSize*/ 5,
+/*Bit8u LinBlueFieldPosition*/ 0,
+/*Bit8u LinRsvdMaskSize*/ 1,
+/*Bit8u LinRsvdFieldPosition*/ 15,
+/*Bit32u MaxPixelClock*/ 0,
+} },
+{ 0x0117, /* 1024x768x16 */
+{ /*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*/ 0x0000,
+/*Bit32u WinFuncPtr*/ 0,
+/*Bit16u BytesPerScanLine*/ 2048,
+/*Bit16u XResolution*/ 1024,
+/*Bit16u YResolution*/ 768,
+/*Bit8u XCharSize*/ 8,
+/*Bit8u YCharSize*/ 16,
+/*Bit8u NumberOfPlanes*/ 1,
+/*Bit8u BitsPerPixel*/ 16,
+/*Bit8u NumberOfBanks*/ 24,
+/*Bit8u MemoryModel*/ VBE_MEMORYMODEL_DIRECT_COLOR,
+/*Bit8u BankSize*/ 0,
+/*Bit8u NumberOfImagePages*/ 0,
+/*Bit8u Reserved_page*/ 0,
+/*Bit8u RedMaskSize*/ 5,
+/*Bit8u RedFieldPosition*/ 11,
+/*Bit8u GreenMaskSize*/ 6,
+/*Bit8u GreenFieldPosition*/ 5,
+/*Bit8u BlueMaskSize*/ 5,
+/*Bit8u BlueFieldPosition*/ 0,
+/*Bit8u RsvdMaskSize*/ 0,
+/*Bit8u RsvdFieldPosition*/ 0,
+/*Bit8u DirectColorModeInfo*/ 0,
+/*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS,
+/*Bit32u OffScreenMemOffset*/ 0,
+/*Bit16u OffScreenMemSize*/ 0,
+/*Bit16u LinBytesPerScanLine*/ 2048,
+/*Bit8u BnkNumberOfPages*/ 0,
+/*Bit8u LinNumberOfPages*/ 0,
+/*Bit8u LinRedMaskSize*/ 5,
+/*Bit8u LinRedFieldPosition*/ 11,
+/*Bit8u LinGreenMaskSize*/ 6,
+/*Bit8u LinGreenFieldPosition*/ 5,
+/*Bit8u LinBlueMaskSize*/ 5,
+/*Bit8u LinBlueFieldPosition*/ 0,
+/*Bit8u LinRsvdMaskSize*/ 0,
+/*Bit8u LinRsvdFieldPosition*/ 0,
+/*Bit32u MaxPixelClock*/ 0,
+} },
+{ 0x0118, /* 1024x768x24 */
+{ /*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*/ 0x0000,
+/*Bit32u WinFuncPtr*/ 0,
+/*Bit16u BytesPerScanLine*/ 3072,
+/*Bit16u XResolution*/ 1024,
+/*Bit16u YResolution*/ 768,
+/*Bit8u XCharSize*/ 8,
+/*Bit8u YCharSize*/ 16,
+/*Bit8u NumberOfPlanes*/ 1,
+/*Bit8u BitsPerPixel*/ 24,
+/*Bit8u NumberOfBanks*/ 36,
+/*Bit8u MemoryModel*/ VBE_MEMORYMODEL_DIRECT_COLOR,
+/*Bit8u BankSize*/ 0,
+/*Bit8u NumberOfImagePages*/ 0,
+/*Bit8u Reserved_page*/ 0,
+/*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,
+/*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS,
+/*Bit32u OffScreenMemOffset*/ 0,
+/*Bit16u OffScreenMemSize*/ 0,
+/*Bit16u LinBytesPerScanLine*/ 3072,
+/*Bit8u BnkNumberOfPages*/ 0,
+/*Bit8u LinNumberOfPages*/ 0,
+/*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,
+} },
+{ 0x0119, /* 1280x1024x15 */
+{ /*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*/ 0x0000,
+/*Bit32u WinFuncPtr*/ 0,
+/*Bit16u BytesPerScanLine*/ 2560,
+/*Bit16u XResolution*/ 1280,
+/*Bit16u YResolution*/ 1024,
+/*Bit8u XCharSize*/ 8,
+/*Bit8u YCharSize*/ 16,
+/*Bit8u NumberOfPlanes*/ 1,
+/*Bit8u BitsPerPixel*/ 15,
+/*Bit8u NumberOfBanks*/ 40,
+/*Bit8u MemoryModel*/ VBE_MEMORYMODEL_DIRECT_COLOR,
+/*Bit8u BankSize*/ 0,
+/*Bit8u NumberOfImagePages*/ 0,
+/*Bit8u Reserved_page*/ 0,
+/*Bit8u RedMaskSize*/ 5,
+/*Bit8u RedFieldPosition*/ 10,
+/*Bit8u GreenMaskSize*/ 5,
+/*Bit8u GreenFieldPosition*/ 5,
+/*Bit8u BlueMaskSize*/ 5,
+/*Bit8u BlueFieldPosition*/ 0,
+/*Bit8u RsvdMaskSize*/ 1,
+/*Bit8u RsvdFieldPosition*/ 15,
+/*Bit8u DirectColorModeInfo*/ 0,
+/*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS,
+/*Bit32u OffScreenMemOffset*/ 0,
+/*Bit16u OffScreenMemSize*/ 0,
+/*Bit16u LinBytesPerScanLine*/ 2560,
+/*Bit8u BnkNumberOfPages*/ 0,
+/*Bit8u LinNumberOfPages*/ 0,
+/*Bit8u LinRedMaskSize*/ 5,
+/*Bit8u LinRedFieldPosition*/ 10,
+/*Bit8u LinGreenMaskSize*/ 5,
+/*Bit8u LinGreenFieldPosition*/ 5,
+/*Bit8u LinBlueMaskSize*/ 5,
+/*Bit8u LinBlueFieldPosition*/ 0,
+/*Bit8u LinRsvdMaskSize*/ 1,
+/*Bit8u LinRsvdFieldPosition*/ 15,
+/*Bit32u MaxPixelClock*/ 0,
+} },
+{ 0x011a, /* 1280x1024x16 */
+{ /*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*/ 0x0000,
+/*Bit32u WinFuncPtr*/ 0,
+/*Bit16u BytesPerScanLine*/ 2560,
+/*Bit16u XResolution*/ 1280,
+/*Bit16u YResolution*/ 1024,
+/*Bit8u XCharSize*/ 8,
+/*Bit8u YCharSize*/ 16,
+/*Bit8u NumberOfPlanes*/ 1,
+/*Bit8u BitsPerPixel*/ 16,
+/*Bit8u NumberOfBanks*/ 40,
+/*Bit8u MemoryModel*/ VBE_MEMORYMODEL_DIRECT_COLOR,
+/*Bit8u BankSize*/ 0,
+/*Bit8u NumberOfImagePages*/ 0,
+/*Bit8u Reserved_page*/ 0,
+/*Bit8u RedMaskSize*/ 5,
+/*Bit8u RedFieldPosition*/ 11,
+/*Bit8u GreenMaskSize*/ 6,
+/*Bit8u GreenFieldPosition*/ 5,
+/*Bit8u BlueMaskSize*/ 5,
+/*Bit8u BlueFieldPosition*/ 0,
+/*Bit8u RsvdMaskSize*/ 0,
+/*Bit8u RsvdFieldPosition*/ 0,
+/*Bit8u DirectColorModeInfo*/ 0,
+/*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS,
+/*Bit32u OffScreenMemOffset*/ 0,
+/*Bit16u OffScreenMemSize*/ 0,
+/*Bit16u LinBytesPerScanLine*/ 2560,
+/*Bit8u BnkNumberOfPages*/ 0,
+/*Bit8u LinNumberOfPages*/ 0,
+/*Bit8u LinRedMaskSize*/ 5,
+/*Bit8u LinRedFieldPosition*/ 11,
+/*Bit8u LinGreenMaskSize*/ 6,
+/*Bit8u LinGreenFieldPosition*/ 5,
+/*Bit8u LinBlueMaskSize*/ 5,
+/*Bit8u LinBlueFieldPosition*/ 0,
+/*Bit8u LinRsvdMaskSize*/ 0,
+/*Bit8u LinRsvdFieldPosition*/ 0,
+/*Bit32u MaxPixelClock*/ 0,
+} },
+{ 0x011b, /* 1280x1024x24 */
+{ /*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*/ 0x0000,
+/*Bit32u WinFuncPtr*/ 0,
+/*Bit16u BytesPerScanLine*/ 3840,
+/*Bit16u XResolution*/ 1280,
+/*Bit16u YResolution*/ 1024,
+/*Bit8u XCharSize*/ 8,
+/*Bit8u YCharSize*/ 16,
+/*Bit8u NumberOfPlanes*/ 1,
+/*Bit8u BitsPerPixel*/ 24,
+/*Bit8u NumberOfBanks*/ 60,
+/*Bit8u MemoryModel*/ VBE_MEMORYMODEL_DIRECT_COLOR,
+/*Bit8u BankSize*/ 0,
+/*Bit8u NumberOfImagePages*/ 0,
+/*Bit8u Reserved_page*/ 0,
+/*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,
+/*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS,
+/*Bit32u OffScreenMemOffset*/ 0,
+/*Bit16u OffScreenMemSize*/ 0,
+/*Bit16u LinBytesPerScanLine*/ 3840,
+/*Bit8u BnkNumberOfPages*/ 0,
+/*Bit8u LinNumberOfPages*/ 0,
+/*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,
+} },
+{ 0x011c, /* 1600x1200x8 */
+{ /*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*/ 0x0000,
+/*Bit32u WinFuncPtr*/ 0,
+/*Bit16u BytesPerScanLine*/ 1600,
+/*Bit16u XResolution*/ 1600,
+/*Bit16u YResolution*/ 1200,
+/*Bit8u XCharSize*/ 8,
+/*Bit8u YCharSize*/ 16,
+/*Bit8u NumberOfPlanes*/ 1,
+/*Bit8u BitsPerPixel*/ 8,
+/*Bit8u NumberOfBanks*/ 30,
+/*Bit8u MemoryModel*/ VBE_MEMORYMODEL_PACKED_PIXEL,
+/*Bit8u BankSize*/ 0,
+/*Bit8u NumberOfImagePages*/ 0,
+/*Bit8u Reserved_page*/ 0,
+/*Bit8u RedMaskSize*/ 0,
+/*Bit8u RedFieldPosition*/ 0,
+/*Bit8u GreenMaskSize*/ 0,
+/*Bit8u GreenFieldPosition*/ 0,
+/*Bit8u BlueMaskSize*/ 0,
+/*Bit8u BlueFieldPosition*/ 0,
+/*Bit8u RsvdMaskSize*/ 0,
+/*Bit8u RsvdFieldPosition*/ 0,
+/*Bit8u DirectColorModeInfo*/ 0,
+/*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS,
+/*Bit32u OffScreenMemOffset*/ 0,
+/*Bit16u OffScreenMemSize*/ 0,
+/*Bit16u LinBytesPerScanLine*/ 1600,
+/*Bit8u BnkNumberOfPages*/ 0,
+/*Bit8u LinNumberOfPages*/ 0,
+/*Bit8u LinRedMaskSize*/ 0,
+/*Bit8u LinRedFieldPosition*/ 0,
+/*Bit8u LinGreenMaskSize*/ 0,
+/*Bit8u LinGreenFieldPosition*/ 0,
+/*Bit8u LinBlueMaskSize*/ 0,
+/*Bit8u LinBlueFieldPosition*/ 0,
+/*Bit8u LinRsvdMaskSize*/ 0,
+/*Bit8u LinRsvdFieldPosition*/ 0,
+/*Bit32u MaxPixelClock*/ 0,
+} },
+{ 0x011d, /* 1600x1200x15 */
+{ /*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*/ 0x0000,
+/*Bit32u WinFuncPtr*/ 0,
+/*Bit16u BytesPerScanLine*/ 3200,
+/*Bit16u XResolution*/ 1600,
+/*Bit16u YResolution*/ 1200,
+/*Bit8u XCharSize*/ 8,
+/*Bit8u YCharSize*/ 16,
+/*Bit8u NumberOfPlanes*/ 1,
+/*Bit8u BitsPerPixel*/ 15,
+/*Bit8u NumberOfBanks*/ 59,
+/*Bit8u MemoryModel*/ VBE_MEMORYMODEL_DIRECT_COLOR,
+/*Bit8u BankSize*/ 0,
+/*Bit8u NumberOfImagePages*/ 0,
+/*Bit8u Reserved_page*/ 0,
+/*Bit8u RedMaskSize*/ 5,
+/*Bit8u RedFieldPosition*/ 10,
+/*Bit8u GreenMaskSize*/ 5,
+/*Bit8u GreenFieldPosition*/ 5,
+/*Bit8u BlueMaskSize*/ 5,
+/*Bit8u BlueFieldPosition*/ 0,
+/*Bit8u RsvdMaskSize*/ 1,
+/*Bit8u RsvdFieldPosition*/ 15,
+/*Bit8u DirectColorModeInfo*/ 0,
+/*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS,
+/*Bit32u OffScreenMemOffset*/ 0,
+/*Bit16u OffScreenMemSize*/ 0,
+/*Bit16u LinBytesPerScanLine*/ 3200,
+/*Bit8u BnkNumberOfPages*/ 0,
+/*Bit8u LinNumberOfPages*/ 0,
+/*Bit8u LinRedMaskSize*/ 5,
+/*Bit8u LinRedFieldPosition*/ 10,
+/*Bit8u LinGreenMaskSize*/ 5,
+/*Bit8u LinGreenFieldPosition*/ 5,
+/*Bit8u LinBlueMaskSize*/ 5,
+/*Bit8u LinBlueFieldPosition*/ 0,
+/*Bit8u LinRsvdMaskSize*/ 1,
+/*Bit8u LinRsvdFieldPosition*/ 15,
+/*Bit32u MaxPixelClock*/ 0,
+} },
+{ 0x011e, /* 1600x1200x16 */
+{ /*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*/ 0x0000,
+/*Bit32u WinFuncPtr*/ 0,
+/*Bit16u BytesPerScanLine*/ 3200,
+/*Bit16u XResolution*/ 1600,
+/*Bit16u YResolution*/ 1200,
+/*Bit8u XCharSize*/ 8,
+/*Bit8u YCharSize*/ 16,
+/*Bit8u NumberOfPlanes*/ 1,
+/*Bit8u BitsPerPixel*/ 16,
+/*Bit8u NumberOfBanks*/ 59,
+/*Bit8u MemoryModel*/ VBE_MEMORYMODEL_DIRECT_COLOR,
+/*Bit8u BankSize*/ 0,
+/*Bit8u NumberOfImagePages*/ 0,
+/*Bit8u Reserved_page*/ 0,
+/*Bit8u RedMaskSize*/ 5,
+/*Bit8u RedFieldPosition*/ 11,
+/*Bit8u GreenMaskSize*/ 6,
+/*Bit8u GreenFieldPosition*/ 5,
+/*Bit8u BlueMaskSize*/ 5,
+/*Bit8u BlueFieldPosition*/ 0,
+/*Bit8u RsvdMaskSize*/ 0,
+/*Bit8u RsvdFieldPosition*/ 0,
+/*Bit8u DirectColorModeInfo*/ 0,
+/*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS,
+/*Bit32u OffScreenMemOffset*/ 0,
+/*Bit16u OffScreenMemSize*/ 0,
+/*Bit16u LinBytesPerScanLine*/ 3200,
+/*Bit8u BnkNumberOfPages*/ 0,
+/*Bit8u LinNumberOfPages*/ 0,
+/*Bit8u LinRedMaskSize*/ 5,
+/*Bit8u LinRedFieldPosition*/ 11,
+/*Bit8u LinGreenMaskSize*/ 6,
+/*Bit8u LinGreenFieldPosition*/ 5,
+/*Bit8u LinBlueMaskSize*/ 5,
+/*Bit8u LinBlueFieldPosition*/ 0,
+/*Bit8u LinRsvdMaskSize*/ 0,
+/*Bit8u LinRsvdFieldPosition*/ 0,
+/*Bit32u MaxPixelClock*/ 0,
+} },
+{ 0x011f, /* 1600x1200x24 */
+{ /*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*/ 0x0000,
+/*Bit32u WinFuncPtr*/ 0,
+/*Bit16u BytesPerScanLine*/ 4800,
+/*Bit16u XResolution*/ 1600,
+/*Bit16u YResolution*/ 1200,
+/*Bit8u XCharSize*/ 8,
+/*Bit8u YCharSize*/ 16,
+/*Bit8u NumberOfPlanes*/ 1,
+/*Bit8u BitsPerPixel*/ 24,
+/*Bit8u NumberOfBanks*/ 88,
+/*Bit8u MemoryModel*/ VBE_MEMORYMODEL_DIRECT_COLOR,
+/*Bit8u BankSize*/ 0,
+/*Bit8u NumberOfImagePages*/ 0,
+/*Bit8u Reserved_page*/ 0,
+/*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,
+/*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS,
+/*Bit32u OffScreenMemOffset*/ 0,
+/*Bit16u OffScreenMemSize*/ 0,
+/*Bit16u LinBytesPerScanLine*/ 4800,
+/*Bit8u BnkNumberOfPages*/ 0,
+/*Bit8u LinNumberOfPages*/ 0,
+/*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_OWN_MODE_640X480X8888,
- {
-/*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,
+} },
+{ 0x0140, /* 320x200x32 */
+{ /*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*/ 0x0000,
+/*Bit32u WinFuncPtr*/ 0,
+/*Bit16u BytesPerScanLine*/ 1280,
+/*Bit16u XResolution*/ 320,
+/*Bit16u YResolution*/ 200,
+/*Bit8u XCharSize*/ 8,
+/*Bit8u YCharSize*/ 16,
+/*Bit8u NumberOfPlanes*/ 1,
+/*Bit8u BitsPerPixel*/ 32,
+/*Bit8u NumberOfBanks*/ 4,
+/*Bit8u MemoryModel*/ VBE_MEMORYMODEL_DIRECT_COLOR,
+/*Bit8u BankSize*/ 0,
+/*Bit8u NumberOfImagePages*/ 0,
+/*Bit8u Reserved_page*/ 0,
+/*Bit8u RedMaskSize*/ 8,
+/*Bit8u RedFieldPosition*/ 16,
+/*Bit8u GreenMaskSize*/ 8,
+/*Bit8u GreenFieldPosition*/ 8,
+/*Bit8u BlueMaskSize*/ 8,
+/*Bit8u BlueFieldPosition*/ 0,
+/*Bit8u RsvdMaskSize*/ 8,
+/*Bit8u RsvdFieldPosition*/ 24,
+/*Bit8u DirectColorModeInfo*/ 0,
+/*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS,
+/*Bit32u OffScreenMemOffset*/ 0,
+/*Bit16u OffScreenMemSize*/ 0,
+/*Bit16u LinBytesPerScanLine*/ 1280,
+/*Bit8u BnkNumberOfPages*/ 0,
+/*Bit8u LinNumberOfPages*/ 0,
+/*Bit8u LinRedMaskSize*/ 8,
+/*Bit8u LinRedFieldPosition*/ 16,
+/*Bit8u LinGreenMaskSize*/ 8,
+/*Bit8u LinGreenFieldPosition*/ 8,
+/*Bit8u LinBlueMaskSize*/ 8,
+/*Bit8u LinBlueFieldPosition*/ 0,
+/*Bit8u LinRsvdMaskSize*/ 8,
+/*Bit8u LinRsvdFieldPosition*/ 24,
+/*Bit32u MaxPixelClock*/ 0,
+} },
+{ 0x0141, /* 640x400x32 */
+{ /*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*/ 0x0000,
+/*Bit32u WinFuncPtr*/ 0,
+/*Bit16u BytesPerScanLine*/ 2560,
+/*Bit16u XResolution*/ 640,
+/*Bit16u YResolution*/ 400,
+/*Bit8u XCharSize*/ 8,
+/*Bit8u YCharSize*/ 16,
+/*Bit8u NumberOfPlanes*/ 1,
+/*Bit8u BitsPerPixel*/ 32,
+/*Bit8u NumberOfBanks*/ 16,
+/*Bit8u MemoryModel*/ VBE_MEMORYMODEL_DIRECT_COLOR,
+/*Bit8u BankSize*/ 0,
+/*Bit8u NumberOfImagePages*/ 0,
+/*Bit8u Reserved_page*/ 0,
+/*Bit8u RedMaskSize*/ 8,
+/*Bit8u RedFieldPosition*/ 16,
+/*Bit8u GreenMaskSize*/ 8,
+/*Bit8u GreenFieldPosition*/ 8,
+/*Bit8u BlueMaskSize*/ 8,
+/*Bit8u BlueFieldPosition*/ 0,
+/*Bit8u RsvdMaskSize*/ 8,
+/*Bit8u RsvdFieldPosition*/ 24,
+/*Bit8u DirectColorModeInfo*/ 0,
+/*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS,
+/*Bit32u OffScreenMemOffset*/ 0,
+/*Bit16u OffScreenMemSize*/ 0,
+/*Bit16u LinBytesPerScanLine*/ 2560,
+/*Bit8u BnkNumberOfPages*/ 0,
+/*Bit8u LinNumberOfPages*/ 0,
+/*Bit8u LinRedMaskSize*/ 8,
+/*Bit8u LinRedFieldPosition*/ 16,
+/*Bit8u LinGreenMaskSize*/ 8,
+/*Bit8u LinGreenFieldPosition*/ 8,
+/*Bit8u LinBlueMaskSize*/ 8,
+/*Bit8u LinBlueFieldPosition*/ 0,
+/*Bit8u LinRsvdMaskSize*/ 8,
+/*Bit8u LinRsvdFieldPosition*/ 24,
+/*Bit32u MaxPixelClock*/ 0,
+} },
+{ 0x0142, /* 640x480x32 */
+{ /*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*/ 0x0000,
+/*Bit32u WinFuncPtr*/ 0,
+/*Bit16u BytesPerScanLine*/ 2560,
+/*Bit16u XResolution*/ 640,
+/*Bit16u YResolution*/ 480,
+/*Bit8u XCharSize*/ 8,
+/*Bit8u YCharSize*/ 16,
+/*Bit8u NumberOfPlanes*/ 1,
+/*Bit8u BitsPerPixel*/ 32,
+/*Bit8u NumberOfBanks*/ 19,
+/*Bit8u MemoryModel*/ VBE_MEMORYMODEL_DIRECT_COLOR,
+/*Bit8u BankSize*/ 0,
+/*Bit8u NumberOfImagePages*/ 0,
+/*Bit8u Reserved_page*/ 0,
+/*Bit8u RedMaskSize*/ 8,
+/*Bit8u RedFieldPosition*/ 16,
+/*Bit8u GreenMaskSize*/ 8,
+/*Bit8u GreenFieldPosition*/ 8,
+/*Bit8u BlueMaskSize*/ 8,
+/*Bit8u BlueFieldPosition*/ 0,
+/*Bit8u RsvdMaskSize*/ 8,
+/*Bit8u RsvdFieldPosition*/ 24,
+/*Bit8u DirectColorModeInfo*/ 0,
+/*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS,
+/*Bit32u OffScreenMemOffset*/ 0,
+/*Bit16u OffScreenMemSize*/ 0,
+/*Bit16u LinBytesPerScanLine*/ 2560,
+/*Bit8u BnkNumberOfPages*/ 0,
+/*Bit8u LinNumberOfPages*/ 0,
+/*Bit8u LinRedMaskSize*/ 8,
+/*Bit8u LinRedFieldPosition*/ 16,
+/*Bit8u LinGreenMaskSize*/ 8,
+/*Bit8u LinGreenFieldPosition*/ 8,
+/*Bit8u LinBlueMaskSize*/ 8,
+/*Bit8u LinBlueFieldPosition*/ 0,
+/*Bit8u LinRsvdMaskSize*/ 8,
+/*Bit8u LinRsvdFieldPosition*/ 24,
+/*Bit32u MaxPixelClock*/ 0,
+} },
+{ 0x0143, /* 800x600x32 */
+{ /*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*4,
-// Mandatory information for VBE 1.2 and above
- /*Bit16u XResolution*/ 640,
- /*Bit16u YResolution*/ 480,
+/*Bit16u BytesPerScanLine*/ 3200,
+/*Bit16u XResolution*/ 800,
+/*Bit16u YResolution*/ 600,
/*Bit8u XCharSize*/ 8,
/*Bit8u YCharSize*/ 16,
/*Bit8u NumberOfPlanes*/ 1,
/*Bit8u BitsPerPixel*/ 32,
- /*Bit8u NumberOfBanks*/ 1,
+/*Bit8u NumberOfBanks*/ 30,
/*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*/ 8,
/*Bit8u RedFieldPosition*/ 16,
/*Bit8u GreenMaskSize*/ 8,
@@ -1035,17 +1333,11 @@
/*Bit8u BlueFieldPosition*/ 0,
/*Bit8u RsvdMaskSize*/ 8,
/*Bit8u RsvdFieldPosition*/ 24,
- /*Bit8u DirectColorModeInfo*/ VBE_DIRECTCOLOR_RESERVED_BITS_AVAILABLE,
-// Mandatory information for VBE 2.0 and above
-#ifdef VBE_HAVE_LFB
+/*Bit8u DirectColorModeInfo*/ 0,
/*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*4,
+/*Bit16u LinBytesPerScanLine*/ 3200,
/*Bit8u BnkNumberOfPages*/ 0,
/*Bit8u LinNumberOfPages*/ 0,
/*Bit8u LinRedMaskSize*/ 8,
@@ -1057,46 +1349,28 @@
/*Bit8u LinRsvdMaskSize*/ 8,
/*Bit8u LinRsvdFieldPosition*/ 24,
/*Bit32u MaxPixelClock*/ 0,
-/*} ModeInfoBlock;*/
- }
- },
-
- {
- VBE_OWN_MODE_800X600X8888,
- {
-/*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,
+} },
+{ 0x0144, /* 1024x768x32 */
+{ /*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*4,
-// Mandatory information for VBE 1.2 and above
- /*Bit16u XResolution*/ 800,
- /*Bit16u YResolution*/ 600,
+/*Bit16u BytesPerScanLine*/ 4096,
+/*Bit16u XResolution*/ 1024,
+/*Bit16u YResolution*/ 768,
/*Bit8u XCharSize*/ 8,
/*Bit8u YCharSize*/ 16,
/*Bit8u NumberOfPlanes*/ 1,
/*Bit8u BitsPerPixel*/ 32,
- /*Bit8u NumberOfBanks*/ 1,
+/*Bit8u NumberOfBanks*/ 48,
/*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*/ 8,
/*Bit8u RedFieldPosition*/ 16,
/*Bit8u GreenMaskSize*/ 8,
@@ -1105,17 +1379,11 @@
/*Bit8u BlueFieldPosition*/ 0,
/*Bit8u RsvdMaskSize*/ 8,
/*Bit8u RsvdFieldPosition*/ 24,
- /*Bit8u DirectColorModeInfo*/ VBE_DIRECTCOLOR_RESERVED_BITS_AVAILABLE,
-// Mandatory information for VBE 2.0 and above
-#ifdef VBE_HAVE_LFB
+/*Bit8u DirectColorModeInfo*/ 0,
/*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*4,
+/*Bit16u LinBytesPerScanLine*/ 4096,
/*Bit8u BnkNumberOfPages*/ 0,
/*Bit8u LinNumberOfPages*/ 0,
/*Bit8u LinRedMaskSize*/ 8,
@@ -1127,46 +1395,28 @@
/*Bit8u LinRsvdMaskSize*/ 8,
/*Bit8u LinRsvdFieldPosition*/ 24,
/*Bit32u MaxPixelClock*/ 0,
-/*} ModeInfoBlock;*/
- }
- },
-
- {
- VBE_OWN_MODE_1024X768X8888,
- {
-/*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,
+} },
+{ 0x0145, /* 1280x1024x32 */
+{ /*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*4,
-// Mandatory information for VBE 1.2 and above
- /*Bit16u XResolution*/ 1024,
- /*Bit16u YResolution*/ 768,
+/*Bit16u BytesPerScanLine*/ 5120,
+/*Bit16u XResolution*/ 1280,
+/*Bit16u YResolution*/ 1024,
/*Bit8u XCharSize*/ 8,
/*Bit8u YCharSize*/ 16,
/*Bit8u NumberOfPlanes*/ 1,
/*Bit8u BitsPerPixel*/ 32,
- /*Bit8u NumberOfBanks*/ 1,
+/*Bit8u NumberOfBanks*/ 80,
/*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*/ 8,
/*Bit8u RedFieldPosition*/ 16,
/*Bit8u GreenMaskSize*/ 8,
@@ -1175,17 +1425,11 @@
/*Bit8u BlueFieldPosition*/ 0,
/*Bit8u RsvdMaskSize*/ 8,
/*Bit8u RsvdFieldPosition*/ 24,
- /*Bit8u DirectColorModeInfo*/ VBE_DIRECTCOLOR_RESERVED_BITS_AVAILABLE,
-// Mandatory information for VBE 2.0 and above
-#ifdef VBE_HAVE_LFB
+/*Bit8u DirectColorModeInfo*/ 0,
/*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*4,
+/*Bit16u LinBytesPerScanLine*/ 5120,
/*Bit8u BnkNumberOfPages*/ 0,
/*Bit8u LinNumberOfPages*/ 0,
/*Bit8u LinRedMaskSize*/ 8,
@@ -1197,33 +1441,17 @@
/*Bit8u LinRsvdMaskSize*/ 8,
/*Bit8u LinRsvdFieldPosition*/ 24,
/*Bit32u MaxPixelClock*/ 0,
-/*} ModeInfoBlock;*/
- }
- },
-
- {
- VBE_OWN_MODE_320X200X8,
- {
-/*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 |
-#ifdef DEBUG
- unimplemented();
-#endif
+ Bit16u size;
+ size = 0;
+ if (CX & 1) {
+ size += 0x46;
+ }
+ if (CX & 2) {
+ size += (5 + 8 + 5) * 2 + 6;
+ }
+ if (CX & 4) {
+ size += 3 + 256 * 3 + 1;
}
-static void biosfn_save_video_state (CX,ES,BX) Bit16u CX;Bit16u ES;Bit16u BX;
+ return size;
+}
+
+static void biosfn_read_video_state_size (CX, BX)
+ Bit16u CX; Bit16u *BX;
{
-#ifdef DEBUG
- unimplemented();
-#endif
- VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
- /*Bit8u WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_READABLE |
- VBE_WINDOW_ATTRIBUTE_WRITEABLE,
+} },
+{ 0x0146, /* 320x200x8 */
+{ /*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*/ 320,
-// Mandatory information for VBE 1.2 and above
/*Bit16u XResolution*/ 320,
/*Bit16u YResolution*/ 200,
/*Bit8u XCharSize*/ 8,
@@ -1233,9 +1461,8 @@
/*Bit8u NumberOfBanks*/ 1,
/*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,
@@ -1245,15 +1472,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,
+ Bit16u ss=get_SS();
+ write_word(ss, BX, biosfn_read_video_state_size2(CX));
}
-static void biosfn_restore_video_state (CX,ES,BX) Bit16u CX;Bit16u ES;Bit16u BX;
+
+static Bit16u biosfn_save_video_state (CX,ES,BX)
+ Bit16u CX;Bit16u ES;Bit16u BX;
{
-#ifdef DEBUG
- unimplemented();
-#endif
/*Bit32u OffScreenMemOffset*/ 0,
/*Bit16u OffScreenMemSize*/ 0,
-// Mandatory information for VBE 3.0 and above
/*Bit16u LinBytesPerScanLine*/ 320,
/*Bit8u BnkNumberOfPages*/ 0,
/*Bit8u LinNumberOfPages*/ 0,
@@ -1266,17 +1487,286 @@
/*Bit8u LinRsvdMaskSize*/ 0,
/*Bit8u LinRsvdFieldPosition*/ 0,
/*Bit32u MaxPixelClock*/ 0,
-/*} ModeInfoBlock;*/
- }
- },
-
-/** END OF THE LIST **/
- {
- VBE_VESA_MODE_END_OF_LIST,
- {
- 0,
- }
- }
+} },
+{ 0x0147, /* 1600x1200x32 */
+{ /*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*/ 0x0000,
+/*Bit32u WinFuncPtr*/ 0,
+/*Bit16u BytesPerScanLine*/ 6400,
+/*Bit16u XResolution*/ 1600,
+/*Bit16u YResolution*/ 1200,
+/*Bit8u XCharSize*/ 8,
+/*Bit8u YCharSize*/ 16,
+/*Bit8u NumberOfPlanes*/ 1,
+/*Bit8u BitsPerPixel*/ 32,
+/*Bit8u NumberOfBanks*/ 118,
+/*Bit8u MemoryModel*/ VBE_MEMORYMODEL_DIRECT_COLOR,
+/*Bit8u BankSize*/ 0,
+/*Bit8u NumberOfImagePages*/ 0,
+/*Bit8u Reserved_page*/ 0,
+/*Bit8u RedMaskSize*/ 8,
+/*Bit8u RedFieldPosition*/ 16,
+/*Bit8u GreenMaskSize*/ 8,
+/*Bit8u GreenFieldPosition*/ 8,
+/*Bit8u BlueMaskSize*/ 8,
+/*Bit8u BlueFieldPosition*/ 0,
+/*Bit8u RsvdMaskSize*/ 8,
+/*Bit8u RsvdFieldPosition*/ 24,
+/*Bit8u DirectColorModeInfo*/ 0,
+/*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS,
+/*Bit32u OffScreenMemOffset*/ 0,
+/*Bit16u OffScreenMemSize*/ 0,
+/*Bit16u LinBytesPerScanLine*/ 6400,
+/*Bit8u BnkNumberOfPages*/ 0,
+/*Bit8u LinNumberOfPages*/ 0,
+/*Bit8u LinRedMaskSize*/ 8,
+/*Bit8u LinRedFieldPosition*/ 16,
+/*Bit8u LinGreenMaskSize*/ 8,
+/*Bit8u LinGreenFieldPosition*/ 8,
+/*Bit8u LinBlueMaskSize*/ 8,
+/*Bit8u LinBlueFieldPosition*/ 0,
+/*Bit8u LinRsvdMaskSize*/ 8,
+/*Bit8u LinRsvdFieldPosition*/ 24,
+/*Bit32u MaxPixelClock*/ 0,
+} },
+{ 0x0148, /* 1152x864x8 */
+{ /*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*/ 0x0000,
+/*Bit32u WinFuncPtr*/ 0,
+/*Bit16u BytesPerScanLine*/ 1152,
+/*Bit16u XResolution*/ 1152,
+/*Bit16u YResolution*/ 864,
+/*Bit8u XCharSize*/ 8,
+/*Bit8u YCharSize*/ 16,
+/*Bit8u NumberOfPlanes*/ 1,
+/*Bit8u BitsPerPixel*/ 8,
+/*Bit8u NumberOfBanks*/ 16,
+/*Bit8u MemoryModel*/ VBE_MEMORYMODEL_PACKED_PIXEL,
+/*Bit8u BankSize*/ 0,
+/*Bit8u NumberOfImagePages*/ 0,
+/*Bit8u Reserved_page*/ 0,
+/*Bit8u RedMaskSize*/ 0,
+/*Bit8u RedFieldPosition*/ 0,
+/*Bit8u GreenMaskSize*/ 0,
+/*Bit8u GreenFieldPosition*/ 0,
+/*Bit8u BlueMaskSize*/ 0,
+/*Bit8u BlueFieldPosition*/ 0,
+/*Bit8u RsvdMaskSize*/ 0,
+/*Bit8u RsvdFieldPosition*/ 0,
+/*Bit8u DirectColorModeInfo*/ 0,
+/*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS,
+/*Bit32u OffScreenMemOffset*/ 0,
+/*Bit16u OffScreenMemSize*/ 0,
+/*Bit16u LinBytesPerScanLine*/ 1152,
+/*Bit8u BnkNumberOfPages*/ 0,
+/*Bit8u LinNumberOfPages*/ 0,
+/*Bit8u LinRedMaskSize*/ 0,
+/*Bit8u LinRedFieldPosition*/ 0,
+/*Bit8u LinGreenMaskSize*/ 0,
+/*Bit8u LinGreenFieldPosition*/ 0,
+/*Bit8u LinBlueMaskSize*/ 0,
+/*Bit8u LinBlueFieldPosition*/ 0,
+/*Bit8u LinRsvdMaskSize*/ 0,
+/*Bit8u LinRsvdFieldPosition*/ 0,
+/*Bit32u MaxPixelClock*/ 0,
+} },
+{ 0x0149, /* 1152x864x15 */
+{ /*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*/ 0x0000,
+/*Bit32u WinFuncPtr*/ 0,
+/*Bit16u BytesPerScanLine*/ 2304,
+/*Bit16u XResolution*/ 1152,
+/*Bit16u YResolution*/ 864,
+/*Bit8u XCharSize*/ 8,
+/*Bit8u YCharSize*/ 16,
+/*Bit8u NumberOfPlanes*/ 1,
+/*Bit8u BitsPerPixel*/ 15,
+/*Bit8u NumberOfBanks*/ 31,
+/*Bit8u MemoryModel*/ VBE_MEMORYMODEL_DIRECT_COLOR,
+/*Bit8u BankSize*/ 0,
+/*Bit8u NumberOfImagePages*/ 0,
+/*Bit8u Reserved_page*/ 0,
+/*Bit8u RedMaskSize*/ 5,
+/*Bit8u RedFieldPosition*/ 10,
+/*Bit8u GreenMaskSize*/ 5,
+/*Bit8u GreenFieldPosition*/ 5,
+/*Bit8u BlueMaskSize*/ 5,
+/*Bit8u BlueFieldPosition*/ 0,
+/*Bit8u RsvdMaskSize*/ 1,
+/*Bit8u RsvdFieldPosition*/ 15,
+/*Bit8u DirectColorModeInfo*/ 0,
+/*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS,
+/*Bit32u OffScreenMemOffset*/ 0,
+/*Bit16u OffScreenMemSize*/ 0,
+/*Bit16u LinBytesPerScanLine*/ 2304,
+/*Bit8u BnkNumberOfPages*/ 0,
+/*Bit8u LinNumberOfPages*/ 0,
+/*Bit8u LinRedMaskSize*/ 5,
+/*Bit8u LinRedFieldPosition*/ 10,
+/*Bit8u LinGreenMaskSize*/ 5,
+/*Bit8u LinGreenFieldPosition*/ 5,
+/*Bit8u LinBlueMaskSize*/ 5,
+/*Bit8u LinBlueFieldPosition*/ 0,
+/*Bit8u LinRsvdMaskSize*/ 1,
+/*Bit8u LinRsvdFieldPosition*/ 15,
+/*Bit32u MaxPixelClock*/ 0,
+} },
+{ 0x014a, /* 1152x864x16 */
+{ /*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*/ 0x0000,
+/*Bit32u WinFuncPtr*/ 0,
+/*Bit16u BytesPerScanLine*/ 2304,
+/*Bit16u XResolution*/ 1152,
+/*Bit16u YResolution*/ 864,
+/*Bit8u XCharSize*/ 8,
+/*Bit8u YCharSize*/ 16,
+/*Bit8u NumberOfPlanes*/ 1,
+/*Bit8u BitsPerPixel*/ 16,
+/*Bit8u NumberOfBanks*/ 31,
+/*Bit8u MemoryModel*/ VBE_MEMORYMODEL_DIRECT_COLOR,
+/*Bit8u BankSize*/ 0,
+/*Bit8u NumberOfImagePages*/ 0,
+/*Bit8u Reserved_page*/ 0,
+/*Bit8u RedMaskSize*/ 5,
+/*Bit8u RedFieldPosition*/ 11,
+/*Bit8u GreenMaskSize*/ 6,
+/*Bit8u GreenFieldPosition*/ 5,
+/*Bit8u BlueMaskSize*/ 5,
+/*Bit8u BlueFieldPosition*/ 0,
+/*Bit8u RsvdMaskSize*/ 0,
+/*Bit8u RsvdFieldPosition*/ 0,
+/*Bit8u DirectColorModeInfo*/ 0,
+/*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS,
+/*Bit32u OffScreenMemOffset*/ 0,
+/*Bit16u OffScreenMemSize*/ 0,
+/*Bit16u LinBytesPerScanLine*/ 2304,
+/*Bit8u BnkNumberOfPages*/ 0,
+/*Bit8u LinNumberOfPages*/ 0,
+/*Bit8u LinRedMaskSize*/ 5,
+/*Bit8u LinRedFieldPosition*/ 11,
+/*Bit8u LinGreenMaskSize*/ 6,
+/*Bit8u LinGreenFieldPosition*/ 5,
+/*Bit8u LinBlueMaskSize*/ 5,
+/*Bit8u LinBlueFieldPosition*/ 0,
+/*Bit8u LinRsvdMaskSize*/ 0,
+/*Bit8u LinRsvdFieldPosition*/ 0,
+/*Bit32u MaxPixelClock*/ 0,
+} },
+{ 0x014b, /* 1152x864x24 */
+{ /*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*/ 0x0000,
+/*Bit32u WinFuncPtr*/ 0,
+/*Bit16u BytesPerScanLine*/ 3456,
+/*Bit16u XResolution*/ 1152,
+/*Bit16u YResolution*/ 864,
+/*Bit8u XCharSize*/ 8,
+/*Bit8u YCharSize*/ 16,
+/*Bit8u NumberOfPlanes*/ 1,
+/*Bit8u BitsPerPixel*/ 24,
+/*Bit8u NumberOfBanks*/ 46,
+/*Bit8u MemoryModel*/ VBE_MEMORYMODEL_DIRECT_COLOR,
+/*Bit8u BankSize*/ 0,
+/*Bit8u NumberOfImagePages*/ 0,
+/*Bit8u Reserved_page*/ 0,
+/*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,
+/*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS,
+/*Bit32u OffScreenMemOffset*/ 0,
+/*Bit16u OffScreenMemSize*/ 0,
+/*Bit16u LinBytesPerScanLine*/ 3456,
+/*Bit8u BnkNumberOfPages*/ 0,
+/*Bit8u LinNumberOfPages*/ 0,
+/*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,
+} },
+{ 0x014c, /* 1152x864x32 */
+{ /*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*/ 0x0000,
+/*Bit32u WinFuncPtr*/ 0,
+/*Bit16u BytesPerScanLine*/ 4608,
+/*Bit16u XResolution*/ 1152,
+/*Bit16u YResolution*/ 864,
+/*Bit8u XCharSize*/ 8,
+/*Bit8u YCharSize*/ 16,
+/*Bit8u NumberOfPlanes*/ 1,
+/*Bit8u BitsPerPixel*/ 32,
+/*Bit8u NumberOfBanks*/ 61,
+/*Bit8u MemoryModel*/ VBE_MEMORYMODEL_DIRECT_COLOR,
+/*Bit8u BankSize*/ 0,
+/*Bit8u NumberOfImagePages*/ 0,
+/*Bit8u Reserved_page*/ 0,
+/*Bit8u RedMaskSize*/ 8,
+/*Bit8u RedFieldPosition*/ 16,
+/*Bit8u GreenMaskSize*/ 8,
+/*Bit8u GreenFieldPosition*/ 8,
+/*Bit8u BlueMaskSize*/ 8,
+/*Bit8u BlueFieldPosition*/ 0,
+/*Bit8u RsvdMaskSize*/ 8,
+/*Bit8u RsvdFieldPosition*/ 24,
+/*Bit8u DirectColorModeInfo*/ 0,
+/*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS,
+/*Bit32u OffScreenMemOffset*/ 0,
+/*Bit16u OffScreenMemSize*/ 0,
+/*Bit16u LinBytesPerScanLine*/ 4608,
+/*Bit8u BnkNumberOfPages*/ 0,
+/*Bit8u LinNumberOfPages*/ 0,
+/*Bit8u LinRedMaskSize*/ 8,
+/*Bit8u LinRedFieldPosition*/ 16,
+/*Bit8u LinGreenMaskSize*/ 8,
+/*Bit8u LinGreenFieldPosition*/ 8,
+/*Bit8u LinBlueMaskSize*/ 8,
+/*Bit8u LinBlueFieldPosition*/ 0,
+/*Bit8u LinRsvdMaskSize*/ 8,
+/*Bit8u LinRsvdFieldPosition*/ 24,
+/*Bit32u MaxPixelClock*/ 0,
+} },
+{ VBE_VESA_MODE_END_OF_LIST,
+{ 0,
+} },
};
+ Bit16u i, v, crtc_addr, ar_index;
+
+ crtc_addr = read_word(BIOSMEM_SEG, BIOSMEM_CRTC_ADDRESS);
+ if (CX & 1) {
+ write_byte(ES, BX, inb(VGAREG_SEQU_ADDRESS)); BX++;
+ write_byte(ES, BX, inb(crtc_addr)); BX++;
+ write_byte(ES, BX, inb(VGAREG_GRDC_ADDRESS)); BX++;
+ inb(VGAREG_ACTL_RESET);
+ ar_index = inb(VGAREG_ACTL_ADDRESS);
+ write_byte(ES, BX, ar_index); BX++;
+ write_byte(ES, BX, inb(VGAREG_READ_FEATURE_CTL)); BX++;
+
+ for(i=1;i<=4;i++){
+ outb(VGAREG_SEQU_ADDRESS, i);
+ write_byte(ES, BX, inb(VGAREG_SEQU_DATA)); BX++;
+ }
+ outb(VGAREG_SEQU_ADDRESS, 0);
+ write_byte(ES, BX, inb(VGAREG_SEQU_DATA)); BX++;
+
+ for(i=0;i<=0x18;i++) {
+ outb(crtc_addr,i);
+ write_byte(ES, BX, inb(crtc_addr+1)); BX++;
+ }
+
+ for(i=0;i<=0x13;i++) {
+ inb(VGAREG_ACTL_RESET);
+ outb(VGAREG_ACTL_ADDRESS, i | (ar_index & 0x20));
+ write_byte(ES, BX, inb(VGAREG_ACTL_READ_DATA)); BX++;
+ }
+ inb(VGAREG_ACTL_RESET);
+
+ for(i=0;i<=8;i++) {
+ outb(VGAREG_GRDC_ADDRESS,i);
+ write_byte(ES, BX, inb(VGAREG_GRDC_DATA)); BX++;
+ }
+
+ write_word(ES, BX, crtc_addr); BX+= 2;
+
+ /* XXX: read plane latches */
+ write_byte(ES, BX, 0); BX++;
+ write_byte(ES, BX, 0); BX++;
+ write_byte(ES, BX, 0); BX++;
+ write_byte(ES, BX, 0); BX++;
+ }
+ if (CX & 2) {
+ write_byte(ES, BX, read_byte(BIOSMEM_SEG,BIOSMEM_CURRENT_MODE)); BX++;
+ write_word(ES, BX, read_word(BIOSMEM_SEG,BIOSMEM_NB_COLS)); BX += 2;
+ write_word(ES, BX, read_word(BIOSMEM_SEG,BIOSMEM_PAGE_SIZE)); BX += 2;
+ write_word(ES, BX, read_word(BIOSMEM_SEG,BIOSMEM_CRTC_ADDRESS)); BX += 2;
+ write_byte(ES, BX, read_byte(BIOSMEM_SEG,BIOSMEM_NB_ROWS)); BX++;
+ write_word(ES, BX, read_word(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT)); BX += 2;
+ write_byte(ES, BX, read_byte(BIOSMEM_SEG,BIOSMEM_VIDEO_CTL)); BX++;
+ write_byte(ES, BX, read_byte(BIOSMEM_SEG,BIOSMEM_SWITCHES)); BX++;
+ write_byte(ES, BX, read_byte(BIOSMEM_SEG,BIOSMEM_MODESET_CTL)); BX++;
+ write_word(ES, BX, read_word(BIOSMEM_SEG,BIOSMEM_CURSOR_TYPE)); BX += 2;
+ for(i=0;i<8;i++) {
+ write_word(ES, BX, read_word(BIOSMEM_SEG, BIOSMEM_CURSOR_POS+2*i));
+ BX += 2;
+ }
+ write_word(ES, BX, read_word(BIOSMEM_SEG,BIOSMEM_CURRENT_START)); BX += 2;
+ write_byte(ES, BX, read_byte(BIOSMEM_SEG,BIOSMEM_CURRENT_PAGE)); BX++;
+ /* current font */
+ write_word(ES, BX, read_word(0, 0x1f * 4)); BX += 2;
+ write_word(ES, BX, read_word(0, 0x1f * 4 + 2)); BX += 2;
+ write_word(ES, BX, read_word(0, 0x43 * 4)); BX += 2;
+ write_word(ES, BX, read_word(0, 0x43 * 4 + 2)); BX += 2;
+ }
+ if (CX & 4) {
+ /* XXX: check this */
+ write_byte(ES, BX, inb(VGAREG_DAC_STATE)); BX++; /* read/write mode dac */
+ write_byte(ES, BX, inb(VGAREG_DAC_WRITE_ADDRESS)); BX++; /* pix address */
+ write_byte(ES, BX, inb(VGAREG_PEL_MASK)); BX++;
+ // Set the whole dac always, from 0
+ outb(VGAREG_DAC_WRITE_ADDRESS,0x00);
+ for(i=0;i<256*3;i++) {
+ write_byte(ES, BX, inb(VGAREG_DAC_DATA)); BX++;
+ }
+ write_byte(ES, BX, 0); BX++; /* color select register */
+ }
+ return BX;
+}
+
+static Bit16u biosfn_restore_video_state (CX,ES,BX)
+ Bit16u CX;Bit16u ES;Bit16u BX;
+{
+ Bit16u i, crtc_addr, v, addr1, ar_index;
+
+ if (CX & 1) {
+ // Reset Attribute Ctl flip-flop
+ inb(VGAREG_ACTL_RESET);
+
+ crtc_addr = read_word(ES, BX + 0x40);
+ addr1 = BX;
+ BX += 5;
+
+ for(i=1;i<=4;i++){
+ outb(VGAREG_SEQU_ADDRESS, i);
+ outb(VGAREG_SEQU_DATA, read_byte(ES, BX)); BX++;
+ }
+ outb(VGAREG_SEQU_ADDRESS, 0);
+ outb(VGAREG_SEQU_DATA, read_byte(ES, BX)); BX++;
+
+ // Disable CRTC write protection
+ outw(crtc_addr,0x0011);
+ // Set CRTC regs
+ for(i=0;i<=0x18;i++) {
+ if (i != 0x11) {
+ outb(crtc_addr,i);
+ outb(crtc_addr+1, read_byte(ES, BX));
+ }
+ BX++;
+ }
+ // select crtc base address
+ v = inb(VGAREG_READ_MISC_OUTPUT) & ~0x01;
+ if (crtc_addr = 0x3d4)
+ v |= 0x01;
+ outb(VGAREG_WRITE_MISC_OUTPUT, v);
+
+ // enable write protection if needed
+ outb(crtc_addr, 0x11);
+ outb(crtc_addr+1, read_byte(ES, BX - 0x18 + 0x11));
+
+ // Set Attribute Ctl
+ ar_index = read_byte(ES, addr1 + 0x03);
+ inb(VGAREG_ACTL_RESET);
+ for(i=0;i<=0x13;i++) {
+ outb(VGAREG_ACTL_ADDRESS, i | (ar_index & 0x20));
+ outb(VGAREG_ACTL_WRITE_DATA, read_byte(ES, BX)); BX++;
+ }
+ outb(VGAREG_ACTL_ADDRESS, ar_index);
+ inb(VGAREG_ACTL_RESET);
+
+ for(i=0;i<=8;i++) {
+ outb(VGAREG_GRDC_ADDRESS,i);
+ outb(VGAREG_GRDC_DATA, read_byte(ES, BX)); BX++;
+ }
+ BX += 2; /* crtc_addr */
+ BX += 4; /* plane latches */
+
+ outb(VGAREG_SEQU_ADDRESS, read_byte(ES, addr1)); addr1++;
+ outb(crtc_addr, read_byte(ES, addr1)); addr1++;
+ outb(VGAREG_GRDC_ADDRESS, read_byte(ES, addr1)); addr1++;
+ addr1++;
+ outb(crtc_addr - 0x4 + 0xa, read_byte(ES, addr1)); addr1++;
+ }
+ if (CX & 2) {
+ write_byte(BIOSMEM_SEG,BIOSMEM_CURRENT_MODE, read_byte(ES, BX)); BX++;
+ write_word(BIOSMEM_SEG,BIOSMEM_NB_COLS, read_word(ES, BX)); BX += 2;
+ write_word(BIOSMEM_SEG,BIOSMEM_PAGE_SIZE, read_word(ES, BX)); BX += 2;
+ write_word(BIOSMEM_SEG,BIOSMEM_CRTC_ADDRESS, read_word(ES, BX)); BX += 2;
+ write_byte(BIOSMEM_SEG,BIOSMEM_NB_ROWS, read_byte(ES, BX)); BX++;
+ write_word(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT, read_word(ES, BX)); BX += 2;
+ write_byte(BIOSMEM_SEG,BIOSMEM_VIDEO_CTL, read_byte(ES, BX)); BX++;
+ write_byte(BIOSMEM_SEG,BIOSMEM_SWITCHES, read_byte(ES, BX)); BX++;
+ write_byte(BIOSMEM_SEG,BIOSMEM_MODESET_CTL, read_byte(ES, BX)); BX++;
+ write_word(BIOSMEM_SEG,BIOSMEM_CURSOR_TYPE, read_word(ES, BX)); BX += 2;
+ for(i=0;i<8;i++) {
+ write_word(BIOSMEM_SEG, BIOSMEM_CURSOR_POS+2*i, read_word(ES, BX));
+ BX += 2;
+ }
+ write_word(BIOSMEM_SEG,BIOSMEM_CURRENT_START, read_word(ES, BX)); BX += 2;
+ write_byte(BIOSMEM_SEG,BIOSMEM_CURRENT_PAGE, read_byte(ES, BX)); BX++;
+ /* current font */
+ write_word(0, 0x1f * 4, read_word(ES, BX)); BX += 2;
+ write_word(0, 0x1f * 4 + 2, read_word(ES, BX)); BX += 2;
+ write_word(0, 0x43 * 4, read_word(ES, BX)); BX += 2;
+ write_word(0, 0x43 * 4 + 2, read_word(ES, BX)); BX += 2;
+ }
+ if (CX & 4) {
+ BX++;
+ v = read_byte(ES, BX); BX++;
+ outb(VGAREG_PEL_MASK, read_byte(ES, BX)); BX++;
+ // Set the whole dac always, from 0
+ outb(VGAREG_DAC_WRITE_ADDRESS,0x00);
+ for(i=0;i<256*3;i++) {
+ outb(VGAREG_DAC_DATA, read_byte(ES, BX)); BX++;
+ }
+ BX++;
+ outb(VGAREG_DAC_WRITE_ADDRESS, v);
+ }
+ return BX;
}
#endif
// ============================================================================================
diff -u -w vbetables-gen.c
--- vbetables-gen.c 1970-01-01 01:00:00.000000000 +0100
+++ vbetables-gen.c 2006-06-14 00:52:18.000000000 +0200
@@ -0,0 +1,217 @@
+/* Generate the VGABIOS VBE Tables */
+#include <stdlib.h>
+#include <stdio.h>
+
+typedef struct {
+ int width;
+ int height;
+ int depth;
+ int mode;
+} ModeInfo;
+
+ModeInfo modes[] = {
+ /* standard VESA modes */
+{ 640, 400, 8 , 0x100},
+{ 640, 480, 8 , 0x101},
+{ 800, 600, 4 , 0x102},
+{ 800, 600, 8 , 0x103},
+ //{ 1024, 768, 4 , 0x104},
+{ 1024, 768, 8 , 0x105},
+ //{ 1280, 1024, 4 , 0x106},
+{ 1280, 1024, 8 , 0x107},
+{ 320, 200, 15 , 0x10D},
+{ 320, 200, 16 , 0x10E},
+{ 320, 200, 24 , 0x10F},
+{ 640, 480, 15 , 0x110},
+{ 640, 480, 16 , 0x111},
+{ 640, 480, 24 , 0x112},
+{ 800, 600, 15 , 0x113},
+{ 800, 600, 16 , 0x114},
+{ 800, 600, 24 , 0x115},
+{ 1024, 768, 15 , 0x116},
+{ 1024, 768, 16 , 0x117},
+{ 1024, 768, 24 , 0x118},
+{ 1280, 1024, 15 , 0x119},
+{ 1280, 1024, 16 , 0x11A},
+{ 1280, 1024, 24 , 0x11B},
+{ 1600, 1200, 8 , 0x11C},
+{ 1600, 1200, 15 , 0x11D},
+{ 1600, 1200, 16 , 0x11E},
+{ 1600, 1200, 24 , 0x11F},
+
+ /* BOCHS/PLE, 86 'own' mode numbers */
+{ 320, 200, 32 , 0x140},
+{ 640, 400, 32 , 0x141},
+{ 640, 480, 32 , 0x142},
+{ 800, 600, 32 , 0x143},
+{ 1024, 768, 32 , 0x144},
+{ 1280, 1024, 32 , 0x145},
+{ 320, 200, 8 , 0x146},
+{ 1600, 1200, 32 , 0x147},
+{ 1152, 864, 8 , 0x148},
+{ 1152, 864, 15 , 0x149},
+{ 1152, 864, 16 , 0x14a},
+{ 1152, 864, 24 , 0x14b},
+{ 1152, 864, 32 , 0x14c},
+{ 0, },
+};
+
+int main(int argc, char **argv)
+{
+ const ModeInfo *pm;
+ int pitch, r_size, r_pos, g_size, g_pos, b_size, b_pos, a_size, a_pos;
+ const char *str;
+
+ printf("/* THIS FILE IS AUTOMATICALLY GENERATED - DO NOT EDIT */\n");
+ printf("static ModeInfoListItem mode_info_list[]=\n");
+ printf("{\n");
+ for(pm = modes; pm->mode != 0; pm++) {
+ printf("{ 0x%04x, /* %dx%dx%d */\n",
+ pm->mode, pm->width, pm->height, pm->depth);
+ printf("{ /*Bit16u ModeAttributes*/ %s,\n",
+ "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");
+
+ printf("/*Bit8u WinAAttributes*/ %s,\n",
+ "VBE_WINDOW_ATTRIBUTE_RELOCATABLE | "
+ "VBE_WINDOW_ATTRIBUTE_READABLE | "
+ "VBE_WINDOW_ATTRIBUTE_WRITEABLE");
+
+ printf("/*Bit8u WinBAttributes*/ %d,\n", 0);
+
+ printf("/*Bit16u WinGranularity*/ %s,\n", "VBE_DISPI_BANK_SIZE_KB");
+
+ printf("/*Bit16u WinSize*/ %s,\n", "VBE_DISPI_BANK_SIZE_KB");
+
+ printf("/*Bit16u WinASegment*/ %s,\n", "VGAMEM_GRAPH");
+
+ printf("/*Bit16u WinBSegment*/ 0x%04x,\n", 0);
+
+ printf("/*Bit32u WinFuncPtr*/ %d,\n", 0);
+
+ if (pm->depth == 4)
+ pitch = (pm->width + 7) / 8;
+ else
+ pitch = pm->width * ((pm->depth + 7) / 8);
+ printf("/*Bit16u BytesPerScanLine*/ %d,\n", pitch);
+
+ // Mandatory information for VBE 1.2 and above
+ printf("/*Bit16u XResolution*/ %d,\n", pm->width);
+ printf("/*Bit16u YResolution*/ %d,\n", pm->height);
+ printf("/*Bit8u XCharSize*/ %d,\n", 8);
+ printf("/*Bit8u YCharSize*/ %d,\n", 16);
+ if (pm->depth == 4) {
+ printf("/*Bit8u NumberOfPlanes*/ %d,\n", 4);
+ printf("/*Bit8u BitsPerPixel*/ %d,\n", pm->depth);
+ } else {
+ printf("/*Bit8u NumberOfPlanes*/ %d,\n", 1);
+ printf("/*Bit8u BitsPerPixel*/ %d,\n", pm->depth);
+ }
+ printf("/*Bit8u NumberOfBanks*/ %d,\n",
+ (pm->height * pitch + 65535) / 65536);
+
+ if (pm->depth == 4)
+ str = "VBE_MEMORYMODEL_PLANAR";
+ else if (pm->depth == 8)
+ str = "VBE_MEMORYMODEL_PACKED_PIXEL";
+ else
+ str = "VBE_MEMORYMODEL_DIRECT_COLOR";
+ printf("/*Bit8u MemoryModel*/ %s,\n", str);
+ printf("/*Bit8u BankSize*/ %d,\n", 0);
+ /* XXX: check */
+ printf("/*Bit8u NumberOfImagePages*/ %d,\n", 0);
+ printf("/*Bit8u Reserved_page*/ %d,\n", 0);
+
+ // Direct Color fields (required for direct/6 and YUV/7 memory models)
+ switch(pm->depth) {
+ case 15:
+ r_size = 5;
+ r_pos = 10;
+ g_size = 5;
+ g_pos = 5;
+ b_size = 5;
+ b_pos = 0;
+ a_size = 1;
+ a_pos = 15;
+ break;
+ case 16:
+ r_size = 5;
+ r_pos = 11;
+ g_size = 6;
+ g_pos = 5;
+ b_size = 5;
+ b_pos = 0;
+ a_size = 0;
+ a_pos = 0;
+ break;
+ case 24:
+ r_size = 8;
+ r_pos = 16;
+ g_size = 8;
+ g_pos = 8;
+ b_size = 8;
+ b_pos = 0;
+ a_size = 0;
+ a_pos = 0;
+ break;
+ case 32:
+ r_size = 8;
+ r_pos = 16;
+ g_size = 8;
+ g_pos = 8;
+ b_size = 8;
+ b_pos = 0;
+ a_size = 8;
+ a_pos = 24;
+ break;
+ default:
+ r_size = 0;
+ r_pos = 0;
+ g_size = 0;
+ g_pos = 0;
+ b_size = 0;
+ b_pos = 0;
+ a_size = 0;
+ a_pos = 0;
+ break;
+ }
+
+ printf("/*Bit8u RedMaskSize*/ %d,\n", r_size);
+ printf("/*Bit8u RedFieldPosition*/ %d,\n", r_pos);
+ printf("/*Bit8u GreenMaskSize*/ %d,\n", g_size);
+ printf("/*Bit8u GreenFieldPosition*/ %d,\n", g_pos);
+ printf("/*Bit8u BlueMaskSize*/ %d,\n", b_size);
+ printf("/*Bit8u BlueFieldPosition*/ %d,\n", b_pos);
+ printf("/*Bit8u RsvdMaskSize*/ %d,\n", a_size);
+ printf("/*Bit8u RsvdFieldPosition*/ %d,\n", a_pos);
+ printf("/*Bit8u DirectColorModeInfo*/ %d,\n", 0);
+
+// Mandatory information for VBE 2.0 and above
+ printf("/*Bit32u PhysBasePtr*/ %s,\n",
+ "VBE_DISPI_LFB_PHYSICAL_ADDRESS");
+ printf("/*Bit32u OffScreenMemOffset*/ %d,\n", 0);
+ printf("/*Bit16u OffScreenMemSize*/ %d,\n", 0);
+ // Mandatory information for VBE 3.0 and above
+ printf("/*Bit16u LinBytesPerScanLine*/ %d,\n", pitch);
+ printf("/*Bit8u BnkNumberOfPages*/ %d,\n", 0);
+ printf("/*Bit8u LinNumberOfPages*/ %d,\n", 0);
+ printf("/*Bit8u LinRedMaskSize*/ %d,\n", r_size);
+ printf("/*Bit8u LinRedFieldPosition*/ %d,\n", r_pos);
+ printf("/*Bit8u LinGreenMaskSize*/ %d,\n", g_size);
+ printf("/*Bit8u LinGreenFieldPosition*/ %d,\n", g_pos);
+ printf("/*Bit8u LinBlueMaskSize*/ %d,\n", b_size);
+ printf("/*Bit8u LinBlueFieldPosition*/ %d,\n", b_pos);
+ printf("/*Bit8u LinRsvdMaskSize*/ %d,\n", a_size);
+ printf("/*Bit8u LinRsvdFieldPosition*/ %d,\n", a_pos);
+ printf("/*Bit32u MaxPixelClock*/ %d,\n", 0);
+ printf("} },\n");
+ }
+ printf("{ VBE_VESA_MODE_END_OF_LIST,\n");
+ printf("{ 0,\n");
+ printf("} },\n");
+ printf("};\n");
+ return 0;
+}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册