Subversion Repositories Kolibri OS

Rev

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

Rev 379 Rev 381
Line 30... Line 30...
30
;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
30
;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
31
; set_bank for Trident videocards, work on Trident 9440
31
; set_bank for Trident videocards, work on Trident 9440
32
; modified by Mario79
32
; modified by Mario79
33
;set_bank:
33
;set_bank:
34
;cli
34
;cli
35
;cmp al,[0xfff2]
35
;cmp al,[BANK_RW]
36
;je retsb
36
;je retsb
37
;mov [0xfff2],al
37
;mov [BANK_RW],al
38
;push dx
38
;push dx
39
;mov dx,3D8h
39
;mov dx,3D8h
40
;out  dx,al
40
;out  dx,al
41
;pop dx
41
;pop dx
42
;retsb:
42
;retsb:
Line 48... Line 48...
48
; set_bank for S3 videocards, work on S3 ViRGE PCI (325)
48
; set_bank for S3 videocards, work on S3 ViRGE PCI (325)
49
; modified by kmeaw
49
; modified by kmeaw
50
set_bank:
50
set_bank:
51
pushfd
51
pushfd
52
cli
52
cli
53
cmp al,[0xfff2]
53
cmp al,[BANK_RW]
54
je retsb
54
je retsb
55
mov [0xfff2],al
55
mov [BANK_RW],al
56
push ax
56
push ax
57
push dx
57
push dx
58
push cx
58
push cx
59
mov cl, al
59
mov cl, al
60
mov dx, 0x3D4
60
mov dx, 0x3D4
Line 130... Line 130...
130
; ********* http://menuetos.hut.ru **************
130
; ********* http://menuetos.hut.ru **************
131
; ************************************************
131
; ************************************************
132
;
132
;
133
;set_bank:
133
;set_bank:
134
;cli
134
;cli
135
;cmp al,[0xfff2]
135
;cmp al,[BANK_RW]
136
;je retsb
136
;je retsb
137
;mov [0xfff2],al
137
;mov [BANK_RW],al
138
;push ax
138
;push ax
139
;push dx
139
;push dx
140
;mov dx,3CEh
140
;mov dx,3CEh
141
;mov ah,al            ; Save value for later use
141
;mov ah,al            ; Save value for later use
142
;mov al,10h           ; Index GR10 (Address Mapping)
142
;mov al,10h           ; Index GR10 (Address Mapping)
Line 158... Line 158...
158
 
158
 
Line 159... Line 159...
159
;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!}
159
;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!}
160
 
160
 
161
;set_bank:
161
;set_bank:
162
;   cli
162
;   cli
163
;   cmp al,[0xfff2]
163
;   cmp al,[BANK_RW]
164
;   je retsb
164
;   je retsb
165
;   mov [0xfff2],al
165
;   mov [BANK_RW],al
166
;   push ax
166
;   push ax
167
;   push dx
167
;   push dx
168
;   mov ah,al
168
;   mov ah,al
Line 214... Line 214...
214
 
214
 
Line 215... Line 215...
215
      v12dp3:
215
      v12dp3:
216
 
216
 
217
        push  eax
217
        push  eax
Line 218... Line 218...
218
        push  ebx
218
        push  ebx
219
        mov   esi,0x300000
219
        mov   esi,IMG_BACKGROUND
Line 220... Line 220...
220
 
220
 
Line 245... Line 245...
245
 
245
 
Line 246... Line 246...
246
        push  edx
246
        push  edx
247
 
247
 
248
        imul  eax,dword [WinMapAddress-8]
248
        imul  eax,dword [WinMapAddress-8]
249
        xor   edx,edx
249
        xor   edx,edx
250
        mov   ecx,[0xfe00]
250
        mov   ecx,[ScreenWidth]
Line 251... Line 251...
251
        inc   ecx
251
        inc   ecx
252
        div   ecx
252
        div   ecx
253
 
253
 
254
        push  eax
254
        push  eax
255
        mov   eax,ebx
255
        mov   eax,ebx
