forked from KolibriOS/kolibrios
kernel: BytesPerScanLine removed, use _display.pitch instead
git-svn-id: svn://kolibrios.org@3606 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
b892f7e281
commit
a678afc6ad
@ -230,10 +230,6 @@ Y_UNDER equ (OS_BASE+0x000FB4C)
|
|||||||
;unused ? only one reference
|
;unused ? only one reference
|
||||||
MOUSE_BUFF_COUNT equ (OS_BASE+0x000FCFF)
|
MOUSE_BUFF_COUNT equ (OS_BASE+0x000FCFF)
|
||||||
|
|
||||||
Screen_Max_X equ (OS_BASE+0x000FE00)
|
|
||||||
Screen_Max_Y equ (OS_BASE+0x000FE04)
|
|
||||||
BytesPerScanLine equ (OS_BASE+0x000FE08)
|
|
||||||
SCR_MODE equ (OS_BASE+0x000FE0C)
|
|
||||||
|
|
||||||
LFBAddress equ (OS_BASE+0x000FE80)
|
LFBAddress equ (OS_BASE+0x000FE80)
|
||||||
BTN_ADDR equ (OS_BASE+0x000FE88)
|
BTN_ADDR equ (OS_BASE+0x000FE88)
|
||||||
@ -281,10 +277,6 @@ BOOT_VAR equ (OS_BASE+0x02E0000)
|
|||||||
|
|
||||||
draw_data equ (OS_BASE+0x0320000)
|
draw_data equ (OS_BASE+0x0320000)
|
||||||
|
|
||||||
BgrDrawMode equ (OS_BASE+0x0323FF4)
|
|
||||||
BgrDataWidth equ (OS_BASE+0x0323FF8)
|
|
||||||
BgrDataHeight equ (OS_BASE+0x0323FFC)
|
|
||||||
|
|
||||||
sys_pgmap equ (OS_BASE+0x0324000)
|
sys_pgmap equ (OS_BASE+0x0324000)
|
||||||
|
|
||||||
UPPER_KERNEL_PAGES equ (OS_BASE+0x0400000)
|
UPPER_KERNEL_PAGES equ (OS_BASE+0x0400000)
|
||||||
|
@ -364,6 +364,11 @@ _display display_t
|
|||||||
_WinMapAddress rd 1
|
_WinMapAddress rd 1
|
||||||
_WinMapSize rd 1
|
_WinMapSize rd 1
|
||||||
|
|
||||||
|
Screen_Max_X rd 1
|
||||||
|
Screen_Max_Y rd 1
|
||||||
|
|
||||||
|
SCR_MODE rw 2
|
||||||
|
|
||||||
def_cursor rd 1
|
def_cursor rd 1
|
||||||
def_cursor_clock rd 1
|
def_cursor_clock rd 1
|
||||||
current_cursor rd 1
|
current_cursor rd 1
|
||||||
@ -438,6 +443,10 @@ img_background rd 1
|
|||||||
mem_BACKGROUND rd 1
|
mem_BACKGROUND rd 1
|
||||||
static_background_data rd 1
|
static_background_data rd 1
|
||||||
|
|
||||||
|
BgrDrawMode rd 1
|
||||||
|
BgrDataWidth rd 1
|
||||||
|
BgrDataHeight rd 1
|
||||||
|
|
||||||
skin_data rd 1
|
skin_data rd 1
|
||||||
|
|
||||||
cache_ide0:
|
cache_ide0:
|
||||||
|
@ -494,9 +494,9 @@ proc set_mouse_data stdcall, BtnState:dword, XMoving:dword, YMoving:dword, VScro
|
|||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
@@M1:
|
@@M1:
|
||||||
cmp ax, [Screen_Max_X];ScreenLength
|
cmp ax, word [Screen_Max_X];ScreenLength
|
||||||
jl @@M2
|
jl @@M2
|
||||||
mov ax, [Screen_Max_X];ScreenLength-1
|
mov ax, word [Screen_Max_X];ScreenLength-1
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
@@M2:
|
@@M2:
|
||||||
@ -514,9 +514,9 @@ align 4
|
|||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
@@M3:
|
@@M3:
|
||||||
cmp ax, [Screen_Max_Y];ScreenHeigth
|
cmp ax, word [Screen_Max_Y];ScreenHeigth
|
||||||
jl @@M4
|
jl @@M4
|
||||||
mov ax, [Screen_Max_Y];ScreenHeigth-1
|
mov ax, word [Screen_Max_Y];ScreenHeigth-1
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
@@M4:
|
@@M4:
|
||||||
|
@ -405,19 +405,18 @@ high_code:
|
|||||||
dec eax
|
dec eax
|
||||||
mov [Screen_Max_Y], eax
|
mov [Screen_Max_Y], eax
|
||||||
mov [screen_workarea.bottom], eax
|
mov [screen_workarea.bottom], eax
|
||||||
movzx eax, word [BOOT_VAR+BOOT_VESA_MODE]; screen mode
|
movzx eax, word [BOOT_VAR+BOOT_VESA_MODE] ; screen mode
|
||||||
mov [SCR_MODE], eax
|
mov dword [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 eax, 640 *4 ; Bytes PerScanLine
|
||||||
cmp [SCR_MODE], word 0x13 ; 320x200
|
cmp [SCR_MODE], word 0x13 ; 320x200
|
||||||
je @f
|
je @f
|
||||||
cmp [SCR_MODE], word 0x12 ; VGA 640x480
|
cmp [SCR_MODE], word 0x12 ; VGA 640x480
|
||||||
je @f
|
je @f
|
||||||
movzx eax, word[BOOT_VAR+BOOT_PITCH] ; for other modes
|
movzx eax, word[BOOT_VAR+BOOT_PITCH] ; for other modes
|
||||||
mov [BytesPerScanLine], ax
|
|
||||||
mov [_display.pitch], eax
|
|
||||||
@@:
|
@@:
|
||||||
|
mov [_display.pitch], eax
|
||||||
mov eax, [_display.width]
|
mov eax, [_display.width]
|
||||||
mul [_display.height]
|
mul [_display.height]
|
||||||
mov [_WinMapSize], eax
|
mov [_WinMapSize], eax
|
||||||
@ -2492,7 +2491,7 @@ sysfn_set_screen_sizes:
|
|||||||
pushfd
|
pushfd
|
||||||
cli
|
cli
|
||||||
mov eax, ecx
|
mov eax, ecx
|
||||||
mov ecx, [BytesPerScanLine]
|
mov ecx, [_display.pitch]
|
||||||
mov [_display.width], eax
|
mov [_display.width], eax
|
||||||
dec eax
|
dec eax
|
||||||
mov [_display.height], edx
|
mov [_display.height], edx
|
||||||
@ -4998,7 +4997,7 @@ sys_gs: ; direct screen access
|
|||||||
.1: ; resolution
|
.1: ; resolution
|
||||||
mov eax, [Screen_Max_X]
|
mov eax, [Screen_Max_X]
|
||||||
shl eax, 16
|
shl eax, 16
|
||||||
mov ax, [Screen_Max_Y]
|
mov ax, word [Screen_Max_Y]
|
||||||
add eax, 0x00010001
|
add eax, 0x00010001
|
||||||
mov [esp+32], eax
|
mov [esp+32], eax
|
||||||
ret
|
ret
|
||||||
@ -5007,7 +5006,7 @@ sys_gs: ; direct screen access
|
|||||||
mov [esp+32], eax
|
mov [esp+32], eax
|
||||||
ret
|
ret
|
||||||
.3: ; bytes per scanline
|
.3: ; bytes per scanline
|
||||||
mov eax, [BytesPerScanLine]
|
mov eax, [_display.pitch]
|
||||||
mov [esp+32], eax
|
mov [esp+32], eax
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -5097,9 +5096,9 @@ syscall_drawrect: ; DrawRect
|
|||||||
|
|
||||||
align 4
|
align 4
|
||||||
syscall_getscreensize: ; GetScreenSize
|
syscall_getscreensize: ; GetScreenSize
|
||||||
mov ax, [Screen_Max_X]
|
mov ax, word [Screen_Max_X]
|
||||||
shl eax, 16
|
shl eax, 16
|
||||||
mov ax, [Screen_Max_Y]
|
mov ax, word [Screen_Max_Y]
|
||||||
mov [esp + 32], eax
|
mov [esp + 32], eax
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -5418,7 +5417,7 @@ calculate_fast_getting_offset_for_LFB:
|
|||||||
cld
|
cld
|
||||||
@@:
|
@@:
|
||||||
stosd
|
stosd
|
||||||
add eax, [BytesPerScanLine]
|
add eax, [_display.pitch]
|
||||||
dec ecx
|
dec ecx
|
||||||
jnz @r
|
jnz @r
|
||||||
ret
|
ret
|
||||||
@ -5441,7 +5440,7 @@ set_screen:
|
|||||||
|
|
||||||
mov [Screen_Max_X], eax
|
mov [Screen_Max_X], eax
|
||||||
mov [Screen_Max_Y], edx
|
mov [Screen_Max_Y], edx
|
||||||
mov [BytesPerScanLine], ecx
|
mov [_display.pitch], ecx
|
||||||
|
|
||||||
mov [screen_workarea.right], eax
|
mov [screen_workarea.right], eax
|
||||||
mov [screen_workarea.bottom], edx
|
mov [screen_workarea.bottom], edx
|
||||||
|
@ -524,7 +524,7 @@ proc restore_24 stdcall, x:dword, y:dword
|
|||||||
align 4
|
align 4
|
||||||
@@:
|
@@:
|
||||||
mov edi, ebx
|
mov edi, ebx
|
||||||
add ebx, [BytesPerScanLine]
|
add ebx, [_display.pitch]
|
||||||
|
|
||||||
mov ecx, [esp]
|
mov ecx, [esp]
|
||||||
rep movsb
|
rep movsb
|
||||||
@ -559,7 +559,7 @@ proc restore_32 stdcall, x:dword, y:dword
|
|||||||
align 4
|
align 4
|
||||||
@@:
|
@@:
|
||||||
mov edi, ebx
|
mov edi, ebx
|
||||||
add ebx, [BytesPerScanLine]
|
add ebx, [_display.pitch]
|
||||||
|
|
||||||
mov ecx, [cur.w]
|
mov ecx, [cur.w]
|
||||||
rep movsd
|
rep movsd
|
||||||
@ -650,7 +650,7 @@ align 4
|
|||||||
align 4
|
align 4
|
||||||
@@:
|
@@:
|
||||||
mov esi, edx
|
mov esi, edx
|
||||||
add edx, [BytesPerScanLine]
|
add edx, [_display.pitch]
|
||||||
mov ecx, [cur.w]
|
mov ecx, [cur.w]
|
||||||
lea ecx, [ecx+ecx*2]
|
lea ecx, [ecx+ecx*2]
|
||||||
rep movsb
|
rep movsb
|
||||||
@ -673,7 +673,7 @@ align 4
|
|||||||
mov esi, edx
|
mov esi, edx
|
||||||
mov edi, ebx
|
mov edi, ebx
|
||||||
add edx, 32*4
|
add edx, 32*4
|
||||||
add ebx, [BytesPerScanLine]
|
add ebx, [_display.pitch]
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
.pix:
|
.pix:
|
||||||
@ -768,7 +768,7 @@ align 4
|
|||||||
align 4
|
align 4
|
||||||
@@:
|
@@:
|
||||||
mov esi, edx
|
mov esi, edx
|
||||||
add edx, [BytesPerScanLine]
|
add edx, [_display.pitch]
|
||||||
mov ecx, [cur.w]
|
mov ecx, [cur.w]
|
||||||
rep movsd
|
rep movsd
|
||||||
dec eax
|
dec eax
|
||||||
@ -790,7 +790,7 @@ align 4
|
|||||||
mov esi, edx
|
mov esi, edx
|
||||||
mov edi, ebx
|
mov edi, ebx
|
||||||
add edx, 32*4
|
add edx, 32*4
|
||||||
add ebx, [BytesPerScanLine]
|
add ebx, [_display.pitch]
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
.pix:
|
.pix:
|
||||||
|
@ -230,7 +230,7 @@ align 4
|
|||||||
sub eax, [putimg.real_sx]
|
sub eax, [putimg.real_sx]
|
||||||
mov [putimg.winmap_newline], eax
|
mov [putimg.winmap_newline], eax
|
||||||
; screen new line increment
|
; screen new line increment
|
||||||
mov eax, [BytesPerScanLine]
|
mov eax, [_display.pitch]
|
||||||
mov ebx, [_display.bpp]
|
mov ebx, [_display.bpp]
|
||||||
shr ebx, 3
|
shr ebx, 3
|
||||||
imul ecx, ebx
|
imul ecx, ebx
|
||||||
@ -534,7 +534,7 @@ align 4
|
|||||||
.finish:
|
.finish:
|
||||||
add esp, putimg.stack_data
|
add esp, putimg.stack_data
|
||||||
popad
|
popad
|
||||||
cmp [SCR_MODE], dword 0x12
|
cmp [SCR_MODE], 0x12
|
||||||
jne @f
|
jne @f
|
||||||
call VGA__putimage
|
call VGA__putimage
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
@ -1233,7 +1233,7 @@ align 4
|
|||||||
shr ebx, 3
|
shr ebx, 3
|
||||||
imul eax, ebx
|
imul eax, ebx
|
||||||
neg eax
|
neg eax
|
||||||
add eax, [BytesPerScanLine]
|
add eax, [_display.pitch]
|
||||||
mov [drbar.line_inc_scr], eax
|
mov [drbar.line_inc_scr], eax
|
||||||
; pointer to screen
|
; pointer to screen
|
||||||
mov edx, [drbar.abs_cy]
|
mov edx, [drbar.abs_cy]
|
||||||
@ -1508,7 +1508,7 @@ align 4
|
|||||||
.end:
|
.end:
|
||||||
add esp, drbar.stack_data
|
add esp, drbar.stack_data
|
||||||
popad
|
popad
|
||||||
cmp [SCR_MODE], dword 0x12
|
cmp [SCR_MODE], 0x12
|
||||||
jne @f
|
jne @f
|
||||||
call VGA_draw_bar
|
call VGA_draw_bar
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
@ -1757,7 +1757,7 @@ dp4:
|
|||||||
jbe dp2
|
jbe dp2
|
||||||
popad
|
popad
|
||||||
mov [EGA_counter], 1
|
mov [EGA_counter], 1
|
||||||
cmp [SCR_MODE], dword 0x12
|
cmp [SCR_MODE], 0x12
|
||||||
jne @f
|
jne @f
|
||||||
call VGA_drawbackground
|
call VGA_drawbackground
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
@ -1950,7 +1950,7 @@ sdp4:
|
|||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
@@:
|
@@:
|
||||||
add edi, [BytesPerScanLine]
|
add edi, [_display.pitch]
|
||||||
; restore ecx,edx; advance esi to next background line
|
; restore ecx,edx; advance esi to next background line
|
||||||
mov eax, [esp+28]
|
mov eax, [esp+28]
|
||||||
mov ebx, [esp+32]
|
mov ebx, [esp+32]
|
||||||
@ -1981,7 +1981,7 @@ sdpdone:
|
|||||||
add esp, 44
|
add esp, 44
|
||||||
popad
|
popad
|
||||||
mov [EGA_counter], 1
|
mov [EGA_counter], 1
|
||||||
cmp [SCR_MODE], dword 0x12
|
cmp [SCR_MODE], 0x12
|
||||||
jne @f
|
jne @f
|
||||||
call VGA_drawbackground
|
call VGA_drawbackground
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
|
@ -150,7 +150,7 @@ endg
|
|||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
checkVga_N13:
|
checkVga_N13:
|
||||||
cmp [SCR_MODE], dword 0x13
|
cmp [SCR_MODE], 0x13
|
||||||
jne @f
|
jne @f
|
||||||
|
|
||||||
pushad
|
pushad
|
||||||
|
Loading…
Reference in New Issue
Block a user