forked from KolibriOS/kolibrios
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:
parent
9fea37d376
commit
539071c806
@ -243,7 +243,8 @@ calc_vmodes_table:
|
|||||||
mov [es:bx+4], ax ; +4[2] : attributes
|
mov [es:bx+4], ax ; +4[2] : attributes
|
||||||
|
|
||||||
cmp [s_vesa.ver], '2'
|
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
|
or cx, 0x4000 ; use LFB
|
||||||
.lp1:
|
.lp1:
|
||||||
@ -735,8 +736,8 @@ set_vmode:
|
|||||||
je .mode0x12_0x13
|
je .mode0x12_0x13
|
||||||
|
|
||||||
|
|
||||||
cmp byte [s_vesa.ver], '2'
|
; cmp byte [s_vesa.ver], '2'
|
||||||
jb .vesa12
|
; jb .vesa12
|
||||||
|
|
||||||
; VESA 2 and Vesa 3
|
; VESA 2 and Vesa 3
|
||||||
|
|
||||||
@ -769,23 +770,21 @@ set_vmode:
|
|||||||
|
|
||||||
; VESA 1.2 PM BANK SWITCH ADDRESS
|
; VESA 1.2 PM BANK SWITCH ADDRESS
|
||||||
|
|
||||||
.vesa12:
|
;.vesa12:
|
||||||
|
; mov ax, 0x4f0A
|
||||||
|
; xor bx, bx
|
||||||
mov ax, 0x4f0A
|
; int 0x10
|
||||||
xor bx, bx
|
; xor eax, eax
|
||||||
int 0x10
|
; xor ebx, ebx
|
||||||
xor eax, eax
|
; mov ax, es
|
||||||
xor ebx, ebx
|
; shl eax, 4
|
||||||
mov ax, es
|
; mov bx, di
|
||||||
shl eax, 4
|
; add eax, ebx
|
||||||
mov bx, di
|
; movzx ebx, word[es:di]
|
||||||
add eax, ebx
|
; add eax, ebx
|
||||||
movzx ebx, word[es:di]
|
; push 0x0000
|
||||||
add eax, ebx
|
; pop es
|
||||||
push 0x0000
|
; mov [es:0x9014], eax
|
||||||
pop es
|
|
||||||
mov [es:0x9014], eax
|
|
||||||
.exit:
|
.exit:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
@ -388,8 +388,8 @@ high_code:
|
|||||||
mov [screen_workarea.bottom], eax
|
mov [screen_workarea.bottom], eax
|
||||||
movzx eax, word [BOOT_VAR+0x9008]; screen mode
|
movzx eax, word [BOOT_VAR+0x9008]; screen mode
|
||||||
mov [SCR_MODE], eax
|
mov [SCR_MODE], eax
|
||||||
mov eax, [BOOT_VAR+0x9014] ; Vesa 1.2 bnk sw add
|
; mov eax, [BOOT_VAR+0x9014] ; Vesa 1.2 bnk sw add
|
||||||
mov [BANK_SWITCH], eax
|
; mov [BANK_SWITCH], eax
|
||||||
mov [BytesPerScanLine], word 640*4 ; Bytes PerScanLine
|
mov [BytesPerScanLine], word 640*4 ; Bytes PerScanLine
|
||||||
cmp [SCR_MODE], word 0x13 ; 320x200
|
cmp [SCR_MODE], word 0x13 ; 320x200
|
||||||
je @f
|
je @f
|
||||||
@ -417,30 +417,32 @@ high_code:
|
|||||||
|
|
||||||
cmp [SCR_MODE], word 0100000000000000b
|
cmp [SCR_MODE], word 0100000000000000b
|
||||||
jge setvesa20
|
jge setvesa20
|
||||||
cmp [SCR_MODE], word 0x13
|
cmp [SCR_MODE], word 0x13 ; EGA 320*200 256 colors
|
||||||
je v20ga32
|
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
|
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 [PUTPIXEL], dword Vesa20_putpixel24 ; Vesa 2.0
|
||||||
mov [GETPIXEL], dword Vesa20_getpixel24
|
mov [GETPIXEL], dword Vesa20_getpixel24
|
||||||
cmp [ScreenBPP], byte 24
|
cmp [ScreenBPP], byte 24
|
||||||
jz v20ga24
|
jz v20ga24
|
||||||
v20ga32:
|
v20ga32:
|
||||||
mov [PUTPIXEL], dword Vesa20_putpixel32
|
mov [PUTPIXEL], dword Vesa20_putpixel32
|
||||||
mov [GETPIXEL], dword Vesa20_getpixel32
|
mov [GETPIXEL], dword Vesa20_getpixel32
|
||||||
v20ga24:
|
jmp no_mode_0x12
|
||||||
|
v20ga24:
|
||||||
cmp [SCR_MODE], word 0x12 ; 16 C VGA 640x480
|
cmp [SCR_MODE], word 0x12 ; 16 C VGA 640x480
|
||||||
jne no_mode_0x12
|
jne no_mode_0x12
|
||||||
mov [PUTPIXEL], dword VGA_putpixel
|
mov [PUTPIXEL], dword VGA_putpixel
|
||||||
mov [GETPIXEL], dword Vesa20_getpixel32
|
mov [GETPIXEL], dword Vesa20_getpixel32
|
||||||
no_mode_0x12:
|
no_mode_0x12:
|
||||||
|
|
||||||
; -------- Fast System Call init ----------
|
; -------- Fast System Call init ----------
|
||||||
; Intel SYSENTER/SYSEXIT (AMD CPU support it too)
|
; Intel SYSENTER/SYSEXIT (AMD CPU support it too)
|
||||||
@ -3640,17 +3642,17 @@ no_mask_io:
|
|||||||
align 4
|
align 4
|
||||||
drawbackground:
|
drawbackground:
|
||||||
inc [mouse_pause]
|
inc [mouse_pause]
|
||||||
cmp [SCR_MODE], word 0x12
|
; cmp [SCR_MODE], word 0x12
|
||||||
je dbrv20
|
; je dbrv20
|
||||||
dbrv12:
|
; dbrv12:
|
||||||
cmp [SCR_MODE], word 0100000000000000b
|
; cmp [SCR_MODE], word 0100000000000000b
|
||||||
jge dbrv20
|
; jge dbrv20
|
||||||
cmp [SCR_MODE], word 0x13
|
; cmp [SCR_MODE], word 0x13
|
||||||
je dbrv20
|
; je dbrv20
|
||||||
call vesa12_drawbackground
|
; call vesa12_drawbackground
|
||||||
dec [mouse_pause]
|
; dec [mouse_pause]
|
||||||
call [draw_pointer]
|
; call [draw_pointer]
|
||||||
ret
|
; ret
|
||||||
dbrv20:
|
dbrv20:
|
||||||
cmp [BgrDrawMode], dword 1
|
cmp [BgrDrawMode], dword 1
|
||||||
jne bgrstr
|
jne bgrstr
|
||||||
@ -3689,14 +3691,14 @@ sys_putimage:
|
|||||||
sys_putimage_bpp:
|
sys_putimage_bpp:
|
||||||
; call [disable_mouse] ; this will be done in xxx_putimage
|
; call [disable_mouse] ; this will be done in xxx_putimage
|
||||||
; mov eax, vga_putimage
|
; mov eax, vga_putimage
|
||||||
cmp [SCR_MODE], word 0x12
|
; cmp [SCR_MODE], word 0x12
|
||||||
jz @f ;.doit
|
; jz @f ;.doit
|
||||||
mov eax, vesa12_putimage
|
; mov eax, vesa12_putimage
|
||||||
cmp [SCR_MODE], word 0100000000000000b
|
; cmp [SCR_MODE], word 0100000000000000b
|
||||||
jae @f
|
; jae @f
|
||||||
cmp [SCR_MODE], word 0x13
|
; cmp [SCR_MODE], word 0x13
|
||||||
jnz .doit
|
; jnz .doit
|
||||||
@@:
|
;@@:
|
||||||
mov eax, vesa20_putimage
|
mov eax, vesa20_putimage
|
||||||
.doit:
|
.doit:
|
||||||
inc [mouse_pause]
|
inc [mouse_pause]
|
||||||
@ -3981,18 +3983,18 @@ __sys_drawbar:
|
|||||||
.forced:
|
.forced:
|
||||||
inc [mouse_pause]
|
inc [mouse_pause]
|
||||||
; call [disable_mouse]
|
; call [disable_mouse]
|
||||||
cmp [SCR_MODE], word 0x12
|
; cmp [SCR_MODE], word 0x12
|
||||||
je dbv20
|
; je dbv20
|
||||||
sdbv20:
|
; sdbv20:
|
||||||
cmp [SCR_MODE], word 0100000000000000b
|
; cmp [SCR_MODE], word 0100000000000000b
|
||||||
jge dbv20
|
; jge dbv20
|
||||||
cmp [SCR_MODE], word 0x13
|
; cmp [SCR_MODE], word 0x13
|
||||||
je dbv20
|
; je dbv20
|
||||||
call vesa12_drawbar
|
; call vesa12_drawbar
|
||||||
dec [mouse_pause]
|
; dec [mouse_pause]
|
||||||
call [draw_pointer]
|
; call [draw_pointer]
|
||||||
ret
|
; ret
|
||||||
dbv20:
|
; dbv20:
|
||||||
call vesa20_drawbar
|
call vesa20_drawbar
|
||||||
dec [mouse_pause]
|
dec [mouse_pause]
|
||||||
call [draw_pointer]
|
call [draw_pointer]
|
||||||
|
@ -194,7 +194,7 @@ include "sound/playnote.inc" ; player Note for Speaker PC
|
|||||||
|
|
||||||
; display
|
; 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/vesa20.inc" ; Vesa 2.0 functions
|
||||||
include "video/blitter.inc" ;
|
include "video/blitter.inc" ;
|
||||||
include "video/vga.inc" ; VGA 16 color functions
|
include "video/vga.inc" ; VGA 16 color functions
|
||||||
|
Loading…
Reference in New Issue
Block a user