forked from KolibriOS/kolibrios
kolibri-acpi:remove Screen_Max_X and Screen_Max_Y. Huge amounts of bugs expected
git-svn-id: svn://kolibrios.org@4288 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
edbca7f724
commit
7194db1dd6
@ -1187,9 +1187,9 @@ proc set_app_params stdcall,slot:dword, params:dword,\
|
|||||||
xor eax, eax
|
xor eax, eax
|
||||||
mov [ecx+0], dword eax
|
mov [ecx+0], dword eax
|
||||||
mov [ecx+4], dword eax
|
mov [ecx+4], dword eax
|
||||||
mov eax, [Screen_Max_X]
|
mov eax, [_display.width]
|
||||||
mov [ecx+8], eax
|
mov [ecx+8], eax
|
||||||
mov eax, [Screen_Max_Y]
|
mov eax, [_display.height]
|
||||||
mov [ecx+12], eax
|
mov [ecx+12], eax
|
||||||
|
|
||||||
mov ebx, [pl0_stack]
|
mov ebx, [pl0_stack]
|
||||||
|
@ -379,8 +379,6 @@ _WinMapAddress rd 1
|
|||||||
_WinMapSize rd 1
|
_WinMapSize rd 1
|
||||||
|
|
||||||
LFBAddress rd 1
|
LFBAddress rd 1
|
||||||
Screen_Max_X rd 1
|
|
||||||
Screen_Max_Y rd 1
|
|
||||||
|
|
||||||
SCR_MODE rw 2
|
SCR_MODE rw 2
|
||||||
|
|
||||||
|
@ -394,9 +394,9 @@ mouse._.move_handler: ;////////////////////////////////////////////////////////
|
|||||||
mov [mouse.active_sys_window.new_box.left], eax
|
mov [mouse.active_sys_window.new_box.left], eax
|
||||||
@@:
|
@@:
|
||||||
add eax, [mouse.active_sys_window.new_box.width]
|
add eax, [mouse.active_sys_window.new_box.width]
|
||||||
cmp eax, [Screen_Max_X]
|
cmp eax, [_display.width]
|
||||||
jl @f
|
jl @f
|
||||||
sub eax, [Screen_Max_X]
|
sub eax, [_display.width]
|
||||||
sub [mouse.active_sys_window.new_box.left], eax
|
sub [mouse.active_sys_window.new_box.left], eax
|
||||||
@@:
|
@@:
|
||||||
mov eax, [mouse.active_sys_window.new_box.top]
|
mov eax, [mouse.active_sys_window.new_box.top]
|
||||||
@ -406,9 +406,9 @@ mouse._.move_handler: ;////////////////////////////////////////////////////////
|
|||||||
mov [mouse.active_sys_window.new_box.top], eax
|
mov [mouse.active_sys_window.new_box.top], eax
|
||||||
@@:
|
@@:
|
||||||
add eax, [mouse.active_sys_window.new_box.height]
|
add eax, [mouse.active_sys_window.new_box.height]
|
||||||
cmp eax, [Screen_Max_Y]
|
cmp eax, [_display.height]
|
||||||
jle .call_window_handler
|
jle .call_window_handler
|
||||||
sub eax, [Screen_Max_Y]
|
sub eax, [_display.height]
|
||||||
sub [mouse.active_sys_window.new_box.top], eax
|
sub [mouse.active_sys_window.new_box.top], eax
|
||||||
jmp .call_window_handler
|
jmp .call_window_handler
|
||||||
|
|
||||||
@ -458,14 +458,14 @@ mouse._.move_handler: ;////////////////////////////////////////////////////////
|
|||||||
mov [mouse.active_sys_window.new_box.height], eax
|
mov [mouse.active_sys_window.new_box.height], eax
|
||||||
@@:
|
@@:
|
||||||
add eax, [mouse.active_sys_window.new_box.top]
|
add eax, [mouse.active_sys_window.new_box.top]
|
||||||
cmp eax, [Screen_Max_Y]
|
cmp eax, [_display.height]
|
||||||
jle .check_resize_e
|
jl .check_resize_e
|
||||||
sub eax, [Screen_Max_Y]
|
sub eax, [_display.height]
|
||||||
neg eax
|
neg eax
|
||||||
add [mouse.active_sys_window.new_box.height], eax
|
add [mouse.active_sys_window.new_box.height], eax
|
||||||
mov ecx, [Screen_Max_Y]
|
mov ecx, [_display.height]
|
||||||
cmp ecx, eax
|
cmp ecx, eax
|
||||||
jge .check_resize_e
|
jg .check_resize_e
|
||||||
mov [mouse.active_sys_window.new_box.height], ecx
|
mov [mouse.active_sys_window.new_box.height], ecx
|
||||||
|
|
||||||
.check_resize_e:
|
.check_resize_e:
|
||||||
@ -484,14 +484,14 @@ mouse._.move_handler: ;////////////////////////////////////////////////////////
|
|||||||
mov [mouse.active_sys_window.new_box.width], eax
|
mov [mouse.active_sys_window.new_box.width], eax
|
||||||
@@:
|
@@:
|
||||||
add eax, [mouse.active_sys_window.new_box.left]
|
add eax, [mouse.active_sys_window.new_box.left]
|
||||||
cmp eax, [Screen_Max_X]
|
cmp eax, [_display.width]
|
||||||
jle .call_window_handler
|
jl .call_window_handler
|
||||||
sub eax, [Screen_Max_X]
|
sub eax, [_display.height]
|
||||||
neg eax
|
neg eax
|
||||||
add [mouse.active_sys_window.new_box.width], eax
|
add [mouse.active_sys_window.new_box.width], eax
|
||||||
mov ecx, [Screen_Max_X]
|
mov ecx, [_display.height]
|
||||||
cmp ecx, eax
|
cmp ecx, eax
|
||||||
jge .call_window_handler
|
jg .call_window_handler
|
||||||
mov [mouse.active_sys_window.new_box.width], ecx
|
mov [mouse.active_sys_window.new_box.width], ecx
|
||||||
|
|
||||||
.call_window_handler:
|
.call_window_handler:
|
||||||
@ -523,9 +523,6 @@ mouse._.find_sys_window_under_cursor: ;////////////////////////////////////////
|
|||||||
;< esi = process slot
|
;< esi = process slot
|
||||||
;< edi = pointer to WDATA struct
|
;< edi = pointer to WDATA struct
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; mov esi, [Screen_Max_X]
|
|
||||||
; inc esi
|
|
||||||
; imul esi, [mouse.state.pos.y]
|
|
||||||
mov esi, [mouse.state.pos.y]
|
mov esi, [mouse.state.pos.y]
|
||||||
mov esi, [d_width_calc_area + esi*4]
|
mov esi, [d_width_calc_area + esi*4]
|
||||||
|
|
||||||
|
@ -209,7 +209,7 @@ align 4
|
|||||||
syscall_display_settings.06:
|
syscall_display_settings.06:
|
||||||
xor esi, esi
|
xor esi, esi
|
||||||
|
|
||||||
mov edi, [Screen_Max_X]
|
mov edi, [_display.width]
|
||||||
mov eax, ecx
|
mov eax, ecx
|
||||||
movsx ebx, ax
|
movsx ebx, ax
|
||||||
sar eax, 16
|
sar eax, 16
|
||||||
@ -233,7 +233,7 @@ align 4
|
|||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
.check_horizontal:
|
.check_horizontal:
|
||||||
mov edi, [Screen_Max_Y]
|
mov edi, [_display.height]
|
||||||
mov eax, edx
|
mov eax, edx
|
||||||
movsx ebx, ax
|
movsx ebx, ax
|
||||||
sar eax, 16
|
sar eax, 16
|
||||||
@ -294,8 +294,8 @@ align 4
|
|||||||
syscall_display_settings._.calculate_whole_screen:
|
syscall_display_settings._.calculate_whole_screen:
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
xor ebx, ebx
|
xor ebx, ebx
|
||||||
mov ecx, [Screen_Max_X]
|
mov ecx, [_display.width]
|
||||||
mov edx, [Screen_Max_Y]
|
mov edx, [_display.height]
|
||||||
jmp calculatescreen
|
jmp calculatescreen
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
@ -303,9 +303,11 @@ syscall_display_settings._.redraw_whole_screen:
|
|||||||
xor eax, eax
|
xor eax, eax
|
||||||
mov [draw_limits.left], eax
|
mov [draw_limits.left], eax
|
||||||
mov [draw_limits.top], eax
|
mov [draw_limits.top], eax
|
||||||
mov eax, [Screen_Max_X]
|
mov eax, [_display.width]
|
||||||
|
dec eax
|
||||||
mov [draw_limits.right], eax
|
mov [draw_limits.right], eax
|
||||||
mov eax, [Screen_Max_Y]
|
mov eax, [_display.height]
|
||||||
|
dec eax
|
||||||
mov [draw_limits.bottom], eax
|
mov [draw_limits.bottom], eax
|
||||||
mov eax, window_data
|
mov eax, window_data
|
||||||
jmp redrawscreen
|
jmp redrawscreen
|
||||||
@ -584,9 +586,9 @@ align 4
|
|||||||
|
|
||||||
mov eax, [edi + WDATA.box.left]
|
mov eax, [edi + WDATA.box.left]
|
||||||
add eax, [edi + WDATA.box.width]
|
add eax, [edi + WDATA.box.width]
|
||||||
mov ebx, [Screen_Max_X]
|
mov ebx, [_display.width]
|
||||||
cmp eax, ebx
|
cmp eax, ebx
|
||||||
jle .fix_vertical
|
jl .fix_vertical
|
||||||
mov eax, [edi + WDATA.box.width]
|
mov eax, [edi + WDATA.box.width]
|
||||||
sub eax, ebx
|
sub eax, ebx
|
||||||
jle @f
|
jle @f
|
||||||
@ -601,9 +603,9 @@ align 4
|
|||||||
.fix_vertical:
|
.fix_vertical:
|
||||||
mov eax, [edi + WDATA.box.top]
|
mov eax, [edi + WDATA.box.top]
|
||||||
add eax, [edi + WDATA.box.height]
|
add eax, [edi + WDATA.box.height]
|
||||||
mov ebx, [Screen_Max_Y]
|
mov ebx, [_display.height]
|
||||||
cmp eax, ebx
|
cmp eax, ebx
|
||||||
jle .fix_client_box
|
jl .fix_client_box
|
||||||
mov eax, [edi + WDATA.box.height]
|
mov eax, [edi + WDATA.box.height]
|
||||||
sub eax, ebx
|
sub eax, ebx
|
||||||
jle @f
|
jle @f
|
||||||
@ -1716,9 +1718,9 @@ window._.check_window_position: ;//////////////////////////////////////////////
|
|||||||
mov ecx, [edi + WDATA.box.width]
|
mov ecx, [edi + WDATA.box.width]
|
||||||
mov edx, [edi + WDATA.box.height]
|
mov edx, [edi + WDATA.box.height]
|
||||||
|
|
||||||
mov esi, [Screen_Max_X]
|
mov esi, [_display.width]
|
||||||
cmp ecx, esi
|
cmp ecx, esi
|
||||||
ja .fix_width_high
|
jae .fix_width_high
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
.check_left:
|
.check_left:
|
||||||
@ -1730,9 +1732,9 @@ align 4
|
|||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
.check_height:
|
.check_height:
|
||||||
mov esi, [Screen_Max_Y]
|
mov esi, [_display.height]
|
||||||
cmp edx, esi
|
cmp edx, esi
|
||||||
ja .fix_height_high
|
jae .fix_height_high
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
.check_top:
|
.check_top:
|
||||||
@ -1881,11 +1883,7 @@ align 4
|
|||||||
|
|
||||||
; get WinMap start
|
; get WinMap start
|
||||||
push esi
|
push esi
|
||||||
; mov edi, [Screen_Max_X]
|
mov esi, [_display.width]
|
||||||
; inc edi
|
|
||||||
; mov esi, edi
|
|
||||||
mov esi, [Screen_Max_X]
|
|
||||||
inc esi
|
|
||||||
; imul edi, ebx
|
; imul edi, ebx
|
||||||
mov edi, [d_width_calc_area + ebx*4]
|
mov edi, [d_width_calc_area + ebx*4]
|
||||||
|
|
||||||
@ -1929,9 +1927,6 @@ align 4
|
|||||||
|
|
||||||
; get WinMap start -> ebp
|
; get WinMap start -> ebp
|
||||||
push eax
|
push eax
|
||||||
; mov eax, [Screen_Max_X] ; screen_sx
|
|
||||||
; inc eax
|
|
||||||
; imul eax, ebx
|
|
||||||
mov eax, [d_width_calc_area + ebx*4]
|
mov eax, [d_width_calc_area + ebx*4]
|
||||||
|
|
||||||
add eax, [esp]
|
add eax, [esp]
|
||||||
@ -1998,7 +1993,7 @@ align 4
|
|||||||
|
|
||||||
sub ebp, [ff_xsz]
|
sub ebp, [ff_xsz]
|
||||||
add ebp, [ff_x]
|
add ebp, [ff_x]
|
||||||
add ebp, [Screen_Max_X] ; screen.x
|
add ebp, [_display.width] ; screen.x
|
||||||
inc ebp
|
inc ebp
|
||||||
inc ebx
|
inc ebx
|
||||||
cmp ebx, [ff_ysz]
|
cmp ebx, [ff_ysz]
|
||||||
|
@ -111,9 +111,6 @@ save_draw_mouse:
|
|||||||
push eax
|
push eax
|
||||||
push ebx
|
push ebx
|
||||||
|
|
||||||
; mov ecx, [Screen_Max_X]
|
|
||||||
; inc ecx
|
|
||||||
; mul ecx
|
|
||||||
mov eax, [d_width_calc_area + eax*4]
|
mov eax, [d_width_calc_area + eax*4]
|
||||||
|
|
||||||
add eax, [_WinMapAddress]
|
add eax, [_WinMapAddress]
|
||||||
@ -494,9 +491,10 @@ proc set_mouse_data stdcall, BtnState:dword, XMoving:dword, YMoving:dword, VScro
|
|||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
@@M1:
|
@@M1:
|
||||||
cmp ax, word [Screen_Max_X];ScreenLength
|
cmp ax, word [_display.width]
|
||||||
jl @@M2
|
jl @@M2
|
||||||
mov ax, word [Screen_Max_X];ScreenLength-1
|
mov ax, word [_display.width]
|
||||||
|
dec ax
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
@@M2:
|
@@M2:
|
||||||
@ -514,9 +512,10 @@ align 4
|
|||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
@@M3:
|
@@M3:
|
||||||
cmp ax, word [Screen_Max_Y];ScreenHeigth
|
cmp ax, word [_display.height]
|
||||||
jl @@M4
|
jl @@M4
|
||||||
mov ax, word [Screen_Max_Y];ScreenHeigth-1
|
mov ax, word [_display.height]
|
||||||
|
dec ax
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
@@M4:
|
@@M4:
|
||||||
|
@ -486,13 +486,11 @@ save_variables_IDE_controller:
|
|||||||
mov [_display.width], eax
|
mov [_display.width], eax
|
||||||
mov [display_width_standard], eax
|
mov [display_width_standard], eax
|
||||||
dec eax
|
dec eax
|
||||||
mov [Screen_Max_X], eax
|
|
||||||
mov [screen_workarea.right], eax
|
mov [screen_workarea.right], eax
|
||||||
movzx eax, word [BOOT_VARS+BOOT_Y_RES]; Y max
|
movzx eax, word [BOOT_VARS+BOOT_Y_RES]; Y max
|
||||||
mov [_display.height], eax
|
mov [_display.height], eax
|
||||||
mov [display_height_standard], eax
|
mov [display_height_standard], eax
|
||||||
dec eax
|
dec eax
|
||||||
mov [Screen_Max_Y], eax
|
|
||||||
mov [screen_workarea.bottom], eax
|
mov [screen_workarea.bottom], eax
|
||||||
movzx eax, word [BOOT_VARS+BOOT_VESA_MODE] ; screen mode
|
movzx eax, word [BOOT_VARS+BOOT_VESA_MODE] ; screen mode
|
||||||
mov dword [SCR_MODE], eax
|
mov dword [SCR_MODE], eax
|
||||||
@ -2191,9 +2189,6 @@ restore_default_cursor_before_killing:
|
|||||||
|
|
||||||
movzx eax, word [MOUSE_Y]
|
movzx eax, word [MOUSE_Y]
|
||||||
movzx ebx, word [MOUSE_X]
|
movzx ebx, word [MOUSE_X]
|
||||||
; mov ecx, [Screen_Max_X]
|
|
||||||
; inc ecx
|
|
||||||
; mul ecx
|
|
||||||
mov eax, [d_width_calc_area + eax*4]
|
mov eax, [d_width_calc_area + eax*4]
|
||||||
|
|
||||||
add eax, [_WinMapAddress]
|
add eax, [_WinMapAddress]
|
||||||
@ -2500,10 +2495,10 @@ sysfn_centermouse: ; 18.15 = mouse centered
|
|||||||
;* mouse centered - start code- Mario79
|
;* mouse centered - start code- Mario79
|
||||||
;mouse_centered:
|
;mouse_centered:
|
||||||
; push eax
|
; push eax
|
||||||
mov eax, [Screen_Max_X]
|
mov eax, [_display.width]
|
||||||
shr eax, 1
|
shr eax, 1
|
||||||
mov [MOUSE_X], ax
|
mov [MOUSE_X], ax
|
||||||
mov eax, [Screen_Max_Y]
|
mov eax, [_display.height]
|
||||||
shr eax, 1
|
shr eax, 1
|
||||||
mov [MOUSE_Y], ax
|
mov [MOUSE_Y], ax
|
||||||
call wakeup_osloop
|
call wakeup_osloop
|
||||||
@ -2545,11 +2540,11 @@ sysfn_mouse_acceleration: ; 18.19 = set/get mouse features
|
|||||||
; cmp ecx,4 ; set mouse pointer position
|
; cmp ecx,4 ; set mouse pointer position
|
||||||
dec ecx
|
dec ecx
|
||||||
jnz .set_mouse_button
|
jnz .set_mouse_button
|
||||||
cmp dx, word[Screen_Max_Y]
|
cmp dx, word[_display.width]
|
||||||
ja .end
|
jae .end
|
||||||
rol edx, 16
|
rol edx, 16
|
||||||
cmp dx, word[Screen_Max_X]
|
cmp dx, word[_display.height]
|
||||||
ja .end
|
jae .end
|
||||||
mov [MOUSE_X], edx
|
mov [MOUSE_X], edx
|
||||||
call wakeup_osloop
|
call wakeup_osloop
|
||||||
ret
|
ret
|
||||||
@ -2636,9 +2631,7 @@ sysfn_set_screen_sizes:
|
|||||||
mov eax, ecx
|
mov eax, ecx
|
||||||
mov ecx, [_display.pitch]
|
mov ecx, [_display.pitch]
|
||||||
mov [_display.width], eax
|
mov [_display.width], eax
|
||||||
dec eax
|
|
||||||
mov [_display.height], edx
|
mov [_display.height], edx
|
||||||
dec edx
|
|
||||||
; eax - new Screen_Max_X
|
; eax - new Screen_Max_X
|
||||||
; edx - new Screen_Max_Y
|
; edx - new Screen_Max_Y
|
||||||
mov [do_not_touch_winmap], 1
|
mov [do_not_touch_winmap], 1
|
||||||
@ -2975,22 +2968,22 @@ nosb8:
|
|||||||
jnz nosb9
|
jnz nosb9
|
||||||
; ecx = [left]*65536 + [right]
|
; ecx = [left]*65536 + [right]
|
||||||
; edx = [top]*65536 + [bottom]
|
; edx = [top]*65536 + [bottom]
|
||||||
mov eax, [Screen_Max_X]
|
mov eax, [_display.width]
|
||||||
mov ebx, [Screen_Max_Y]
|
mov ebx, [_display.height]
|
||||||
; check [right]
|
; check [right]
|
||||||
cmp cx, ax
|
cmp cx, ax
|
||||||
ja .exit
|
jae .exit
|
||||||
; check [left]
|
; check [left]
|
||||||
ror ecx, 16
|
ror ecx, 16
|
||||||
cmp cx, ax
|
cmp cx, ax
|
||||||
ja .exit
|
jae .exit
|
||||||
; check [bottom]
|
; check [bottom]
|
||||||
cmp dx, bx
|
cmp dx, bx
|
||||||
ja .exit
|
jae .exit
|
||||||
; check [top]
|
; check [top]
|
||||||
ror edx, 16
|
ror edx, 16
|
||||||
cmp dx, bx
|
cmp dx, bx
|
||||||
ja .exit
|
jae .exit
|
||||||
|
|
||||||
movzx eax, cx ; [left]
|
movzx eax, cx ; [left]
|
||||||
movzx ebx, dx ; [top]
|
movzx ebx, dx ; [top]
|
||||||
@ -3028,8 +3021,8 @@ force_redraw_background:
|
|||||||
and [draw_data+32 + RECT.left], 0
|
and [draw_data+32 + RECT.left], 0
|
||||||
and [draw_data+32 + RECT.top], 0
|
and [draw_data+32 + RECT.top], 0
|
||||||
push eax ebx
|
push eax ebx
|
||||||
mov eax, [Screen_Max_X]
|
mov eax, [_display.width]
|
||||||
mov ebx, [Screen_Max_Y]
|
mov ebx, [_display.height]
|
||||||
mov [draw_data+32 + RECT.right], eax
|
mov [draw_data+32 + RECT.right], eax
|
||||||
mov [draw_data+32 + RECT.bottom], ebx
|
mov [draw_data+32 + RECT.bottom], ebx
|
||||||
pop ebx eax
|
pop ebx eax
|
||||||
@ -3385,9 +3378,9 @@ sys_redrawstat:
|
|||||||
add edx, draw_data - CURRENT_TASK
|
add edx, draw_data - CURRENT_TASK
|
||||||
mov [edx + RECT.left], 0
|
mov [edx + RECT.left], 0
|
||||||
mov [edx + RECT.top], 0
|
mov [edx + RECT.top], 0
|
||||||
mov eax, [Screen_Max_X]
|
mov eax, [_display.width]
|
||||||
mov [edx + RECT.right], eax
|
mov [edx + RECT.right], eax
|
||||||
mov eax, [Screen_Max_Y]
|
mov eax, [_display.height]
|
||||||
mov [edx + RECT.bottom], eax
|
mov [edx + RECT.bottom], eax
|
||||||
|
|
||||||
srl1:
|
srl1:
|
||||||
@ -3518,26 +3511,6 @@ modify_pce:
|
|||||||
;---------------------------------------------------------------------------------------------
|
;---------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
; check if pixel is allowed to be drawn
|
|
||||||
|
|
||||||
;checkpixel:
|
|
||||||
; push eax edx
|
|
||||||
|
|
||||||
;; mov edx, [Screen_Max_X] ; screen x size
|
|
||||||
;; inc edx
|
|
||||||
;; imul edx, ebx
|
|
||||||
; mov edx, [d_width_calc_area + ebx*4]
|
|
||||||
; add eax, [_WinMapAddress]
|
|
||||||
; mov dl, [eax+edx]; lea eax, [...]
|
|
||||||
|
|
||||||
; xor ecx, ecx
|
|
||||||
; mov eax, [CURRENT_TASK]
|
|
||||||
; cmp al, dl
|
|
||||||
; setne cl
|
|
||||||
|
|
||||||
; pop edx eax
|
|
||||||
; ret
|
|
||||||
|
|
||||||
iglobal
|
iglobal
|
||||||
cpustring db 'CPU',0
|
cpustring db 'CPU',0
|
||||||
endg
|
endg
|
||||||
@ -4974,9 +4947,9 @@ endg
|
|||||||
jnz @f
|
jnz @f
|
||||||
mov word [msg_board_pos+2], (42*6)
|
mov word [msg_board_pos+2], (42*6)
|
||||||
add word [msg_board_pos], 10
|
add word [msg_board_pos], 10
|
||||||
mov ax, word [Screen_Max_Y]
|
mov ax, word [_display.height]
|
||||||
cmp word [msg_board_pos], ax
|
cmp word [msg_board_pos], ax
|
||||||
jbe @f
|
jb @f
|
||||||
mov word [msg_board_pos], 10
|
mov word [msg_board_pos], 10
|
||||||
@@:
|
@@:
|
||||||
; // end if
|
; // end if
|
||||||
@ -5193,9 +5166,9 @@ sys_gs: ; direct screen access
|
|||||||
|
|
||||||
|
|
||||||
.1: ; resolution
|
.1: ; resolution
|
||||||
mov eax, [Screen_Max_X]
|
mov eax, [_display.width]
|
||||||
shl eax, 16
|
shl eax, 16
|
||||||
mov ax, word [Screen_Max_Y]
|
mov ax, word [_display.height]
|
||||||
add eax, 0x00010001
|
add eax, 0x00010001
|
||||||
mov [esp+32], eax
|
mov [esp+32], eax
|
||||||
ret
|
ret
|
||||||
@ -5281,9 +5254,9 @@ syscall_drawrect: ; DrawRect
|
|||||||
|
|
||||||
align 4
|
align 4
|
||||||
syscall_getscreensize: ; GetScreenSize
|
syscall_getscreensize: ; GetScreenSize
|
||||||
mov ax, word [Screen_Max_X]
|
mov ax, word [_display.width]
|
||||||
shl eax, 16
|
shl eax, 16
|
||||||
mov ax, word [Screen_Max_Y]
|
mov ax, word [_display.height]
|
||||||
mov [esp + 32], eax
|
mov [esp + 32], eax
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -5349,10 +5322,10 @@ syscall_cdaudio: ; CD
|
|||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
syscall_getpixel_WinMap: ; GetPixel WinMap
|
syscall_getpixel_WinMap: ; GetPixel WinMap
|
||||||
cmp ebx, [Screen_Max_X]
|
cmp ebx, [_display.width]
|
||||||
jbe @f
|
jb @f
|
||||||
cmp ecx, [Screen_Max_Y]
|
cmp ecx, [_display.height]
|
||||||
jbe @f
|
jb @f
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
jmp .store
|
jmp .store
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
@ -5369,8 +5342,7 @@ align 4
|
|||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
syscall_getpixel: ; GetPixel
|
syscall_getpixel: ; GetPixel
|
||||||
mov ecx, [Screen_Max_X]
|
mov ecx, [_display.width]
|
||||||
inc ecx
|
|
||||||
xor edx, edx
|
xor edx, edx
|
||||||
mov eax, ebx
|
mov eax, ebx
|
||||||
div ecx
|
div ecx
|
||||||
@ -5615,8 +5587,6 @@ set_screen:
|
|||||||
pushfd
|
pushfd
|
||||||
cli
|
cli
|
||||||
|
|
||||||
mov [Screen_Max_X], eax
|
|
||||||
mov [Screen_Max_Y], edx
|
|
||||||
mov [_display.pitch], ecx
|
mov [_display.pitch], ecx
|
||||||
|
|
||||||
mov [screen_workarea.right], eax
|
mov [screen_workarea.right], eax
|
||||||
@ -5658,8 +5628,8 @@ set_screen:
|
|||||||
call repos_windows
|
call repos_windows
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
xor ebx, ebx
|
xor ebx, ebx
|
||||||
mov ecx, [Screen_Max_X]
|
mov ecx, [_display.width]
|
||||||
mov edx, [Screen_Max_Y]
|
mov edx, [_display.height]
|
||||||
call calculatescreen
|
call calculatescreen
|
||||||
pop edi
|
pop edi
|
||||||
pop esi
|
pop esi
|
||||||
|
@ -618,15 +618,17 @@ proc move_cursor_24 stdcall, hcursor:dword, x:dword, y:dword
|
|||||||
add edx, eax
|
add edx, eax
|
||||||
mov [cur_saved_base], edx
|
mov [cur_saved_base], edx
|
||||||
|
|
||||||
cmp ebx, [Screen_Max_X]
|
cmp ebx, [_display.width]
|
||||||
jbe @F
|
jb @F
|
||||||
mov ebx, [Screen_Max_X]
|
mov ebx, [_display.width]
|
||||||
|
dec ebx
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
@@:
|
@@:
|
||||||
cmp edi, [Screen_Max_Y]
|
cmp edi, [_display.height]
|
||||||
jbe @F
|
jb @F
|
||||||
mov edi, [Screen_Max_Y]
|
mov edi, [_display.height]
|
||||||
|
dec edi
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
@@:
|
@@:
|
||||||
@ -736,15 +738,17 @@ proc move_cursor_32 stdcall, hcursor:dword, x:dword, y:dword
|
|||||||
lea edx, [LFB_BASE+eax+ecx*4]
|
lea edx, [LFB_BASE+eax+ecx*4]
|
||||||
mov [cur_saved_base], edx
|
mov [cur_saved_base], edx
|
||||||
|
|
||||||
cmp ebx, [Screen_Max_X]
|
cmp ebx, [_display.width]
|
||||||
jbe @F
|
jb @F
|
||||||
mov ebx, [Screen_Max_X]
|
mov ebx, [_display.width]
|
||||||
|
dec ebx
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
@@:
|
@@:
|
||||||
cmp edi, [Screen_Max_Y]
|
cmp edi, [_display.height]
|
||||||
jbe @F
|
jb @F
|
||||||
mov edi, [Screen_Max_Y]
|
mov edi, [_display.height]
|
||||||
|
dec edi
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
@@:
|
@@:
|
||||||
|
@ -23,13 +23,6 @@ $Revision$
|
|||||||
; If you're planning to write your own video driver I suggest
|
; If you're planning to write your own video driver I suggest
|
||||||
; you replace the VESA12.INC file and see those instructions.
|
; you replace the VESA12.INC file and see those instructions.
|
||||||
|
|
||||||
;Screen_Max_X equ 0xfe00
|
|
||||||
;Screen_Max_Y equ 0xfe04
|
|
||||||
;BytesPerScanLine equ 0xfe08
|
|
||||||
;LFBAddress equ 0xfe80
|
|
||||||
;ScreenBPP equ 0xfbf1
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
; getpixel
|
; getpixel
|
||||||
@ -225,8 +218,7 @@ align 4
|
|||||||
add eax, [putimg.arg_0]
|
add eax, [putimg.arg_0]
|
||||||
mov [putimg.line_increment], eax
|
mov [putimg.line_increment], eax
|
||||||
; winmap new line increment
|
; winmap new line increment
|
||||||
mov eax, [Screen_Max_X]
|
mov eax, [_display.width]
|
||||||
inc eax
|
|
||||||
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
|
||||||
@ -249,8 +241,6 @@ align 4
|
|||||||
add edx, eax
|
add edx, eax
|
||||||
; pointer to pixel map
|
; pointer to pixel map
|
||||||
mov eax, [putimg.abs_cy]
|
mov eax, [putimg.abs_cy]
|
||||||
; imul eax, [Screen_Max_X]
|
|
||||||
; add eax, [putimg.abs_cy]
|
|
||||||
mov eax, [d_width_calc_area + eax*4]
|
mov eax, [d_width_calc_area + eax*4]
|
||||||
|
|
||||||
add eax, [putimg.abs_cx]
|
add eax, [putimg.abs_cx]
|
||||||
@ -695,12 +685,11 @@ __sys_putpixel:
|
|||||||
; for example drawwindow_III and drawwindow_IV
|
; for example drawwindow_III and drawwindow_IV
|
||||||
; edi = 0x00000001 force
|
; edi = 0x00000001 force
|
||||||
|
|
||||||
;;; mov [novesachecksum], dword 0
|
|
||||||
pushad
|
pushad
|
||||||
cmp [Screen_Max_X], eax
|
cmp eax, [_display.width]
|
||||||
jb .exit
|
jae .exit
|
||||||
cmp [Screen_Max_Y], ebx
|
cmp ebx, [_display.height]
|
||||||
jb .exit
|
jae .exit
|
||||||
test edi, 1 ; force ?
|
test edi, 1 ; force ?
|
||||||
jnz .forced
|
jnz .forced
|
||||||
|
|
||||||
@ -889,9 +878,6 @@ align 4
|
|||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
calculate_edi:
|
calculate_edi:
|
||||||
; mov edi, ebx
|
|
||||||
; imul edi, [Screen_Max_X]
|
|
||||||
; add edi, ebx
|
|
||||||
mov edi, [d_width_calc_area + ebx*4]
|
mov edi, [d_width_calc_area + ebx*4]
|
||||||
add edi, eax
|
add edi, eax
|
||||||
ret
|
ret
|
||||||
@ -1223,9 +1209,8 @@ align 4
|
|||||||
.end_y:
|
.end_y:
|
||||||
mov [drbar.real_sy], ebx
|
mov [drbar.real_sy], ebx
|
||||||
; line_inc_map
|
; line_inc_map
|
||||||
mov eax, [Screen_Max_X]
|
mov eax, [_display.width]
|
||||||
sub eax, [drbar.real_sx]
|
sub eax, [drbar.real_sx]
|
||||||
inc eax
|
|
||||||
mov [drbar.line_inc_map], eax
|
mov [drbar.line_inc_map], eax
|
||||||
; line_inc_scr
|
; line_inc_scr
|
||||||
mov eax, [drbar.real_sx]
|
mov eax, [drbar.real_sx]
|
||||||
@ -1244,8 +1229,6 @@ align 4
|
|||||||
add edx, eax
|
add edx, eax
|
||||||
; pointer to pixel map
|
; pointer to pixel map
|
||||||
mov eax, [drbar.abs_cy]
|
mov eax, [drbar.abs_cy]
|
||||||
; imul eax, [Screen_Max_X]
|
|
||||||
; add eax, [drbar.abs_cy]
|
|
||||||
mov eax, [d_width_calc_area + eax*4]
|
mov eax, [d_width_calc_area + eax*4]
|
||||||
|
|
||||||
add eax, [drbar.abs_cx]
|
add eax, [drbar.abs_cx]
|
||||||
@ -1769,23 +1752,21 @@ align 4
|
|||||||
vesa20_drawbackground_stretch:
|
vesa20_drawbackground_stretch:
|
||||||
pushad
|
pushad
|
||||||
; Helper variables
|
; Helper variables
|
||||||
; calculate 2^32*(BgrDataWidth-1) mod (ScreenWidth-1)
|
; calculate 2^32*(BgrDataWidth) mod (ScreenWidth)
|
||||||
mov eax, [BgrDataWidth]
|
mov eax, [BgrDataWidth]
|
||||||
dec eax
|
|
||||||
xor edx, edx
|
xor edx, edx
|
||||||
div dword [Screen_Max_X]
|
div dword [_display.width]
|
||||||
push eax ; high
|
push eax ; high
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
div dword [Screen_Max_X]
|
div dword [_display.width]
|
||||||
push eax ; low
|
push eax ; low
|
||||||
; the same for height
|
; the same for height
|
||||||
mov eax, [BgrDataHeight]
|
mov eax, [BgrDataHeight]
|
||||||
dec eax
|
|
||||||
xor edx, edx
|
xor edx, edx
|
||||||
div dword [Screen_Max_Y]
|
div dword [_display.height]
|
||||||
push eax ; high
|
push eax ; high
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
div dword [Screen_Max_Y]
|
div dword [_display.height]
|
||||||
push eax ; low
|
push eax ; low
|
||||||
; External loop for all y from start to end
|
; External loop for all y from start to end
|
||||||
mov ebx, [draw_data+32+RECT.top] ; y start
|
mov ebx, [draw_data+32+RECT.top] ; y start
|
||||||
@ -1939,8 +1920,7 @@ sdp4:
|
|||||||
; advance edi, ebp to next scan line
|
; advance edi, ebp to next scan line
|
||||||
sub eax, [draw_data+32+RECT.left]
|
sub eax, [draw_data+32+RECT.left]
|
||||||
sub ebp, eax
|
sub ebp, eax
|
||||||
add ebp, [Screen_Max_X]
|
add ebp, [_display.width]
|
||||||
add ebp, 1
|
|
||||||
sub edi, eax
|
sub edi, eax
|
||||||
sub edi, eax
|
sub edi, eax
|
||||||
sub edi, eax
|
sub edi, eax
|
||||||
@ -1971,7 +1951,7 @@ align 4
|
|||||||
push edi
|
push edi
|
||||||
mov esi, bgr_next_line
|
mov esi, bgr_next_line
|
||||||
mov edi, bgr_cur_line
|
mov edi, bgr_cur_line
|
||||||
mov ecx, [Screen_Max_X]
|
mov ecx, [_display.width]
|
||||||
inc ecx
|
inc ecx
|
||||||
rep movsd
|
rep movsd
|
||||||
jmp bgr_resmooth1
|
jmp bgr_resmooth1
|
||||||
|
Loading…
Reference in New Issue
Block a user