Subversion Repositories Kolibri OS

Rev

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

Rev 2010 Rev 2434
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
4
;; Distributed under terms of the GNU General Public License    ;;
4
;; Distributed under terms of the GNU General Public License    ;;
5
;;                                                              ;;
5
;;                                                              ;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 7... Line 7...
7
 
7
 
Line 8... Line 8...
8
$Revision: 2010 $
8
$Revision: 2434 $
9
 
9
 
10
struc VBE_VGAInfo {
10
struc VBE_VGAInfo {
11
  .VESASignature          dd ?    ; char
11
  .VESASignature          dd ?    ; char
Line 92... Line 92...
92
        xor     edx,edx
92
        xor     edx, edx
93
        div     ecx
93
        div     ecx
94
        push    edx
94
        push    edx
95
        call    int2str
95
        call    int2str
96
        pop     eax
96
        pop     eax
-
 
97
    @@:
97
    @@: or      al,0x30
98
        or      al, 0x30
98
        mov     [ds:di],al
99
        mov     [ds:di], al
99
        inc     di
100
        inc     di
100
        ret
101
        ret
Line 101... Line 102...
101
 
102
 
Line 105... Line 106...
105
        xor     edx,edx
106
        xor     edx, edx
106
        div     ecx
107
        div     ecx
107
        push    edx
108
        push    edx
108
        call    int2strnz
109
        call    int2strnz
109
        pop     eax
110
        pop     eax
-
 
111
    @@:
110
    @@: or      al,0x30
112
        or      al, 0x30
111
        mov     [es:di],al
113
        mov     [es:di], al
112
        inc     di
114
        inc     di
113
        ret
115
        ret
Line 114... Line 116...
114
 
116
 
Line 239... Line 241...
239
        mov     [es:bx+2],ax               ; +2[2] : resolution Y
241
        mov     [es:bx+2], ax              ; +2[2] : resolution Y
240
        mov     ax,[es:mi.ModeAttributes]
242
        mov     ax, [es:mi.ModeAttributes]
241
        mov     [es:bx+4],ax               ; +4[2] : attributes
243
        mov     [es:bx+4], ax              ; +4[2] : attributes
Line 242... Line 244...
242
 
244
 
243
        cmp     [s_vesa.ver],'2'
245
        cmp     [s_vesa.ver], '2'
-
 
246
;        jb      .lp1
Line 244... Line 247...
244
        jb      .lp1
247
        jb      @f    ; We do not use Vesa 1.2 mode is now
-
 
248
 
245
 
249
        or      cx, 0x4000 ; use LFB
246
        or      cx,0x4000  ; use LFB
250
.lp1:
247
.lp1:	mov     [es:bx+6],cx               ; +6 : mode number
251
        mov     [es:bx+6], cx              ; +6 : mode number
248
        movzx   ax,byte [es:mi.BitsPerPixel]
252
        movzx   ax, byte [es:mi.BitsPerPixel]
Line 249... Line 253...
249
        mov     word [es:bx+8],ax               ; +8 : bits per pixel
253
        mov     word [es:bx+8], ax              ; +8 : bits per pixel
Line 361... Line 365...
361
        jnz     @f
365
        jnz     @f
362
        cmp     word [es:si+8],32
366
        cmp     word [es:si+8], 32
363
        je      .ok_found_mode
367
        je      .ok_found_mode
364
        cmp     word [es:si+8],24
368
        cmp     word [es:si+8], 24
365
        je      .ok_found_mode
369
        je      .ok_found_mode
-
 
370
@@:
366
@@:     add     si,size_of_step
371
        add     si, size_of_step
367
        cmp     word [es:si],-1
372
        cmp     word [es:si], -1
368
        jnz     .findvbemode
373
        jnz     .findvbemode
369
.novbemode:
374
.novbemode:
370
        mov     ax, [x_save]
375
        mov     ax, [x_save]
371
        test    ax, ax
376
        test    ax, ax
Line 436... Line 441...
436
        mov     word [preboot_graph],si
441
        mov     word [preboot_graph], si
437
        mov     ax,si
442
        mov     ax, si
Line 438... Line 443...
438
 
443
 
Line -... Line 444...
-
 
444
        mov     ecx, long_v_table
439
        mov     ecx,long_v_table
445
 
440
 
446
.loop:
441
.loop:  add     ax,size_of_step
447
        add     ax, size_of_step
442
        cmp     ax,word [end_cursor]
448
        cmp     ax, word [end_cursor]
443
        jae     .next_step
449
        jae     .next_step
444
        loop    .loop
450
        loop    .loop
Line 469... Line 475...
469
        jne     .next
475
        jne     .next
470
        cmp     word [es:si+8],32
476
        cmp     word [es:si+8], 32
471
        je      .ok
477
        je      .ok
472
        cmp     word [es:si+8],24
478
        cmp     word [es:si+8], 24
473
        je      .ok
479
        je      .ok
-
 
480
.next:
474
.next:  add     si,size_of_step
481
        add     si, size_of_step
475
        cmp     word [es:si],-1
482
        cmp     word [es:si], -1
476
        je      .exit
483
        je      .exit
477
        jmp     .loops
484
        jmp     .loops
-
 
485
.ok:
478
.ok:    xor     ax,ax        
486
        xor     ax, ax
479
	ret
487
	ret
-
 
488
.exit:
480
.exit:  or	ax,-1
489
        or      ax, -1
481
	ret
490
	ret
Line 482... Line 491...
482
 
491
 
Line 518... Line 527...
518
        push    si
527
        push    si
519
        pop     word [home_cursor]
528
        pop     word [home_cursor]
520
        jmp     .ok
529
        jmp     .ok
Line -... Line 530...
-
 
530
 
521
 
531
 
522
 
532
.low:
523
.low:   sub     cx,size_of_step
533
        sub     cx, size_of_step
524
        cmp     cx,modes_table
534
        cmp     cx, modes_table
525
        jb      .ok
535
        jb      .ok
526
        push    cx
536
        push    cx
Line 724... Line 734...
724
        je      .mode0x12_0x13
734
        je      .mode0x12_0x13
725
        cmp     cx,0x13
735
        cmp     cx, 0x13
726
        je      .mode0x12_0x13
736
        je      .mode0x12_0x13
Line 727... Line 737...
727
 
737
 
728
 
738
 
Line 729... Line 739...
729
        cmp     byte [s_vesa.ver],'2'
739
;        cmp     byte [s_vesa.ver], '2'
Line 730... Line 740...
730
        jb      .vesa12
740
;        jb      .vesa12
731
 
741
 
Line 758... Line 768...
758
        or      dword [es:0x9018], 0xFFFFFFFF; 0x800000
768
        or      dword [es:0x9018], 0xFFFFFFFF; 0x800000
Line 759... Line 769...
759
 
769
 
Line 760... Line 770...
760
 
770
 
761
;  VESA 1.2 PM BANK SWITCH ADDRESS
-
 
762
 
-
 
763
.vesa12:
771
;  VESA 1.2 PM BANK SWITCH ADDRESS
764
 
772
 
765
 
773
;.vesa12:
766
        mov     ax,0x4f0A
774
;        mov     ax, 0x4f0A
767
        xor     bx,bx
775
;        xor     bx, bx
768
        int     0x10
776
;        int     0x10
769
        xor     eax,eax
777
;        xor     eax, eax
770
        xor     ebx,ebx
778
;        xor     ebx, ebx
771
        mov     ax,es
779
;        mov     ax, es
772
        shl     eax,4
780
;        shl     eax, 4
773
        mov     bx,di
781
;        mov     bx, di
774
        add     eax,ebx
782
;        add     eax, ebx
775
        movzx   ebx,word[es:di]
783
;        movzx   ebx, word[es:di]
776
        add     eax,ebx
784
;        add     eax, ebx
777
        push    0x0000
785
;        push    0x0000
778
        pop     es
786
;        pop     es
Line 779... Line 787...
779
        mov     [es:0x9014],eax
787
;        mov     [es:0x9014], eax