Subversion Repositories Kolibri OS

Rev

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

Rev 4265 Rev 5201
Line 1... Line 1...
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;                                                              ;;
2
;;                                                              ;;
3
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2014. 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: 4265 $
8
$Revision: 5201 $
9
 
9
 
10
struc VBE_VGAInfo {
10
struc VBE_VGAInfo {
11
  .VESASignature          dd ?    ; char
11
  .VESASignature          dd ?    ; char
Line 219... Line 219...
219
        jz      @f
219
        jz      @f
Line 220... Line 220...
220
 
220
 
221
        cmp     [es:mi.BitsPerPixel], 32   ;It show only videomodes to have support 24 and 32 bpp
221
        cmp     [es:mi.BitsPerPixel], 32   ;It show only videomodes to have support 24 and 32 bpp
Line -... Line 222...
-
 
222
        jb      @f
222
        jb      @f
223
 
223
 
224
; 16 bpp might actually be 15 bpp
224
;        cmp     [es:mi.BitsPerPixel],16
225
        cmp     [es:mi.BitsPerPixel], 16 
225
;        jne     .l0
226
        jne     .l0
226
;        cmp     [es:mi.GreenMaskSize],5
227
        cmp     [es:mi.GreenMaskSize], 5
-
 
228
        jne     .l0
Line 227... Line 229...
227
;        jne     .l0
229
;        mov     [es:mi.BitsPerPixel],15
228
;        mov     [es:mi.BitsPerPixel],15
230
        jmp     @f                         ; 15 bpp isnt supported ATM
229
 
231
 
Line 366... Line 368...
366
        jnz     @f
368
        jnz     @f
367
        cmp     word [es:si+8], 32
369
        cmp     word [es:si+8], 32
368
        je      .ok_found_mode
370
        je      .ok_found_mode
369
        cmp     word [es:si+8], 24
371
        cmp     word [es:si+8], 24
370
        je      .ok_found_mode
372
        je      .ok_found_mode
-
 
373
        cmp     word [es:si+8], 16
-
 
374
        je      .ok_found_mode
371
@@:
375
@@:
372
        add     si, size_of_step
376
        add     si, size_of_step
373
        cmp     word [es:si], -1
377
        cmp     word [es:si], -1
374
        jnz     .findvbemode
378
        jnz     .findvbemode
375
.novbemode:
379
.novbemode:
Line 390... Line 394...
390
;        mov     ax,modes_table
394
;        mov     ax,modes_table
391
;        mov     word [cursor_pos],ax
395
;        mov     word [cursor_pos],ax
392
;        mov     word [home_cursor],ax
396
;        mov     word [home_cursor],ax
393
;        mov     word [preboot_graph],ax
397
;        mov     word [preboot_graph],ax
394
;SET default video of mode first probe will fined a move of work 1024x768@32
398
;SET default video of mode first probe will fined a move of work 1024x768@32
-
 
399
        mov     cx, 32
395
 
400
  .find_mode:
396
        mov     ax, 1024
401
        mov     ax, 1024
397
        mov     bx, 768
402
        mov     bx, 768
398
        mov     si, modes_table
403
        mov     si, modes_table
399
        call    .loops
404
        call    .loops
400
        test    ax, ax
405
        test    ax, ax
Line 409... Line 414...
409
        mov     bx, 480
414
        mov     bx, 480
410
        mov     si, modes_table
415
        mov     si, modes_table
411
        call    .loops
416
        call    .loops
412
        test    ax, ax
417
        test    ax, ax
413
        jz      .ok_found_mode
418
        jz      .ok_found_mode
-
 
419
        sub     cx, 8
-
 
420
        jnz     .find_mode
Line 414... Line 421...
414
 
421
 
415
        mov     si, modes_table
422
        mov     si, modes_table
416
if ~ defined extended_primary_loader
423
if ~ defined extended_primary_loader
Line 472... Line 479...
472
.loops:
479
.loops:
473
        cmp     ax, word [es:si]
480
        cmp     ax, word [es:si]
474
        jne     .next
481
        jne     .next
475
        cmp     bx, word [es:si+2]
482
        cmp     bx, word [es:si+2]
476
        jne     .next
483
        jne     .next
477
        cmp     word [es:si+8], 32
484
        cmp     cx, word [es:si+8]
478
        je      .ok
485
        jne     .next
479
        cmp     word [es:si+8], 24
486
        xor     ax, ax
480
        je      .ok
487
        ret
481
.next:
488
.next:
482
        add     si, size_of_step
489
        add     si, size_of_step
483
        cmp     word [es:si], -1
490
        cmp     word [es:si], -1
484
        je      .exit
491
        je      .exit
485
        jmp     .loops
492
        jmp     .loops
486
.ok:
-
 
487
        xor     ax, ax
-
 
488
        ret
-
 
489
.exit:
493
.exit:
490
        or      ax, -1
494
        or      ax, -1
491
        ret
495
        ret