summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Ruppert <info@vruppert.de>2006-07-08 13:27:08 +0000
committerVolker Ruppert <info@vruppert.de>2006-07-08 13:27:08 +0000
commit9140ec64f7ef9b82b01ed8980b468fd52f7d89a2 (patch)
treef2a7a0cff14109d416f9b480ebf77ca15fbf3c91
parent702c19b1686bcb01c7e99f5773c0fabb1e0a9505 (diff)
- added special case for the 4 bpp when setting VBE display start
- VBE mode table fixes
-rw-r--r--vbe.c12
-rw-r--r--vbetables.h8
2 files changed, 17 insertions, 3 deletions
diff --git a/vbe.c b/vbe.c
index 78bfd8f..2cb9377 100644
--- a/vbe.c
+++ b/vbe.c
@@ -154,6 +154,8 @@ vesa_pm_set_display_start1:
movzx esi, ax
pop eax
+ cmp esi, #4
+ jz bpp4_mode
add esi, #7
shr esi, #3
imul ecx, esi
@@ -163,7 +165,17 @@ vesa_pm_set_display_start1:
mov eax, edx
xor edx, edx
div esi
+ jmp set_xy_regs
+bpp4_mode:
+ shr ecx, #1
+ xor edx, edx
+ div ecx
+ mov edi, eax
+ mov eax, edx
+ shl eax, #1
+
+set_xy_regs:
push dx
push ax
mov dx, # VBE_DISPI_IOPORT_INDEX
diff --git a/vbetables.h b/vbetables.h
index 412bb0c..bde10bf 100644
--- a/vbetables.h
+++ b/vbetables.h
@@ -87,7 +87,8 @@ static ModeInfoListItem mode_info_list[]=
VBE_MODE_ATTRIBUTE_COLOR_MODE |
VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE |
VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
- /*Bit8u WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_READABLE |
+ /*Bit8u WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE |
+ VBE_WINDOW_ATTRIBUTE_READABLE |
VBE_WINDOW_ATTRIBUTE_WRITEABLE,
/*Bit8u WinBAttributes*/ 0,
/*Bit16u WinGranularity*/ VBE_DISPI_BANK_SIZE_KB,
@@ -167,7 +168,7 @@ static ModeInfoListItem mode_info_list[]=
/*Bit8u YCharSize*/ 16,
/*Bit8u NumberOfPlanes*/ 4,
/*Bit8u BitsPerPixel*/ 4,
- /*Bit8u NumberOfBanks*/ 16,
+ /*Bit8u NumberOfBanks*/ 1,
/*Bit8u MemoryModel*/ VBE_MEMORYMODEL_PLANAR,
/*Bit8u BankSize*/ 0,
/*Bit8u NumberOfImagePages*/ 15,
@@ -1110,7 +1111,8 @@ static ModeInfoListItem mode_info_list[]=
VBE_MODE_ATTRIBUTE_COLOR_MODE |
VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE |
VBE_MODE_ATTRIBUTE_GRAPHICS_MODE,
- /*Bit8u WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_READABLE |
+ /*Bit8u WinAAttributes*/ VBE_WINDOW_ATTRIBUTE_RELOCATABLE |
+ VBE_WINDOW_ATTRIBUTE_READABLE |
VBE_WINDOW_ATTRIBUTE_WRITEABLE,
/*Bit8u WinBAttributes*/ 0,
/*Bit16u WinGranularity*/ VBE_DISPI_BANK_SIZE_KB,