53,8 → 53,8 |
add ah,1 |
loop palvganew |
; mov dx, 3ceh |
; mov ax, 0005h |
; out dx, ax |
; mov ax, 0005h |
; out dx, ax |
ret |
|
palette320x200: |
114,7 → 114,7 |
novesachecksum dd 0x0 |
EGA_counter db 0 |
VGA_drawing_screen db 0 |
VGA_8_pixels: |
VGA_8_pixels: |
rb 16 |
temp: |
.cx dd 0 |
122,7 → 122,7 |
|
checkVga_N13: |
|
cmp [0xfe0c],dword 0x13 |
cmp [SCR_MODE],dword 0x13 |
jne @f |
|
; cnvl: |
129,7 → 129,7 |
pushad |
cmp [EGA_counter],1 |
je novesal |
mov ecx,[0xfb0a] |
mov ecx,[MOUSE_X] |
cmp ecx,[novesachecksum] |
jne novesal |
popad |
151,7 → 151,7 |
sub eax,100 |
imul eax,640*4 |
add ecx,eax |
movzx eax,word [0xfb0a] |
movzx eax,word [MOUSE_X] |
cmp eax,160 |
jge m13l1 |
mov eax,160 |
163,9 → 163,9 |
sub eax,160 |
shl eax,2 |
add ecx,eax |
mov esi,[0xfe80] |
mov esi,[LFBAddress] |
add esi,ecx |
mov edi,0xa0000 |
mov edi,VGABasePtr |
mov edx,200 |
mov ecx,320 |
cld |
196,17 → 196,17 |
ret |
|
VGA_drawbackground: |
; draw all |
cmp [0xfe0c],dword 0x12 |
; draw all |
cmp [SCR_MODE],dword 0x12 |
jne .end |
pushad |
mov esi,[0xfe80] |
mov edi,0xa0000 |
mov esi,[LFBAddress] |
mov edi,VGABasePtr |
mov ebx,640/32 ; 640*480/(8*4) |
mov edx,480 |
@@: |
push ebx edx esi edi |
shl edx,9 |
shl edx,9 |
lea edx,[edx+edx*4] |
add esi,edx |
shr edx,5 |
224,7 → 224,7 |
mov dx,3ceh |
mov ax,0ff08h |
cli |
out dx, ax |
out dx, ax |
mov ax,0005h |
out dx, ax |
m12pix: |
318,15 → 318,15 |
; ebx = y |
mov ecx,eax |
mov eax, [esp+32-8+4] ; color |
shl ebx,9 |
shl ebx,9 |
lea ebx,[ebx+ebx*4] ; óìíîæåíèå íà 5 |
lea edx, [ebx+ecx*4] ; + x*BytesPerPixel (Vesa2.0 32) |
mov edi,edx |
add edi, [0xfe80] ; + LFB address |
add edi, [LFBAddress] ; + LFB address |
mov [edi], eax ; write to LFB for Vesa2.0 |
shr edx,5 ; change BytesPerPixel to 1/8 |
mov edi,edx |
add edi, 0x0a0000 ; address of pixel in VGA area |
add edi, VGABasePtr ; address of pixel in VGA area |
and ecx,0x07 ; bit no. (modulo 8) |
pushfd |
; edi = address, eax = 24bit colour, ecx = bit no. (modulo 8) |
346,7 → 346,7 |
cmp ah,170 |
jbe .p13red |
or dl,0x08 |
.p13red: |
.p13red: |
shr eax,8 |
cmp ah,85 |
jbe .p13cont |
369,11 → 369,11 |
popfd |
;.end: |
ret |
|
|
VGA__putimage: |
; ecx = size [x|y] |
; edx = coordinates [x|y] |
cmp [0xfe0c],dword 0x12 |
cmp [SCR_MODE],dword 0x12 |
jne @f |
pushad |
rol edx,16 |
393,7 → 393,7 |
; ebx cy |
; ecx xe |
; edx ye |
cmp [0xfe0c],dword 0x12 |
cmp [SCR_MODE],dword 0x12 |
jne @f |
pushad |
sub ecx,eax |
409,19 → 409,19 |
|
VGA_draw_bar_1: |
mov [temp.cx],eax |
mov eax, [0x3010] |
mov eax, [TASK_BASE] |
add ebx, [eax-twdw + 4] |
mov eax, [eax-twdw + 0] |
add eax, [temp.cx] |
and eax,0xfff8 |
shl ebx,9 |
shl ebx,9 |
lea ebx,[ebx+ebx*4] ; óìíîæåíèå íà 5 |
lea ebx, [ebx+eax*4] ; + x*BytesPerPixel (Vesa2.0 32) |
mov esi,ebx |
add esi, [0xfe80] ; + LFB address |
add esi, [LFBAddress] ; + LFB address |
shr ebx,5 ; change BytesPerPixel to 1/8 |
mov edi,ebx |
add edi, 0x0a0000 ; address of pixel in VGA area |
add edi, VGABasePtr ; address of pixel in VGA area |
mov ebx,ecx |
shr ebx,5 |
inc ebx |
434,7 → 434,7 |
|
VGA_draw_long_line_1: |
push ebx edx esi edi |
shl edx,9 |
shl edx,9 |
lea edx,[edx+edx*4] |
add esi,edx |
shr edx,5 |