256
        imul  eax,dword [WinMapAddress-4]
256
        imul  eax,dword [WinMapAddress-4]
257
        xor   edx,edx
257
        xor   edx,edx
258
        mov   ecx,[0xfe04]
258
        mov   ecx,[ScreenHeight]
259
        inc   ecx
259
        inc   ecx
Line 276... Line 276...
276
        mov   esi,eax
276
        mov   esi,eax
277
        pop   eax
277
        pop   eax
278
        add   esi,eax
278
        add   esi,eax
279
        add   esi,eax
279
        add   esi,eax
280
        add   esi,eax
280
        add   esi,eax
281
        add   esi,0x300000
281
        add   esi,IMG_BACKGROUND
282
        pop   ebx
282
        pop   ebx
283
        pop   eax
283
        pop   eax
Line 284... Line 284...
284
 
284
 
Line 285... Line 285...
285
      v12di4:
285
      v12di4:
286
 
286
 
287
        mov   ecx,[esi]
287
        mov   ecx,[esi]
288
        pusha
288
        pusha
289
        mov   esi,eax
289
        mov   esi,eax
290
        mov   edi,ebx
290
        mov   edi,ebx
291
        mov   eax,[0xfe00]
291
        mov   eax,[ScreenWidth]
292
        add   eax,1
292
        add   eax,1
293
        mul   ebx
293
        mul   ebx
294
        add   eax,esi
294
        add   eax,esi
295
        add   eax,WinMapAddress
295
        add   eax,WinMapAddress
296
        cmp   [eax],byte 1
296
        cmp   [eax],byte 1
297
        jnz   v12nbgp
297
        jnz   v12nbgp
298
        mov   eax,[0xfe08]
298
        mov   eax,[BytesPerScanLine]
299
        mov   ebx,edi
299
        mov   ebx,edi
300
        mul   ebx
300
        mul   ebx
301
        add   eax,esi
301
        add   eax,esi
302
        add   eax,esi
302
        add   eax,esi
303
        add   eax,esi
303
        add   eax,esi
304
        cmp   [0xFBF1],byte 24
304
        cmp   [ScreenBPP],byte 24
Line 305... Line 305...
305
        jz    v12bgl3
305
        jz    v12bgl3
Line 306... Line 306...
306
        add   eax,esi
306
        add   eax,esi
307
 
307
 
Line 308... Line 308...
308
      v12bgl3:
308
      v12bgl3:
Line 309... Line 309...
309
 
309
 
310
        push ebx
310
        push ebx
311
        push eax
311
        push eax
312
 
312
 
313
        sub  eax,[0xfe80]
313
        sub  eax,[LFBAddress]
314
 
314
 
Line 315... Line 315...
315
        shr  eax,16
315
        shr  eax,16
316
        call set_bank
316
        call set_bank
317
        pop  eax
317
        pop  eax
Line 367... Line 367...
367
    mov  ecx,[TASK_BASE]
367
    mov  ecx,[TASK_BASE]
368
    add  eax,[ecx-twdw+WDATA.box.left]
368
    add  eax,[ecx-twdw+WDATA.box.left]
369
    add  ebx,[ecx-twdw+WDATA.box.top]
369
    add  ebx,[ecx-twdw+WDATA.box.top]
370
    push eax
370
    push eax
371
    mov  eax,ebx         ; y
371
    mov  eax,ebx         ; y
372
    mov  ebx,[0xfe08]
372
    mov  ebx,[BytesPerScanLine]
373
    mul  ebx
373
    mul  ebx
374
    pop  ecx
374
    pop  ecx
375
    add  eax,ecx         ; x
375
    add  eax,ecx         ; x
376
    add  eax,ecx
376
    add  eax,ecx
377
    add  eax,ecx
377
    add  eax,ecx
378
    cmp  [0xfbf1],byte 24     ; 24 or 32 bpp ? - x start
378
    cmp  [ScreenBPP],byte 24     ; 24 or 32 bpp ? - x start
379
    jz   dbpi2412
379
    jz   dbpi2412
380
    add  eax,ecx
