diff options
author | Volker Ruppert <info@vruppert.de> | 2006-07-10 07:47:35 +0000 |
---|---|---|
committer | Volker Ruppert <info@vruppert.de> | 2006-07-10 07:47:35 +0000 |
commit | fbbcf92662647aebabe0f64feae2c18160600e6a (patch) | |
tree | 1a071f8cbf28671e3df50bfae330c7569bdaf671 | |
parent | 9140ec64f7ef9b82b01ed8980b468fd52f7d89a2 (diff) | |
download | vgabios-fbbcf92662647aebabe0f64feae2c18160600e6a.tar.gz |
- VBE set bank functions failure handling added
- VBE get/set logical scan line length fixes for the 4bpp mode
-rw-r--r-- | vbe.c | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -113,9 +113,15 @@ vesa_pm_set_display_window1: pop ax mov dx, # VBE_DISPI_IOPORT_DATA out dx, ax + in ax, dx pop dx + cmp dx, ax + jne illegal_window mov ax, #0x004f ret +illegal_window: + mov ax, #0x014f + ret vesa_pm_set_display_start: cmp bl, #0x80 @@ -398,13 +404,20 @@ ASM_START je dispi_set_bank_farcall_get or bx,bx jnz dispi_set_bank_farcall_error + mov ax,dx push dx + push ax mov ax,# VBE_DISPI_INDEX_BANK mov dx,# VBE_DISPI_IOPORT_INDEX out dx,ax pop ax mov dx,# VBE_DISPI_IOPORT_DATA out dx,ax + in ax,dx + pop dx + cmp dx,ax + jne dispi_set_bank_farcall_error + mov ax, #0x004f retf dispi_set_bank_farcall_get: mov ax,# VBE_DISPI_INDEX_BANK @@ -1117,6 +1130,11 @@ set_logical_scan_line_bytes: call dispi_get_bpp xor bh, bh mov bl, ah + or bl, bl + jnz no_4bpp_1 + shl ax, #3 + mov bl, #1 +no_4bpp_1: xor dx, dx pop ax div bx @@ -1128,6 +1146,11 @@ get_logical_scan_line_length: mov bl, ah call dispi_get_virt_width mov cx, ax + or bl, bl + jnz no_4bpp_2 + shr ax, #3 + mov bl, #1 +no_4bpp_2: mul bx mov bx, ax call dispi_get_virt_height |