Rev 3598 | Rev 3611 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3598 | Rev 3606 | ||
---|---|---|---|
Line 69... | Line 69... | ||
69 | format binary as "mnt" |
69 | format binary as "mnt" |
Line 70... | Line 70... | ||
70 | 70 | ||
71 | include 'macros.inc' |
71 | include 'macros.inc' |
Line 72... | Line 72... | ||
72 | include 'struct.inc' |
72 | include 'struct.inc' |
Line 73... | Line 73... | ||
73 | 73 | ||
Line 74... | Line 74... | ||
74 | $Revision: 3598 $ |
74 | $Revision: 3606 $ |
Line 404... | Line 404... | ||
404 | mov [display_height_standard], eax |
404 | mov [display_height_standard], eax |
405 | dec eax |
405 | dec eax |
406 | mov [Screen_Max_Y], eax |
406 | mov [Screen_Max_Y], eax |
407 | mov [screen_workarea.bottom], eax |
407 | mov [screen_workarea.bottom], eax |
408 | movzx eax, word [BOOT_VAR+BOOT_VESA_MODE]; screen mode |
408 | movzx eax, word [BOOT_VAR+BOOT_VESA_MODE] ; screen mode |
409 | mov [SCR_MODE], eax |
409 | mov dword [SCR_MODE], eax |
410 | ; mov eax, [BOOT_VAR+0x9014] ; Vesa 1.2 bnk sw add |
410 | ; mov eax, [BOOT_VAR+0x9014] ; Vesa 1.2 bnk sw add |
411 | ; mov [BANK_SWITCH], eax |
411 | ; mov [BANK_SWITCH], eax |
412 | mov [BytesPerScanLine], word 640*4 ; Bytes PerScanLine |
412 | mov eax, 640 *4 ; Bytes PerScanLine |
413 | cmp [SCR_MODE], word 0x13 ; 320x200 |
413 | cmp [SCR_MODE], word 0x13 ; 320x200 |
414 | je @f |
414 | je @f |
415 | cmp [SCR_MODE], word 0x12 ; VGA 640x480 |
415 | cmp [SCR_MODE], word 0x12 ; VGA 640x480 |
416 | je @f |
416 | je @f |
417 | movzx eax, word[BOOT_VAR+BOOT_PITCH] ; for other modes |
417 | movzx eax, word[BOOT_VAR+BOOT_PITCH] ; for other modes |
418 | mov [BytesPerScanLine], ax |
- | |
419 | mov [_display.pitch], eax |
- | |
420 | @@: |
418 | @@: |
- | 419 | mov [_display.pitch], eax |
|
421 | mov eax, [_display.width] |
420 | mov eax, [_display.width] |
422 | mul [_display.height] |
421 | mul [_display.height] |
423 | mov [_WinMapSize], eax |
422 | mov [_WinMapSize], eax |
Line 424... | Line 423... | ||
424 | 423 | ||
Line 2490... | Line 2489... | ||
2490 | ja .exit |
2489 | ja .exit |
Line 2491... | Line 2490... | ||
2491 | 2490 | ||
2492 | pushfd |
2491 | pushfd |
2493 | cli |
2492 | cli |
2494 | mov eax, ecx |
2493 | mov eax, ecx |
2495 | mov ecx, [BytesPerScanLine] |
2494 | mov ecx, [_display.pitch] |
2496 | mov [_display.width], eax |
2495 | mov [_display.width], eax |
2497 | dec eax |
2496 | dec eax |
2498 | mov [_display.height], edx |
2497 | mov [_display.height], edx |
2499 | dec edx |
2498 | dec edx |
Line 4996... | Line 4995... | ||
4996 | 4995 | ||
4997 | 4996 | ||
4998 | .1: ; resolution |
4997 | .1: ; resolution |
4999 | mov eax, [Screen_Max_X] |
4998 | mov eax, [Screen_Max_X] |
5000 | shl eax, 16 |
4999 | shl eax, 16 |
5001 | mov ax, [Screen_Max_Y] |
5000 | mov ax, word [Screen_Max_Y] |
5002 | add eax, 0x00010001 |
5001 | add eax, 0x00010001 |
5003 | mov [esp+32], eax |
5002 | mov [esp+32], eax |
5004 | ret |
5003 | ret |
5005 | .2: ; bits per pixel |
5004 | .2: ; bits per pixel |
5006 | mov eax, [_display.bpp] |
5005 | mov eax, [_display.bpp] |
5007 | mov [esp+32], eax |
5006 | mov [esp+32], eax |
5008 | ret |
5007 | ret |
5009 | .3: ; bytes per scanline |
5008 | .3: ; bytes per scanline |
5010 | mov eax, [BytesPerScanLine] |
5009 | mov eax, [_display.pitch] |
Line 5011... | Line 5010... | ||
5011 | mov [esp+32], eax |
5010 | mov [esp+32], eax |
Line 5095... | Line 5094... | ||
5095 | .drectr: |
5094 | .drectr: |
5096 | ret |
5095 | ret |
Line 5097... | Line 5096... | ||
5097 | 5096 | ||
5098 | align 4 |
5097 | align 4 |
5099 | syscall_getscreensize: ; GetScreenSize |
5098 | syscall_getscreensize: ; GetScreenSize |
5100 | mov ax, [Screen_Max_X] |
5099 | mov ax, word [Screen_Max_X] |
5101 | shl eax, 16 |
5100 | shl eax, 16 |
5102 | mov ax, [Screen_Max_Y] |
5101 | mov ax, word [Screen_Max_Y] |
5103 | mov [esp + 32], eax |
5102 | mov [esp + 32], eax |
Line 5104... | Line 5103... | ||
5104 | ret |
5103 | ret |
Line 5416... | Line 5415... | ||
5416 | inc ecx |
5415 | inc ecx |
5417 | mov edi, BPSLine_calc_area |
5416 | mov edi, BPSLine_calc_area |
5418 | cld |
5417 | cld |
5419 | @@: |
5418 | @@: |
5420 | stosd |
5419 | stosd |
5421 | add eax, [BytesPerScanLine] |
5420 | add eax, [_display.pitch] |
5422 | dec ecx |
5421 | dec ecx |
5423 | jnz @r |
5422 | jnz @r |
5424 | ret |
5423 | ret |
5425 | ;------------------------------------------------------------------------------ |
5424 | ;------------------------------------------------------------------------------ |
5426 | align 4 |
5425 | align 4 |
Line 5439... | Line 5438... | ||
5439 | pushfd |
5438 | pushfd |
5440 | cli |
5439 | cli |
Line 5441... | Line 5440... | ||
5441 | 5440 | ||
5442 | mov [Screen_Max_X], eax |
5441 | mov [Screen_Max_X], eax |
5443 | mov [Screen_Max_Y], edx |
5442 | mov [Screen_Max_Y], edx |
Line 5444... | Line 5443... | ||
5444 | mov [BytesPerScanLine], ecx |
5443 | mov [_display.pitch], ecx |
5445 | 5444 | ||
Line 5446... | Line 5445... | ||
5446 | mov [screen_workarea.right], eax |
5445 | mov [screen_workarea.right], eax |