380
    add  eax,ecx
Line 381... Line 381...
381
 
381
 
Line 382... Line 382...
382
  dbpi2412:
382
  dbpi2412:
383
 
383
 
Line 384... Line 384...
384
    add  eax,[0xfe80]
384
    add  eax,[LFBAddress]
Line 385... Line 385...
385
    mov  edi,eax
385
    mov  edi,eax
386
 
386
 
387
    ; x size
387
    ; x size
388
 
388
 
389
    mov  eax,[esp+4] ; [esp+6]
389
    mov  eax,[esp+4] ; [esp+6]
390
    mov  ecx,eax
390
    mov  ecx,eax
391
    add  ecx,eax
391
    add  ecx,eax
Line 392... Line 392...
392
    add  ecx,eax
392
    add  ecx,eax
Line 408... Line 408...
408
    jnz  dbcblimitlset12
408
    jnz  dbcblimitlset12
409
    mov  ecx,[eax+draw_data-CURRENT_TASK+RECT.top]
409
    mov  ecx,[eax+draw_data-CURRENT_TASK+RECT.top]
410
    cmp  ecx,0
410
    cmp  ecx,0
411
    jnz  dbcblimitlset12
411
    jnz  dbcblimitlset12
412
    mov  ecx,[eax+draw_data-CURRENT_TASK+RECT.right]
412
    mov  ecx,[eax+draw_data-CURRENT_TASK+RECT.right]
413
    cmp  ecx,[0xfe00]
413
    cmp  ecx,[ScreenWidth]
414
    jnz  dbcblimitlset12
414
    jnz  dbcblimitlset12
415
    mov  ecx,[eax+draw_data-CURRENT_TASK+RECT.bottom]
415
    mov  ecx,[eax+draw_data-CURRENT_TASK+RECT.bottom]
416
    cmp  ecx,[0xfe04]
416
    cmp  ecx,[ScreenHeight]
417
    jnz  dbcblimitlset12
417
    jnz  dbcblimitlset12
418
    pop  ecx
418
    pop  ecx
419
    pop  eax
419
    pop  eax
420
    push dword 0
420
    push dword 0
421
    jmp  dbcblimitlno12
421
    jmp  dbcblimitlno12
Line 426... Line 426...
426
    pop  eax
426
    pop  eax
427
    push dword 1
427
    push dword 1
Line 428... Line 428...
428
 
428
 
Line 429... Line 429...
429
  dbcblimitlno12:
429
  dbcblimitlno12:
430
 
430
 
431
    cmp  [0xfbf1],byte 24     ; 24 or 32 bpp ?
431
    cmp  [ScreenBPP],byte 24     ; 24 or 32 bpp ?
Line 432... Line 432...
432
    jz   dbpi24bit12
432
    jz   dbpi24bit12
Line 456... Line 456...
456
    push edi
456
    push edi
457
    push ecx
457
    push ecx
Line 458... Line 458...
458
 
458
 
459
      xor  edx,edx
459
      xor  edx,edx
460
      mov  eax,edi
460
      mov  eax,edi
461
      sub  eax,[0xfe80]
461
      sub  eax,[LFBAddress]
462
      mov  ebx,3
462
      mov  ebx,3
463
      div  ebx
463
      div  ebx
464
      add  eax,WinMapAddress
464
      add  eax,WinMapAddress
465
      mov   ebx,[CURRENT_TASK]
465
      mov   ebx,[CURRENT_TASK]
Line 479... Line 479...
479
 
479
 
Line 480... Line 480...
480
     dbimp24yes12:
480
     dbimp24yes12:
481
 
481
 
482
        push edi
482
        push edi
483
        mov  eax,edi
483
        mov  eax,edi
484
        sub  eax,[0xfe80]
484
        sub  eax,[LFBAddress]
485
        shr  eax,16
485
        shr  eax,16
486
        call set_bank
486
        call set_bank
487
        and  edi,0xffff
487
        and  edi,0xffff
488
        add  edi,0xa0000
488
        add  edi,VGABasePtr
