diff options
author | Volker Ruppert <info@vruppert.de> | 2004-07-22 18:37:29 +0000 |
---|---|---|
committer | Volker Ruppert <info@vruppert.de> | 2004-07-22 18:37:29 +0000 |
commit | 66e74811b998360ef1326391cc9fd09c873d7905 (patch) | |
tree | 33ea0df3898ed6809de4e772ad9b7466a577c360 | |
parent | 1011509cdc5c343d6cdf4465fc52c2f567d234c1 (diff) | |
download | vgabios-66e74811b998360ef1326391cc9fd09c873d7905.tar.gz |
- cirrus extension: tables for mode 1280x1024x8 added
- vbe: dispi_set_xres() and dispi_set_virt_width() now modify vga compatible registers
- vbe: mode list entry for mode 800x600x4 fixed
-rw-r--r-- | clext.c | 21 | ||||
-rw-r--r-- | vbe.c | 58 | ||||
-rw-r--r-- | vbetables.h | 4 |
3 files changed, 76 insertions, 7 deletions
@@ -207,6 +207,21 @@ unsigned short ccrtc_1024x768x24[] = { 0x001a,0x321b,0x001d, 0xffff }; +/* 1280x1024x8 */ +unsigned short cseq_1280x1024x8[] = { +0x0300,0x2101,0x0f02,0x0003,0x0e04,0x1107, +0x760b,0x760c,0x760d,0x760e, +0x0412,0x0013,0x2017, +0x341b,0x341c,0x341d,0x341e, +0xffff +}; +unsigned short ccrtc_1280x1024x8[] = { +0x2911,0xc300,0x9f01,0x9f02,0x8603,0x8304,0x9405,0x2406,0xf707, +0x6009,0x000c,0x000d, +0x0310,0xff12,0xa013,0x4014,0xff15,0x2416,0xc317,0xff18, +0x001a,0x221b,0x001d, +0xffff +}; cirrus_mode_t cirrus_modes[] = @@ -251,6 +266,10 @@ cirrus_mode_t cirrus_modes[] = cseq_1024x768x24,cgraph_svgacolor,ccrtc_1024x768x24,24, 6,8,16,8,8,8,0,0,0}, + {0x6d,1280,1024,8,0x00, + cseq_1280x1024x8,cgraph_svgacolor,ccrtc_1280x1024x8,8, + 4,0,0,0,0,0,0,0,0}, + {0xfe,0,0,0,0,cseq_vga,cgraph_vga,ccrtc_vga,0, 0xff,0,0,0,0,0,0,0,0}, {0xff,0,0,0,0,0,0,0,0, @@ -292,6 +311,8 @@ unsigned short cirrus_vesa_modelist[] = { 0x117, 0x74, // 1024x768x24 //0x118, 0x79, +// 1280x1024x8 + 0x107, 0x6d, // invalid 0xffff,0xffff }; @@ -162,8 +162,37 @@ ASM_END static void dispi_set_xres(xres) Bit16u xres; { - outw(VBE_DISPI_IOPORT_INDEX,VBE_DISPI_INDEX_XRES); - outw(VBE_DISPI_IOPORT_DATA,xres); +ASM_START + push bp + mov bp, sp + push ax + push dx + + mov dx, # VBE_DISPI_IOPORT_INDEX + mov ax, # VBE_DISPI_INDEX_XRES + out dx, ax + mov dx, # VBE_DISPI_IOPORT_DATA + mov ax, 4[bp] ; xres + out dx, ax + push ax + mov dx, #0x03d4 + mov ax, #0x0011 + out dx, ax + mov dx, #0x03d4 + pop ax + push ax + shr ax, #3 + dec ax + mov ah, al + mov al, #0x01 + out dx, ax + pop ax + call vga_set_virt_width + + pop dx + pop ax + pop bp +ASM_END } static void dispi_set_yres(yres) @@ -239,9 +268,7 @@ dispi_get_enable: in ax, dx pop dx ret -ASM_END -ASM_START _dispi_set_bank: push dx push ax @@ -339,7 +366,28 @@ dispi_get_y_offset: pop dx ret +vga_set_virt_width: + push ax + push bx + push dx + mov bx, ax + call dispi_get_bpp + cmp al, #0x04 + ja set_width_svga + shr bx, #2 +set_width_svga: + shr bx, #2 + mov dx, #0x03d4 + mov ah, bl + mov al, #0x13 + out dx, ax + pop dx + pop bx + pop ax + ret + dispi_set_virt_width: + call vga_set_virt_width push dx push ax mov dx, # VBE_DISPI_IOPORT_INDEX @@ -718,9 +766,9 @@ Bit16u *AX;Bit16u BX; Bit16u ES;Bit16u DI; biosfn_set_video_mode(0x6a); } + dispi_set_bpp(cur_info->info.BitsPerPixel); dispi_set_xres(cur_info->info.XResolution); dispi_set_yres(cur_info->info.YResolution); - dispi_set_bpp(cur_info->info.BitsPerPixel); dispi_set_bank(0); dispi_set_enable(VBE_DISPI_ENABLED | no_clear | lfb_flag); diff --git a/vbetables.h b/vbetables.h index c9a1a79..a742ac7 100644 --- a/vbetables.h +++ b/vbetables.h @@ -185,10 +185,10 @@ static ModeInfoListItem mode_info_list[]= /*Bit8u YCharSize*/ 16, /*Bit8u NumberOfPlanes*/ 4, /*Bit8u BitsPerPixel*/ 4, - /*Bit8u NumberOfBanks*/ 1, + /*Bit8u NumberOfBanks*/ 16, /*Bit8u MemoryModel*/ VBE_MEMORYMODEL_PLANAR, /*Bit8u BankSize*/ 0, - /*Bit8u NumberOfImagePages*/ 0, + /*Bit8u NumberOfImagePages*/ 15, /*Bit8u Reserved_page*/ 0, // Direct Color fields (required for direct/6 and YUV/7 memory models) /*Bit8u RedMaskSize*/ 0, |