Subversion Repositories Kolibri OS

Rev

Rev 6275 | Rev 7522 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6275 Rev 7132
Line 38... Line 38...
38
 
38
 
39
align 4
39
align 4
40
init_video:
40
init_video:
Line 41... Line 41...
41
        mov     ebp, bios_fb
41
        mov     ebp, bios_fb
42
 
42
 
43
        movzx   eax, byte [BOOT_VARS+BOOT_BPP]      ; bpp
43
        movzx   eax, byte [BOOT.bpp]      ; bpp
Line 44... Line 44...
44
        mov     [_display.bits_per_pixel], eax
44
        mov     [_display.bits_per_pixel], eax
45
        mov     [_display.vrefresh], 60
45
        mov     [_display.vrefresh], 60
46
 
46
 
47
        movzx   eax, word [BOOT_VARS+BOOT_X_RES]; X max
47
        movzx   eax, word [BOOT.x_res]; X max
48
        mov     [_display.width], eax
48
        mov     [_display.width], eax
49
        mov     [ebp+FRB.width], eax
49
        mov     [ebp+FRB.width], eax
Line 50... Line 50...
50
        mov     [display_width_standard], eax
50
        mov     [display_width_standard], eax
51
        dec     eax
51
        dec     eax
52
        mov     [screen_workarea.right], eax
52
        mov     [screen_workarea.right], eax
53
 
53
 
54
        movzx   eax, word [BOOT_VARS+BOOT_Y_RES]; Y max
54
        movzx   eax, word [BOOT.y_res]; Y max
55
        mov     [_display.height], eax
55
        mov     [_display.height], eax
Line 56... Line 56...
56
        mov     [ebp+FRB.height], eax
56
        mov     [ebp+FRB.height], eax
57
        mov     [display_height_standard], eax
57
        mov     [display_height_standard], eax
58
        dec     eax
58
        dec     eax
59
        mov     [screen_workarea.bottom], eax
59
        mov     [screen_workarea.bottom], eax
60
 
60
 
61
        movzx   eax, word [BOOT_VARS+BOOT_VESA_MODE]    ; screen mode
61
        movzx   eax, word [BOOT.vesa_mode]    ; screen mode
62
        mov     dword [SCR_MODE], eax
62
        mov     dword [SCR_MODE], eax
63
        mov     eax, 640 *4                             ; Bytes PerScanLine
63
        mov     eax, 640 *4                             ; Bytes PerScanLine
64
        cmp     [SCR_MODE], word 0x13                   ; 320x200
64
        cmp     [SCR_MODE], word 0x13                   ; 320x200
65
        je      @f
65
        je      @f
66
        cmp     [SCR_MODE], word 0x12                   ; VGA 640x480
66
        cmp     [SCR_MODE], word 0x12                   ; VGA 640x480
Line 67... Line 67...
67
        je      @f
67
        je      @f
68
        movzx   eax, word[BOOT_VARS+BOOT_PITCH]         ; for other modes
68
        movzx   eax, word[BOOT.pitch]         ; for other modes
Line 69... Line 69...
69
@@:
69
@@:
70
        mov     [_display.lfb_pitch], eax
70
        mov     [_display.lfb_pitch], eax
71
        mov     [ebp+FRB.pitch], eax
71
        mov     [ebp+FRB.pitch], eax
Line 177... Line 177...
177
        jnz     .new_pd
177
        jnz     .new_pd
178
        stdcall free_kernel_space, edi
178
        stdcall free_kernel_space, edi
179
        jmp     .ok
179
        jmp     .ok
Line 180... Line 180...
180
 
180
 
181
.fake:
181
.fake:
Line 182... Line 182...
182
        mov     [BOOT_VARS+BOOT_MTRR], byte 2
182
        mov     [BOOT.mtrr], byte 2
183
 
183
 
184
        stdcall alloc_kernel_space, 0x1000
184
        stdcall alloc_kernel_space, 0x1000