Changeset 5450 in vbox for trunk/src/VBox/Devices/Graphics
- Timestamp:
- Oct 23, 2007 7:03:55 PM (17 years ago)
- Location:
- trunk/src/VBox/Devices/Graphics
- Files:
-
- 1 deleted
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/BIOS/ChangeLog
r1 r5450 1 2006-08-19 09:39 vruppert 2 3 * vbe.c (1.58): 4 5 - improved VGA compatible setup for VBE modes (disable CGA and Hercules 6 compatible memory layout) 7 8 2006-08-18 20:39 vruppert 9 10 * vbe.c (1.57): 11 12 - improved VGA compatible setup for >=8bpp VBE modes (CRTC doubleword mode and 13 GRDC shift register setting added) 14 - now using symbolic name for CRTC address register 15 16 2006-08-15 20:42 vruppert 17 18 * vbe.c (1.56), vbetables-gen.c (1.4): 19 20 - init 4bpp VBE modes by a temporary switch to VGA mode 0x6A 21 - all 4bpp VBE modes now enabled 22 23 2006-08-14 20:24 vruppert 24 25 * vbe.c (1.55): 26 27 - VGA compatible setup for VBE modes improved (Bochs hack can be removed now) 28 29 2006-08-12 07:51 vruppert 30 31 * .cvsignore (1.1): 32 33 - .cvsignore added for auto-generated file 34 35 2006-08-12 07:47 vruppert 36 37 * vbe.c (1.54), vbe.h (1.27), vbe_display_api.txt (1.13), vbetables-gen.c (1.3): 38 39 - cleaned up VBE memory size definitions (removed duplicate defines, main 40 definition now in vbetables-gen.c) 41 42 2006-08-09 21:28 vruppert 43 44 * vbetables.h (1.30): 45 46 - removed auto-generated file 47 48 2006-08-09 21:26 vruppert 49 50 * vbe.c (1.53), vbe.h (1.26), vbe_display_api.txt (1.12), vbetables-gen.c (1.2), 51 vbetables.h (1.29): 52 53 - VBE video memory increased to 8 MB 54 - VBE dispi ID changed to B0C4 55 - documentation update 56 57 2006-07-11 08:03 vruppert 58 59 * Makefile (1.18), vbetables-gen.c (1.1), vbetables.h (1.28): 60 61 - generate vbetables.h dynamicly 62 * initial patch from the qemu project by Fabrice Bellard 63 * only add modes that fit in video memory (still 4 MB) 64 * several other fixes (e.g. 4 bpp specific stuff, number of pages) 65 66 2006-07-10 07:47 vruppert 67 68 * vgabios.c (1.66): 69 70 - biosfn_scroll(): check variable 'i' for underflowing when scrolling downwards 71 to avoid screen corruption 72 73 2006-07-10 07:47 vruppert 74 75 * vbe.c (1.52): 76 77 - VBE set bank functions failure handling added 78 - VBE get/set logical scan line length fixes for the 4bpp mode 79 80 2006-07-08 13:27 vruppert 81 82 * vbe.c (1.51), vbetables.h (1.27): 83 84 - added special case for the 4 bpp when setting VBE display start 85 - VBE mode table fixes 86 87 2006-07-07 13:30 vruppert 88 89 * clext.c (1.12): 90 91 - bank pointer must be set to 0 after a mode set 92 93 2006-06-21 16:58 vruppert 94 95 * vbe.c (1.50), vbetables.h (1.26): 96 97 - improved VBE display capabilities check (X resulution checked now) 98 - removed obsolete defines (LFB always available, always generate dynamic list) 99 - CR/LF to LF fixes 100 101 2006-06-18 15:22 vruppert 102 103 * clext.c (1.11), vbe.c (1.49), vbe.h (1.25), vbetables.h (1.25), vgabios.c 104 (1.65): 105 106 - applied patch from the qemu project (Fabrice Bellard) 107 * Cirrus SVGA now supports the "no clear" bit when switching to Cirrus or 108 VESA mode 109 * Bochs VBE protected mode interface improved 110 * save/restore video state support for Bochs VBE and standard VGA added 111 * Bochs VBE prepared for more modi 112 113 2006-03-25 10:19 vruppert 114 115 * clext.c (1.10), vgabios.c (1.64), vgatables.h (1.10): 116 117 - applied patch from Fabrice Bellard 118 * added minimal support for the video parameter table (VPT) 119 * added Cirrus SVGA mode 0x7b (1600x1200x8) 120 121 2005-12-26 19:50 vruppert 122 123 * vbe.c (1.48), vgabios.c (1.63): 124 125 - Bochs VBE protected mode interface added (based on a patch by [email protected]) 126 127 2005-12-26 19:50 vruppert 128 129 * biossums.c (1.3): 130 131 - biossums utility now supports VGABIOS sizes up to 64 kBytes 132 133 2005-09-21 18:45 vruppert 134 135 * vgatables.h (1.9): 136 137 - mode 0x11: all color planes must be enabled in this 2-color VGA mode 138 139 2005-08-30 18:41 vruppert 140 141 * biossums.c (1.2): 142 143 - missing license text added in biossums.c 144 1 145 2005-07-02 18:39 vruppert 2 146 -
trunk/src/VBox/Devices/Graphics/BIOS/Makefile.kmk
r4071 r5450 24 24 # Build program for calculating the VGA BIOS checksums. 25 25 # 26 BLDPROGS += vgabiossums 26 BLDPROGS += vgabiossums vbetables-gen 27 27 vgabiossums_TEMPLATE = VBOXBLDPROG 28 28 vgabiossums_SOURCES = biossums.c 29 vbetables-gen_TEMPLATE = VBOXBLDPROG 30 vbetables-gen_SOURCES = vbetables-gen.c 29 31 30 32 # … … 63 65 # 64 66 65 # 1. precompile 66 $(PATH_TARGET)/_vgabios_.c: $(addprefix $(PATH_SUB_CURRENT)/,vgabios.c vgabios.h vbe.h vgatables.h vgafonts.h vbe.c clext.c) 67 # 1. create vbetables.h 68 $(PATH_SUB_CURRENT)/vbetables.h: $(MAKEFILE_CURRENT) 69 $(QUIET)$(TARGET_vbetables-gen) > $@ 70 71 # 2. precompile 72 $(PATH_TARGET)/_vgabios_.c: $(addprefix $(PATH_SUB_CURRENT)/,vgabios.c vgabios.h vbe.h vgatables.h vgafonts.h vbe.c clext.c) $(PATH_SUB_CURRENT)/vbetables.h 67 73 $(call MSG_TOOL,cpp,VgaBiosBin,$<,$@) 68 74 $(QUIET)$(TOOL_$(VBOX_GCC_TOOL)_CC) -DVBOX -DVBOX_VERSION_STRING=\"$(VBOX_VERSION_STRING)\" -E -P $< -DVBE -DVGABIOS_DATE="''" $(addprefix -D,$(DEFS) $(DEFS.$(BUILD_TYPE))) > $@ 69 75 70 # 2. compile - tempfile clashes, so make sure it's built in solitude.76 # 3. compile - tempfile clashes, so make sure it's built in solitude. 71 77 .NOTPARALLEL: $(PATH_TARGET)/vgabios0.s 72 78 $(PATH_TARGET)/vgabios0.s: $(PATH_TARGET)/_vgabios_.c … … 74 80 $(QUIET)$(VBOX_BCC) -o $@ -C-c -D__i86__ -0 -S $^ 75 81 76 # 3. preprocess intermediate assembly.82 # 4. preprocess intermediate assembly. 77 83 $(PATH_TARGET)/vgabios1.s: $(PATH_TARGET)/vgabios0.s 78 84 $(call MSG_TOOL,Adjusting BCC Assembly,VgaBiosBin,$<,$@) 79 85 $(QUIET)$(SED) -e 's/^\.text//' -e 's/^\.data//' $^ > $@ 80 86 81 # 4. assemble87 # 5. assemble 82 88 $(PATH_TARGET)/vgabios.tmp $(PATH_TARGET)/vgabios.lst: $(PATH_TARGET)/vgabios1.s 83 89 $(call MSG_COMPILE,VgaBiosBin,$<,$@,AS) 84 90 $(QUIET)$(VBOX_AS86) -b $(PATH_TARGET)/vgabios.tmp -u- -w- -g -0 -j -O -l $(PATH_TARGET)/vgabios.lst < $^ 85 91 86 # 5. checksums92 # 6. checksums 87 93 $(PATH_TARGET)/vgabios.bin: $(PATH_TARGET)/vgabios.tmp $$(TARGET_vgabiossums) 88 94 $(call MSG_TOOL,vgabiossums,VgaBiosBin,$<,$@) -
trunk/src/VBox/Devices/Graphics/BIOS/README
r1 r5450 91 91 History 92 92 ------- 93 vgabios-0.6a : Aug 19 2006 94 - Volker 95 . added minimal support for the video parameter table (VPT) 96 . Cirrus SVGA now supports the "no clear" bit in Cirrus and VESA mode 97 . Bochs VBE protected mode interface improved 98 . save/restore video state support for Bochs VBE and standard VGA added 99 . generate vbetables.h dynamicly 100 . VBE video memory increased to 8 MB (VBE dispi ID changed to B0C4) 101 . lots of 4bpp VBE fixes (all 4bpp VBE modes now enabled) 102 . VGA compatible setup for VBE modes added 103 104 vgabios-0.5d : Dec 29 2005 105 - Volker 106 . Bochs VBE protected mode interface added (based on a patch by [email protected]) 107 . biossums utility now supports VGABIOS sizes up to 64 kBytes 108 . VGA mode 0x11: all color planes must be enabled in this 2-color VGA mode 109 93 110 vgabios-0.5c : Jul 07 2005 94 111 - Volker -
trunk/src/VBox/Devices/Graphics/BIOS/TODO
r1 r5450 7 7 - Performance : 16 bits IO 8 8 9 v0.6 10 - Reimplement the tables so it is compatible with the video save pointer table 9 v0.7 11 10 - Implement the remaining functions (don't know if all are needed): 12 11 - chargen ax=1120, ax=1121, ax=1122, ax=1123, ax=1124 13 12 - display switch interface ah=12 bl=35 14 13 - video refresh control ah=12 bl=36 15 - save/restore state ah=1c16 14 - Graphic modes 17 15 -
trunk/src/VBox/Devices/Graphics/BIOS/biossums.c
r1 r5450 2 2 /* adapted for the LGPL'd VGABIOS by vruppert */ 3 3 4 /* This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Lesser General Public 6 * License as published by the Free Software Foundation; either 7 * version 2 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Lesser General Public License for more details. 13 * 14 * You should have received a copy of the GNU Lesser General Public 15 * License along with this library; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 */ 4 18 #include <stdlib.h> 5 19 #include <stdio.h> … … 9 23 void check( int value, char* message ); 10 24 11 #define LEN_BIOS_DATA 0x8000 12 #define MAX_OFFSET (LEN_BIOS_DATA - 1) 13 14 15 #define BIOS_OFFSET 0x7FFF 25 #define MAX_BIOS_DATA 0x10000 16 26 17 27 long chksum_bios_get_offset( byte* data, long offset ); … … 30 40 31 41 32 byte bios_data[LEN_BIOS_DATA]; 33 34 35 int main( int argc, char* argv[] ) { 36 42 byte bios_data[MAX_BIOS_DATA]; 43 long bios_len; 44 45 46 int main(int argc, char* argv[]) 47 { 37 48 FILE* stream; 38 49 long offset, tmp_offset; 39 byte cur_val = 0, new_val = 0; 40 int hits; 41 42 43 if( argc != 2 ) { 50 byte bios_len_byte, cur_val = 0, new_val = 0; 51 int hits, modified; 52 53 if (argc != 2) { 44 54 printf( "Error. Need a file-name as an argument.\n" ); 45 55 exit( EXIT_FAILURE ); 46 56 } 47 57 48 if(( stream = fopen( argv[1], "rb" )) == NULL ) { 49 printf( "Error opening %s for reading.\n", argv[1] ); 50 exit( EXIT_FAILURE ); 51 } 52 if( fread( bios_data, 1, LEN_BIOS_DATA, stream ) >= LEN_BIOS_DATA ) { 53 printf( "Error reading max. 32767 Bytes from %s.\n", argv[1] ); 54 fclose( stream ); 55 exit( EXIT_FAILURE ); 56 } 57 fclose( stream ); 58 if ((stream = fopen(argv[1], "rb")) == NULL) { 59 printf("Error opening %s for reading.\n", argv[1]); 60 exit(EXIT_FAILURE); 61 } 62 memset(bios_data, 0, MAX_BIOS_DATA); 63 bios_len = fread(bios_data, 1, MAX_BIOS_DATA, stream); 64 if (bios_len > MAX_BIOS_DATA) { 65 printf("Error reading max. 65536 Bytes from %s.\n", argv[1]); 66 fclose(stream); 67 exit(EXIT_FAILURE); 68 } 69 fclose(stream); 70 modified = 0; 71 if (bios_len < 0x8000) { 72 bios_len = 0x8000; 73 modified = 1; 74 } else if ((bios_len & 0x1FF) != 0) { 75 bios_len = (bios_len + 0x200) & ~0x1FF; 76 modified = 1; 77 } 78 bios_len_byte = (byte)(bios_len / 512); 79 if (bios_len_byte != bios_data[2]) { 80 if (modified == 0) { 81 bios_len += 0x200; 82 } 83 bios_data[2] = (byte)(bios_len / 512); 84 modified = 1; 85 } 58 86 59 87 hits = 0; … … 68 96 hits++; 69 97 } 70 if ( hits == 1 && cur_val != new_val) {71 printf( "Setting checksum.");98 if ((hits == 1) && (cur_val != new_val)) { 99 printf("Setting checksum."); 72 100 chksum_pmid_set_value( bios_data, offset, new_val ); 73 } 74 if( hits >= 2 ) { 101 if (modified == 0) { 102 bios_len += 0x200; 103 bios_data[2]++; 104 } 105 modified = 1; 106 } 107 if (hits >= 2) { 75 108 printf( "Multiple PMID entries! No checksum set." ); 76 109 } 77 if( hits ) { 78 printf( "\n" ); 79 } 80 110 if (hits) { 111 printf("\n"); 112 } 81 113 82 114 offset = 0L; 83 offset = chksum_bios_get_offset( bios_data, offset ); 84 cur_val = chksum_bios_get_value( bios_data, offset ); 85 new_val = chksum_bios_calc_value( bios_data, offset ); 86 printf( "\nBios checksum at: 0x%4lX\n", offset ); 87 printf( "Current checksum: 0x%02X\n", cur_val ); 88 printf( "Calculated checksum: 0x%02X ", new_val ); 89 if( cur_val != new_val ) { 90 printf( "Setting checksum." ); 91 chksum_bios_set_value( bios_data, offset, new_val ); 92 } 93 printf( "\n\n" ); 94 95 96 if(( stream = fopen( argv[1], "wb" )) == NULL ) { 97 printf( "Error opening %s for writing.\n", argv[1] ); 98 exit( EXIT_FAILURE ); 99 } 100 if( fwrite( bios_data, 1, LEN_BIOS_DATA, stream ) < LEN_BIOS_DATA ) { 101 printf( "Error writing 32KBytes to %s.\n", argv[1] ); 102 fclose( stream ); 103 exit( EXIT_FAILURE ); 104 } 105 fclose( stream ); 106 107 return( EXIT_SUCCESS ); 115 do { 116 offset = chksum_bios_get_offset(bios_data, offset); 117 cur_val = chksum_bios_get_value(bios_data, offset); 118 new_val = chksum_bios_calc_value(bios_data, offset); 119 if ((cur_val != new_val) && (modified == 0)) { 120 bios_len += 0x200; 121 bios_data[2]++; 122 modified = 1; 123 } else { 124 printf("\nBios checksum at: 0x%4lX\n", offset); 125 printf("Current checksum: 0x%02X\n", cur_val); 126 printf("Calculated checksum: 0x%02X ", new_val); 127 if (cur_val != new_val) { 128 printf("Setting checksum."); 129 chksum_bios_set_value(bios_data, offset, new_val); 130 cur_val = new_val; 131 modified = 1; 132 } 133 printf( "\n" ); 134 } 135 } while (cur_val != new_val); 136 137 if (modified == 1) { 138 #ifdef VBOX 139 long new_bios_len; 140 #endif 141 if ((stream = fopen( argv[1], "wb")) == NULL) { 142 printf("Error opening %s for writing.\n", argv[1]); 143 exit(EXIT_FAILURE); 144 } 145 #ifdef VBOX 146 if (bios_len <= 0x8000) /* 32k */ 147 new_bios_len = 0x8000; 148 else if (bios_len <= 0xC000) /* 48k */ 149 new_bios_len = 0xC000; 150 else if (bios_len > 0xC000) /* 64k */ 151 new_bios_len = MAX_BIOS_DATA; 152 153 if (fwrite(bios_data, 1, new_bios_len, stream) < new_bios_len) { 154 #else 155 if (fwrite(bios_data, 1, bios_len, stream) < bios_len) { 156 #endif 157 printf("Error writing %d KBytes to %s.\n", bios_len / 1024, argv[1]); 158 fclose(stream); 159 exit(EXIT_FAILURE); 160 } 161 fclose(stream); 162 } 163 164 return (EXIT_SUCCESS); 108 165 } 109 166 … … 120 177 long chksum_bios_get_offset( byte* data, long offset ) { 121 178 122 return ( BIOS_OFFSET);179 return (bios_len - 1); 123 180 } 124 181 … … 130 187 131 188 sum = 0; 132 for( i = 0; i < MAX_OFFSET; i++ ) {189 for( i = 0; i < offset; i++ ) { 133 190 sum = sum + *( data + i ); 134 191 } … … 140 197 byte chksum_bios_get_value( byte* data, long offset ) { 141 198 142 return( *( data + BIOS_OFFSET) );199 return( *( data + offset ) ); 143 200 } 144 201 … … 146 203 void chksum_bios_set_value( byte* data, long offset, byte value ) { 147 204 148 *( data + BIOS_OFFSET) = value;205 *( data + offset ) = value; 149 206 } 150 207 … … 157 214 158 215 len = PMID_LEN; 159 check( offset + len <= MAX_OFFSET, "PMID entry length out of bounds" );216 check((offset + len) <= (bios_len - 1), "PMID entry length out of bounds" ); 160 217 sum = 0; 161 218 for( i = 0; i < len; i++ ) { … … 173 230 long result = -1L; 174 231 175 while ( offset + PMID_LEN < MAX_OFFSET) {232 while ((offset + PMID_LEN) < (bios_len - 1)) { 176 233 offset = offset + 1; 177 234 if( *( data + offset + 0 ) == 'P' && \ … … 189 246 byte chksum_pmid_get_value( byte* data, long offset ) { 190 247 191 check( offset + PMID_CHKSUM <= MAX_OFFSET, "PMID checksum out of bounds" );248 check((offset + PMID_CHKSUM) <= (bios_len - 1), "PMID checksum out of bounds" ); 192 249 return( *( data + offset + PMID_CHKSUM ) ); 193 250 } … … 196 253 void chksum_pmid_set_value( byte* data, long offset, byte value ) { 197 254 198 check( offset + PMID_CHKSUM <= MAX_OFFSET, "PMID checksum out of bounds" );255 check((offset + PMID_CHKSUM) <= (bios_len - 1), "PMID checksum out of bounds" ); 199 256 *( data + offset + PMID_CHKSUM ) = value; 200 257 } -
trunk/src/VBox/Devices/Graphics/BIOS/vbe.c
r3290 r5450 31 31 32 32 // defines available 33 // enable LFB support34 #define VBE_HAVE_LFB35 33 36 34 // disable VESA/VBE2 check in vbe info 37 35 //#define VBE2_NO_VESA_CHECK 38 39 // dynamicly generate a mode_info list40 #define DYN_LIST41 36 42 37 // use bytewise i/o by default (Longhorn issue) … … 50 45 51 46 #include "vbe.h" 52 #include "vbetables.h"53 47 54 48 … … 60 54 extern char vbebios_product_name; 61 55 extern char vbebios_product_revision; 62 63 #ifndef DYN_LIST64 extern Bit16u vbebios_mode_list;65 #endif66 56 67 57 ASM_START … … 104 94 105 95 106 #ifndef DYN_LIST 107 // FIXME: for each new mode add a statement here 108 // at least until dynamic list creation is working 109 _vbebios_mode_list: 110 111 .word VBE_VESA_MODE_640X400X8 112 .word VBE_VESA_MODE_640X480X8 113 .word VBE_VESA_MODE_800X600X4 114 .word VBE_VESA_MODE_800X600X8 115 .word VBE_VESA_MODE_1024X768X8 116 .word VBE_VESA_MODE_640X480X1555 117 .word VBE_VESA_MODE_640X480X565 118 .word VBE_VESA_MODE_640X480X888 119 .word VBE_VESA_MODE_800X600X1555 120 .word VBE_VESA_MODE_800X600X565 121 .word VBE_VESA_MODE_800X600X888 122 .word VBE_VESA_MODE_1024X768X1555 123 .word VBE_VESA_MODE_1024X768X565 124 .word VBE_VESA_MODE_1024X768X888 125 .word VBE_OWN_MODE_640X480X8888 126 .word VBE_OWN_MODE_800X600X8888 127 .word VBE_OWN_MODE_1024X768X8888 128 .word VBE_OWN_MODE_320X200X8 129 .word VBE_VESA_MODE_END_OF_LIST 130 #endif 96 .align 2 97 vesa_pm_start: 98 dw vesa_pm_set_window - vesa_pm_start 99 dw vesa_pm_set_display_start - vesa_pm_start 100 dw vesa_pm_unimplemented - vesa_pm_start 101 dw vesa_pm_io_ports_table - vesa_pm_start 102 vesa_pm_io_ports_table: 103 dw VBE_DISPI_IOPORT_INDEX 104 dw VBE_DISPI_IOPORT_INDEX + 1 105 dw VBE_DISPI_IOPORT_DATA 106 dw VBE_DISPI_IOPORT_DATA + 1 107 dw 0xffff 108 dw 0xffff 109 110 USE32 111 vesa_pm_set_window: 112 cmp bx, #0x00 113 je vesa_pm_set_display_window1 114 mov ax, #0x0100 115 ret 116 vesa_pm_set_display_window1: 117 mov ax, dx 118 push dx 119 push ax 120 mov dx, # VBE_DISPI_IOPORT_INDEX 121 mov ax, # VBE_DISPI_INDEX_BANK 122 out dx, ax 123 pop ax 124 mov dx, # VBE_DISPI_IOPORT_DATA 125 out dx, ax 126 in ax, dx 127 pop dx 128 cmp dx, ax 129 jne illegal_window 130 mov ax, #0x004f 131 ret 132 illegal_window: 133 mov ax, #0x014f 134 ret 135 vesa_pm_set_display_start: 136 cmp bl, #0x80 137 je vesa_pm_set_display_start1 138 cmp bl, #0x00 139 je vesa_pm_set_display_start1 140 mov ax, #0x0100 141 ret 142 vesa_pm_set_display_start1: 143 ; convert offset to (X, Y) coordinate 144 ; (would be simpler to change Bochs VBE API...) 145 push eax 146 push ecx 147 push edx 148 push esi 149 push edi 150 shl edx, #16 151 and ecx, #0xffff 152 or ecx, edx 153 shl ecx, #2 154 mov eax, ecx 155 push eax 156 mov dx, # VBE_DISPI_IOPORT_INDEX 157 mov ax, # VBE_DISPI_INDEX_VIRT_WIDTH 158 out dx, ax 159 mov dx, # VBE_DISPI_IOPORT_DATA 160 in ax, dx 161 movzx ecx, ax 162 mov dx, # VBE_DISPI_IOPORT_INDEX 163 mov ax, # VBE_DISPI_INDEX_BPP 164 out dx, ax 165 mov dx, # VBE_DISPI_IOPORT_DATA 166 in ax, dx 167 movzx esi, ax 168 pop eax 169 170 cmp esi, #4 171 jz bpp4_mode 172 add esi, #7 173 shr esi, #3 174 imul ecx, esi 175 xor edx, edx 176 div ecx 177 mov edi, eax 178 mov eax, edx 179 xor edx, edx 180 div esi 181 jmp set_xy_regs 182 183 bpp4_mode: 184 shr ecx, #1 185 xor edx, edx 186 div ecx 187 mov edi, eax 188 mov eax, edx 189 shl eax, #1 190 191 set_xy_regs: 192 push dx 193 push ax 194 mov dx, # VBE_DISPI_IOPORT_INDEX 195 mov ax, # VBE_DISPI_INDEX_X_OFFSET 196 out dx, ax 197 pop ax 198 mov dx, # VBE_DISPI_IOPORT_DATA 199 out dx, ax 200 pop dx 201 202 mov ax, di 203 push dx 204 push ax 205 mov dx, # VBE_DISPI_IOPORT_INDEX 206 mov ax, # VBE_DISPI_INDEX_Y_OFFSET 207 out dx, ax 208 pop ax 209 mov dx, # VBE_DISPI_IOPORT_DATA 210 out dx, ax 211 pop dx 212 213 pop edi 214 pop esi 215 pop edx 216 pop ecx 217 pop eax 218 mov ax, #0x004f 219 ret 220 221 vesa_pm_unimplemented: 222 mov ax, #0x014f 223 ret 224 USE16 225 vesa_pm_end: 131 226 132 227 ;; Bytewise in/out … … 210 305 out dx, ax 211 306 #endif 212 push ax213 mov dx, #0x03d4214 mov ax, #0x0011215 #ifdef VBE_BYTEWISE_IO216 call out_dx_ax217 #else218 out dx, ax219 #endif220 mov dx, #0x03d4221 pop ax222 push ax223 shr ax, #3224 dec ax225 mov ah, al226 mov al, #0x01227 #ifdef VBE_BYTEWISE_IO228 call out_dx_ax229 #else230 out dx, ax231 #endif232 pop ax233 call vga_set_virt_width234 235 307 pop dx 236 308 pop ax … … 333 405 ret 334 406 407 ; get display capabilities 408 409 _dispi_get_max_xres: 410 push dx 411 push bx 412 call dispi_get_enable 413 mov bx, ax 414 or ax, # VBE_DISPI_GETCAPS 415 call _dispi_set_enable 416 mov dx, # VBE_DISPI_IOPORT_INDEX 417 mov ax, # VBE_DISPI_INDEX_XRES 418 #ifdef VBE_BYTEWISE_IO 419 call out_dx_ax 420 #else 421 out dx, ax 422 #endif 423 mov dx, # VBE_DISPI_IOPORT_DATA 424 #ifdef VBE_BYTEWISE_IO 425 call in_ax_dx 426 #else 427 in ax, dx 428 #endif 429 push ax 430 mov ax, bx 431 call _dispi_set_enable 432 pop ax 433 pop bx 434 pop dx 435 ret 436 335 437 _dispi_get_max_bpp: 336 438 push dx … … 445 547 or bx,bx 446 548 jnz dispi_set_bank_farcall_error 447 push dx 549 mov ax, dx 550 push dx 551 push ax 448 552 mov ax,# VBE_DISPI_INDEX_BANK 449 553 mov dx,# VBE_DISPI_IOPORT_INDEX … … 460 564 out dx,ax 461 565 #endif 566 #ifdef VBE_BYTEWISE_IO 567 call in_ax_dx 568 #else 569 in ax,dx 570 #endif 571 pop dx 572 cmp dx,ax 573 jne dispi_set_bank_farcall_error 574 mov ax, #0x004f 462 575 retf 463 576 dispi_set_bank_farcall_get: … … 568 681 cmp al, #0x04 569 682 ja set_width_svga 570 shr bx, # 2683 shr bx, #1 571 684 set_width_svga: 572 shr bx, # 2573 mov dx, # 0x03d4685 shr bx, #3 686 mov dx, # VGAREG_VGA_CRTC_ADDRESS 574 687 mov ah, bl 575 688 mov al, #0x13 … … 640 753 pop dx 641 754 ret 755 756 _vga_compat_setup: 757 push ax 758 push dx 759 760 ; set CRT X resolution 761 mov dx, # VBE_DISPI_IOPORT_INDEX 762 mov ax, # VBE_DISPI_INDEX_XRES 763 #ifdef VBE_BYTEWISE_IO 764 call out_dx_ax 765 #else 766 out dx, ax 767 #endif 768 mov dx, # VBE_DISPI_IOPORT_DATA 769 #ifdef VBE_BYTEWISE_IO 770 call in_ax_dx 771 #else 772 in ax, dx 773 #endif 774 push ax 775 mov dx, # VGAREG_VGA_CRTC_ADDRESS 776 mov ax, #0x0011 777 #ifdef VBE_BYTEWISE_IO 778 call out_dx_ax 779 #else 780 out dx, ax 781 #endif 782 pop ax 783 push ax 784 shr ax, #3 785 dec ax 786 mov ah, al 787 mov al, #0x01 788 #ifdef VBE_BYTEWISE_IO 789 call out_dx_ax 790 #else 791 out dx, ax 792 #endif 793 pop ax 794 call vga_set_virt_width 795 796 ; set CRT Y resolution 797 mov dx, # VBE_DISPI_IOPORT_INDEX 798 mov ax, # VBE_DISPI_INDEX_YRES 799 #ifdef VBE_BYTEWISE_IO 800 call out_dx_ax 801 #else 802 out dx, ax 803 #endif 804 mov dx, # VBE_DISPI_IOPORT_DATA 805 #ifdef VBE_BYTEWISE_IO 806 call in_ax_dx 807 #else 808 in ax, dx 809 #endif 810 dec ax 811 push ax 812 mov dx, # VGAREG_VGA_CRTC_ADDRESS 813 mov ah, al 814 mov al, #0x12 815 #ifdef VBE_BYTEWISE_IO 816 call out_dx_ax 817 #else 818 out dx, ax 819 #endif 820 pop ax 821 mov al, #0x07 822 out dx, al 823 inc dx 824 in al, dx 825 and al, #0xbd 826 test ah, #0x01 827 jz bit8_clear 828 or al, #0x02 829 bit8_clear: 830 test ah, #0x02 831 jz bit9_clear 832 or al, #0x40 833 bit9_clear: 834 out dx, al 835 836 ; other settings 837 mov dx, # VGAREG_VGA_CRTC_ADDRESS 838 mov ax, #0x0009 839 #ifdef VBE_BYTEWISE_IO 840 call out_dx_ax 841 #else 842 out dx, ax 843 #endif 844 mov al, #0x17 845 out dx, al 846 mov dx, # VGAREG_VGA_CRTC_DATA 847 in al, dx 848 or al, #0x03 849 out dx, al 850 mov dx, # VGAREG_ACTL_RESET 851 in al, dx 852 mov dx, # VGAREG_ACTL_ADDRESS 853 mov al, #0x10 854 out dx, al 855 mov dx, # VGAREG_ACTL_READ_DATA 856 in al, dx 857 or al, #0x01 858 mov dx, # VGAREG_ACTL_ADDRESS 859 out dx, al 860 mov al, #0x20 861 out dx, al 862 mov dx, # VGAREG_GRDC_ADDRESS 863 mov ax, #0x0506 864 #ifdef VBE_BYTEWISE_IO 865 call out_dx_ax 866 #else 867 out dx, ax 868 #endif 869 mov dx, # VGAREG_SEQU_ADDRESS 870 mov ax, #0x0f02 871 #ifdef VBE_BYTEWISE_IO 872 call out_dx_ax 873 #else 874 out dx, ax 875 #endif 876 877 ; settings for >= 8bpp 878 mov dx, # VBE_DISPI_IOPORT_INDEX 879 mov ax, # VBE_DISPI_INDEX_BPP 880 #ifdef VBE_BYTEWISE_IO 881 call out_dx_ax 882 #else 883 out dx, ax 884 #endif 885 mov dx, # VBE_DISPI_IOPORT_DATA 886 #ifdef VBE_BYTEWISE_IO 887 call in_ax_dx 888 #else 889 in ax, dx 890 #endif 891 cmp al, #0x08 892 jb vga_compat_end 893 mov dx, # VGAREG_VGA_CRTC_ADDRESS 894 mov al, #0x14 895 out dx, al 896 mov dx, # VGAREG_VGA_CRTC_DATA 897 in al, dx 898 or al, #0x40 899 out dx, al 900 mov dx, # VGAREG_ACTL_RESET 901 in al, dx 902 mov dx, # VGAREG_ACTL_ADDRESS 903 mov al, #0x10 904 out dx, al 905 mov dx, # VGAREG_ACTL_READ_DATA 906 in al, dx 907 or al, #0x40 908 mov dx, # VGAREG_ACTL_ADDRESS 909 out dx, al 910 mov al, #0x20 911 out dx, al 912 mov dx, # VGAREG_SEQU_ADDRESS 913 mov al, #0x04 914 out dx, al 915 mov dx, # VGAREG_SEQU_DATA 916 in al, dx 917 or al, #0x08 918 out dx, al 919 mov dx, # VGAREG_GRDC_ADDRESS 920 mov al, #0x05 921 out dx, al 922 mov dx, # VGAREG_GRDC_DATA 923 in al, dx 924 and al, #0x9f 925 or al, #0x40 926 out dx, al 927 928 vga_compat_end: 929 pop dx 930 pop ax 642 931 ASM_END 643 932 … … 769 1058 pop bx 770 1059 pop ds 771 mov ax, # VBE_DISPI_ID3 1060 ; mov ax, # VBE_DISPI_ID3 1061 mov ax, # VBE_DISPI_ID4 772 1062 call dispi_set_id 773 1063 no_vbe_interface: 1064 #if defined(DEBUG) 774 1065 mov bx, #msg_vbe_init 775 1066 push bx … … 777 1068 inc sp 778 1069 inc sp 779 ret 780 1070 #endif 1071 ret 1072 1073 #ifndef VBOX 781 1074 ; VBE Display Info - Display information on screen about the VBE 782 1075 … … 794 1087 mov si, #_no_vbebios_info_string 795 1088 jmp _display_string 1089 #endif 1090 796 1091 ASM_END 797 1092 … … 820 1115 ModeInfoListItem *cur_info; /* used to get the mode list offset. */ 821 1116 Bit16u sig, vmode; 1117 Bit16u max_bpp=dispi_get_max_bpp(); 822 1118 #else 823 1119 ModeInfoListItem *cur_info=&mode_info_list; 824 #endif825 #ifdef DYN_LIST826 Bit16u max_bpp=dispi_get_max_bpp();827 1120 #endif 828 1121 … … 890 1183 vbe_info_block.Capabilities[3] = 0; 891 1184 892 #ifdef DYN_LIST893 1185 // VBE Video Mode Pointer (dynamicly generated from the mode_info_list) 894 1186 vbe_info_block.VideoModePtr_Seg= ES ; 895 1187 vbe_info_block.VideoModePtr_Off= DI + 34; 896 #else897 // VBE Video Mode Pointer (staticly in rom)898 vbe_info_block.VideoModePtr_Seg = 0xc000;899 vbe_info_block.VideoModePtr_Off = &vbebios_mode_list;900 #endif901 1188 902 1189 // VBE Total Memory (in 64b blocks) … … 947 1234 write_word(ES, DI + cur_ptr, vmode); 948 1235 #else 949 #ifdef DYN_LIST950 1236 do 951 1237 { … … 963 1249 // Add vesa mode list terminator 964 1250 write_word(ES, DI + cur_ptr, cur_info->mode); 965 #endif966 1251 #endif // VBE_NEW_DYN_LIST 967 1252 … … 1095 1380 Bit16u data; 1096 1381 Bit8u data_b; 1097 #ifdef DEBUG1098 1382 Bit16u x, y; 1099 1383 Bit8u bpp; … … 1103 1387 bpp = in_byte(VBE_EXTRA_PORT, &cur_info->info.BitsPerPixel); 1104 1388 1389 #ifdef DEBUG 1105 1390 printf("VBE found mode %x, setting:\n", BX); 1106 1391 printf("\txres%x yres%x bpp%x\n", x, y, bpp); … … 1143 1428 dispi_set_bank(0); 1144 1429 dispi_set_enable(VBE_DISPI_ENABLED | no_clear | lfb_flag); 1430 vga_compat_setup(); 1145 1431 1146 1432 write_word(BIOSMEM_SEG,BIOSMEM_VBE_MODE,BX); … … 1193 1479 ASM_END 1194 1480 1481 Bit16u vbe_biosfn_read_video_state_size() 1482 { 1483 return 9 * 2; 1484 } 1485 1486 void vbe_biosfn_save_video_state(ES, BX) 1487 Bit16u ES; Bit16u BX; 1488 { 1489 Bit16u enable, i; 1490 1491 outw(VBE_DISPI_IOPORT_INDEX,VBE_DISPI_INDEX_ENABLE); 1492 enable = inw(VBE_DISPI_IOPORT_DATA); 1493 write_word(ES, BX, enable); 1494 BX += 2; 1495 if (!(enable & VBE_DISPI_ENABLED)) 1496 return; 1497 for(i = VBE_DISPI_INDEX_XRES; i <= VBE_DISPI_INDEX_Y_OFFSET; i++) { 1498 if (i != VBE_DISPI_INDEX_ENABLE) { 1499 outw(VBE_DISPI_IOPORT_INDEX, i); 1500 write_word(ES, BX, inw(VBE_DISPI_IOPORT_DATA)); 1501 BX += 2; 1502 } 1503 } 1504 } 1505 1506 1507 void vbe_biosfn_restore_video_state(ES, BX) 1508 Bit16u ES; Bit16u BX; 1509 { 1510 Bit16u enable, i; 1511 1512 enable = read_word(ES, BX); 1513 BX += 2; 1514 1515 if (!(enable & VBE_DISPI_ENABLED)) { 1516 outw(VBE_DISPI_IOPORT_INDEX,VBE_DISPI_INDEX_ENABLE); 1517 outw(VBE_DISPI_IOPORT_DATA, enable); 1518 } else { 1519 outw(VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_XRES); 1520 outw(VBE_DISPI_IOPORT_DATA, read_word(ES, BX)); 1521 BX += 2; 1522 outw(VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_YRES); 1523 outw(VBE_DISPI_IOPORT_DATA, read_word(ES, BX)); 1524 BX += 2; 1525 outw(VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_BPP); 1526 outw(VBE_DISPI_IOPORT_DATA, read_word(ES, BX)); 1527 BX += 2; 1528 outw(VBE_DISPI_IOPORT_INDEX,VBE_DISPI_INDEX_ENABLE); 1529 outw(VBE_DISPI_IOPORT_DATA, enable); 1530 1531 for(i = VBE_DISPI_INDEX_BANK; i <= VBE_DISPI_INDEX_Y_OFFSET; i++) { 1532 outw(VBE_DISPI_IOPORT_INDEX, i); 1533 outw(VBE_DISPI_IOPORT_DATA, read_word(ES, BX)); 1534 BX += 2; 1535 } 1536 } 1537 } 1195 1538 1196 1539 /** Function 04h - Save/Restore State … … 1208 1551 * 1209 1552 */ 1210 void vbe_biosfn_save_restore_state(AX, DL, CX, ES, BX) 1553 void vbe_biosfn_save_restore_state(AX, CX, DX, ES, BX) 1554 Bit16u *AX; Bit16u CX; Bit16u DX; Bit16u ES; Bit16u *BX; 1211 1555 { 1556 Bit16u ss=get_SS(); 1557 Bit16u result, val; 1558 1559 result = 0x4f; 1560 switch(GET_DL()) { 1561 case 0x00: 1562 val = biosfn_read_video_state_size2(CX); 1563 #ifdef DEBUG 1564 printf("VGA state size=%x\n", val); 1565 #endif 1566 if (CX & 8) 1567 val += vbe_biosfn_read_video_state_size(); 1568 write_word(ss, BX, val); 1569 break; 1570 case 0x01: 1571 val = read_word(ss, BX); 1572 val = biosfn_save_video_state(CX, ES, val); 1573 #ifdef DEBUG 1574 printf("VGA save_state offset=%x\n", val); 1575 #endif 1576 if (CX & 8) 1577 vbe_biosfn_save_video_state(ES, val); 1578 break; 1579 case 0x02: 1580 val = read_word(ss, BX); 1581 val = biosfn_restore_video_state(CX, ES, val); 1582 #ifdef DEBUG 1583 printf("VGA restore_state offset=%x\n", val); 1584 #endif 1585 if (CX & 8) 1586 vbe_biosfn_restore_video_state(ES, val); 1587 break; 1588 default: 1589 // function failed 1590 result = 0x100; 1591 break; 1592 } 1593 write_word(ss, AX, result); 1212 1594 } 1213 1595 … … 1295 1677 xor bh, bh 1296 1678 mov bl, ah 1679 or bl, bl 1680 jnz no_4bpp_1 1681 shl ax, #3 1682 mov bl, #1 1683 no_4bpp_1: 1297 1684 xor dx, dx 1298 1685 pop ax … … 1306 1693 call dispi_get_virt_width 1307 1694 mov cx, ax 1695 or bl, bl 1696 jnz no_4bpp_2 1697 shr ax, #3 1698 mov bl, #1 1699 no_4bpp_2: 1308 1700 mul bx 1309 1701 mov bx, ax … … 1522 1914 ASM_END 1523 1915 1916 1524 1917 /** Function 0Ah - Return VBE Protected Mode Interface 1525 1918 * 1526 * Input: 1527 * AX = 4F0Ah 1528 * Output: 1529 * AX = VBE Return Status 1530 * 1531 * FIXME: incomplete API description, Input & Output 1919 * Input: AX = 4F0Ah VBE 2.0 Protected Mode Interface 1920 * BL = 00h Return protected mode table 1921 * Output: AX = Status 1922 * ES = Real Mode Segment of Table 1923 * DI = Offset of Table 1924 * CX = Length of Table including protected mode code 1925 * (for copying purposes) 1532 1926 */ 1533 void vbe_biosfn_return_protected_mode_interface(AX) 1534 { 1535 } 1927 ASM_START 1928 vbe_biosfn_return_protected_mode_interface: 1929 test bl, bl 1930 jnz _fail 1931 mov di, #0xc000 1932 mov es, di 1933 mov di, # vesa_pm_start 1934 mov cx, # vesa_pm_end 1935 sub cx, di 1936 mov ax, #0x004f 1937 ret 1938 _fail: 1939 mov ax, #0x014f 1940 ret 1941 ASM_END -
trunk/src/VBox/Devices/Graphics/BIOS/vbe.h
r3290 r5450 15 15 void vbe_biosfn_return_mode_information(AX, CX, ES, DI); 16 16 void vbe_biosfn_set_mode(AX, BX, ES, DI); 17 void vbe_biosfn_save_restore_state(AX, DL, CX, ES, BX);17 void vbe_biosfn_save_restore_state(AX, CX, DX, ES, BX); 18 18 void vbe_biosfn_return_protected_mode_interface(AX); 19 19 … … 151 151 } ModeInfoBlock; 152 152 153 typedef struct ModeInfoListItem 154 { 155 Bit16u mode; 156 ModeInfoBlockCompact info; 157 } ModeInfoListItem; 158 153 159 // VBE Return Status Info 154 160 // AL … … 193 199 #define VBE_VESA_MODE_1280X1024X565 0x11A 194 200 #define VBE_VESA_MODE_1280X1024X888 0x11B 201 #define VBE_VESA_MODE_1600X1200X8 0x11C 202 #define VBE_VESA_MODE_1600X1200X1555 0x11D 203 #define VBE_VESA_MODE_1600X1200X565 0x11E 204 #define VBE_VESA_MODE_1600X1200X888 0x11F 195 205 196 206 // BOCHS/PLEX86 'own' mode numbers … … 202 212 #define VBE_OWN_MODE_1280X1024X8888 0x145 203 213 #define VBE_OWN_MODE_320X200X8 0x146 214 #define VBE_OWN_MODE_1600X1200X8888 0x147 215 #define VBE_OWN_MODE_1152X864X8 0x148 216 #define VBE_OWN_MODE_1152X864X1555 0x149 217 #define VBE_OWN_MODE_1152X864X565 0x14a 218 #define VBE_OWN_MODE_1152X864X888 0x14b 219 #define VBE_OWN_MODE_1152X864X8888 0x14c 204 220 205 221 #define VBE_VESA_MODE_END_OF_LIST 0xFFFF … … 283 299 #define VBE_DISPI_ID2 0xB0C2 284 300 #define VBE_DISPI_ID3 0xB0C3 285 301 #define VBE_DISPI_ID4 0xB0C4 302 286 303 #define VBE_DISPI_DISABLED 0x00 287 304 #define VBE_DISPI_ENABLED 0x01 -
trunk/src/VBox/Devices/Graphics/BIOS/vbe_display_api.txt
r1 r5450 41 41 VBE_DISPI_INDEX_ENABLE supports new flags VBE_DISPI_GETCAPS and VBE_DISPI_8BIT_DAC 42 42 43 0xb0c4 VBE video memory increased to 8 MB 44 43 45 44 46 History … … 83 85 #defines 84 86 -------- 85 #define VBE_DISPI_TOTAL_VIDEO_MEMORY_MB 4 87 vbetables-gen.c 88 #define VBE_DISPI_TOTAL_VIDEO_MEMORY_MB 8 89 90 vbe.h 86 91 #define VBE_DISPI_BANK_ADDRESS 0xA0000 87 92 #define VBE_DISPI_BANK_SIZE_KB 64 … … 107 112 #define VBE_DISPI_ID1 0xB0C1 108 113 #define VBE_DISPI_ID2 0xB0C2 114 #define VBE_DISPI_ID3 0xB0C3 115 #define VBE_DISPI_ID4 0xB0C4 109 116 110 117 #define VBE_DISPI_DISABLED 0x00 … … 203 210 The new flag VBE_DISPI_8BIT_DAC switches the DAC to 8 bit mode. 204 211 212 [0xb0c4] 213 * VBE_DISPI_TOTAL_VIDEO_MEMORY_MB set to 8 (moved to auto-generated vbetables.h) 214 205 215 Displaying GFX (banked mode) 206 216 -------------- -
trunk/src/VBox/Devices/Graphics/BIOS/vgabios.c
r3290 r5450 107 107 static void biosfn_read_state_info(); 108 108 static void biosfn_read_video_state_size(); 109 static void biosfn_save_video_state(); 110 static void biosfn_restore_video_state(); 109 static Bit16u biosfn_save_video_state(); 110 static Bit16u biosfn_restore_video_state(); 111 extern Bit8u video_save_pointer_table[]; 111 112 112 113 // This is for compiling with gcc2 and gcc3 … … 228 229 #endif 229 230 231 #ifndef VBOX 230 232 ;; display splash screen 231 233 call _display_splash_screen … … 236 238 int #0x10 237 239 238 #ifndef VBOX239 240 240 241 ;; show info … … 372 373 int10_test_vbe_09: 373 374 cmp al, #0x09 375 jne int10_test_vbe_0A 376 call vbe_biosfn_set_get_palette_data 377 jmp int10_end 378 int10_test_vbe_0A: 379 cmp al, #0x0A 374 380 jne int10_normal 375 call vbe_biosfn_ set_get_palette_data381 call vbe_biosfn_return_protected_mode_interface 376 382 jmp int10_end 377 383 #endif … … 477 483 pop ds 478 484 ret 485 486 _video_save_pointer_table: 487 .word _video_param_table 488 .word 0xc000 489 490 .word 0 /* XXX: fill it */ 491 .word 0 492 493 .word 0 /* XXX: fill it */ 494 .word 0 495 496 .word 0 /* XXX: fill it */ 497 .word 0 498 499 .word 0 /* XXX: fill it */ 500 .word 0 501 502 .word 0 /* XXX: fill it */ 503 .word 0 504 505 .word 0 /* XXX: fill it */ 506 .word 0 479 507 ASM_END 480 508 … … 487 515 } 488 516 517 #ifndef VBOX 489 518 // -------------------------------------------------------------------------------------------- 490 519 /* … … 494 523 static void display_info() 495 524 { 496 #ifndef VBOX497 525 ASM_START 498 526 mov ax,#0xc000 … … 514 542 call _display_string 515 543 ASM_END 516 #endif517 544 } 518 545 … … 545 572 ASM_END 546 573 } 574 #endif 547 575 548 576 // -------------------------------------------------------------------------------------------- … … 745 773 break; 746 774 case 0x04: 747 //FIXME 748 #ifdef DEBUG 749 unimplemented(); 750 #endif 751 // function failed 752 AX=0x100; 775 vbe_biosfn_save_restore_state(&AX, CX, DX, ES, &BX); 753 776 break; 754 777 case 0x09: … … 801 824 // Should we clear the screen ? 802 825 Bit8u noclearmem=mode&0x80; 803 Bit8u line,mmask,*palette ;804 Bit16u i,twidth,theight ,cheight;826 Bit8u line,mmask,*palette,vpti; 827 Bit16u i,twidth,theightm1,cheight; 805 828 Bit8u modeset_ctl,video_ctl,vga_switches; 806 829 Bit16u crtc_addr; … … 825 848 return; 826 849 827 twidth=vga_modes[line].twidth; 828 theight=vga_modes[line].theight; 829 cheight=vga_modes[line].cheight; 850 vpti=line_to_vpti[line]; 851 twidth=video_param_table[vpti].twidth; 852 theightm1=video_param_table[vpti].theightm1; 853 cheight=video_param_table[vpti].cheight; 830 854 831 855 // Read the bios vga control … … 887 911 888 912 // Set Attribute Ctl 889 for(i=0;i<= ACTL_MAX_REG;i++)913 for(i=0;i<=0x13;i++) 890 914 {outb(VGAREG_ACTL_ADDRESS,i); 891 outb(VGAREG_ACTL_WRITE_DATA,actl_regs[vga_modes[line].actlmodel][i]); 892 } 915 outb(VGAREG_ACTL_WRITE_DATA,video_param_table[vpti].actl_regs[i]); 916 } 917 outb(VGAREG_ACTL_ADDRESS,0x14); 918 outb(VGAREG_ACTL_WRITE_DATA,0x00); 893 919 894 920 // Set Sequencer Ctl 895 for(i=0;i<=SEQU_MAX_REG;i++) 921 outb(VGAREG_SEQU_ADDRESS,0); 922 outb(VGAREG_SEQU_DATA,0x03); 923 for(i=1;i<=4;i++) 896 924 {outb(VGAREG_SEQU_ADDRESS,i); 897 outb(VGAREG_SEQU_DATA, sequ_regs[vga_modes[line].sequmodel][i]);925 outb(VGAREG_SEQU_DATA,video_param_table[vpti].sequ_regs[i - 1]); 898 926 } 899 927 900 928 // Set Grafx Ctl 901 for(i=0;i<= GRDC_MAX_REG;i++)929 for(i=0;i<=8;i++) 902 930 {outb(VGAREG_GRDC_ADDRESS,i); 903 outb(VGAREG_GRDC_DATA, grdc_regs[vga_modes[line].grdcmodel][i]);931 outb(VGAREG_GRDC_DATA,video_param_table[vpti].grdc_regs[i]); 904 932 } 905 933 … … 910 938 outw(crtc_addr,0x0011); 911 939 // Set CRTC regs 912 for(i=0;i<= CRTC_MAX_REG;i++)940 for(i=0;i<=0x18;i++) 913 941 {outb(crtc_addr,i); 914 outb(crtc_addr+1, crtc_regs[vga_modes[line].crtcmodel][i]);942 outb(crtc_addr+1,video_param_table[vpti].crtc_regs[i]); 915 943 } 916 944 917 945 // Set the misc register 918 outb(VGAREG_WRITE_MISC_OUTPUT,v ga_modes[line].miscreg);946 outb(VGAREG_WRITE_MISC_OUTPUT,video_param_table[vpti].miscreg); 919 947 920 948 // Enable video … … 948 976 write_byte(BIOSMEM_SEG,BIOSMEM_CURRENT_MODE,mode); 949 977 write_word(BIOSMEM_SEG,BIOSMEM_NB_COLS,twidth); 950 write_word(BIOSMEM_SEG,BIOSMEM_PAGE_SIZE, vga_modes[line].slength);978 write_word(BIOSMEM_SEG,BIOSMEM_PAGE_SIZE,*(Bit16u *)&video_param_table[vpti].slength_l); 951 979 write_word(BIOSMEM_SEG,BIOSMEM_CRTC_ADDRESS,crtc_addr); 952 write_byte(BIOSMEM_SEG,BIOSMEM_NB_ROWS,theight -1);980 write_byte(BIOSMEM_SEG,BIOSMEM_NB_ROWS,theightm1); 953 981 write_word(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT,cheight); 954 982 write_byte(BIOSMEM_SEG,BIOSMEM_VIDEO_CTL,(0x60|noclearmem)); … … 958 986 // FIXME We nearly have the good tables. to be reworked 959 987 write_byte(BIOSMEM_SEG,BIOSMEM_DCC_INDEX,0x08); // 8 is VGA should be ok for now 960 write_word(BIOSMEM_SEG,BIOSMEM_VS_POINTER, 0x00);961 write_word(BIOSMEM_SEG,BIOSMEM_VS_POINTER+2, 0x00);988 write_word(BIOSMEM_SEG,BIOSMEM_VS_POINTER, video_save_pointer_table); 989 write_word(BIOSMEM_SEG,BIOSMEM_VS_POINTER+2, 0xc000); 962 990 963 991 // FIXME … … 1135 1163 else 1136 1164 { 1137 address = page *vga_modes[line].slength;1165 address = page * (*(Bit16u *)&video_param_table[line_to_vpti[line]].slength_l); 1138 1166 } 1139 1167 … … 1285 1313 else 1286 1314 memcpyw(vga_modes[line].sstart,address+(i*nbcols+cul)*2,vga_modes[line].sstart,((i-nblines)*nbcols+cul)*2,cols); 1315 if (i>rlr) break; 1287 1316 } 1288 1317 } … … 1292 1321 { 1293 1322 // FIXME gfx mode not complete 1294 cheight=v ga_modes[line].cheight;1323 cheight=video_param_table[line_to_vpti[line]].cheight; 1295 1324 switch(vga_modes[line].memmodel) 1296 1325 { … … 1321 1350 else 1322 1351 vgamem_copy_pl4(cul,i,i-nblines,cols,nbcols,cheight); 1352 if (i>rlr) break; 1323 1353 } 1324 1354 } … … 1356 1386 else 1357 1387 vgamem_copy_cga(cul,i,i-nblines,cols,nbcols,cheight); 1388 if (i>rlr) break; 1358 1389 } 1359 1390 } … … 1602 1633 { 1603 1634 // FIXME gfx mode not complete 1604 cheight=v ga_modes[line].cheight;1635 cheight=video_param_table[line_to_vpti[line]].cheight; 1605 1636 bpp=vga_modes[line].pixbits; 1606 1637 while((count-->0) && (xcurs<nbcols)) … … 1662 1693 { 1663 1694 // FIXME gfx mode not complete 1664 cheight=v ga_modes[line].cheight;1695 cheight=video_param_table[line_to_vpti[line]].cheight; 1665 1696 bpp=vga_modes[line].pixbits; 1666 1697 while((count-->0) && (xcurs<nbcols)) … … 1978 2009 { 1979 2010 // FIXME gfx mode not complete 1980 cheight=v ga_modes[line].cheight;2011 cheight=video_param_table[line_to_vpti[line]].cheight; 1981 2012 bpp=vga_modes[line].pixbits; 1982 2013 switch(vga_modes[line].memmodel) … … 3169 3200 3170 3201 // -------------------------------------------------------------------------------------------- 3171 static void biosfn_read_video_state_size (CX,ES,BX) Bit16u CX;Bit16u ES;Bit16u BX; 3172 { 3173 #ifdef DEBUG 3174 unimplemented(); 3175 #endif 3176 } 3177 static void biosfn_save_video_state (CX,ES,BX) Bit16u CX;Bit16u ES;Bit16u BX; 3178 { 3179 #ifdef DEBUG 3180 unimplemented(); 3181 #endif 3182 } 3183 static void biosfn_restore_video_state (CX,ES,BX) Bit16u CX;Bit16u ES;Bit16u BX; 3184 { 3185 #ifdef DEBUG 3186 unimplemented(); 3187 #endif 3202 static Bit16u biosfn_read_video_state_size2 (CX) 3203 Bit16u CX; 3204 { 3205 Bit16u size; 3206 size = 0; 3207 if (CX & 1) { 3208 size += 0x46; 3209 } 3210 if (CX & 2) { 3211 size += (5 + 8 + 5) * 2 + 6; 3212 } 3213 if (CX & 4) { 3214 size += 3 + 256 * 3 + 1; 3215 } 3216 return size; 3217 } 3218 static void biosfn_read_video_state_size (CX, BX) 3219 Bit16u CX; Bit16u *BX; 3220 { 3221 Bit16u ss=get_SS(); 3222 write_word(ss, BX, biosfn_read_video_state_size2(CX)); 3223 } 3224 static Bit16u biosfn_save_video_state (CX,ES,BX) 3225 Bit16u CX;Bit16u ES;Bit16u BX; 3226 { 3227 Bit16u i, v, crtc_addr, ar_index; 3228 3229 crtc_addr = read_word(BIOSMEM_SEG, BIOSMEM_CRTC_ADDRESS); 3230 if (CX & 1) { 3231 write_byte(ES, BX, inb(VGAREG_SEQU_ADDRESS)); BX++; 3232 write_byte(ES, BX, inb(crtc_addr)); BX++; 3233 write_byte(ES, BX, inb(VGAREG_GRDC_ADDRESS)); BX++; 3234 inb(VGAREG_ACTL_RESET); 3235 ar_index = inb(VGAREG_ACTL_ADDRESS); 3236 write_byte(ES, BX, ar_index); BX++; 3237 write_byte(ES, BX, inb(VGAREG_READ_FEATURE_CTL)); BX++; 3238 3239 for(i=1;i<=4;i++){ 3240 outb(VGAREG_SEQU_ADDRESS, i); 3241 write_byte(ES, BX, inb(VGAREG_SEQU_DATA)); BX++; 3242 } 3243 outb(VGAREG_SEQU_ADDRESS, 0); 3244 write_byte(ES, BX, inb(VGAREG_SEQU_DATA)); BX++; 3245 3246 for(i=0;i<=0x18;i++) { 3247 outb(crtc_addr,i); 3248 write_byte(ES, BX, inb(crtc_addr+1)); BX++; 3249 } 3250 3251 for(i=0;i<=0x13;i++) { 3252 inb(VGAREG_ACTL_RESET); 3253 outb(VGAREG_ACTL_ADDRESS, i | (ar_index & 0x20)); 3254 write_byte(ES, BX, inb(VGAREG_ACTL_READ_DATA)); BX++; 3255 } 3256 inb(VGAREG_ACTL_RESET); 3257 3258 for(i=0;i<=8;i++) { 3259 outb(VGAREG_GRDC_ADDRESS,i); 3260 write_byte(ES, BX, inb(VGAREG_GRDC_DATA)); BX++; 3261 } 3262 3263 write_word(ES, BX, crtc_addr); BX+= 2; 3264 3265 /* XXX: read plane latches */ 3266 write_byte(ES, BX, 0); BX++; 3267 write_byte(ES, BX, 0); BX++; 3268 write_byte(ES, BX, 0); BX++; 3269 write_byte(ES, BX, 0); BX++; 3270 } 3271 if (CX & 2) { 3272 write_byte(ES, BX, read_byte(BIOSMEM_SEG,BIOSMEM_CURRENT_MODE)); BX++; 3273 write_word(ES, BX, read_word(BIOSMEM_SEG,BIOSMEM_NB_COLS)); BX += 2; 3274 write_word(ES, BX, read_word(BIOSMEM_SEG,BIOSMEM_PAGE_SIZE)); BX += 2; 3275 write_word(ES, BX, read_word(BIOSMEM_SEG,BIOSMEM_CRTC_ADDRESS)); BX += 2; 3276 write_byte(ES, BX, read_byte(BIOSMEM_SEG,BIOSMEM_NB_ROWS)); BX++; 3277 write_word(ES, BX, read_word(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT)); BX += 2; 3278 write_byte(ES, BX, read_byte(BIOSMEM_SEG,BIOSMEM_VIDEO_CTL)); BX++; 3279 write_byte(ES, BX, read_byte(BIOSMEM_SEG,BIOSMEM_SWITCHES)); BX++; 3280 write_byte(ES, BX, read_byte(BIOSMEM_SEG,BIOSMEM_MODESET_CTL)); BX++; 3281 write_word(ES, BX, read_word(BIOSMEM_SEG,BIOSMEM_CURSOR_TYPE)); BX += 2; 3282 for(i=0;i<8;i++) { 3283 write_word(ES, BX, read_word(BIOSMEM_SEG, BIOSMEM_CURSOR_POS+2*i)); 3284 BX += 2; 3285 } 3286 write_word(ES, BX, read_word(BIOSMEM_SEG,BIOSMEM_CURRENT_START)); BX += 2; 3287 write_byte(ES, BX, read_byte(BIOSMEM_SEG,BIOSMEM_CURRENT_PAGE)); BX++; 3288 /* current font */ 3289 write_word(ES, BX, read_word(0, 0x1f * 4)); BX += 2; 3290 write_word(ES, BX, read_word(0, 0x1f * 4 + 2)); BX += 2; 3291 write_word(ES, BX, read_word(0, 0x43 * 4)); BX += 2; 3292 write_word(ES, BX, read_word(0, 0x43 * 4 + 2)); BX += 2; 3293 } 3294 if (CX & 4) { 3295 /* XXX: check this */ 3296 write_byte(ES, BX, inb(VGAREG_DAC_STATE)); BX++; /* read/write mode dac */ 3297 write_byte(ES, BX, inb(VGAREG_DAC_WRITE_ADDRESS)); BX++; /* pix address */ 3298 write_byte(ES, BX, inb(VGAREG_PEL_MASK)); BX++; 3299 // Set the whole dac always, from 0 3300 outb(VGAREG_DAC_WRITE_ADDRESS,0x00); 3301 for(i=0;i<256*3;i++) { 3302 write_byte(ES, BX, inb(VGAREG_DAC_DATA)); BX++; 3303 } 3304 write_byte(ES, BX, 0); BX++; /* color select register */ 3305 } 3306 return BX; 3307 } 3308 3309 static Bit16u biosfn_restore_video_state (CX,ES,BX) 3310 Bit16u CX;Bit16u ES;Bit16u BX; 3311 { 3312 Bit16u i, crtc_addr, v, addr1, ar_index; 3313 3314 if (CX & 1) { 3315 // Reset Attribute Ctl flip-flop 3316 inb(VGAREG_ACTL_RESET); 3317 3318 crtc_addr = read_word(ES, BX + 0x40); 3319 addr1 = BX; 3320 BX += 5; 3321 3322 for(i=1;i<=4;i++){ 3323 outb(VGAREG_SEQU_ADDRESS, i); 3324 outb(VGAREG_SEQU_DATA, read_byte(ES, BX)); BX++; 3325 } 3326 outb(VGAREG_SEQU_ADDRESS, 0); 3327 outb(VGAREG_SEQU_DATA, read_byte(ES, BX)); BX++; 3328 3329 // Disable CRTC write protection 3330 outw(crtc_addr,0x0011); 3331 // Set CRTC regs 3332 for(i=0;i<=0x18;i++) { 3333 if (i != 0x11) { 3334 outb(crtc_addr,i); 3335 outb(crtc_addr+1, read_byte(ES, BX)); 3336 } 3337 BX++; 3338 } 3339 // select crtc base address 3340 v = inb(VGAREG_READ_MISC_OUTPUT) & ~0x01; 3341 if (crtc_addr = 0x3d4) 3342 v |= 0x01; 3343 outb(VGAREG_WRITE_MISC_OUTPUT, v); 3344 3345 // enable write protection if needed 3346 outb(crtc_addr, 0x11); 3347 outb(crtc_addr+1, read_byte(ES, BX - 0x18 + 0x11)); 3348 3349 // Set Attribute Ctl 3350 ar_index = read_byte(ES, addr1 + 0x03); 3351 inb(VGAREG_ACTL_RESET); 3352 for(i=0;i<=0x13;i++) { 3353 outb(VGAREG_ACTL_ADDRESS, i | (ar_index & 0x20)); 3354 outb(VGAREG_ACTL_WRITE_DATA, read_byte(ES, BX)); BX++; 3355 } 3356 outb(VGAREG_ACTL_ADDRESS, ar_index); 3357 inb(VGAREG_ACTL_RESET); 3358 3359 for(i=0;i<=8;i++) { 3360 outb(VGAREG_GRDC_ADDRESS,i); 3361 outb(VGAREG_GRDC_DATA, read_byte(ES, BX)); BX++; 3362 } 3363 BX += 2; /* crtc_addr */ 3364 BX += 4; /* plane latches */ 3365 3366 outb(VGAREG_SEQU_ADDRESS, read_byte(ES, addr1)); addr1++; 3367 outb(crtc_addr, read_byte(ES, addr1)); addr1++; 3368 outb(VGAREG_GRDC_ADDRESS, read_byte(ES, addr1)); addr1++; 3369 addr1++; 3370 outb(crtc_addr - 0x4 + 0xa, read_byte(ES, addr1)); addr1++; 3371 } 3372 if (CX & 2) { 3373 write_byte(BIOSMEM_SEG,BIOSMEM_CURRENT_MODE, read_byte(ES, BX)); BX++; 3374 write_word(BIOSMEM_SEG,BIOSMEM_NB_COLS, read_word(ES, BX)); BX += 2; 3375 write_word(BIOSMEM_SEG,BIOSMEM_PAGE_SIZE, read_word(ES, BX)); BX += 2; 3376 write_word(BIOSMEM_SEG,BIOSMEM_CRTC_ADDRESS, read_word(ES, BX)); BX += 2; 3377 write_byte(BIOSMEM_SEG,BIOSMEM_NB_ROWS, read_byte(ES, BX)); BX++; 3378 write_word(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT, read_word(ES, BX)); BX += 2; 3379 write_byte(BIOSMEM_SEG,BIOSMEM_VIDEO_CTL, read_byte(ES, BX)); BX++; 3380 write_byte(BIOSMEM_SEG,BIOSMEM_SWITCHES, read_byte(ES, BX)); BX++; 3381 write_byte(BIOSMEM_SEG,BIOSMEM_MODESET_CTL, read_byte(ES, BX)); BX++; 3382 write_word(BIOSMEM_SEG,BIOSMEM_CURSOR_TYPE, read_word(ES, BX)); BX += 2; 3383 for(i=0;i<8;i++) { 3384 write_word(BIOSMEM_SEG, BIOSMEM_CURSOR_POS+2*i, read_word(ES, BX)); 3385 BX += 2; 3386 } 3387 write_word(BIOSMEM_SEG,BIOSMEM_CURRENT_START, read_word(ES, BX)); BX += 2; 3388 write_byte(BIOSMEM_SEG,BIOSMEM_CURRENT_PAGE, read_byte(ES, BX)); BX++; 3389 /* current font */ 3390 write_word(0, 0x1f * 4, read_word(ES, BX)); BX += 2; 3391 write_word(0, 0x1f * 4 + 2, read_word(ES, BX)); BX += 2; 3392 write_word(0, 0x43 * 4, read_word(ES, BX)); BX += 2; 3393 write_word(0, 0x43 * 4 + 2, read_word(ES, BX)); BX += 2; 3394 } 3395 if (CX & 4) { 3396 BX++; 3397 v = read_byte(ES, BX); BX++; 3398 outb(VGAREG_PEL_MASK, read_byte(ES, BX)); BX++; 3399 // Set the whole dac always, from 0 3400 outb(VGAREG_DAC_WRITE_ADDRESS,0x00); 3401 for(i=0;i<256*3;i++) { 3402 outb(VGAREG_DAC_DATA, read_byte(ES, BX)); BX++; 3403 } 3404 BX++; 3405 outb(VGAREG_DAC_WRITE_ADDRESS, v); 3406 } 3407 return BX; 3188 3408 } 3189 3409 … … 3591 3811 Bit8u *s; 3592 3812 { 3813 #if 0//def VBE 3593 3814 Bit8u c, format_char; 3594 3815 Boolean in_format; … … 3638 3859 s ++; 3639 3860 } 3861 #endif 3640 3862 } 3641 3863 -
trunk/src/VBox/Devices/Graphics/BIOS/vgatables.h
r1 r5450 78 78 * 79 79 */ 80 #define MODE_MAX 0x1480 #define MODE_MAX 15 81 81 #define TEXT 0x00 82 82 #define GRAPH 0x01 … … 97 97 typedef struct 98 98 {Bit8u svgamode; 99 Bit16u vesamode;100 99 Bit8u class; /* TEXT, GRAPH */ 101 100 Bit8u memmodel; /* CTEXT,MTEXT,CGA,PL1,PL2,PL4,P8,P15,P16,P24,P32 */ 102 Bit8u nbpages;103 101 Bit8u pixbits; 104 Bit16u swidth, sheight;105 Bit16u twidth, theight;106 Bit16u cwidth, cheight;107 102 Bit16u sstart; 108 Bit16u slength;109 Bit8u miscreg;110 103 Bit8u pelmask; 111 Bit8u crtcmodel;112 Bit8u actlmodel;113 Bit8u grdcmodel;114 Bit8u sequmodel;115 104 Bit8u dacmodel; /* 0 1 2 3 */ 116 105 } VGAMODES; 117 106 118 107 static VGAMODES vga_modes[MODE_MAX+1]= 119 {//mode vesa class model pg bits sw sh tw th cw ch sstart slength misc pelm crtc actl gdc sequ dac 120 {0x00, 0xFFFF, TEXT, CTEXT, 8, 4, 360, 400, 40, 25, 9, 16, 0xB800, 0x0800, 0x67, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x02}, 121 {0x01, 0xFFFF, TEXT, CTEXT, 8, 4, 360, 400, 40, 25, 9, 16, 0xB800, 0x0800, 0x67, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x02}, 122 {0x02, 0xFFFF, TEXT, CTEXT, 4, 4, 720, 400, 80, 25, 9, 16, 0xB800, 0x1000, 0x67, 0xFF, 0x01, 0x00, 0x00, 0x01, 0x02}, 123 {0x03, 0xFFFF, TEXT, CTEXT, 4, 4, 720, 400, 80, 25, 9, 16, 0xB800, 0x1000, 0x67, 0xFF, 0x01, 0x00, 0x00, 0x01, 0x02}, 124 {0x04, 0xFFFF, GRAPH, CGA, 4, 2, 320, 200, 40, 25, 8, 8, 0xB800, 0x0800, 0x63, 0xFF, 0x02, 0x01, 0x01, 0x02, 0x01}, 125 {0x05, 0xFFFF, GRAPH, CGA, 1, 2, 320, 200, 40, 25, 8, 8, 0xB800, 0x0800, 0x63, 0xFF, 0x02, 0x01, 0x01, 0x02, 0x01}, 126 {0x06, 0xFFFF, GRAPH, CGA, 1, 1, 640, 200, 80, 25, 8, 8, 0xB800, 0x1000, 0x63, 0xFF, 0x03, 0x02, 0x02, 0x03, 0x01}, 127 {0x07, 0xFFFF, TEXT, MTEXT, 4, 4, 720, 400, 80, 25, 9, 16, 0xB000, 0x1000, 0x66, 0xFF, 0x04, 0x03, 0x03, 0x01, 0x00}, 128 {0x0D, 0xFFFF, GRAPH, PLANAR4, 8, 4, 320, 200, 40, 25, 8, 8, 0xA000, 0x2000, 0x63, 0xFF, 0x05, 0x04, 0x04, 0x04, 0x01}, 129 {0x0E, 0xFFFF, GRAPH, PLANAR4, 4, 4, 640, 200, 80, 25, 8, 8, 0xA000, 0x4000, 0x63, 0xFF, 0x06, 0x04, 0x04, 0x05, 0x01}, 130 {0x0F, 0xFFFF, GRAPH, PLANAR1, 2, 1, 640, 350, 80, 25, 8, 14, 0xA000, 0x8000, 0xa3, 0xFF, 0x07, 0x05, 0x04, 0x05, 0x00}, 131 {0x10, 0xFFFF, GRAPH, PLANAR4, 2, 4, 640, 350, 80, 25, 8, 14, 0xA000, 0x8000, 0xa3, 0xFF, 0x07, 0x06, 0x04, 0x05, 0x02}, 132 {0x11, 0xFFFF, GRAPH, PLANAR1, 1, 1, 640, 480, 80, 30, 8, 16, 0xA000, 0x0000, 0xe3, 0xFF, 0x08, 0x07, 0x04, 0x05, 0x02}, 133 {0x12, 0xFFFF, GRAPH, PLANAR4, 1, 4, 640, 480, 80, 30, 8, 16, 0xA000, 0x0000, 0xe3, 0xFF, 0x08, 0x06, 0x04, 0x05, 0x02}, 134 {0x13, 0xFFFF, GRAPH, LINEAR8, 1, 8, 320, 200, 40, 25, 8, 8, 0xA000, 0x0000, 0x63, 0xFF, 0x09, 0x08, 0x05, 0x06, 0x03}, 135 {0x6A, 0xFFFF, GRAPH, PLANAR4, 1, 4, 800, 600,100, 37, 8, 16, 0xA000, 0x0000, 0xe3, 0xFF, 0x0A, 0x06, 0x04, 0x05, 0x02} 136 }; 137 138 /* CRTC */ 139 #define CRTC_MAX_REG 0x18 140 #define CRTC_MAX_MODEL 0x0A 141 static Bit8u crtc_access[CRTC_MAX_REG+1]= 142 { /* 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 */ 143 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 144 }; 145 static Bit8u crtc_regs[CRTC_MAX_MODEL+1][CRTC_MAX_REG+1]= 146 {/* Model 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 */ 147 /* 00 */ 0x2d,0x27,0x28,0x90,0x2b,0xa0,0xbf,0x1f,0x00,0x4f,0x0d,0x0e,0x00,0x00,0x00,0x00,0x9c,0x8e,0x8f,0x14,0x1f,0x96,0xb9,0xa3,0xff, 148 /* 01 */ 0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,0x00,0x4f,0x0d,0x0e,0x00,0x00,0x00,0x00,0x9c,0x8e,0x8f,0x28,0x1f,0x96,0xb9,0xa3,0xff, 149 /* 02 */ 0x2d,0x27,0x28,0x90,0x2b,0x80,0xbf,0x1f,0x00,0xc1,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x8e,0x8f,0x14,0x00,0x96,0xb9,0xa2,0xff, 150 /* 03 */ 0x5f,0x4f,0x50,0x82,0x54,0x80,0xbf,0x1f,0x00,0xc1,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x8e,0x8f,0x28,0x00,0x96,0xb9,0xc2,0xff, 151 /* 04 */ 0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,0x00,0x4f,0x0d,0x0e,0x00,0x00,0x00,0x00,0x9c,0x8e,0x8f,0x28,0x0f,0x96,0xb9,0xa3,0xff, 152 /* 05 */ 0x2d,0x27,0x28,0x90,0x2b,0x80,0xbf,0x1f,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x8e,0x8f,0x14,0x00,0x96,0xb9,0xe3,0xff, 153 /* 06 */ 0x5f,0x4f,0x50,0x82,0x54,0x80,0xbf,0x1f,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x8e,0x8f,0x28,0x00,0x96,0xb9,0xe3,0xff, 154 /* 07 */ 0x5f,0x4f,0x50,0x82,0x54,0x80,0xbf,0x1f,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x83,0x85,0x5d,0x28,0x0f,0x63,0xba,0xe3,0xff, 155 /* 08 */ 0x5f,0x4f,0x50,0x82,0x54,0x80,0x0b,0x3e,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xea,0x8c,0xdf,0x28,0x00,0xe7,0x04,0xe3,0xff, 156 /* 09 */ 0x5f,0x4f,0x50,0x82,0x54,0x80,0xbf,0x1f,0x00,0x41,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x8e,0x8f,0x28,0x40,0x96,0xb9,0xa3,0xff, 157 /* 0A */ 0x7f,0x63,0x63,0x83,0x6b,0x1b,0x72,0xf0,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x59,0x8d,0x57,0x32,0x00,0x57,0x73,0xe3,0xff 158 }; 159 160 /* Attribute Controler 0x3c0 */ 161 #define ACTL_MAX_REG 0x14 162 #define ACTL_MAX_MODEL 0x08 163 164 static Bit8u actl_access[ACTL_MAX_REG+1]= 165 {/* 00 01 02 03 04 05 06 07 08 09 0A 0B OC OD OE OF 10 11 12 13 14 */ 166 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 167 }; 168 169 static Bit8u actl_regs[ACTL_MAX_MODEL+1][ACTL_MAX_REG+1]= 170 {/* Model 00 01 02 03 04 05 06 07 08 09 0A 0B OC OD OE OF 10 11 12 13 14 */ 171 /* 00 */ 0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,0x0c,0x00,0x0f,0x08,0x00, 172 /* 01 */ 0x00,0x13,0x15,0x17,0x02,0x04,0x06,0x07,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x01,0x00,0x03,0x00,0x00, 173 /* 02 */ 0x00,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x01,0x00,0x01,0x00,0x00, 174 /* 03 */ 0x00,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x10,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x0e,0x00,0x0f,0x08,0x00, 175 /* 04 */ 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x01,0x00,0x0f,0x00,0x00, 176 /* 05 */ 0x00,0x08,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x18,0x00,0x00,0x01,0x00,0x01,0x00,0x00, 177 /* 06 */ 0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,0x01,0x00,0x0f,0x00,0x00, 178 /* 07 */ 0x00,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x01,0x00,0x01,0x00,0x00, 179 /* 08 */ 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x41,0x00,0x0f,0x00,0x00 180 }; 181 182 /* Sequencer 0x3c4 */ 183 #define SEQU_MAX_REG 0x04 184 #define SEQU_MAX_MODEL 0x06 185 186 static Bit8u sequ_access[SEQU_MAX_REG+1]= 187 { /* 00 01 02 03 04 */ 188 0x00,0x00,0x00,0x00,0x00 189 }; 190 191 static Bit8u sequ_regs[SEQU_MAX_MODEL+1][SEQU_MAX_REG+1]= 192 {/* Model 00 01 02 03 04 */ 193 /* 00 */ 0x03,0x08,0x03,0x00,0x02, 194 /* 01 */ 0x03,0x00,0x03,0x00,0x02, 195 /* 02 */ 0x03,0x09,0x03,0x00,0x02, 196 /* 03 */ 0x03,0x01,0x01,0x00,0x06, 197 /* 04 */ 0x03,0x09,0x0f,0x00,0x06, 198 /* 05 */ 0x03,0x01,0x0f,0x00,0x06, 199 /* 06 */ 0x03,0x01,0x0f,0x00,0x0e 200 }; 201 202 /* Graphic ctl 0x3ce */ 203 #define GRDC_MAX_REG 0x08 204 #define GRDC_MAX_MODEL 0x05 205 206 static Bit8u grdc_access[GRDC_MAX_REG+1]= 207 { /* 00 01 02 03 04 05 06 07 08 */ 208 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 209 }; 210 211 static Bit8u grdc_regs[GRDC_MAX_MODEL+1][GRDC_MAX_REG+1]= 212 {/* Model 00 01 02 03 04 05 06 07 08 */ 213 /* 00 */ 0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x0f,0xff, 214 /* 01 */ 0x00,0x00,0x00,0x00,0x00,0x30,0x0f,0x0f,0xff, 215 /* 02 */ 0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x0f,0xff, 216 /* 03 */ 0x00,0x00,0x00,0x00,0x00,0x10,0x0a,0x0f,0xff, 217 /* 04 */ 0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x0f,0xff, 218 /* 05 */ 0x00,0x00,0x00,0x00,0x00,0x40,0x05,0x0f,0xff 108 {//mode class model bits sstart pelm dac 109 {0x00, TEXT, CTEXT, 4, 0xB800, 0xFF, 0x02}, 110 {0x01, TEXT, CTEXT, 4, 0xB800, 0xFF, 0x02}, 111 {0x02, TEXT, CTEXT, 4, 0xB800, 0xFF, 0x02}, 112 {0x03, TEXT, CTEXT, 4, 0xB800, 0xFF, 0x02}, 113 {0x04, GRAPH, CGA, 2, 0xB800, 0xFF, 0x01}, 114 {0x05, GRAPH, CGA, 2, 0xB800, 0xFF, 0x01}, 115 {0x06, GRAPH, CGA, 1, 0xB800, 0xFF, 0x01}, 116 {0x07, TEXT, MTEXT, 4, 0xB000, 0xFF, 0x00}, 117 {0x0D, GRAPH, PLANAR4, 4, 0xA000, 0xFF, 0x01}, 118 {0x0E, GRAPH, PLANAR4, 4, 0xA000, 0xFF, 0x01}, 119 {0x0F, GRAPH, PLANAR1, 1, 0xA000, 0xFF, 0x00}, 120 {0x10, GRAPH, PLANAR4, 4, 0xA000, 0xFF, 0x02}, 121 {0x11, GRAPH, PLANAR1, 1, 0xA000, 0xFF, 0x02}, 122 {0x12, GRAPH, PLANAR4, 4, 0xA000, 0xFF, 0x02}, 123 {0x13, GRAPH, LINEAR8, 8, 0xA000, 0xFF, 0x03}, 124 {0x6A, GRAPH, PLANAR4, 4, 0xA000, 0xFF, 0x02} 125 }; 126 127 /* convert index in vga_modes[] to index in video_param_table[] */ 128 static Bit8u line_to_vpti[MODE_MAX+1]={ 129 0x17, 0x17, 0x18, 0x18, 0x04, 0x05, 0x06, 0x07, 130 0x0d, 0x0e, 0x11, 0x12, 0x1a, 0x1b, 0x1c, 0x1d, 219 131 }; 220 132 … … 224 136 static Bit8u dac_regs[DAC_MAX_MODEL+1]= 225 137 {0x3f,0x3f,0x3f,0xff}; 138 139 /* standard BIOS Video Parameter Table */ 140 typedef struct { 141 Bit8u twidth; 142 Bit8u theightm1; 143 Bit8u cheight; 144 Bit8u slength_l; 145 Bit8u slength_h; 146 Bit8u sequ_regs[4]; 147 Bit8u miscreg; 148 Bit8u crtc_regs[25]; 149 Bit8u actl_regs[20]; 150 Bit8u grdc_regs[9]; 151 } VideoParamTableEntry; 152 153 static VideoParamTableEntry video_param_table[30] = { 154 { 155 /* index=0x00 no mode defined */ 156 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 157 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 158 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 159 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 160 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 161 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 162 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 163 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 164 }, 165 { 166 /* index=0x01 no mode defined */ 167 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 168 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 169 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 170 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 171 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 172 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 173 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 174 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 175 }, 176 { 177 /* index=0x02 no mode defined */ 178 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 179 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 180 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 181 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 182 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 183 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 184 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 185 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 186 }, 187 { 188 /* index=0x03 no mode defined */ 189 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 190 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 191 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 192 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 193 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 194 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 195 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 196 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 197 }, 198 { 199 /* index=0x04 vga mode 0x04 */ 200 40, 24, 8, 0x00, 0x08, /* tw, th-1, ch, slength */ 201 0x09, 0x03, 0x00, 0x02, /* sequ_regs */ 202 0x63, /* miscreg */ 203 0x2d, 0x27, 0x28, 0x90, 0x2b, 0x80, 0xbf, 0x1f, 204 0x00, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 205 0x9c, 0x8e, 0x8f, 0x14, 0x00, 0x96, 0xb9, 0xa2, 206 0xff, /* crtc_regs */ 207 0x00, 0x13, 0x15, 0x17, 0x02, 0x04, 0x06, 0x07, 208 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 209 0x01, 0x00, 0x03, 0x00, /* actl_regs */ 210 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x0f, 0x0f, 0xff, /* grdc_regs */ 211 }, 212 { 213 /* index=0x05 vga mode 0x05 */ 214 40, 24, 8, 0x00, 0x08, /* tw, th-1, ch, slength */ 215 0x09, 0x03, 0x00, 0x02, /* sequ_regs */ 216 0x63, /* miscreg */ 217 0x2d, 0x27, 0x28, 0x90, 0x2b, 0x80, 0xbf, 0x1f, 218 0x00, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 219 0x9c, 0x8e, 0x8f, 0x14, 0x00, 0x96, 0xb9, 0xa2, 220 0xff, /* crtc_regs */ 221 0x00, 0x13, 0x15, 0x17, 0x02, 0x04, 0x06, 0x07, 222 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 223 0x01, 0x00, 0x03, 0x00, /* actl_regs */ 224 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x0f, 0x0f, 0xff, /* grdc_regs */ 225 }, 226 { 227 /* index=0x06 vga mode 0x06 */ 228 80, 24, 8, 0x00, 0x10, /* tw, th-1, ch, slength */ 229 0x01, 0x01, 0x00, 0x06, /* sequ_regs */ 230 0x63, /* miscreg */ 231 0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80, 0xbf, 0x1f, 232 0x00, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 233 0x9c, 0x8e, 0x8f, 0x28, 0x00, 0x96, 0xb9, 0xc2, 234 0xff, /* crtc_regs */ 235 0x00, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 236 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 237 0x01, 0x00, 0x01, 0x00, /* actl_regs */ 238 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x0f, 0xff, /* grdc_regs */ 239 }, 240 { 241 /* index=0x07 vga mode 0x07 */ 242 80, 24, 16, 0x00, 0x10, /* tw, th-1, ch, slength */ 243 0x00, 0x03, 0x00, 0x02, /* sequ_regs */ 244 0x66, /* miscreg */ 245 0x5f, 0x4f, 0x50, 0x82, 0x55, 0x81, 0xbf, 0x1f, 246 0x00, 0x4f, 0x0d, 0x0e, 0x00, 0x00, 0x00, 0x00, 247 0x9c, 0x8e, 0x8f, 0x28, 0x0f, 0x96, 0xb9, 0xa3, 248 0xff, /* crtc_regs */ 249 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 250 0x10, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 251 0x0e, 0x00, 0x0f, 0x08, /* actl_regs */ 252 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0a, 0x0f, 0xff, /* grdc_regs */ 253 }, 254 { 255 /* index=0x08 no mode defined */ 256 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 257 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 258 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 259 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 260 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 261 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 262 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 263 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 264 }, 265 { 266 /* index=0x09 no mode defined */ 267 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 268 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 269 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 270 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 271 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 272 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 273 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 274 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 275 }, 276 { 277 /* index=0x0a no mode defined */ 278 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 279 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 280 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 281 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 282 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 283 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 284 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 285 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 286 }, 287 { 288 /* index=0x0b no mode defined */ 289 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 290 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 291 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 292 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 293 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 294 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 295 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 296 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 297 }, 298 { 299 /* index=0x0c no mode defined */ 300 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 301 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 302 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 303 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 304 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 305 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 306 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 307 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 308 }, 309 { 310 /* index=0x0d vga mode 0x0d */ 311 40, 24, 8, 0x00, 0x20, /* tw, th-1, ch, slength */ 312 0x09, 0x0f, 0x00, 0x06, /* sequ_regs */ 313 0x63, /* miscreg */ 314 0x2d, 0x27, 0x28, 0x90, 0x2b, 0x80, 0xbf, 0x1f, 315 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 316 0x9c, 0x8e, 0x8f, 0x14, 0x00, 0x96, 0xb9, 0xe3, 317 0xff, /* crtc_regs */ 318 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 319 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 320 0x01, 0x00, 0x0f, 0x00, /* actl_regs */ 321 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff, /* grdc_regs */ 322 }, 323 { 324 /* index=0x0e vga mode 0x0e */ 325 80, 24, 8, 0x00, 0x40, /* tw, th-1, ch, slength */ 326 0x01, 0x0f, 0x00, 0x06, /* sequ_regs */ 327 0x63, /* miscreg */ 328 0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80, 0xbf, 0x1f, 329 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 330 0x9c, 0x8e, 0x8f, 0x28, 0x00, 0x96, 0xb9, 0xe3, 331 0xff, /* crtc_regs */ 332 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 333 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 334 0x01, 0x00, 0x0f, 0x00, /* actl_regs */ 335 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff, /* grdc_regs */ 336 }, 337 { 338 /* index=0x0f no mode defined */ 339 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 340 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 341 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 342 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 343 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 344 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 345 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 346 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 347 }, 348 { 349 /* index=0x10 no mode defined */ 350 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 351 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 352 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 353 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 354 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 355 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 356 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 357 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 358 }, 359 { 360 /* index=0x11 vga mode 0x0f */ 361 80, 24, 14, 0x00, 0x80, /* tw, th-1, ch, slength */ 362 0x01, 0x0f, 0x00, 0x06, /* sequ_regs */ 363 0xa3, /* miscreg */ 364 0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80, 0xbf, 0x1f, 365 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 366 0x83, 0x85, 0x5d, 0x28, 0x0f, 0x63, 0xba, 0xe3, 367 0xff, /* crtc_regs */ 368 0x00, 0x08, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 369 0x00, 0x08, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 370 0x01, 0x00, 0x01, 0x00, /* actl_regs */ 371 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff, /* grdc_regs */ 372 }, 373 { 374 /* index=0x12 vga mode 0x10 */ 375 80, 24, 14, 0x00, 0x80, /* tw, th-1, ch, slength */ 376 0x01, 0x0f, 0x00, 0x06, /* sequ_regs */ 377 0xa3, /* miscreg */ 378 0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80, 0xbf, 0x1f, 379 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 380 0x83, 0x85, 0x5d, 0x28, 0x0f, 0x63, 0xba, 0xe3, 381 0xff, /* crtc_regs */ 382 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x14, 0x07, 383 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 384 0x01, 0x00, 0x0f, 0x00, /* actl_regs */ 385 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff, /* grdc_regs */ 386 }, 387 { 388 /* index=0x13 no mode defined */ 389 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 390 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 391 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 392 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 393 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 394 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 395 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 396 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 397 }, 398 { 399 /* index=0x14 no mode defined */ 400 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 401 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 402 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 403 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 404 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 405 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 406 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 407 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 408 }, 409 { 410 /* index=0x15 no mode defined */ 411 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 412 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 413 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 414 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 415 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 416 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 417 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 418 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 419 }, 420 { 421 /* index=0x16 no mode defined */ 422 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 423 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 424 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 425 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 426 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 427 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 428 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 429 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 430 }, 431 { 432 /* index=0x17 vga mode 0x01 */ 433 40, 24, 16, 0x00, 0x08, /* tw, th-1, ch, slength */ 434 0x08, 0x03, 0x00, 0x02, /* sequ_regs */ 435 0x67, /* miscreg */ 436 0x2d, 0x27, 0x28, 0x90, 0x2b, 0xa0, 0xbf, 0x1f, 437 0x00, 0x4f, 0x0d, 0x0e, 0x00, 0x00, 0x00, 0x00, 438 0x9c, 0x8e, 0x8f, 0x14, 0x1f, 0x96, 0xb9, 0xa3, 439 0xff, /* crtc_regs */ 440 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x14, 0x07, 441 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 442 0x0c, 0x00, 0x0f, 0x08, /* actl_regs */ 443 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x0f, 0xff, /* grdc_regs */ 444 }, 445 { 446 /* index=0x18 vga mode 0x03 */ 447 80, 24, 16, 0x00, 0x10, /* tw, th-1, ch, slength */ 448 0x00, 0x03, 0x00, 0x02, /* sequ_regs */ 449 0x67, /* miscreg */ 450 0x5f, 0x4f, 0x50, 0x82, 0x55, 0x81, 0xbf, 0x1f, 451 0x00, 0x4f, 0x0d, 0x0e, 0x00, 0x00, 0x00, 0x00, 452 0x9c, 0x8e, 0x8f, 0x28, 0x1f, 0x96, 0xb9, 0xa3, 453 0xff, /* crtc_regs */ 454 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x14, 0x07, 455 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 456 0x0c, 0x00, 0x0f, 0x08, /* actl_regs */ 457 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x0f, 0xff, /* grdc_regs */ 458 }, 459 { 460 /* index=0x19 vga mode 0x07 */ 461 80, 24, 16, 0x00, 0x10, /* tw, th-1, ch, slength */ 462 0x00, 0x03, 0x00, 0x02, /* sequ_regs */ 463 0x66, /* miscreg */ 464 0x5f, 0x4f, 0x50, 0x82, 0x55, 0x81, 0xbf, 0x1f, 465 0x00, 0x4f, 0x0d, 0x0e, 0x00, 0x00, 0x00, 0x00, 466 0x9c, 0x8e, 0x8f, 0x28, 0x0f, 0x96, 0xb9, 0xa3, 467 0xff, /* crtc_regs */ 468 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 469 0x10, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 470 0x0e, 0x00, 0x0f, 0x08, /* actl_regs */ 471 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0a, 0x0f, 0xff, /* grdc_regs */ 472 }, 473 { 474 /* index=0x1a vga mode 0x11 */ 475 80, 29, 16, 0x00, 0x00, /* tw, th-1, ch, slength */ 476 0x01, 0x0f, 0x00, 0x06, /* sequ_regs */ 477 0xe3, /* miscreg */ 478 0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80, 0x0b, 0x3e, 479 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 480 0xea, 0x8c, 0xdf, 0x28, 0x00, 0xe7, 0x04, 0xe3, 481 0xff, /* crtc_regs */ 482 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x3f, 483 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x3f, 484 0x01, 0x00, 0x0f, 0x00, /* actl_regs */ 485 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff, /* grdc_regs */ 486 }, 487 { 488 /* index=0x1b vga mode 0x12 */ 489 80, 29, 16, 0x00, 0x00, /* tw, th-1, ch, slength */ 490 0x01, 0x0f, 0x00, 0x06, /* sequ_regs */ 491 0xe3, /* miscreg */ 492 0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80, 0x0b, 0x3e, 493 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 494 0xea, 0x8c, 0xdf, 0x28, 0x00, 0xe7, 0x04, 0xe3, 495 0xff, /* crtc_regs */ 496 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x14, 0x07, 497 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 498 0x01, 0x00, 0x0f, 0x00, /* actl_regs */ 499 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff, /* grdc_regs */ 500 }, 501 { 502 /* index=0x1c vga mode 0x13 */ 503 40, 24, 8, 0x00, 0x00, /* tw, th-1, ch, slength */ 504 0x01, 0x0f, 0x00, 0x0e, /* sequ_regs */ 505 0x63, /* miscreg */ 506 0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80, 0xbf, 0x1f, 507 0x00, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 508 0x9c, 0x8e, 0x8f, 0x28, 0x40, 0x96, 0xb9, 0xa3, 509 0xff, /* crtc_regs */ 510 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 511 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 512 0x41, 0x00, 0x0f, 0x00, /* actl_regs */ 513 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 0x0f, 0xff, /* grdc_regs */ 514 }, 515 { 516 /* index=0x1d vga mode 0x6a */ 517 100, 36, 16, 0x00, 0x00, /* tw, th-1, ch, slength */ 518 0x01, 0x0f, 0x00, 0x06, /* sequ_regs */ 519 0xe3, /* miscreg */ 520 0x7f, 0x63, 0x63, 0x83, 0x6b, 0x1b, 0x72, 0xf0, 521 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 522 0x59, 0x8d, 0x57, 0x32, 0x00, 0x57, 0x73, 0xe3, 523 0xff, /* crtc_regs */ 524 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x14, 0x07, 525 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 526 0x01, 0x00, 0x0f, 0x00, /* actl_regs */ 527 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff, /* grdc_regs */ 528 }, 529 }; 226 530 227 531 /* Mono */ -
trunk/src/VBox/Devices/Graphics/DevVGA.cpp
r5156 r5450 331 331 (addr >= 0x3d0 && addr <= 0x3df && !(s->msr & MSR_COLOR_EMULATION))) { 332 332 val = 0xff; 333 Log(("VGA: following read ignored\n")); 333 334 } else { 334 335 switch(addr) { … … 421 422 int index; 422 423 424 #ifdef DEBUG_VGA 425 Log(("VGA: write addr=0x%04x data=0x%02x\n", addr, val)); 426 #endif 427 423 428 /* check port range access depending on color/monochrome mode */ 424 429 if ((addr >= 0x3b0 && addr <= 0x3bf && (s->msr & MSR_COLOR_EMULATION)) || 425 (addr >= 0x3d0 && addr <= 0x3df && !(s->msr & MSR_COLOR_EMULATION))) 430 (addr >= 0x3d0 && addr <= 0x3df && !(s->msr & MSR_COLOR_EMULATION))) { 431 Log(("VGA: previous write ignored\n")); 426 432 return; 427 428 #ifdef DEBUG_VGA 429 Log(("VGA: write addr=0x%04x data=0x%02x\n", addr, val)); 430 #endif 433 } 431 434 432 435 switch(addr) { … … 608 611 if (val == VBE_DISPI_ID0 || 609 612 val == VBE_DISPI_ID1 || 610 val == VBE_DISPI_ID2) { 613 val == VBE_DISPI_ID2 || 614 val == VBE_DISPI_ID3 || 615 val == VBE_DISPI_ID4) { 611 616 s->vbe_regs[s->vbe_index] = val; 612 617 } … … 677 682 return VINF_IOM_HC_IOPORT_WRITE; 678 683 #else 679 if (val & VBE_DISPI_ENABLED) { 684 if ((val & VBE_DISPI_ENABLED) && 685 !(s->vbe_regs[VBE_DISPI_INDEX_ENABLE] & VBE_DISPI_ENABLED)) { 680 686 int h, shift_control; 681 687 #ifdef VBOX … … 867 873 uint32_t ret; 868 874 875 #ifdef DEBUG_VGA_MEM 876 Log(("vga: read [0x%x] -> ", addr)); 877 #endif 869 878 /* convert to VGA memory offset */ 870 879 memory_map_mode = (s->gr[6] >> 2) & 3; … … 903 912 ret = s->CTXSUFF(vram_ptr)[addr]; 904 913 #endif /* VBOX */ 905 } else if ( s->gr[5] & 0x10) {914 } else if (!(s->sr[4] & 0x04)) { /* Host access is controlled by SR4, not GR5! */ 906 915 /* odd/even mode (aka text mode mapping) */ 907 916 plane = (s->gr[4] & 2) | (addr & 1); … … 932 941 } 933 942 } 943 #ifdef DEBUG_VGA_MEM 944 Log((" 0x%02x\n", ret)); 945 #endif 934 946 return ret; 935 947 } … … 1035 1047 #endif /* VBOX */ 1036 1048 } 1037 } else if ( s->gr[5] & 0x10) {1049 } else if (!(s->sr[4] & 0x04)) { /* Host access is controlled by SR4, not GR5! */ 1038 1050 /* odd/even mode (aka text mode mapping) */ 1039 1051 plane = (s->gr[4] & 2) | (addr & 1); -
trunk/src/VBox/Devices/Graphics/DevVGA.h
r4787 r5450 75 75 #define VBE_DISPI_ID1 0xB0C1 76 76 #define VBE_DISPI_ID2 0xB0C2 77 #define VBE_DISPI_ID3 0xB0C3 78 #define VBE_DISPI_ID4 0xB0C4 77 79 78 80 #ifdef VBOX -
trunk/src/VBox/Devices/Graphics/DevVGAModes.h
r4071 r5450 50 50 #define VBE_VESA_MODE_1280X1024X565 0x11A 51 51 #define VBE_VESA_MODE_1280X1024X888 0x11B 52 #define VBE_VESA_MODE_1600X1200X8 0x11C 53 #define VBE_VESA_MODE_1600X1200X1555 0x11D 54 #define VBE_VESA_MODE_1600X1200X565 0x11E 55 #define VBE_VESA_MODE_1600X1200X888 0x11F 52 56 53 57 /* BOCHS/PLEX86 'own' mode numbers */ … … 59 63 #define VBE_OWN_MODE_1280X1024X8888 0x125 60 64 #define VBE_OWN_MODE_320X200X8 0x126 65 #define VBE_OWN_MODE_1600X1200X8888 0x127 66 #define VBE_OWN_MODE_1152X864X8 0x128 67 #define VBE_OWN_MODE_1152X864X1555 0x129 68 #define VBE_OWN_MODE_1152X864X565 0x12a 69 #define VBE_OWN_MODE_1152X864X888 0x12b 70 #define VBE_OWN_MODE_1152X864X8888 0x12c 61 71 62 72 #define VBE_VESA_MODE_END_OF_LIST 0xFFFF … … 169 179 #pragma pack() 170 180 171 172 181 typedef struct ModeInfoListItem 173 182 { … … 176 185 } ModeInfoListItem; 177 186 178 179 static ModeInfoListItem mode_info_list[]= 180 { 181 { 182 VBE_VESA_MODE_640X400X8, 183 { 184 /*typedef struct ModeInfoBlock 185 {*/ 186 /* Mandatory information for all VBE revisions */ 187 /*Bit16u ModeAttributes*/ VBE_MODE_ATTRIBUTE_SUPPORTED | 188 VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE | 189 VBE_MODE_ATTRIBUTE_COLOR_MODE | 190 VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE | 191 VBE_MODE_ATTRIBUTE_GRAPHICS_MODE, 192 /*Bit8u WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | 193 VBE_WINDOW_ATTRIBUTE_READABLE | 194 VBE_WINDOW_ATTRIBUTE_WRITEABLE, 195 /*Bit8u WinBAttributes*/ 0, 196 /*Bit16u WinGranularity*/ VBE_DISPI_BANK_SIZE_KB, 197 /*Bit16u WinSize*/ VBE_DISPI_BANK_SIZE_KB, 198 /*Bit16u WinASegment*/ VGAMEM_GRAPH, 199 /*Bit16u WinBSegment*/ 0, 200 /*Bit32u WinFuncPtr*/ 0, 201 /*Bit16u BytesPerScanLine*/ 640, 202 /* Mandatory information for VBE 1.2 and above */ 203 /*Bit16u XResolution*/ 640, 204 /*Bit16u YResolution*/ 400, 205 /*Bit8u XCharSize*/ 8, 206 /*Bit8u YCharSize*/ 16, 207 /*Bit8u NumberOfPlanes*/ 1, 208 /*Bit8u BitsPerPixel*/ 8, 209 /*Bit8u NumberOfBanks*/ 4, /* 640x400/64kb == 4 */ 210 /*Bit8u MemoryModel*/ VBE_MEMORYMODEL_PACKED_PIXEL, 211 /*Bit8u BankSize*/ 0, 212 /*Bit8u NumberOfImagePages*/ 15, 213 /*Bit8u Reserved_page*/ 0, 214 /* Direct Color fields (required for direct/6 and YUV/7 memory models) */ 215 /*Bit8u RedMaskSize*/ 0, 216 /*Bit8u RedFieldPosition*/ 0, 217 /*Bit8u GreenMaskSize*/ 0, 218 /*Bit8u GreenFieldPosition*/ 0, 219 /*Bit8u BlueMaskSize*/ 0, 220 /*Bit8u BlueFieldPosition*/ 0, 221 /*Bit8u RsvdMaskSize*/ 0, 222 /*Bit8u RsvdFieldPosition*/ 0, 223 /*Bit8u DirectColorModeInfo*/ 0, 224 /* Mandatory information for VBE 2.0 and above */ 225 /*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS, 226 /*Bit32u OffScreenMemOffset*/ 0, 227 /*Bit16u OffScreenMemSize*/ 0, 228 /* Mandatory information for VBE 3.0 and above */ 229 /*Bit16u LinBytesPerScanLine*/ 640, 230 /*Bit8u BnkNumberOfPages*/ 0, 231 /*Bit8u LinNumberOfPages*/ 0, 232 /*Bit8u LinRedMaskSize*/ 0, 233 /*Bit8u LinRedFieldPosition*/ 0, 234 /*Bit8u LinGreenMaskSize*/ 0, 235 /*Bit8u LinGreenFieldPosition*/ 0, 236 /*Bit8u LinBlueMaskSize*/ 0, 237 /*Bit8u LinBlueFieldPosition*/ 0, 238 /*Bit8u LinRsvdMaskSize*/ 0, 239 /*Bit8u LinRsvdFieldPosition*/ 0, 240 /*Bit32u MaxPixelClock*/ 0, 241 /*} ModeInfoBlock;*/ 242 } 243 }, 244 245 { 246 VBE_VESA_MODE_640X480X8, 247 { 248 /*typedef struct ModeInfoBlock 249 {*/ 250 /* Mandatory information for all VBE revisions */ 251 /*Bit16u ModeAttributes*/ VBE_MODE_ATTRIBUTE_SUPPORTED | 252 VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE | 253 VBE_MODE_ATTRIBUTE_COLOR_MODE | 254 VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE | 255 VBE_MODE_ATTRIBUTE_GRAPHICS_MODE, 256 /*Bit8u WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | 257 VBE_WINDOW_ATTRIBUTE_READABLE | 258 VBE_WINDOW_ATTRIBUTE_WRITEABLE, 259 /*Bit8u WinBAttributes*/ 0, 260 /*Bit16u WinGranularity*/ VBE_DISPI_BANK_SIZE_KB, 261 /*Bit16u WinSize*/ VBE_DISPI_BANK_SIZE_KB, 262 /*Bit16u WinASegment*/ VGAMEM_GRAPH, 263 /*Bit16u WinBSegment*/ 0, 264 /*Bit32u WinFuncPtr*/ 0, 265 /*Bit16u BytesPerScanLine*/ 640, 266 /* Mandatory information for VBE 1.2 and above */ 267 /*Bit16u XResolution*/ 640, 268 /*Bit16u YResolution*/ 480, 269 /*Bit8u XCharSize*/ 8, 270 /*Bit8u YCharSize*/ 16, 271 /*Bit8u NumberOfPlanes*/ 1, 272 /*Bit8u BitsPerPixel*/ 8, 273 /*Bit8u NumberOfBanks*/ 5, /* 640x480/64kb == 5 */ 274 /*Bit8u MemoryModel*/ VBE_MEMORYMODEL_PACKED_PIXEL, 275 /*Bit8u BankSize*/ 0, 276 /*Bit8u NumberOfImagePages*/ 11, 277 /*Bit8u Reserved_page*/ 0, 278 /* Direct Color fields (required for direct/6 and YUV/7 memory models) */ 279 /*Bit8u RedMaskSize*/ 0, 280 /*Bit8u RedFieldPosition*/ 0, 281 /*Bit8u GreenMaskSize*/ 0, 282 /*Bit8u GreenFieldPosition*/ 0, 283 /*Bit8u BlueMaskSize*/ 0, 284 /*Bit8u BlueFieldPosition*/ 0, 285 /*Bit8u RsvdMaskSize*/ 0, 286 /*Bit8u RsvdFieldPosition*/ 0, 287 /*Bit8u DirectColorModeInfo*/ 0, 288 /* Mandatory information for VBE 2.0 and above */ 289 /*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS, 290 /*Bit32u OffScreenMemOffset*/ 0, 291 /*Bit16u OffScreenMemSize*/ 0, 292 /* Mandatory information for VBE 3.0 and above */ 293 /*Bit16u LinBytesPerScanLine*/ 640, 294 /*Bit8u BnkNumberOfPages*/ 0, 295 /*Bit8u LinNumberOfPages*/ 0, 296 /*Bit8u LinRedMaskSize*/ 0, 297 /*Bit8u LinRedFieldPosition*/ 0, 298 /*Bit8u LinGreenMaskSize*/ 0, 299 /*Bit8u LinGreenFieldPosition*/ 0, 300 /*Bit8u LinBlueMaskSize*/ 0, 301 /*Bit8u LinBlueFieldPosition*/ 0, 302 /*Bit8u LinRsvdMaskSize*/ 0, 303 /*Bit8u LinRsvdFieldPosition*/ 0, 304 /*Bit32u MaxPixelClock*/ 0, 305 /*} ModeInfoBlock;*/ 306 } 307 }, 308 309 { 310 VBE_VESA_MODE_800X600X4, 311 { 312 /*typedef struct ModeInfoBlock 313 {*/ 314 /* Mandatory information for all VBE revisions */ 315 /*Bit16u ModeAttributes*/ VBE_MODE_ATTRIBUTE_SUPPORTED | 316 VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE | 317 VBE_MODE_ATTRIBUTE_TTY_BIOS_SUPPORT | 318 VBE_MODE_ATTRIBUTE_COLOR_MODE | 319 VBE_MODE_ATTRIBUTE_GRAPHICS_MODE, 320 /*Bit8u WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | 321 VBE_WINDOW_ATTRIBUTE_READABLE | 322 VBE_WINDOW_ATTRIBUTE_WRITEABLE, 323 /*Bit8u WinBAttributes*/ 0, 324 /*Bit16u WinGranularity*/ VBE_DISPI_BANK_SIZE_KB, 325 /*Bit16u WinSize*/ VBE_DISPI_BANK_SIZE_KB, 326 /*Bit16u WinASegment*/ VGAMEM_GRAPH, 327 /*Bit16u WinBSegment*/ 0, 328 /*Bit32u WinFuncPtr*/ 0, 329 /*Bit16u BytesPerScanLine*/ 100, 330 /* Mandatory information for VBE 1.2 and above */ 331 /*Bit16u XResolution*/ 800, 332 /*Bit16u YResolution*/ 600, 333 /*Bit8u XCharSize*/ 8, 334 /*Bit8u YCharSize*/ 16, 335 /*Bit8u NumberOfPlanes*/ 4, 336 /*Bit8u BitsPerPixel*/ 4, 337 /*Bit8u NumberOfBanks*/ 16, 338 /*Bit8u MemoryModel*/ VBE_MEMORYMODEL_PLANAR, 339 /*Bit8u BankSize*/ 0, 340 /*Bit8u NumberOfImagePages*/ 15, 341 /*Bit8u Reserved_page*/ 0, 342 /* Direct Color fields (required for direct/6 and YUV/7 memory models) */ 343 /*Bit8u RedMaskSize*/ 0, 344 /*Bit8u RedFieldPosition*/ 0, 345 /*Bit8u GreenMaskSize*/ 0, 346 /*Bit8u GreenFieldPosition*/ 0, 347 /*Bit8u BlueMaskSize*/ 0, 348 /*Bit8u BlueFieldPosition*/ 0, 349 /*Bit8u RsvdMaskSize*/ 0, 350 /*Bit8u RsvdFieldPosition*/ 0, 351 /*Bit8u DirectColorModeInfo*/ 0, 352 /* Mandatory information for VBE 2.0 and above */ 353 /*Bit32u PhysBasePtr*/ 0, 354 /*Bit32u OffScreenMemOffset*/ 0, 355 /*Bit16u OffScreenMemSize*/ 0, 356 /* Mandatory information for VBE 3.0 and above */ 357 /*Bit16u LinBytesPerScanLine*/ 100, 358 /*Bit8u BnkNumberOfPages*/ 0, 359 /*Bit8u LinNumberOfPages*/ 0, 360 /*Bit8u LinRedMaskSize*/ 0, 361 /*Bit8u LinRedFieldPosition*/ 0, 362 /*Bit8u LinGreenMaskSize*/ 0, 363 /*Bit8u LinGreenFieldPosition*/ 0, 364 /*Bit8u LinBlueMaskSize*/ 0, 365 /*Bit8u LinBlueFieldPosition*/ 0, 366 /*Bit8u LinRsvdMaskSize*/ 0, 367 /*Bit8u LinRsvdFieldPosition*/ 0, 368 /*Bit32u MaxPixelClock*/ 0, 369 /*} ModeInfoBlock;*/ 370 } 371 }, 372 373 { 374 VBE_VESA_MODE_800X600X8, 375 { 376 /*typedef struct ModeInfoBlock 377 {*/ 378 /* Mandatory information for all VBE revisions */ 379 /*Bit16u ModeAttributes*/ VBE_MODE_ATTRIBUTE_SUPPORTED | 380 VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE | 381 VBE_MODE_ATTRIBUTE_COLOR_MODE | 382 VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE | 383 VBE_MODE_ATTRIBUTE_GRAPHICS_MODE, 384 /*Bit8u WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | 385 VBE_WINDOW_ATTRIBUTE_READABLE | 386 VBE_WINDOW_ATTRIBUTE_WRITEABLE, 387 /*Bit8u WinBAttributes*/ 0, 388 /*Bit16u WinGranularity*/ VBE_DISPI_BANK_SIZE_KB, 389 /*Bit16u WinSize*/ VBE_DISPI_BANK_SIZE_KB, 390 /*Bit16u WinASegment*/ VGAMEM_GRAPH, 391 /*Bit16u WinBSegment*/ 0, 392 /*Bit32u WinFuncPtr*/ 0, 393 /*Bit16u BytesPerScanLine*/ 800, 394 /* Mandatory information for VBE 1.2 and above */ 395 /*Bit16u XResolution*/ 800, 396 /*Bit16u YResolution*/ 600, 397 /*Bit8u XCharSize*/ 8, 398 /*Bit8u YCharSize*/ 16, 399 /*Bit8u NumberOfPlanes*/ 1, 400 /*Bit8u BitsPerPixel*/ 8, 401 /*Bit8u NumberOfBanks*/ 8, /* 800x600/64kb == 8 */ 402 /*Bit8u MemoryModel*/ VBE_MEMORYMODEL_PACKED_PIXEL, 403 /*Bit8u BankSize*/ 0, 404 /*Bit8u NumberOfImagePages*/ 7, 405 /*Bit8u Reserved_page*/ 0, 406 /* Direct Color fields (required for direct/6 and YUV/7 memory models) */ 407 /*Bit8u RedMaskSize*/ 0, 408 /*Bit8u RedFieldPosition*/ 0, 409 /*Bit8u GreenMaskSize*/ 0, 410 /*Bit8u GreenFieldPosition*/ 0, 411 /*Bit8u BlueMaskSize*/ 0, 412 /*Bit8u BlueFieldPosition*/ 0, 413 /*Bit8u RsvdMaskSize*/ 0, 414 /*Bit8u RsvdFieldPosition*/ 0, 415 /*Bit8u DirectColorModeInfo*/ 0, 416 /* Mandatory information for VBE 2.0 and above */ 417 /*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS, 418 /*Bit32u OffScreenMemOffset*/ 0, 419 /*Bit16u OffScreenMemSize*/ 0, 420 /* Mandatory information for VBE 3.0 and above */ 421 /*Bit16u LinBytesPerScanLine*/ 800, 422 /*Bit8u BnkNumberOfPages*/ 0, 423 /*Bit8u LinNumberOfPages*/ 0, 424 /*Bit8u LinRedMaskSize*/ 0, 425 /*Bit8u LinRedFieldPosition*/ 0, 426 /*Bit8u LinGreenMaskSize*/ 0, 427 /*Bit8u LinGreenFieldPosition*/ 0, 428 /*Bit8u LinBlueMaskSize*/ 0, 429 /*Bit8u LinBlueFieldPosition*/ 0, 430 /*Bit8u LinRsvdMaskSize*/ 0, 431 /*Bit8u LinRsvdFieldPosition*/ 0, 432 /*Bit32u MaxPixelClock*/ 0, 433 /*} ModeInfoBlock;*/ 434 } 435 }, 436 437 { 438 VBE_VESA_MODE_1024X768X8, 439 { 440 /*typedef struct ModeInfoBlock 441 {*/ 442 /* Mandatory information for all VBE revisions */ 443 /*Bit16u ModeAttributes*/ VBE_MODE_ATTRIBUTE_SUPPORTED | 444 VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE | 445 VBE_MODE_ATTRIBUTE_COLOR_MODE | 446 VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE | 447 VBE_MODE_ATTRIBUTE_GRAPHICS_MODE, 448 /*Bit8u WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | 449 VBE_WINDOW_ATTRIBUTE_READABLE | 450 VBE_WINDOW_ATTRIBUTE_WRITEABLE, 451 /*Bit8u WinBAttributes*/ 0, 452 /*Bit16u WinGranularity*/ VBE_DISPI_BANK_SIZE_KB, 453 /*Bit16u WinSize*/ VBE_DISPI_BANK_SIZE_KB, 454 /*Bit16u WinASegment*/ VGAMEM_GRAPH, 455 /*Bit16u WinBSegment*/ 0, 456 /*Bit32u WinFuncPtr*/ 0, 457 /*Bit16u BytesPerScanLine*/ 1024, 458 /* Mandatory information for VBE 1.2 and above */ 459 /*Bit16u XResolution*/ 1024, 460 /*Bit16u YResolution*/ 768, 461 /*Bit8u XCharSize*/ 8, 462 /*Bit8u YCharSize*/ 16, 463 /*Bit8u NumberOfPlanes*/ 1, 464 /*Bit8u BitsPerPixel*/ 8, 465 /*Bit8u NumberOfBanks*/ 12, /* 1024x768/64kb == 12 */ 466 /*Bit8u MemoryModel*/ VBE_MEMORYMODEL_PACKED_PIXEL, 467 /*Bit8u BankSize*/ 0, 468 /*Bit8u NumberOfImagePages*/ 3, 469 /*Bit8u Reserved_page*/ 0, 470 /* Direct Color fields (required for direct/6 and YUV/7 memory models) */ 471 /*Bit8u RedMaskSize*/ 0, 472 /*Bit8u RedFieldPosition*/ 0, 473 /*Bit8u GreenMaskSize*/ 0, 474 /*Bit8u GreenFieldPosition*/ 0, 475 /*Bit8u BlueMaskSize*/ 0, 476 /*Bit8u BlueFieldPosition*/ 0, 477 /*Bit8u RsvdMaskSize*/ 0, 478 /*Bit8u RsvdFieldPosition*/ 0, 479 /*Bit8u DirectColorModeInfo*/ 0, 480 /* Mandatory information for VBE 2.0 and above */ 481 /*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS, 482 /*Bit32u OffScreenMemOffset*/ 0, 483 /*Bit16u OffScreenMemSize*/ 0, 484 /* Mandatory information for VBE 3.0 and above */ 485 /*Bit16u LinBytesPerScanLine*/ 1024, 486 /*Bit8u BnkNumberOfPages*/ 0, 487 /*Bit8u LinNumberOfPages*/ 0, 488 /*Bit8u LinRedMaskSize*/ 0, 489 /*Bit8u LinRedFieldPosition*/ 0, 490 /*Bit8u LinGreenMaskSize*/ 0, 491 /*Bit8u LinGreenFieldPosition*/ 0, 492 /*Bit8u LinBlueMaskSize*/ 0, 493 /*Bit8u LinBlueFieldPosition*/ 0, 494 /*Bit8u LinRsvdMaskSize*/ 0, 495 /*Bit8u LinRsvdFieldPosition*/ 0, 496 /*Bit32u MaxPixelClock*/ 0, 497 /*} ModeInfoBlock;*/ 498 } 499 }, 500 501 { 502 VBE_VESA_MODE_640X480X1555, 503 { 504 /*typedef struct ModeInfoBlock 505 {*/ 506 /* Mandatory information for all VBE revisions */ 507 /*Bit16u ModeAttributes*/ VBE_MODE_ATTRIBUTE_SUPPORTED | 508 VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE | 509 VBE_MODE_ATTRIBUTE_COLOR_MODE | 510 VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE | 511 VBE_MODE_ATTRIBUTE_GRAPHICS_MODE, 512 /*Bit8u WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | 513 VBE_WINDOW_ATTRIBUTE_READABLE | 514 VBE_WINDOW_ATTRIBUTE_WRITEABLE, 515 /*Bit8u WinBAttributes*/ 0, 516 /*Bit16u WinGranularity*/ VBE_DISPI_BANK_SIZE_KB, 517 /*Bit16u WinSize*/ VBE_DISPI_BANK_SIZE_KB, 518 /*Bit16u WinASegment*/ VGAMEM_GRAPH, 519 /*Bit16u WinBSegment*/ 0, 520 /*Bit32u WinFuncPtr*/ 0, 521 /*Bit16u BytesPerScanLine*/ 640*2, 522 /* Mandatory information for VBE 1.2 and above */ 523 /*Bit16u XResolution*/ 640, 524 /*Bit16u YResolution*/ 480, 525 /*Bit8u XCharSize*/ 8, 526 /*Bit8u YCharSize*/ 16, 527 /*Bit8u NumberOfPlanes*/ 1, 528 /*Bit8u BitsPerPixel*/ 15, 529 /*Bit8u NumberOfBanks*/ 1, 530 /*Bit8u MemoryModel*/ VBE_MEMORYMODEL_DIRECT_COLOR, 531 /*Bit8u BankSize*/ 0, 532 /*Bit8u NumberOfImagePages*/ 5, 533 /*Bit8u Reserved_page*/ 0, 534 /* Direct Color fields (required for direct/6 and YUV/7 memory models) */ 535 /*Bit8u RedMaskSize*/ 5, 536 /*Bit8u RedFieldPosition*/ 10, 537 /*Bit8u GreenMaskSize*/ 5, 538 /*Bit8u GreenFieldPosition*/ 5, 539 /*Bit8u BlueMaskSize*/ 5, 540 /*Bit8u BlueFieldPosition*/ 0, 541 /*Bit8u RsvdMaskSize*/ 1, 542 /*Bit8u RsvdFieldPosition*/ 15, 543 /*Bit8u DirectColorModeInfo*/ 0, 544 /* Mandatory information for VBE 2.0 and above */ 545 /*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS, 546 /*Bit32u OffScreenMemOffset*/ 0, 547 /*Bit16u OffScreenMemSize*/ 0, 548 /* Mandatory information for VBE 3.0 and above */ 549 /*Bit16u LinBytesPerScanLine*/ 640*2, 550 /*Bit8u BnkNumberOfPages*/ 0, 551 /*Bit8u LinNumberOfPages*/ 0, 552 /*Bit8u LinRedMaskSize*/ 5, 553 /*Bit8u LinRedFieldPosition*/ 10, 554 /*Bit8u LinGreenMaskSize*/ 0, 555 /*Bit8u LinGreenFieldPosition*/ 5, 556 /*Bit8u LinBlueMaskSize*/ 5, 557 /*Bit8u LinBlueFieldPosition*/ 0, 558 /*Bit8u LinRsvdMaskSize*/ 1, 559 /*Bit8u LinRsvdFieldPosition*/ 15, 560 /*Bit32u MaxPixelClock*/ 0, 561 /*} ModeInfoBlock;*/ 562 } 563 }, 564 565 { 566 VBE_VESA_MODE_800X600X1555, 567 { 568 /*typedef struct ModeInfoBlock 569 {*/ 570 /* Mandatory information for all VBE revisions */ 571 /*Bit16u ModeAttributes*/ VBE_MODE_ATTRIBUTE_SUPPORTED | 572 VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE | 573 VBE_MODE_ATTRIBUTE_COLOR_MODE | 574 VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE | 575 VBE_MODE_ATTRIBUTE_GRAPHICS_MODE, 576 /*Bit8u WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | 577 VBE_WINDOW_ATTRIBUTE_READABLE | 578 VBE_WINDOW_ATTRIBUTE_WRITEABLE, 579 /*Bit8u WinBAttributes*/ 0, 580 /*Bit16u WinGranularity*/ VBE_DISPI_BANK_SIZE_KB, 581 /*Bit16u WinSize*/ VBE_DISPI_BANK_SIZE_KB, 582 /*Bit16u WinASegment*/ VGAMEM_GRAPH, 583 /*Bit16u WinBSegment*/ 0, 584 /*Bit32u WinFuncPtr*/ 0, 585 /*Bit16u BytesPerScanLine*/ 800*2, 586 /* Mandatory information for VBE 1.2 and above */ 587 /*Bit16u XResolution*/ 800, 588 /*Bit16u YResolution*/ 600, 589 /*Bit8u XCharSize*/ 8, 590 /*Bit8u YCharSize*/ 16, 591 /*Bit8u NumberOfPlanes*/ 1, 592 /*Bit8u BitsPerPixel*/ 15, 593 /*Bit8u NumberOfBanks*/ 1, 594 /*Bit8u MemoryModel*/ VBE_MEMORYMODEL_DIRECT_COLOR, 595 /*Bit8u BankSize*/ 0, 596 /*Bit8u NumberOfImagePages*/ 3, 597 /*Bit8u Reserved_page*/ 0, 598 /* Direct Color fields (required for direct/6 and YUV/7 memory models) */ 599 /*Bit8u RedMaskSize*/ 5, 600 /*Bit8u RedFieldPosition*/ 10, 601 /*Bit8u GreenMaskSize*/ 5, 602 /*Bit8u GreenFieldPosition*/ 5, 603 /*Bit8u BlueMaskSize*/ 5, 604 /*Bit8u BlueFieldPosition*/ 0, 605 /*Bit8u RsvdMaskSize*/ 1, 606 /*Bit8u RsvdFieldPosition*/ 15, 607 /*Bit8u DirectColorModeInfo*/ 0, 608 /* Mandatory information for VBE 2.0 and above */ 609 /*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS, 610 /*Bit32u OffScreenMemOffset*/ 0, 611 /*Bit16u OffScreenMemSize*/ 0, 612 /* Mandatory information for VBE 3.0 and above */ 613 /*Bit16u LinBytesPerScanLine*/ 800*2, 614 /*Bit8u BnkNumberOfPages*/ 0, 615 /*Bit8u LinNumberOfPages*/ 0, 616 /*Bit8u LinRedMaskSize*/ 5, 617 /*Bit8u LinRedFieldPosition*/ 10, 618 /*Bit8u LinGreenMaskSize*/ 5, 619 /*Bit8u LinGreenFieldPosition*/ 5, 620 /*Bit8u LinBlueMaskSize*/ 5, 621 /*Bit8u LinBlueFieldPosition*/ 0, 622 /*Bit8u LinRsvdMaskSize*/ 1, 623 /*Bit8u LinRsvdFieldPosition*/ 15, 624 /*Bit32u MaxPixelClock*/ 0, 625 /*} ModeInfoBlock;*/ 626 } 627 }, 628 629 { 630 VBE_VESA_MODE_1024X768X1555, 631 { 632 /*typedef struct ModeInfoBlock 633 {*/ 634 /* Mandatory information for all VBE revisions */ 635 /*Bit16u ModeAttributes*/ VBE_MODE_ATTRIBUTE_SUPPORTED | 636 VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE | 637 VBE_MODE_ATTRIBUTE_COLOR_MODE | 638 VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE | 639 VBE_MODE_ATTRIBUTE_GRAPHICS_MODE, 640 /*Bit8u WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | 641 VBE_WINDOW_ATTRIBUTE_READABLE | 642 VBE_WINDOW_ATTRIBUTE_WRITEABLE, 643 /*Bit8u WinBAttributes*/ 0, 644 /*Bit16u WinGranularity*/ VBE_DISPI_BANK_SIZE_KB, 645 /*Bit16u WinSize*/ VBE_DISPI_BANK_SIZE_KB, 646 /*Bit16u WinASegment*/ VGAMEM_GRAPH, 647 /*Bit16u WinBSegment*/ 0, 648 /*Bit32u WinFuncPtr*/ 0, 649 /*Bit16u BytesPerScanLine*/ 1024*2, 650 /* Mandatory information for VBE 1.2 and above */ 651 /*Bit16u XResolution*/ 1024, 652 /*Bit16u YResolution*/ 768, 653 /*Bit8u XCharSize*/ 8, 654 /*Bit8u YCharSize*/ 16, 655 /*Bit8u NumberOfPlanes*/ 1, 656 /*Bit8u BitsPerPixel*/ 15, 657 /*Bit8u NumberOfBanks*/ 1, 658 /*Bit8u MemoryModel*/ VBE_MEMORYMODEL_DIRECT_COLOR, 659 /*Bit8u BankSize*/ 0, 660 /*Bit8u NumberOfImagePages*/ 1, 661 /*Bit8u Reserved_page*/ 0, 662 /* Direct Color fields (required for direct/6 and YUV/7 memory models) */ 663 /*Bit8u RedMaskSize*/ 5, 664 /*Bit8u RedFieldPosition*/ 10, 665 /*Bit8u GreenMaskSize*/ 5, 666 /*Bit8u GreenFieldPosition*/ 5, 667 /*Bit8u BlueMaskSize*/ 5, 668 /*Bit8u BlueFieldPosition*/ 0, 669 /*Bit8u RsvdMaskSize*/ 1, 670 /*Bit8u RsvdFieldPosition*/ 15, 671 /*Bit8u DirectColorModeInfo*/ 0, 672 /* Mandatory information for VBE 2.0 and above */ 673 /*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS, 674 /*Bit32u OffScreenMemOffset*/ 0, 675 /*Bit16u OffScreenMemSize*/ 0, 676 /* Mandatory information for VBE 3.0 and above */ 677 /*Bit16u LinBytesPerScanLine*/ 1024*2, 678 /*Bit8u BnkNumberOfPages*/ 0, 679 /*Bit8u LinNumberOfPages*/ 0, 680 /*Bit8u LinRedMaskSize*/ 5, 681 /*Bit8u LinRedFieldPosition*/ 10, 682 /*Bit8u LinGreenMaskSize*/ 5, 683 /*Bit8u LinGreenFieldPosition*/ 5, 684 /*Bit8u LinBlueMaskSize*/ 5, 685 /*Bit8u LinBlueFieldPosition*/ 0, 686 /*Bit8u LinRsvdMaskSize*/ 1, 687 /*Bit8u LinRsvdFieldPosition*/ 15, 688 /*Bit32u MaxPixelClock*/ 0, 689 /*} ModeInfoBlock;*/ 690 } 691 }, 692 693 { 694 VBE_VESA_MODE_640X480X565, 695 { 696 /*typedef struct ModeInfoBlock 697 {*/ 698 /* Mandatory information for all VBE revisions */ 699 /*Bit16u ModeAttributes*/ VBE_MODE_ATTRIBUTE_SUPPORTED | 700 VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE | 701 VBE_MODE_ATTRIBUTE_COLOR_MODE | 702 VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE | 703 VBE_MODE_ATTRIBUTE_GRAPHICS_MODE, 704 /*Bit8u WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | 705 VBE_WINDOW_ATTRIBUTE_READABLE | 706 VBE_WINDOW_ATTRIBUTE_WRITEABLE, 707 /*Bit8u WinBAttributes*/ 0, 708 /*Bit16u WinGranularity*/ VBE_DISPI_BANK_SIZE_KB, 709 /*Bit16u WinSize*/ VBE_DISPI_BANK_SIZE_KB, 710 /*Bit16u WinASegment*/ VGAMEM_GRAPH, 711 /*Bit16u WinBSegment*/ 0, 712 /*Bit32u WinFuncPtr*/ 0, 713 /*Bit16u BytesPerScanLine*/ 640*2, 714 /* Mandatory information for VBE 1.2 and above */ 715 /*Bit16u XResolution*/ 640, 716 /*Bit16u YResolution*/ 480, 717 /*Bit8u XCharSize*/ 8, 718 /*Bit8u YCharSize*/ 16, 719 /*Bit8u NumberOfPlanes*/ 1, 720 /*Bit8u BitsPerPixel*/ 16, 721 /*Bit8u NumberOfBanks*/ 1, 722 /*Bit8u MemoryModel*/ VBE_MEMORYMODEL_DIRECT_COLOR, 723 /*Bit8u BankSize*/ 0, 724 /*Bit8u NumberOfImagePages*/ 5, 725 /*Bit8u Reserved_page*/ 0, 726 /* Direct Color fields (required for direct/6 and YUV/7 memory models) */ 727 /*Bit8u RedMaskSize*/ 5, 728 /*Bit8u RedFieldPosition*/ 11, 729 /*Bit8u GreenMaskSize*/ 6, 730 /*Bit8u GreenFieldPosition*/ 5, 731 /*Bit8u BlueMaskSize*/ 5, 732 /*Bit8u BlueFieldPosition*/ 0, 733 /*Bit8u RsvdMaskSize*/ 0, 734 /*Bit8u RsvdFieldPosition*/ 0, 735 /*Bit8u DirectColorModeInfo*/ 0, 736 /* Mandatory information for VBE 2.0 and above */ 737 /*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS, 738 /*Bit32u OffScreenMemOffset*/ 0, 739 /*Bit16u OffScreenMemSize*/ 0, 740 /* Mandatory information for VBE 3.0 and above */ 741 /*Bit16u LinBytesPerScanLine*/ 640*2, 742 /*Bit8u BnkNumberOfPages*/ 0, 743 /*Bit8u LinNumberOfPages*/ 0, 744 /*Bit8u LinRedMaskSize*/ 5, 745 /*Bit8u LinRedFieldPosition*/ 11, 746 /*Bit8u LinGreenMaskSize*/ 6, 747 /*Bit8u LinGreenFieldPosition*/ 5, 748 /*Bit8u LinBlueMaskSize*/ 5, 749 /*Bit8u LinBlueFieldPosition*/ 0, 750 /*Bit8u LinRsvdMaskSize*/ 0, 751 /*Bit8u LinRsvdFieldPosition*/ 0, 752 /*Bit32u MaxPixelClock*/ 0, 753 /*} ModeInfoBlock;*/ 754 } 755 }, 756 757 { 758 VBE_VESA_MODE_800X600X565, 759 { 760 /*typedef struct ModeInfoBlock 761 {*/ 762 /* Mandatory information for all VBE revisions */ 763 /*Bit16u ModeAttributes*/ VBE_MODE_ATTRIBUTE_SUPPORTED | 764 VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE | 765 VBE_MODE_ATTRIBUTE_COLOR_MODE | 766 VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE | 767 VBE_MODE_ATTRIBUTE_GRAPHICS_MODE, 768 /*Bit8u WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | 769 VBE_WINDOW_ATTRIBUTE_READABLE | 770 VBE_WINDOW_ATTRIBUTE_WRITEABLE, 771 /*Bit8u WinBAttributes*/ 0, 772 /*Bit16u WinGranularity*/ VBE_DISPI_BANK_SIZE_KB, 773 /*Bit16u WinSize*/ VBE_DISPI_BANK_SIZE_KB, 774 /*Bit16u WinASegment*/ VGAMEM_GRAPH, 775 /*Bit16u WinBSegment*/ 0, 776 /*Bit32u WinFuncPtr*/ 0, 777 /*Bit16u BytesPerScanLine*/ 800*2, 778 /* Mandatory information for VBE 1.2 and above */ 779 /*Bit16u XResolution*/ 800, 780 /*Bit16u YResolution*/ 600, 781 /*Bit8u XCharSize*/ 8, 782 /*Bit8u YCharSize*/ 16, 783 /*Bit8u NumberOfPlanes*/ 1, 784 /*Bit8u BitsPerPixel*/ 16, 785 /*Bit8u NumberOfBanks*/ 1, 786 /*Bit8u MemoryModel*/ VBE_MEMORYMODEL_DIRECT_COLOR, 787 /*Bit8u BankSize*/ 0, 788 /*Bit8u NumberOfImagePages*/ 3, 789 /*Bit8u Reserved_page*/ 0, 790 /* Direct Color fields (required for direct/6 and YUV/7 memory models) */ 791 /*Bit8u RedMaskSize*/ 5, 792 /*Bit8u RedFieldPosition*/ 11, 793 /*Bit8u GreenMaskSize*/ 6, 794 /*Bit8u GreenFieldPosition*/ 5, 795 /*Bit8u BlueMaskSize*/ 5, 796 /*Bit8u BlueFieldPosition*/ 0, 797 /*Bit8u RsvdMaskSize*/ 0, 798 /*Bit8u RsvdFieldPosition*/ 0, 799 /*Bit8u DirectColorModeInfo*/ 0, 800 /* Mandatory information for VBE 2.0 and above */ 801 /*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS, 802 /*Bit32u OffScreenMemOffset*/ 0, 803 /*Bit16u OffScreenMemSize*/ 0, 804 /* Mandatory information for VBE 3.0 and above */ 805 /*Bit16u LinBytesPerScanLine*/ 800*2, 806 /*Bit8u BnkNumberOfPages*/ 0, 807 /*Bit8u LinNumberOfPages*/ 0, 808 /*Bit8u LinRedMaskSize*/ 5, 809 /*Bit8u LinRedFieldPosition*/ 11, 810 /*Bit8u LinGreenMaskSize*/ 6, 811 /*Bit8u LinGreenFieldPosition*/ 5, 812 /*Bit8u LinBlueMaskSize*/ 5, 813 /*Bit8u LinBlueFieldPosition*/ 0, 814 /*Bit8u LinRsvdMaskSize*/ 0, 815 /*Bit8u LinRsvdFieldPosition*/ 0, 816 /*Bit32u MaxPixelClock*/ 0, 817 /*} ModeInfoBlock;*/ 818 } 819 }, 820 821 { 822 VBE_VESA_MODE_1024X768X565, 823 { 824 /*typedef struct ModeInfoBlock 825 {*/ 826 /* Mandatory information for all VBE revisions */ 827 /*Bit16u ModeAttributes*/ VBE_MODE_ATTRIBUTE_SUPPORTED | 828 VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE | 829 VBE_MODE_ATTRIBUTE_COLOR_MODE | 830 VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE | 831 VBE_MODE_ATTRIBUTE_GRAPHICS_MODE, 832 /*Bit8u WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | 833 VBE_WINDOW_ATTRIBUTE_READABLE | 834 VBE_WINDOW_ATTRIBUTE_WRITEABLE, 835 /*Bit8u WinBAttributes*/ 0, 836 /*Bit16u WinGranularity*/ VBE_DISPI_BANK_SIZE_KB, 837 /*Bit16u WinSize*/ VBE_DISPI_BANK_SIZE_KB, 838 /*Bit16u WinASegment*/ VGAMEM_GRAPH, 839 /*Bit16u WinBSegment*/ 0, 840 /*Bit32u WinFuncPtr*/ 0, 841 /*Bit16u BytesPerScanLine*/ 1024*2, 842 /* Mandatory information for VBE 1.2 and above */ 843 /*Bit16u XResolution*/ 1024, 844 /*Bit16u YResolution*/ 768, 845 /*Bit8u XCharSize*/ 8, 846 /*Bit8u YCharSize*/ 16, 847 /*Bit8u NumberOfPlanes*/ 1, 848 /*Bit8u BitsPerPixel*/ 16, 849 /*Bit8u NumberOfBanks*/ 1, 850 /*Bit8u MemoryModel*/ VBE_MEMORYMODEL_DIRECT_COLOR, 851 /*Bit8u BankSize*/ 0, 852 /*Bit8u NumberOfImagePages*/ 1, 853 /*Bit8u Reserved_page*/ 0, 854 /* Direct Color fields (required for direct/6 and YUV/7 memory models) */ 855 /*Bit8u RedMaskSize*/ 5, 856 /*Bit8u RedFieldPosition*/ 11, 857 /*Bit8u GreenMaskSize*/ 6, 858 /*Bit8u GreenFieldPosition*/ 5, 859 /*Bit8u BlueMaskSize*/ 5, 860 /*Bit8u BlueFieldPosition*/ 0, 861 /*Bit8u RsvdMaskSize*/ 0, 862 /*Bit8u RsvdFieldPosition*/ 0, 863 /*Bit8u DirectColorModeInfo*/ 0, 864 /* Mandatory information for VBE 2.0 and above */ 865 /*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS, 866 /*Bit32u OffScreenMemOffset*/ 0, 867 /*Bit16u OffScreenMemSize*/ 0, 868 /* Mandatory information for VBE 3.0 and above */ 869 /*Bit16u LinBytesPerScanLine*/ 1024*2, 870 /*Bit8u BnkNumberOfPages*/ 0, 871 /*Bit8u LinNumberOfPages*/ 0, 872 /*Bit8u LinRedMaskSize*/ 5, 873 /*Bit8u LinRedFieldPosition*/ 11, 874 /*Bit8u LinGreenMaskSize*/ 6, 875 /*Bit8u LinGreenFieldPosition*/ 5, 876 /*Bit8u LinBlueMaskSize*/ 5, 877 /*Bit8u LinBlueFieldPosition*/ 0, 878 /*Bit8u LinRsvdMaskSize*/ 0, 879 /*Bit8u LinRsvdFieldPosition*/ 0, 880 /*Bit32u MaxPixelClock*/ 0, 881 /*} ModeInfoBlock;*/ 882 } 883 }, 884 885 { 886 VBE_VESA_MODE_640X480X888, 887 { 888 /*typedef struct ModeInfoBlock 889 {*/ 890 /* Mandatory information for all VBE revisions */ 891 /*Bit16u ModeAttributes*/ VBE_MODE_ATTRIBUTE_SUPPORTED | 892 VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE | 893 VBE_MODE_ATTRIBUTE_COLOR_MODE | 894 VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE | 895 VBE_MODE_ATTRIBUTE_GRAPHICS_MODE, 896 /*Bit8u WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | 897 VBE_WINDOW_ATTRIBUTE_READABLE | 898 VBE_WINDOW_ATTRIBUTE_WRITEABLE, 899 /*Bit8u WinBAttributes*/ 0, 900 /*Bit16u WinGranularity*/ VBE_DISPI_BANK_SIZE_KB, 901 /*Bit16u WinSize*/ VBE_DISPI_BANK_SIZE_KB, 902 /*Bit16u WinASegment*/ VGAMEM_GRAPH, 903 /*Bit16u WinBSegment*/ 0, 904 /*Bit32u WinFuncPtr*/ 0, 905 /*Bit16u BytesPerScanLine*/ 640*3, 906 /* Mandatory information for VBE 1.2 and above */ 907 /*Bit16u XResolution*/ 640, 908 /*Bit16u YResolution*/ 480, 909 /*Bit8u XCharSize*/ 8, 910 /*Bit8u YCharSize*/ 16, 911 /*Bit8u NumberOfPlanes*/ 1, 912 /*Bit8u BitsPerPixel*/ 24, 913 /*Bit8u NumberOfBanks*/ 1, 914 /*Bit8u MemoryModel*/ VBE_MEMORYMODEL_DIRECT_COLOR, 915 /*Bit8u BankSize*/ 0, 916 /*Bit8u NumberOfImagePages*/ 3, 917 /*Bit8u Reserved_page*/ 0, 918 /* Direct Color fields (required for direct/6 and YUV/7 memory models) */ 919 /*Bit8u RedMaskSize*/ 8, 920 /*Bit8u RedFieldPosition*/ 16, 921 /*Bit8u GreenMaskSize*/ 8, 922 /*Bit8u GreenFieldPosition*/ 8, 923 /*Bit8u BlueMaskSize*/ 8, 924 /*Bit8u BlueFieldPosition*/ 0, 925 /*Bit8u RsvdMaskSize*/ 0, 926 /*Bit8u RsvdFieldPosition*/ 0, 927 /*Bit8u DirectColorModeInfo*/ 0, 928 /* Mandatory information for VBE 2.0 and above */ 929 /*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS, 930 /*Bit32u OffScreenMemOffset*/ 0, 931 /*Bit16u OffScreenMemSize*/ 0, 932 /* Mandatory information for VBE 3.0 and above */ 933 /*Bit16u LinBytesPerScanLine*/ 640*3, 934 /*Bit8u BnkNumberOfPages*/ 0, 935 /*Bit8u LinNumberOfPages*/ 0, 936 /*Bit8u LinRedMaskSize*/ 8, 937 /*Bit8u LinRedFieldPosition*/ 16, 938 /*Bit8u LinGreenMaskSize*/ 8, 939 /*Bit8u LinGreenFieldPosition*/ 8, 940 /*Bit8u LinBlueMaskSize*/ 8, 941 /*Bit8u LinBlueFieldPosition*/ 0, 942 /*Bit8u LinRsvdMaskSize*/ 0, 943 /*Bit8u LinRsvdFieldPosition*/ 0, 944 /*Bit32u MaxPixelClock*/ 0, 945 /*} ModeInfoBlock;*/ 946 } 947 }, 948 949 { 950 VBE_VESA_MODE_800X600X888, 951 { 952 /*typedef struct ModeInfoBlock 953 {*/ 954 /* Mandatory information for all VBE revisions */ 955 /*Bit16u ModeAttributes*/ VBE_MODE_ATTRIBUTE_SUPPORTED | 956 VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE | 957 VBE_MODE_ATTRIBUTE_COLOR_MODE | 958 VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE | 959 VBE_MODE_ATTRIBUTE_GRAPHICS_MODE, 960 /*Bit8u WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | 961 VBE_WINDOW_ATTRIBUTE_READABLE | 962 VBE_WINDOW_ATTRIBUTE_WRITEABLE, 963 /*Bit8u WinBAttributes*/ 0, 964 /*Bit16u WinGranularity*/ VBE_DISPI_BANK_SIZE_KB, 965 /*Bit16u WinSize*/ VBE_DISPI_BANK_SIZE_KB, 966 /*Bit16u WinASegment*/ VGAMEM_GRAPH, 967 /*Bit16u WinBSegment*/ 0, 968 /*Bit32u WinFuncPtr*/ 0, 969 /*Bit16u BytesPerScanLine*/ 800*3, 970 /* Mandatory information for VBE 1.2 and above */ 971 /*Bit16u XResolution*/ 800, 972 /*Bit16u YResolution*/ 600, 973 /*Bit8u XCharSize*/ 8, 974 /*Bit8u YCharSize*/ 16, 975 /*Bit8u NumberOfPlanes*/ 1, 976 /*Bit8u BitsPerPixel*/ 24, 977 /*Bit8u NumberOfBanks*/ 1, 978 /*Bit8u MemoryModel*/ VBE_MEMORYMODEL_DIRECT_COLOR, 979 /*Bit8u BankSize*/ 0, 980 /*Bit8u NumberOfImagePages*/ 1, 981 /*Bit8u Reserved_page*/ 0, 982 /* Direct Color fields (required for direct/6 and YUV/7 memory models) */ 983 /*Bit8u RedMaskSize*/ 8, 984 /*Bit8u RedFieldPosition*/ 16, 985 /*Bit8u GreenMaskSize*/ 8, 986 /*Bit8u GreenFieldPosition*/ 8, 987 /*Bit8u BlueMaskSize*/ 8, 988 /*Bit8u BlueFieldPosition*/ 0, 989 /*Bit8u RsvdMaskSize*/ 0, 990 /*Bit8u RsvdFieldPosition*/ 0, 991 /*Bit8u DirectColorModeInfo*/ 0, 992 /* Mandatory information for VBE 2.0 and above */ 993 /*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS, 994 /*Bit32u OffScreenMemOffset*/ 0, 995 /*Bit16u OffScreenMemSize*/ 0, 996 /* Mandatory information for VBE 3.0 and above */ 997 /*Bit16u LinBytesPerScanLine*/ 800*3, 998 /*Bit8u BnkNumberOfPages*/ 0, 999 /*Bit8u LinNumberOfPages*/ 0, 1000 /*Bit8u LinRedMaskSize*/ 8, 1001 /*Bit8u LinRedFieldPosition*/ 16, 1002 /*Bit8u LinGreenMaskSize*/ 8, 1003 /*Bit8u LinGreenFieldPosition*/ 8, 1004 /*Bit8u LinBlueMaskSize*/ 8, 1005 /*Bit8u LinBlueFieldPosition*/ 0, 1006 /*Bit8u LinRsvdMaskSize*/ 0, 1007 /*Bit8u LinRsvdFieldPosition*/ 0, 1008 /*Bit32u MaxPixelClock*/ 0, 1009 /*} ModeInfoBlock;*/ 1010 } 1011 }, 1012 1013 { 1014 VBE_VESA_MODE_1024X768X888, 1015 { 1016 /*typedef struct ModeInfoBlock 1017 {*/ 1018 /* Mandatory information for all VBE revisions */ 1019 /*Bit16u ModeAttributes*/ VBE_MODE_ATTRIBUTE_SUPPORTED | 1020 VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE | 1021 VBE_MODE_ATTRIBUTE_COLOR_MODE | 1022 VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE | 1023 VBE_MODE_ATTRIBUTE_GRAPHICS_MODE, 1024 /*Bit8u WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | 1025 VBE_WINDOW_ATTRIBUTE_READABLE | 1026 VBE_WINDOW_ATTRIBUTE_WRITEABLE, 1027 /*Bit8u WinBAttributes*/ 0, 1028 /*Bit16u WinGranularity*/ VBE_DISPI_BANK_SIZE_KB, 1029 /*Bit16u WinSize*/ VBE_DISPI_BANK_SIZE_KB, 1030 /*Bit16u WinASegment*/ VGAMEM_GRAPH, 1031 /*Bit16u WinBSegment*/ 0, 1032 /*Bit32u WinFuncPtr*/ 0, 1033 /*Bit16u BytesPerScanLine*/ 1024*3, 1034 /* Mandatory information for VBE 1.2 and above */ 1035 /*Bit16u XResolution*/ 1024, 1036 /*Bit16u YResolution*/ 768, 1037 /*Bit8u XCharSize*/ 8, 1038 /*Bit8u YCharSize*/ 16, 1039 /*Bit8u NumberOfPlanes*/ 1, 1040 /*Bit8u BitsPerPixel*/ 24, 1041 /*Bit8u NumberOfBanks*/ 1, 1042 /*Bit8u MemoryModel*/ VBE_MEMORYMODEL_DIRECT_COLOR, 1043 /*Bit8u BankSize*/ 0, 1044 /*Bit8u NumberOfImagePages*/ 0, 1045 /*Bit8u Reserved_page*/ 0, 1046 /* Direct Color fields (required for direct/6 and YUV/7 memory models) */ 1047 /*Bit8u RedMaskSize*/ 8, 1048 /*Bit8u RedFieldPosition*/ 16, 1049 /*Bit8u GreenMaskSize*/ 8, 1050 /*Bit8u GreenFieldPosition*/ 8, 1051 /*Bit8u BlueMaskSize*/ 8, 1052 /*Bit8u BlueFieldPosition*/ 0, 1053 /*Bit8u RsvdMaskSize*/ 0, 1054 /*Bit8u RsvdFieldPosition*/ 0, 1055 /*Bit8u DirectColorModeInfo*/ 0, 1056 /* Mandatory information for VBE 2.0 and above */ 1057 /*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS, 1058 /*Bit32u OffScreenMemOffset*/ 0, 1059 /*Bit16u OffScreenMemSize*/ 0, 1060 /* Mandatory information for VBE 3.0 and above */ 1061 /*Bit16u LinBytesPerScanLine*/ 1024*3, 1062 /*Bit8u BnkNumberOfPages*/ 0, 1063 /*Bit8u LinNumberOfPages*/ 0, 1064 /*Bit8u LinRedMaskSize*/ 8, 1065 /*Bit8u LinRedFieldPosition*/ 16, 1066 /*Bit8u LinGreenMaskSize*/ 8, 1067 /*Bit8u LinGreenFieldPosition*/ 8, 1068 /*Bit8u LinBlueMaskSize*/ 8, 1069 /*Bit8u LinBlueFieldPosition*/ 0, 1070 /*Bit8u LinRsvdMaskSize*/ 0, 1071 /*Bit8u LinRsvdFieldPosition*/ 0, 1072 /*Bit32u MaxPixelClock*/ 0, 1073 /*} ModeInfoBlock;*/ 1074 } 1075 }, 1076 1077 { 1078 VBE_OWN_MODE_640X480X8888, 1079 { 1080 /*typedef struct ModeInfoBlock 1081 {*/ 1082 /* Mandatory information for all VBE revisions */ 1083 /*Bit16u ModeAttributes*/ VBE_MODE_ATTRIBUTE_SUPPORTED | 1084 VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE | 1085 VBE_MODE_ATTRIBUTE_COLOR_MODE | 1086 VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE | 1087 VBE_MODE_ATTRIBUTE_GRAPHICS_MODE, 1088 /*Bit8u WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | 1089 VBE_WINDOW_ATTRIBUTE_READABLE | 1090 VBE_WINDOW_ATTRIBUTE_WRITEABLE, 1091 /*Bit8u WinBAttributes*/ 0, 1092 /*Bit16u WinGranularity*/ VBE_DISPI_BANK_SIZE_KB, 1093 /*Bit16u WinSize*/ VBE_DISPI_BANK_SIZE_KB, 1094 /*Bit16u WinASegment*/ VGAMEM_GRAPH, 1095 /*Bit16u WinBSegment*/ 0, 1096 /*Bit32u WinFuncPtr*/ 0, 1097 /*Bit16u BytesPerScanLine*/ 640*4, 1098 /* Mandatory information for VBE 1.2 and above */ 1099 /*Bit16u XResolution*/ 640, 1100 /*Bit16u YResolution*/ 480, 1101 /*Bit8u XCharSize*/ 8, 1102 /*Bit8u YCharSize*/ 16, 1103 /*Bit8u NumberOfPlanes*/ 1, 1104 /*Bit8u BitsPerPixel*/ 32, 1105 /*Bit8u NumberOfBanks*/ 1, 1106 /*Bit8u MemoryModel*/ VBE_MEMORYMODEL_DIRECT_COLOR, 1107 /*Bit8u BankSize*/ 0, 1108 /*Bit8u NumberOfImagePages*/ 1, 1109 /*Bit8u Reserved_page*/ 0, 1110 /* Direct Color fields (required for direct/6 and YUV/7 memory models) */ 1111 /*Bit8u RedMaskSize*/ 8, 1112 /*Bit8u RedFieldPosition*/ 16, 1113 /*Bit8u GreenMaskSize*/ 8, 1114 /*Bit8u GreenFieldPosition*/ 8, 1115 /*Bit8u BlueMaskSize*/ 8, 1116 /*Bit8u BlueFieldPosition*/ 0, 1117 /*Bit8u RsvdMaskSize*/ 8, 1118 /*Bit8u RsvdFieldPosition*/ 24, 1119 /*Bit8u DirectColorModeInfo*/ VBE_DIRECTCOLOR_RESERVED_BITS_AVAILABLE, 1120 /* Mandatory information for VBE 2.0 and above */ 1121 /*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS, 1122 /*Bit32u OffScreenMemOffset*/ 0, 1123 /*Bit16u OffScreenMemSize*/ 0, 1124 /* Mandatory information for VBE 3.0 and above */ 1125 /*Bit16u LinBytesPerScanLine*/ 640*4, 1126 /*Bit8u BnkNumberOfPages*/ 0, 1127 /*Bit8u LinNumberOfPages*/ 0, 1128 /*Bit8u LinRedMaskSize*/ 8, 1129 /*Bit8u LinRedFieldPosition*/ 16, 1130 /*Bit8u LinGreenMaskSize*/ 8, 1131 /*Bit8u LinGreenFieldPosition*/ 8, 1132 /*Bit8u LinBlueMaskSize*/ 8, 1133 /*Bit8u LinBlueFieldPosition*/ 0, 1134 /*Bit8u LinRsvdMaskSize*/ 8, 1135 /*Bit8u LinRsvdFieldPosition*/ 24, 1136 /*Bit32u MaxPixelClock*/ 0, 1137 /*} ModeInfoBlock;*/ 1138 } 1139 }, 1140 1141 { 1142 VBE_OWN_MODE_800X600X8888, 1143 { 1144 /*typedef struct ModeInfoBlock 1145 {*/ 1146 /* Mandatory information for all VBE revisions */ 1147 /*Bit16u ModeAttributes*/ VBE_MODE_ATTRIBUTE_SUPPORTED | 1148 VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE | 1149 VBE_MODE_ATTRIBUTE_COLOR_MODE | 1150 VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE | 1151 VBE_MODE_ATTRIBUTE_GRAPHICS_MODE, 1152 /*Bit8u WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | 1153 VBE_WINDOW_ATTRIBUTE_READABLE | 1154 VBE_WINDOW_ATTRIBUTE_WRITEABLE, 1155 /*Bit8u WinBAttributes*/ 0, 1156 /*Bit16u WinGranularity*/ VBE_DISPI_BANK_SIZE_KB, 1157 /*Bit16u WinSize*/ VBE_DISPI_BANK_SIZE_KB, 1158 /*Bit16u WinASegment*/ VGAMEM_GRAPH, 1159 /*Bit16u WinBSegment*/ 0, 1160 /*Bit32u WinFuncPtr*/ 0, 1161 /*Bit16u BytesPerScanLine*/ 800*4, 1162 /* Mandatory information for VBE 1.2 and above */ 1163 /*Bit16u XResolution*/ 800, 1164 /*Bit16u YResolution*/ 600, 1165 /*Bit8u XCharSize*/ 8, 1166 /*Bit8u YCharSize*/ 16, 1167 /*Bit8u NumberOfPlanes*/ 1, 1168 /*Bit8u BitsPerPixel*/ 32, 1169 /*Bit8u NumberOfBanks*/ 1, 1170 /*Bit8u MemoryModel*/ VBE_MEMORYMODEL_DIRECT_COLOR, 1171 /*Bit8u BankSize*/ 0, 1172 /*Bit8u NumberOfImagePages*/ 1, 1173 /*Bit8u Reserved_page*/ 0, 1174 /* Direct Color fields (required for direct/6 and YUV/7 memory models) */ 1175 /*Bit8u RedMaskSize*/ 8, 1176 /*Bit8u RedFieldPosition*/ 16, 1177 /*Bit8u GreenMaskSize*/ 8, 1178 /*Bit8u GreenFieldPosition*/ 8, 1179 /*Bit8u BlueMaskSize*/ 8, 1180 /*Bit8u BlueFieldPosition*/ 0, 1181 /*Bit8u RsvdMaskSize*/ 8, 1182 /*Bit8u RsvdFieldPosition*/ 24, 1183 /*Bit8u DirectColorModeInfo*/ VBE_DIRECTCOLOR_RESERVED_BITS_AVAILABLE, 1184 /* Mandatory information for VBE 2.0 and above */ 1185 /*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS, 1186 /*Bit32u OffScreenMemOffset*/ 0, 1187 /*Bit16u OffScreenMemSize*/ 0, 1188 /* Mandatory information for VBE 3.0 and above */ 1189 /*Bit16u LinBytesPerScanLine*/ 800*4, 1190 /*Bit8u BnkNumberOfPages*/ 0, 1191 /*Bit8u LinNumberOfPages*/ 0, 1192 /*Bit8u LinRedMaskSize*/ 8, 1193 /*Bit8u LinRedFieldPosition*/ 16, 1194 /*Bit8u LinGreenMaskSize*/ 8, 1195 /*Bit8u LinGreenFieldPosition*/ 8, 1196 /*Bit8u LinBlueMaskSize*/ 8, 1197 /*Bit8u LinBlueFieldPosition*/ 0, 1198 /*Bit8u LinRsvdMaskSize*/ 8, 1199 /*Bit8u LinRsvdFieldPosition*/ 24, 1200 /*Bit32u MaxPixelClock*/ 0, 1201 /*} ModeInfoBlock;*/ 1202 } 1203 }, 1204 1205 { 1206 VBE_OWN_MODE_1024X768X8888, 1207 { 1208 /*typedef struct ModeInfoBlock 1209 {*/ 1210 /* Mandatory information for all VBE revisions */ 1211 /*Bit16u ModeAttributes*/ VBE_MODE_ATTRIBUTE_SUPPORTED | 1212 VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE | 1213 VBE_MODE_ATTRIBUTE_COLOR_MODE | 1214 VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE | 1215 VBE_MODE_ATTRIBUTE_GRAPHICS_MODE, 1216 /*Bit8u WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE | 1217 VBE_WINDOW_ATTRIBUTE_READABLE | 1218 VBE_WINDOW_ATTRIBUTE_WRITEABLE, 1219 /*Bit8u WinBAttributes*/ 0, 1220 /*Bit16u WinGranularity*/ VBE_DISPI_BANK_SIZE_KB, 1221 /*Bit16u WinSize*/ VBE_DISPI_BANK_SIZE_KB, 1222 /*Bit16u WinASegment*/ VGAMEM_GRAPH, 1223 /*Bit16u WinBSegment*/ 0, 1224 /*Bit32u WinFuncPtr*/ 0, 1225 /*Bit16u BytesPerScanLine*/ 1024*4, 1226 /* Mandatory information for VBE 1.2 and above */ 1227 /*Bit16u XResolution*/ 1024, 1228 /*Bit16u YResolution*/ 768, 1229 /*Bit8u XCharSize*/ 8, 1230 /*Bit8u YCharSize*/ 16, 1231 /*Bit8u NumberOfPlanes*/ 1, 1232 /*Bit8u BitsPerPixel*/ 32, 1233 /*Bit8u NumberOfBanks*/ 1, 1234 /*Bit8u MemoryModel*/ VBE_MEMORYMODEL_DIRECT_COLOR, 1235 /*Bit8u BankSize*/ 0, 1236 /*Bit8u NumberOfImagePages*/ 1, 1237 /*Bit8u Reserved_page*/ 0, 1238 /* Direct Color fields (required for direct/6 and YUV/7 memory models) */ 1239 /*Bit8u RedMaskSize*/ 8, 1240 /*Bit8u RedFieldPosition*/ 16, 1241 /*Bit8u GreenMaskSize*/ 8, 1242 /*Bit8u GreenFieldPosition*/ 8, 1243 /*Bit8u BlueMaskSize*/ 8, 1244 /*Bit8u BlueFieldPosition*/ 0, 1245 /*Bit8u RsvdMaskSize*/ 8, 1246 /*Bit8u RsvdFieldPosition*/ 24, 1247 /*Bit8u DirectColorModeInfo*/ VBE_DIRECTCOLOR_RESERVED_BITS_AVAILABLE, 1248 /* Mandatory information for VBE 2.0 and above */ 1249 /*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS, 1250 /*Bit32u OffScreenMemOffset*/ 0, 1251 /*Bit16u OffScreenMemSize*/ 0, 1252 /* Mandatory information for VBE 3.0 and above */ 1253 /*Bit16u LinBytesPerScanLine*/ 1024*4, 1254 /*Bit8u BnkNumberOfPages*/ 0, 1255 /*Bit8u LinNumberOfPages*/ 0, 1256 /*Bit8u LinRedMaskSize*/ 8, 1257 /*Bit8u LinRedFieldPosition*/ 16, 1258 /*Bit8u LinGreenMaskSize*/ 8, 1259 /*Bit8u LinGreenFieldPosition*/ 8, 1260 /*Bit8u LinBlueMaskSize*/ 8, 1261 /*Bit8u LinBlueFieldPosition*/ 0, 1262 /*Bit8u LinRsvdMaskSize*/ 8, 1263 /*Bit8u LinRsvdFieldPosition*/ 24, 1264 /*Bit32u MaxPixelClock*/ 0, 1265 /*} ModeInfoBlock;*/ 1266 } 1267 }, 1268 1269 { 1270 VBE_OWN_MODE_320X200X8, 1271 { 1272 /*typedef struct ModeInfoBlock 1273 {*/ 1274 /* Mandatory information for all VBE revisions */ 1275 /*Bit16u ModeAttributes*/ VBE_MODE_ATTRIBUTE_SUPPORTED | 1276 VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE | 1277 VBE_MODE_ATTRIBUTE_COLOR_MODE | 1278 VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE | 1279 VBE_MODE_ATTRIBUTE_GRAPHICS_MODE, 1280 /*Bit8u WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_READABLE | 1281 VBE_WINDOW_ATTRIBUTE_WRITEABLE, 1282 /*Bit8u WinBAttributes*/ 0, 1283 /*Bit16u WinGranularity*/ VBE_DISPI_BANK_SIZE_KB, 1284 /*Bit16u WinSize*/ VBE_DISPI_BANK_SIZE_KB, 1285 /*Bit16u WinASegment*/ VGAMEM_GRAPH, 1286 /*Bit16u WinBSegment*/ 0, 1287 /*Bit32u WinFuncPtr*/ 0, 1288 /*Bit16u BytesPerScanLine*/ 320, 1289 /* Mandatory information for VBE 1.2 and above */ 1290 /*Bit16u XResolution*/ 320, 1291 /*Bit16u YResolution*/ 200, 1292 /*Bit8u XCharSize*/ 8, 1293 /*Bit8u YCharSize*/ 16, 1294 /*Bit8u NumberOfPlanes*/ 1, 1295 /*Bit8u BitsPerPixel*/ 8, 1296 /*Bit8u NumberOfBanks*/ 1, 1297 /*Bit8u MemoryModel*/ VBE_MEMORYMODEL_PACKED_PIXEL, 1298 /*Bit8u BankSize*/ 0, 1299 /*Bit8u NumberOfImagePages*/ 3, 1300 /*Bit8u Reserved_page*/ 0, 1301 /* Direct Color fields (required for direct/6 and YUV/7 memory models) */ 1302 /*Bit8u RedMaskSize*/ 0, 1303 /*Bit8u RedFieldPosition*/ 0, 1304 /*Bit8u GreenMaskSize*/ 0, 1305 /*Bit8u GreenFieldPosition*/ 0, 1306 /*Bit8u BlueMaskSize*/ 0, 1307 /*Bit8u BlueFieldPosition*/ 0, 1308 /*Bit8u RsvdMaskSize*/ 0, 1309 /*Bit8u RsvdFieldPosition*/ 0, 1310 /*Bit8u DirectColorModeInfo*/ 0, 1311 /* Mandatory information for VBE 2.0 and above */ 1312 /*Bit32u PhysBasePtr*/ VBE_DISPI_LFB_PHYSICAL_ADDRESS, 1313 /*Bit32u OffScreenMemOffset*/ 0, 1314 /*Bit16u OffScreenMemSize*/ 0, 1315 /* Mandatory information for VBE 3.0 and above */ 1316 /*Bit16u LinBytesPerScanLine*/ 320, 1317 /*Bit8u BnkNumberOfPages*/ 0, 1318 /*Bit8u LinNumberOfPages*/ 0, 1319 /*Bit8u LinRedMaskSize*/ 0, 1320 /*Bit8u LinRedFieldPosition*/ 0, 1321 /*Bit8u LinGreenMaskSize*/ 0, 1322 /*Bit8u LinGreenFieldPosition*/ 0, 1323 /*Bit8u LinBlueMaskSize*/ 0, 1324 /*Bit8u LinBlueFieldPosition*/ 0, 1325 /*Bit8u LinRsvdMaskSize*/ 0, 1326 /*Bit8u LinRsvdFieldPosition*/ 0, 1327 /*Bit32u MaxPixelClock*/ 0, 1328 /*} ModeInfoBlock;*/ 1329 } 1330 }, 1331 }; 187 #include "BIOS/vbetables.h" 1332 188 1333 189 #define MODE_INFO_SIZE ( sizeof(mode_info_list) / sizeof(ModeInfoListItem) )
Note:
See TracChangeset
for help on using the changeset viewer.