/kernel/trunk/const.inc |
---|
237,7 → 237,6 |
MOUSE_DOWN equ (OS_BASE+0x000FB44) |
X_UNDER equ (OS_BASE+0x000FB4A) |
Y_UNDER equ (OS_BASE+0x000FB4C) |
ScreenBPP equ (OS_BASE+0x000FBF1) |
;unused ? only one reference |
MOUSE_BUFF_COUNT equ (OS_BASE+0x000FCFF) |
/kernel/trunk/kernel.asm |
---|
389,8 → 389,6 |
mov al, [BOOT_VAR+BOOT_DMA] ; DMA access |
mov [allow_dma_access], al |
movzx eax, byte [BOOT_VAR+BOOT_BPP] ; bpp |
mov [ScreenBPP], al |
mov [_display.bpp], eax |
mov [_display.vrefresh], 60 |
449,7 → 447,7 |
setvesa20: |
mov [PUTPIXEL], dword Vesa20_putpixel24 ; Vesa 2.0 |
mov [GETPIXEL], dword Vesa20_getpixel24 |
cmp [ScreenBPP], byte 24 |
cmp byte [_display.bpp], 24 |
jz v20ga24 |
v20ga32: |
mov [PUTPIXEL], dword Vesa20_putpixel32 |
4980,7 → 4978,7 |
mov [esp+32], eax |
ret |
.2: ; bits per pixel |
movzx eax, byte [ScreenBPP] |
mov eax, [_display.bpp] |
mov [esp+32], eax |
ret |
.3: ; bytes per scanline |
/kernel/trunk/video/cursors.inc |
---|
846,7 → 846,7 |
add eax, ebx |
mov ebx, eax |
shl eax, 2 |
cmp [ScreenBPP], byte 32 |
cmp byte [_display.bpp], 32 |
je @f |
sub eax, ebx |
;-------------------------------------- |
921,7 → 921,7 |
add ecx, ebx |
mov ebx, ecx |
shl ecx, 2 |
cmp [ScreenBPP], byte 24 |
cmp byte [_display.bpp], 24 |
je .24 |
and eax, 0xFFFFFF |
mov [ecx + cur_saved_data], eax ;store new color to |
991,21 → 991,15 |
test word [SCR_MODE], 0x4000 |
jz .fail |
; jmp .fail |
mov ebx, restore_32 |
mov ecx, move_cursor_32 |
movzx eax, byte [ScreenBPP] |
cmp eax, 32 |
je @F |
mov edx, Vesa20_putpixel32_new |
mov eax, [_display.bpp] |
cmp al, 32 |
jne .24 |
mov ebx, restore_24 |
mov ecx, move_cursor_24 |
cmp eax, 24 |
jne .fail |
;-------------------------------------- |
align 4 |
@@: |
.set: |
mov [_display.select_cursor], select_cursor |
mov [_display.move_cursor], ecx |
mov [_display.restore_cursor], ebx |
1014,16 → 1008,7 |
cmp [PUTPIXEL], dword VGA_putpixel |
je @f |
cmp [ScreenBPP], byte 32 |
je .32 |
mov [PUTPIXEL], dword Vesa20_putpixel24_new |
jmp @f |
;-------------------------------------- |
align 4 |
.32: |
mov [PUTPIXEL], dword Vesa20_putpixel32_new |
;-------------------------------------- |
align 4 |
mov [PUTPIXEL], edx |
@@: |
stdcall load_cursor, clock_arrow, dword LOAD_FROM_MEM |
mov [def_cursor_clock], eax |
1030,8 → 1015,14 |
stdcall load_cursor, def_arrow, dword LOAD_FROM_MEM |
mov [def_cursor], eax |
ret |
;-------------------------------------- |
align 4 |
.24: |
mov ebx, restore_24 |
mov ecx, move_cursor_24 |
mov edx, Vesa20_putpixel24_new |
cmp al, 24 |
je .set |
.fail: |
xor eax, eax |
mov [_display.select_cursor], eax |
/kernel/trunk/video/vesa20.inc |
---|
231,7 → 231,7 |
mov [putimg.winmap_newline], eax |
; screen new line increment |
mov eax, [BytesPerScanLine] |
movzx ebx, byte [ScreenBPP] |
mov ebx, [_display.bpp] |
shr ebx, 3 |
imul ecx, ebx |
sub eax, ecx |
266,7 → 266,7 |
;-------------------------------------- |
; get process number |
mov ebx, [CURRENT_TASK] |
cmp byte [ScreenBPP], 32 |
cmp byte [_display.bpp], 32 |
je put_image_end_32 |
;-------------------------------------- |
put_image_end_24: |
1229,7 → 1229,7 |
mov [drbar.line_inc_map], eax |
; line_inc_scr |
mov eax, [drbar.real_sx] |
movzx ebx, byte [ScreenBPP] |
mov ebx, [_display.bpp] |
shr ebx, 3 |
imul eax, ebx |
neg eax |
1268,7 → 1268,7 |
rol eax, 8 |
mov bh, al ; 0x80 drawing gradient bars |
ror eax, 8 |
cmp byte [ScreenBPP], 24 |
cmp byte [_display.bpp], 24 |
jne draw_bar_end_32 |
;-------------------------------------- |
align 4 |
1653,7 → 1653,7 |
add ebp, eax |
add ebp, eax |
add ebp, eax |
cmp [ScreenBPP], byte 24 ; 24 or 32 bpp ? - x size |
cmp byte [_display.bpp], 24 ; 24 or 32 bpp ? - x size |
jz @f |
add ebp, eax |
;-------------------------------------- |
1733,7 → 1733,7 |
;-------------------------------------- |
align 4 |
@@: |
cmp [ScreenBPP], byte 25 ; 24 or 32 bpp? |
cmp byte [_display.bpp], 25 ; 24 or 32 bpp? |
sbb edi, -1 ; +1 for 32 bpp |
; I do not use 'inc eax' because this is slightly slower then 'add eax,1' |
add ebp, edx |
1799,7 → 1799,7 |
add ebp, eax |
add ebp, eax |
add ebp, eax |
cmp [ScreenBPP], byte 24 ; 24 or 32 bpp ? - x size |
cmp byte [_display.bpp], 24 ; 24 or 32 bpp ? - x size |
jz @f |
add ebp, eax |
;-------------------------------------- |
1918,7 → 1918,7 |
;-------------------------------------- |
align 4 |
snbgp: |
cmp [ScreenBPP], byte 25 |
cmp byte [_display.bpp], 25 |
sbb edi, -4 |
add ebp, 1 |
mov eax, [esp+20] |
1944,7 → 1944,7 |
sub edi, eax |
sub edi, eax |
sub edi, eax |
cmp [ScreenBPP], byte 24 |
cmp byte [_display.bpp], 24 |
jz @f |
sub edi, eax |
;-------------------------------------- |