Subversion Repositories Kolibri OS

Rev

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

Rev 2384 Rev 2407
Line 67... Line 67...
67
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
67
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 68... Line 68...
68
 
68
 
69
include 'macros.inc'
69
include 'macros.inc'
Line 70... Line 70...
70
include 'struct.inc'
70
include 'struct.inc'
Line 71... Line 71...
71
 
71
 
Line 72... Line 72...
72
$Revision: 2384 $
72
$Revision: 2407 $
Line 386... Line 386...
386
        dec     eax
386
        dec     eax
387
        mov     [Screen_Max_Y], eax
387
        mov     [Screen_Max_Y], eax
388
        mov     [screen_workarea.bottom], eax
388
        mov     [screen_workarea.bottom], eax
389
        movzx   eax, word [BOOT_VAR+0x9008]; screen mode
389
        movzx   eax, word [BOOT_VAR+0x9008]; screen mode
390
        mov     [SCR_MODE], eax
390
        mov     [SCR_MODE], eax
391
        mov     eax, [BOOT_VAR+0x9014]    ; Vesa 1.2 bnk sw add
391
;        mov     eax, [BOOT_VAR+0x9014]    ; Vesa 1.2 bnk sw add
392
        mov     [BANK_SWITCH], eax
392
;        mov     [BANK_SWITCH], eax
393
        mov     [BytesPerScanLine], word 640*4      ; Bytes PerScanLine
393
        mov     [BytesPerScanLine], word 640*4      ; Bytes PerScanLine
394
        cmp     [SCR_MODE], word 0x13       ; 320x200
394
        cmp     [SCR_MODE], word 0x13       ; 320x200
395
        je      @f
395
        je      @f
396
        cmp     [SCR_MODE], word 0x12       ; VGA 640x480
396
        cmp     [SCR_MODE], word 0x12       ; VGA 640x480
397
        je      @f
397
        je      @f
Line 415... Line 415...
415
        mov     eax, [BOOT_VAR+0x9018]
415
        mov     eax, [BOOT_VAR+0x9018]
416
        mov     [LFBAddress], eax
416
        mov     [LFBAddress], eax
Line 417... Line 417...
417
 
417
 
418
        cmp     [SCR_MODE], word 0100000000000000b
418
        cmp     [SCR_MODE], word 0100000000000000b
419
        jge     setvesa20
419
        jge     setvesa20
420
        cmp     [SCR_MODE], word 0x13
420
        cmp     [SCR_MODE], word 0x13  ; EGA 320*200 256 colors
421
        je      v20ga32
-
 
422
        mov     [PUTPIXEL], dword Vesa12_putpixel24 ; Vesa 1.2
-
 
423
        mov     [GETPIXEL], dword Vesa12_getpixel24
-
 
424
        cmp     [ScreenBPP], byte 24
-
 
425
        jz      ga24
-
 
426
        mov     [PUTPIXEL], dword Vesa12_putpixel32
-
 
427
        mov     [GETPIXEL], dword Vesa12_getpixel32
-
 
428
      ga24:
421
        je      v20ga32
-
 
422
        jmp     v20ga24
-
 
423
;        mov     [PUTPIXEL], dword Vesa12_putpixel24 ; Vesa 1.2
-
 
424
;        mov     [GETPIXEL], dword Vesa12_getpixel24
-
 
425
;        cmp     [ScreenBPP], byte 24
-
 
426
;        jz      ga24
-
 
427
;        mov     [PUTPIXEL], dword Vesa12_putpixel32
-
 
428
;        mov     [GETPIXEL], dword Vesa12_getpixel32
-
 
429
;      ga24:
429
        jmp     v20ga24
430
;        jmp     v20ga24
430
      setvesa20:
431
setvesa20:
431
        mov     [PUTPIXEL], dword Vesa20_putpixel24 ; Vesa 2.0
432
        mov     [PUTPIXEL], dword Vesa20_putpixel24 ; Vesa 2.0
432
        mov     [GETPIXEL], dword Vesa20_getpixel24
433
        mov     [GETPIXEL], dword Vesa20_getpixel24
433
        cmp     [ScreenBPP], byte 24
434
        cmp     [ScreenBPP], byte 24
434
        jz      v20ga24
435
        jz      v20ga24
435
      v20ga32:
436
v20ga32:
436
        mov     [PUTPIXEL], dword Vesa20_putpixel32
437
        mov     [PUTPIXEL], dword Vesa20_putpixel32
-
 
438
        mov     [GETPIXEL], dword Vesa20_getpixel32
437
        mov     [GETPIXEL], dword Vesa20_getpixel32
439
        jmp     no_mode_0x12
438
      v20ga24:
440
v20ga24:
439
        cmp     [SCR_MODE], word 0x12               ; 16 C VGA 640x480
441
        cmp     [SCR_MODE], word 0x12               ; 16 C VGA 640x480
440
        jne     no_mode_0x12