489
        mov  eax,[esp+8+3*4+16+4+4]
489
        mov  eax,[esp+8+3*4+16+4+4]
490
        stosw
490
        stosw
491
        shr  eax,16
491
        shr  eax,16
Line 521... Line 521...
521
      nodbgl2412:
521
      nodbgl2412:
Line 522... Line 522...
522
 
522
 
523
    pop  ecx
523
    pop  ecx
524
    pop  edi
524
    pop  edi
525
    pop  ebx
525
    pop  ebx
526
    add  edi,[0xfe08]
526
    add  edi,[BytesPerScanLine]
527
    dec  ebx
527
    dec  ebx
528
    jz   dbnonewpi12
528
    jz   dbnonewpi12
Line 529... Line 529...
529
    jmp  dbnewpi12
529
    jmp  dbnewpi12
Line 548... Line 548...
548
    push ebx
548
    push ebx
549
    push edi
549
    push edi
550
    push ecx
550
    push ecx
Line 551... Line 551...
551
 
551
 
552
      mov  eax,edi
552
      mov  eax,edi
553
      sub  eax,[0xfe80]
553
      sub  eax,[LFBAddress]
554
      shr  eax,2
554
      shr  eax,2
555
      add  eax,WinMapAddress
555
      add  eax,WinMapAddress
556
      mov   ebx,[CURRENT_TASK]
556
      mov   ebx,[CURRENT_TASK]
Line 570... Line 570...
570
 
570
 
Line 571... Line 571...
571
      dbimp32yes12:
571
      dbimp32yes12:
572
 
572
 
573
        push edi
573
        push edi
574
        mov  eax,edi
574
        mov  eax,edi
575
        sub  eax,[0xfe80]
575
        sub  eax,[LFBAddress]
576
        shr  eax,16
576
        shr  eax,16
577
        call set_bank
577
        call set_bank
578
        and  edi,0xffff
578
        and  edi,0xffff
579
        add  edi,0xa0000
579
        add  edi,VGABasePtr
580
        mov  eax,[esp+8+3*4+16+4+4]
580
        mov  eax,[esp+8+3*4+16+4+4]
581
        stosw
581
        stosw
582
        shr  eax,16
582
        shr  eax,16
Line 613... Line 613...
613
      nodbgl3212:
613
      nodbgl3212:
Line 614... Line 614...
614
 
614
 
615
    pop  ecx
615
    pop  ecx
616
    pop  edi
616
    pop  edi
617
    pop  ebx
617
    pop  ebx
618
    add  edi,[0xfe08]
618
    add  edi,[BytesPerScanLine]
619
    dec  ebx
619
    dec  ebx
620
    jz   nodbnewpi3212
620
    jz   nodbnewpi3212
Line 621... Line 621...
621
    jmp  dbnewpi3212
621
    jmp  dbnewpi3212
Line 629... Line 629...
629
Vesa12_putpixel24:
629
Vesa12_putpixel24:
Line 630... Line 630...
630
 
630
 
631
        mov  edi,eax ; x
631
        mov  edi,eax ; x
632
        mov  eax,ebx ; y
632
        mov  eax,ebx ; y
633
        lea  edi,[edi+edi*2]
633
        lea  edi,[edi+edi*2]
634
        mov  ebx,[0xfe08]
634
        mov  ebx,[BytesPerScanLine]
635
        mul  ebx
635
        mul  ebx
636
        add  edi,eax
636
        add  edi,eax
637
        mov  eax,edi
637
        mov  eax,edi
638
        shr  eax,16
638
        shr  eax,16
639
        call set_bank
639
        call set_bank
640
        and  edi,65535
640
        and  edi,65535
641
        add  edi,0xa0000
641
        add  edi,VGABasePtr
642
        mov  eax,[esp+28]
642
        mov  eax,[esp+28]
643
        stosw
643
        stosw
644
        shr  eax,16
644
        shr  eax,16
645
        mov  [edi],al
645
        mov  [edi],al
