We do not use Vesa 1.2 mode (for trunk kernel) is now

git-svn-id: svn://kolibrios.org@2407 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Marat Zakiyanov (Mario79) 2012-02-26 00:26:08 +00:00
parent 9fea37d376
commit 539071c806
3 changed files with 67 additions and 66 deletions

View File

@ -243,7 +243,8 @@ calc_vmodes_table:
mov [es:bx+4], ax ; +4[2] : attributes
cmp [s_vesa.ver], '2'
jb .lp1
; jb .lp1
jb @f ; We do not use Vesa 1.2 mode is now
or cx, 0x4000 ; use LFB
.lp1:
@ -735,8 +736,8 @@ set_vmode:
je .mode0x12_0x13
cmp byte [s_vesa.ver], '2'
jb .vesa12
; cmp byte [s_vesa.ver], '2'
; jb .vesa12
; VESA 2 and Vesa 3
@ -769,23 +770,21 @@ set_vmode:
; VESA 1.2 PM BANK SWITCH ADDRESS
.vesa12:
mov ax, 0x4f0A
xor bx, bx
int 0x10
xor eax, eax
xor ebx, ebx
mov ax, es
shl eax, 4
mov bx, di
add eax, ebx
movzx ebx, word[es:di]
add eax, ebx
push 0x0000
pop es
mov [es:0x9014], eax
;.vesa12:
; mov ax, 0x4f0A
; xor bx, bx
; int 0x10
; xor eax, eax
; xor ebx, ebx
; mov ax, es
; shl eax, 4
; mov bx, di
; add eax, ebx
; movzx ebx, word[es:di]
; add eax, ebx
; push 0x0000
; pop es
; mov [es:0x9014], eax
.exit:
ret

View File

@ -388,8 +388,8 @@ high_code:
mov [screen_workarea.bottom], eax
movzx eax, word [BOOT_VAR+0x9008]; screen mode
mov [SCR_MODE], eax
mov eax, [BOOT_VAR+0x9014] ; Vesa 1.2 bnk sw add
mov [BANK_SWITCH], eax
; mov eax, [BOOT_VAR+0x9014] ; Vesa 1.2 bnk sw add
; mov [BANK_SWITCH], eax
mov [BytesPerScanLine], word 640*4 ; Bytes PerScanLine
cmp [SCR_MODE], word 0x13 ; 320x200
je @f
@ -417,30 +417,32 @@ high_code:
cmp [SCR_MODE], word 0100000000000000b
jge setvesa20
cmp [SCR_MODE], word 0x13
cmp [SCR_MODE], word 0x13 ; EGA 320*200 256 colors
je v20ga32
mov [PUTPIXEL], dword Vesa12_putpixel24 ; Vesa 1.2
mov [GETPIXEL], dword Vesa12_getpixel24
cmp [ScreenBPP], byte 24
jz ga24
mov [PUTPIXEL], dword Vesa12_putpixel32
mov [GETPIXEL], dword Vesa12_getpixel32
ga24:
jmp v20ga24
setvesa20:
; mov [PUTPIXEL], dword Vesa12_putpixel24 ; Vesa 1.2
; mov [GETPIXEL], dword Vesa12_getpixel24
; cmp [ScreenBPP], byte 24
; jz ga24
; mov [PUTPIXEL], dword Vesa12_putpixel32
; mov [GETPIXEL], dword Vesa12_getpixel32
; ga24:
; jmp v20ga24
setvesa20:
mov [PUTPIXEL], dword Vesa20_putpixel24 ; Vesa 2.0
mov [GETPIXEL], dword Vesa20_getpixel24
cmp [ScreenBPP], byte 24
jz v20ga24
v20ga32:
v20ga32:
mov [PUTPIXEL], dword Vesa20_putpixel32
mov [GETPIXEL], dword Vesa20_getpixel32
v20ga24:
jmp no_mode_0x12
v20ga24:
cmp [SCR_MODE], word 0x12 ; 16 C VGA 640x480
jne no_mode_0x12
mov [PUTPIXEL], dword VGA_putpixel
mov [GETPIXEL], dword Vesa20_getpixel32
no_mode_0x12:
no_mode_0x12:
; -------- Fast System Call init ----------
; Intel SYSENTER/SYSEXIT (AMD CPU support it too)
@ -3640,17 +3642,17 @@ no_mask_io:
align 4
drawbackground:
inc [mouse_pause]
cmp [SCR_MODE], word 0x12
je dbrv20
dbrv12:
cmp [SCR_MODE], word 0100000000000000b
jge dbrv20
cmp [SCR_MODE], word 0x13
je dbrv20
call vesa12_drawbackground
dec [mouse_pause]
call [draw_pointer]
ret
; cmp [SCR_MODE], word 0x12
; je dbrv20
; dbrv12:
; cmp [SCR_MODE], word 0100000000000000b
; jge dbrv20
; cmp [SCR_MODE], word 0x13
; je dbrv20
; call vesa12_drawbackground
; dec [mouse_pause]
; call [draw_pointer]
; ret
dbrv20:
cmp [BgrDrawMode], dword 1
jne bgrstr
@ -3689,14 +3691,14 @@ sys_putimage:
sys_putimage_bpp:
; call [disable_mouse] ; this will be done in xxx_putimage
; mov eax, vga_putimage
cmp [SCR_MODE], word 0x12
jz @f ;.doit
mov eax, vesa12_putimage
cmp [SCR_MODE], word 0100000000000000b
jae @f
cmp [SCR_MODE], word 0x13
jnz .doit
@@:
; cmp [SCR_MODE], word 0x12
; jz @f ;.doit
; mov eax, vesa12_putimage
; cmp [SCR_MODE], word 0100000000000000b
; jae @f
; cmp [SCR_MODE], word 0x13
; jnz .doit
;@@:
mov eax, vesa20_putimage
.doit:
inc [mouse_pause]
@ -3981,18 +3983,18 @@ __sys_drawbar:
.forced:
inc [mouse_pause]
; call [disable_mouse]
cmp [SCR_MODE], word 0x12
je dbv20
sdbv20:
cmp [SCR_MODE], word 0100000000000000b
jge dbv20
cmp [SCR_MODE], word 0x13
je dbv20
call vesa12_drawbar
dec [mouse_pause]
call [draw_pointer]
ret
dbv20:
; cmp [SCR_MODE], word 0x12
; je dbv20
; sdbv20:
; cmp [SCR_MODE], word 0100000000000000b
; jge dbv20
; cmp [SCR_MODE], word 0x13
; je dbv20
; call vesa12_drawbar
; dec [mouse_pause]
; call [draw_pointer]
; ret
; dbv20:
call vesa20_drawbar
dec [mouse_pause]
call [draw_pointer]

View File

@ -194,7 +194,7 @@ include "sound/playnote.inc" ; player Note for Speaker PC
; display
include "video/vesa12.inc" ; Vesa 1.2 functions
;include "video/vesa12.inc" ; Vesa 1.2 functions
include "video/vesa20.inc" ; Vesa 2.0 functions
include "video/blitter.inc" ;
include "video/vga.inc" ; VGA 16 color functions