Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 2479 → Rev 2480

/kernel/trunk/const.inc
190,6 → 190,8
TASK_EVENT equ (OS_BASE+0x0003020)
 
d_width_calc_area equ (OS_BASE+0x0005000)
BPSLine_calc_area equ (OS_BASE+0x0339000)
 
mouseunder equ (OS_BASE+0x0006900)
CDDataBuf equ (OS_BASE+0x0007000)
FLOPPY_BUFF equ (OS_BASE+0x0008000)
/kernel/trunk/kernel.asm
403,6 → 403,10
mov [_WinMapSize], eax
 
call calculate_fast_getting_offset_for_WinMapAddress
; for Qemu or non standart video cards
; Unfortunately [BytesPerScanLine] does not always
; equal to [_display.width] * [ScreenBPP] / 8
call calculate_fast_getting_offset_for_LFB
 
mov esi, BOOT_VAR+0x9080
movzx ecx, byte [esi-1]
4849,6 → 4853,21
ret
;------------------------------------------------------------------------------
align 4
calculate_fast_getting_offset_for_LFB:
; calculate data area for fast getting offset to LFB
xor eax, eax
mov ecx, [_display.height]
inc ecx
mov edi, BPSLine_calc_area
cld
@@:
stosd
add eax, [BytesPerScanLine]
dec ecx
jnz @r
ret
;------------------------------------------------------------------------------
align 4
set_screen:
cmp eax, [Screen_Max_X]
jne .set
/kernel/trunk/memmap.inc
246,7 → 246,8
; 04 dword draw limit - y start
; 08 dword draw limit - x end
; 0C dword draw limit - y end
; 0x80339000 -> 3BFFF3 free (12k)
; 0x80339000 -> 33A7FF area for fast getting offset to LFB (6k)
; 0x8033A800 -> 3BFFF3 free (6k)
; 0x8033BFF4 -> 33BFFF background info
; 0x8033C000 page map (length b = memsize shr 15)
; 0x8033C000 + b start of static pagetables
/kernel/trunk/video/blitter.inc
345,7 → 345,8
 
mov edi, ebp
 
imul edi, [_display.pitch]
; imul edi, [_display.pitch]
mov edi, [BPSLine_calc_area+edi*4]
; imul ebp, [_display.width]
mov ebp, [d_width_calc_area + ebp*4]
 
/kernel/trunk/video/cursors.inc
618,9 → 618,7
mov [_dy], edx
 
; mul dword [BytesPerScanLine]
mov eax, [d_width_calc_area + eax*4]
lea eax, [eax + eax*2]
 
mov eax, [BPSLine_calc_area+eax*4]
lea edx, [LFB_BASE+ecx*3]
add edx, eax
mov [cur_saved_base], edx
737,9 → 735,7
mov [_dy], edx
 
; mul dword [BytesPerScanLine]
mov eax, [d_width_calc_area + eax*4]
shl eax, 2
 
mov eax, [BPSLine_calc_area+eax*4]
lea edx, [LFB_BASE+eax+ecx*4]
mov [cur_saved_base], edx
 
/kernel/trunk/video/vesa20.inc
72,8 → 72,7
.no_mouseunder:
;--------------------------------------
; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
mov ebx, [d_width_calc_area + ebx*4]
lea ebx, [ebx + ebx*2]
mov ebx, [BPSLine_calc_area+ebx*4]
lea edi, [eax+eax*2]; edi = x*3
add edi, ebx ; edi = x*3+(y*y multiplier)
mov ecx, [LFB_BASE+edi]
105,8 → 104,7
.no_mouseunder:
;--------------------------------------
; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
mov ebx, [d_width_calc_area + ebx*4]
shl ebx, 2
mov ebx, [BPSLine_calc_area+ebx*4]
lea edi, [ebx+eax*4]; edi = x*4+(y*y multiplier)
mov ecx, [LFB_BASE+edi]
;--------------------------------------
243,19 → 241,7
; pointer to screen
mov edx, [putimg.abs_cy]
; imul edx, [BytesPerScanLine]
 
mov edx, [d_width_calc_area + edx*4]
cmp bl, 4
je .32
lea edx, [edx+edx*2]
jmp @f
;-------------------------------------
align 4
.32:
shl edx, 2
;-------------------------------------
align 4
@@:
mov edx, [BPSLine_calc_area+edx*4]
mov eax, [putimg.abs_cx]
; movzx ebx, byte [ScreenBPP]
; shr ebx, 3
740,9 → 726,7
mov cx, bx
 
; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
mov ebx, [d_width_calc_area + ebx*4]
lea ebx, [ebx + ebx*2]
 
mov ebx, [BPSLine_calc_area+ebx*4]
lea edi, [eax+eax*2]; edi = x*3
mov eax, [esp+32-8+4]
;--------------------------------------
771,9 → 755,7
mov cx, bx
 
; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
mov ebx, [d_width_calc_area + ebx*4]
lea ebx, [ebx + ebx*2]
 
mov ebx, [BPSLine_calc_area+ebx*4]
lea edi, [eax+eax*2]; edi = x*3
mov eax, [esp+32-8+4]
;--------------------------------------
819,9 → 801,7
mov cx, bx
 
; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
mov ebx, [d_width_calc_area + ebx*4]
shl ebx, 2
 
mov ebx, [BPSLine_calc_area+ebx*4]
lea edi, [ebx+eax*4]; edi = x*4+(y*y multiplier)
mov eax, [esp+32-8+4]; eax = color
;--------------------------------------
849,9 → 829,7
mov cx, bx
 
; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier
mov ebx, [d_width_calc_area + ebx*4]
shl ebx, 2
 
mov ebx, [BPSLine_calc_area+ebx*4]
lea edi, [ebx+eax*4]; edi = x*4+(y*y multiplier)
mov eax, [esp+32-8+4]; eax = color
;--------------------------------------
1238,19 → 1216,7
; pointer to screen
mov edx, [drbar.abs_cy]
; imul edx, [BytesPerScanLine]
 
mov edx, [d_width_calc_area + edx*4]
cmp bl, 4
je .32
lea edx, [edx+edx*2]
jmp @f
;-------------------------------------
align 4
.32:
shl edx, 2
;-------------------------------------
align 4
@@:
mov edx, [BPSLine_calc_area+edx*4]
mov eax, [drbar.abs_cx]
imul eax, ebx
add edx, eax
1656,18 → 1622,7
; and LFB data (output for our function) [edi]
; mov eax, [BytesPerScanLine]
; mul ebx
mov eax, [d_width_calc_area + ebx*4]
cmp [ScreenBPP], byte 32
je .32
lea eax, [eax+eax*2]
jmp @f
;-------------------------------------
align 4
.32:
shl eax, 2
;-------------------------------------
align 4
@@:
mov eax, [BPSLine_calc_area+ebx*4]
xchg ebp, eax
add ebp, eax
add ebp, eax
1813,19 → 1768,7
; and LFB data (output for our function) [edi]
; mov eax, [BytesPerScanLine]
; mul ebx
mov eax, [d_width_calc_area + ebx*4]
cmp [ScreenBPP], byte 32
je .32
lea eax, [eax+eax*2]
jmp @f
;-------------------------------------
align 4
.32:
shl eax, 2
;-------------------------------------
align 4
@@:
 
mov eax, [BPSLine_calc_area+ebx*4]
xchg ebp, eax
add ebp, eax
add ebp, eax