Line 651... Line 651...
651
Vesa12_putpixel32:
651
Vesa12_putpixel32:
Line 652... Line 652...
652
 
652
 
653
        mov  edi,eax ; x
653
        mov  edi,eax ; x
654
        mov  eax,ebx ; y
654
        mov  eax,ebx ; y
655
        shl  edi,2
655
        shl  edi,2
656
        mov  ebx,[0xfe08]
656
        mov  ebx,[BytesPerScanLine]
657
        mul  ebx
657
        mul  ebx
658
        add  edi,eax
658
        add  edi,eax
659
        mov  eax,edi
659
        mov  eax,edi
660
        shr  eax,16
660
        shr  eax,16
661
        call set_bank
661
        call set_bank
662
        and  edi,65535
662
        and  edi,65535
663
        add  edi,0xa0000
663
        add  edi,VGABasePtr
664
        mov  ecx,[esp+28]
664
        mov  ecx,[esp+28]
665
        mov  [edi],ecx
665
        mov  [edi],ecx
666
        sti
666
        sti
Line 670... Line 670...
670
Vesa12_getpixel24:
670
Vesa12_getpixel24:
Line 671... Line 671...
671
 
671
 
672
        mov  edi,eax ; x
672
        mov  edi,eax ; x
673
        mov  eax,ebx ; y
673
        mov  eax,ebx ; y
674
        lea  edi,[edi+edi*2]
674
        lea  edi,[edi+edi*2]
675
        mov  ebx,[0xfe08]
675
        mov  ebx,[BytesPerScanLine]
676
        mul  ebx
676
        mul  ebx
677
        add  edi,eax
677
        add  edi,eax
678
        mov  eax,edi
678
        mov  eax,edi
679
        shr  eax,16
679
        shr  eax,16
680
        call set_bank
680
        call set_bank
681
        and  edi,65535
681
        and  edi,65535
682
        add  edi,0xa0000
682
        add  edi,VGABasePtr
683
        mov  ecx,[edi]
683
        mov  ecx,[edi]
684
        and  ecx,255*256*256+255*256+255
684
        and  ecx,255*256*256+255*256+255
685
        sti
685
        sti
Line 689... Line 689...
689
Vesa12_getpixel32:
689
Vesa12_getpixel32:
Line 690... Line 690...
690
 
690
 
691
        mov  edi,eax ; x
691
        mov  edi,eax ; x
692
        mov  eax,ebx ; y
692
        mov  eax,ebx ; y
693
        shl  edi,2
693
        shl  edi,2
694
        mov  ebx,[0xfe08]
694
        mov  ebx,[BytesPerScanLine]
695
        xor  edx,edx
695
        xor  edx,edx
696
        mul  ebx
696
        mul  ebx
697
        add  edi,eax
697
        add  edi,eax
698
        mov  eax,edi
698
        mov  eax,edi
699
        shr  eax,16
699
        shr  eax,16
700
        call set_bank
700
        call set_bank
701
        and  edi,65535
701
        and  edi,65535
702
        add  edi,0xa0000
702
        add  edi,VGABasePtr
703
        mov  ecx,[edi]
703
        mov  ecx,[edi]
704
        and  ecx,255*256*256+255*256+255
704
        and  ecx,255*256*256+255*256+255
Line 705... Line 705...
705
        sti
705
        sti
Line 734... Line 734...
734
    mov   ecx,[TASK_BASE]
734
    mov   ecx,[TASK_BASE]
735
    add   eax,[ecx-twdw+WDATA.box.left]
735
    add   eax,[ecx-twdw+WDATA.box.left]
736
    add   ebx,[ecx-twdw+WDATA.box.top]
736
    add   ebx,[ecx-twdw+WDATA.box.top]
737
    push  eax
737
    push  eax
738
    mov   eax,ebx         ; y
738
    mov   eax,ebx         ; y
739
    mul   dword [0xfe08]
739
    mul   dword [BytesPerScanLine]
740
    pop   ecx
740
    pop   ecx
741
    add   eax,ecx         ; x
741
    add   eax,ecx         ; x
742
    add   eax,ecx