442
        jne     no_mode_0x12
441
        mov     [PUTPIXEL], dword VGA_putpixel
443
        mov     [PUTPIXEL], dword VGA_putpixel
Line 3638... Line 3640...
3638
 
3640
 
3639
 
3641
 
3640
align 4
3642
align 4
3641
drawbackground:
3643
drawbackground:
3642
        inc     [mouse_pause]
3644
        inc     [mouse_pause]
3643
        cmp     [SCR_MODE], word 0x12
3645
;        cmp     [SCR_MODE], word 0x12
3644
        je      dbrv20
3646
;        je      dbrv20
3645
     dbrv12:
3647
;     dbrv12:
3646
        cmp     [SCR_MODE], word 0100000000000000b
3648
;        cmp     [SCR_MODE], word 0100000000000000b
3647
        jge     dbrv20
3649
;        jge     dbrv20
3648
        cmp     [SCR_MODE], word 0x13
3650
;        cmp     [SCR_MODE], word 0x13
3649
        je      dbrv20
3651
;        je      dbrv20
3650
        call    vesa12_drawbackground
3652
;        call    vesa12_drawbackground
3651
        dec     [mouse_pause]
3653
;        dec     [mouse_pause]
3652
        call    [draw_pointer]
3654
;        call    [draw_pointer]
3653
        ret
3655
;        ret
3654
     dbrv20:
3656
     dbrv20:
3655
        cmp     [BgrDrawMode], dword 1
3657
        cmp     [BgrDrawMode], dword 1
3656
        jne     bgrstr
3658
        jne     bgrstr
Line 3687... Line 3689...
3687
        mov     ebp, putimage_get24bpp
3689
        mov     ebp, putimage_get24bpp
3688
        mov     esi, putimage_init24bpp
3690
        mov     esi, putimage_init24bpp
3689
sys_putimage_bpp:
3691
sys_putimage_bpp:
3690
;        call    [disable_mouse] ; this will be done in xxx_putimage
3692
;        call    [disable_mouse] ; this will be done in xxx_putimage
3691
;        mov     eax, vga_putimage
3693
;        mov     eax, vga_putimage
3692
        cmp     [SCR_MODE], word 0x12
3694
;        cmp     [SCR_MODE], word 0x12
3693
        jz      @f   ;.doit
3695
;        jz      @f   ;.doit
3694
        mov     eax, vesa12_putimage
3696
;        mov     eax, vesa12_putimage
3695
        cmp     [SCR_MODE], word 0100000000000000b
3697
;        cmp     [SCR_MODE], word 0100000000000000b
3696
        jae     @f
3698
;        jae     @f
3697
        cmp     [SCR_MODE], word 0x13
3699
;        cmp     [SCR_MODE], word 0x13
3698
        jnz     .doit
3700
;        jnz     .doit
3699
@@:
3701
;@@:
3700
        mov     eax, vesa20_putimage
3702
        mov     eax, vesa20_putimage
3701
.doit:
3703
.doit:
3702
        inc     [mouse_pause]
3704
        inc     [mouse_pause]
3703
        call    eax
3705
        call    eax
3704
        dec     [mouse_pause]
3706
        dec     [mouse_pause]
Line 3979... Line 3981...
3979
        add     ebx, [esi+APPDATA.wnd_clientbox.top]
3981
        add     ebx, [esi+APPDATA.wnd_clientbox.top]
3980
        add     edx, [esi+APPDATA.wnd_clientbox.top]
3982
        add     edx, [esi+APPDATA.wnd_clientbox.top]
3981
  .forced:
3983
  .forced:
3982
        inc     [mouse_pause]
3984
        inc     [mouse_pause]
3983
;        call    [disable_mouse]
3985
;        call    [disable_mouse]
3984
        cmp     [SCR_MODE], word 0x12
3986
;        cmp     [SCR_MODE], word 0x12
3985
        je      dbv20
3987
;        je      dbv20
3986
   sdbv20:
3988
;   sdbv20:
3987
        cmp     [SCR_MODE], word 0100000000000000b
3989
;        cmp     [SCR_MODE], word 0100000000000000b
3988
        jge     dbv20
3990
;        jge     dbv20
3989
        cmp     [SCR_MODE], word 0x13
3991
;        cmp     [SCR_MODE], word 0x13
3990
        je      dbv20
3992
;        je      dbv20
3991
        call    vesa12_drawbar
3993
;        call    vesa12_drawbar
3992
        dec     [mouse_pause]
3994
;        dec     [mouse_pause]
3993
        call    [draw_pointer]
3995
;        call    [draw_pointer]
3994
        ret
3996
;        ret
3995
  dbv20:
3997
;  dbv20:
3996
        call    vesa20_drawbar
3998
        call    vesa20_drawbar
3997
        dec     [mouse_pause]
3999
        dec     [mouse_pause]
3998
        call    [draw_pointer]
4000
        call    [draw_pointer]
3999
        ret
4001
        ret