742
    add   eax,ecx
743
    add   eax,ecx
743
    add   eax,ecx
744
    cmp  [0xfbf1],byte 24     ; 24 or 32 bpp ? - x start
744
    cmp  [ScreenBPP],byte 24     ; 24 or 32 bpp ? - x start
745
    jz   pi2412
745
    jz   pi2412
746
    add  eax,ecx
746
    add  eax,ecx
Line 747... Line 747...
747
 
747
 
Line 748... Line 748...
748
  pi2412:
748
  pi2412:
749
 
749
 
Line 750... Line 750...
750
    add  eax,[0xfe80]
750
    add  eax,[LFBAddress]
Line 751... Line 751...
751
    mov  edi,eax
751
    mov  edi,eax
Line 764... Line 764...
764
    cmp  dword [eax+draw_data-CURRENT_TASK+RECT.left], 0
764
    cmp  dword [eax+draw_data-CURRENT_TASK+RECT.left], 0
765
    jnz  dbcblimitlset212
765
    jnz  dbcblimitlset212
766
    cmp  dword [eax+draw_data-CURRENT_TASK+RECT.top], 0
766
    cmp  dword [eax+draw_data-CURRENT_TASK+RECT.top], 0
767
    jnz  dbcblimitlset212
767
    jnz  dbcblimitlset212
768
    mov  ecx,[eax+draw_data-CURRENT_TASK+RECT.right]
768
    mov  ecx,[eax+draw_data-CURRENT_TASK+RECT.right]
769
    cmp  ecx,[0xfe00]
769
    cmp  ecx,[ScreenWidth]
770
    jnz  dbcblimitlset212
770
    jnz  dbcblimitlset212
771
    mov  ecx,[eax+draw_data-CURRENT_TASK+RECT.bottom]
771
    mov  ecx,[eax+draw_data-CURRENT_TASK+RECT.bottom]
772
    cmp  ecx,[0xfe04]
772
    cmp  ecx,[ScreenHeight]
773
    jnz  dbcblimitlset212
773
    jnz  dbcblimitlset212
774
    pop  ecx
774
    pop  ecx
775
    push 0
775
    push 0
776
    jmp  dbcblimitlno212
776
    jmp  dbcblimitlno212
Line 780... Line 780...
780
    pop  ecx
780
    pop  ecx
781
    push 1
781
    push 1
Line 782... Line 782...
782
 
782
 
Line 783... Line 783...
783
  dbcblimitlno212:
783
  dbcblimitlno212:
784
 
784
 
Line 785... Line 785...
785
    cmp  [0xfbf1],byte 24     ; 24 or 32 bpp ?
785
    cmp  [ScreenBPP],byte 24     ; 24 or 32 bpp ?
Line 786... Line 786...
786
    jnz  pi32bit12
786
    jnz  pi32bit12
Line 792... Line 792...
792
    push edi
792
    push edi
793
    push ecx
793
    push ecx
794
    push ebx
794
    push ebx
Line 795... Line 795...
795
 
795
 
796
      mov  edx,edi
796
      mov  edx,edi
797
      sub  edx,[0xfe80]
797
      sub  edx,[LFBAddress]
798
      mov  ebx,3
798
      mov  ebx,3
799
      div  ebx
799
      div  ebx
800
      add  edx,WinMapAddress
800
      add  edx,WinMapAddress
801
      mov  ebx,[CURRENT_TASK]
801
      mov  ebx,[CURRENT_TASK]
Line 816... Line 816...
816
     imp24yes12:
816
     imp24yes12:
Line 817... Line 817...
817
 
817
 
818
        push edi
818
        push edi
819
        push eax
819
        push eax
820
        mov  eax,edi
820
        mov  eax,edi
821
        sub  eax,[0xfe80]
821
        sub  eax,[LFBAddress]
822
        shr  eax,16
822
        shr  eax,16
823
        call set_bank
823
        call set_bank
824
        pop  eax
824
        pop  eax
825
        and  edi,0xffff
825
        and  edi,0xffff
826
        add  edi,0xa0000
826
        add  edi,VGABasePtr
827
        mov  [edi],ax
827
        mov  [edi],ax
828
        shr  eax,16
828
        shr  eax,16
829
        mov  [edi+2],al
829
        mov  [edi+2],al
Line 841... Line 841...
841
 
841
 
842
     pop  ebx
842
     pop  ebx
843
     pop  ecx
843
     pop  ecx
Line 844... Line 844...
844
     pop  edi
844
     pop  edi
845
 
845
 
846
    add  edi,[0xfe08]
846
    add  edi,[BytesPerScanLine]
847
    add  esi,[esp+32]
847
    add  esi,[esp+32]
Line 848... Line 848...
848
    dec  ebx
848
    dec  ebx
Line 862... Line 862...
862
    push edi
862
    push edi
863
    push ecx
863
    push ecx
864
    push ebx
864
    push ebx
Line 865... Line 865...
865
 
865
 
866
      mov  edx,edi
866
      mov  edx,edi
867
      sub  edx,[0xfe80]
867
      sub  edx,[LFBAddress]
868
      shr  edx,2
868
      shr  edx,2
869
      add  edx,WinMapAddress
869
      add  edx,WinMapAddress
870
      mov   ebx,[CURRENT_TASK]
870
      mov   ebx,[CURRENT_TASK]
Line 885... Line 885...
885
      imp32yes12:
885
      imp32yes12:
Line 886... Line 886...
886
 
886
 
887
        push edi
887
        push edi
888
        push eax
888
        push eax
889
        mov  eax,edi
889
        mov  eax,edi
890
        sub  eax,[0xfe80]
890
        sub  eax,[LFBAddress]
891
        shr  eax,16
891
        shr  eax,16
892
        call set_bank
892
        call set_bank
893
        pop  eax
893
        pop  eax
894
        and  edi,0xffff
894
        and  edi,0xffff
895
        mov  [edi+0xa0000],eax
895
        mov  [edi+VGABasePtr],eax
Line 896... Line 896...
896
        pop  edi
896
        pop  edi
Line 897... Line 897...
897
 
897
 
Line 907... Line 907...
907
 
907
 
908
     pop  ebx
908
     pop  ebx
909
     pop  ecx
909
     pop  ecx
Line 910... Line 910...
910
     pop  edi
910
     pop  edi
911
 
911
 
912
    add   edi,[0xfe08]
912
    add   edi,[BytesPerScanLine]
Line 913... Line 913...
913
    dec   ebx
913
    dec   ebx
Line 921... Line 921...
921
 
921
 
Line 922... Line 922...
922
 
922
 
923
vesa12_read_screen_pixel:
923
vesa12_read_screen_pixel:
924
 
924
 
925
     and   eax,0x3FFFFF
925
     and   eax,0x3FFFFF
926
     cmp   [0xfbf1],byte 24      ; 24 or 32 bpp ?
926
     cmp   [ScreenBPP],byte 24      ; 24 or 32 bpp ?
927
     jz    v12rsp24
927
     jz    v12rsp24
928
     mov   edi,eax
928
     mov   edi,eax
929
     shl   edi,2
929
     shl   edi,2
930
     mov   eax,edi
930
     mov   eax,edi
931
     shr   eax,16
931
     shr   eax,16
932
     call  set_bank
932
     call  set_bank
933
     and   edi,65535
933
     and   edi,65535
934
     add   edi,0xa0000
934
     add   edi,VGABasePtr
935
     mov   eax,[edi]
935
     mov   eax,[edi]
Line 936... Line 936...
936
     and   eax,0x00ffffff
936
     and   eax,0x00ffffff
937
     ret
937
     ret
938
  v12rsp24:
938
  v12rsp24:
939
 
939
 
940
     imul  eax,3
940
     imul  eax,3
941
     mov   edi,eax
941
     mov   edi,eax
942
     shr   eax,16
942
     shr   eax,16
943
     call  set_bank
943
     call  set_bank
944
     and   edi,65535
944
     and   edi,65535