Subversion Repositories Kolibri OS

Rev

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

Rev 129 Rev 384
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 362... Line 362...
362
    push edi
362
    push edi
363
    push eax
363
    push eax
364
    push ebx
364
    push ebx
365
    push ecx
365
    push ecx
366
    push edx
366
    push edx
367
    mov  ecx,[0x3010]
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 400... Line 400...
400
 
400
 
Line 401... Line 401...
401
    ; check limits ?
401
    ; check limits ?
402
 
402
 
403
    push eax
403
    push eax
404
    push ecx
404
    push ecx
405
    mov  eax,[0x3010]
405
    mov  eax,[TASK_BASE]
406
    mov  ecx,[eax+draw_data-0x3000+RECT.left]
406
    mov  ecx,[eax+draw_data-CURRENT_TASK+RECT.left]
407
    cmp  ecx,0
407
    cmp  ecx,0
408
    jnz  dbcblimitlset12
408
    jnz  dbcblimitlset12
409
    mov  ecx,[eax+draw_data-0x3000+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-0x3000+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-0x3000+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
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,[0x3000]
465
      mov   ebx,[CURRENT_TASK]
Line 466... Line 466...
466
      cld
466
      cld
Line 467... Line 467...
467
 
467
 
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,[0x3000]
556
      mov   ebx,[CURRENT_TASK]
Line 557... Line 557...
557
      cld
557
      cld
Line 558... Line 558...
558
 
558
 
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 706... Line 706...
706
 
706
 
-
 
707
        ret
-
 
708
 
-
 
709
 
-
 
710
 
-
 
711
vesa12_putimage:
-
 
712
; ebx = pointer to image
Line 707... Line 713...
707
        ret
713
; ecx = size [x|y]
708
 
714
; edx = coordinates [x|y]
709
 
715
; ebp = pointer to 'get' function
Line 723... Line 729...
723
    push  ebx
729
    push  ebx
724
    push  ecx
730
    push  ecx
725
    push  edx
731
    push  edx
726
    movzx eax,word [esp+2]
732
    movzx eax,word [esp+2]
727
    movzx ebx,word [esp+0]
733
    movzx ebx,word [esp+0]
728
    mov   ecx,[0x3010]
734
    mov   ecx,[TASK_BASE]
729
    add   eax,[ecx-twdw+WDATA.box.left]
735
    add   eax,[ecx-twdw+WDATA.box.left]
730
    add   ebx,[ecx-twdw+WDATA.box.top]
736
    add   ebx,[ecx-twdw+WDATA.box.top]
731
    push  eax
737
    push  eax
732
    mov   eax,ebx         ; y
738
    mov   eax,ebx         ; y
733
    mov   ebx,[0xfe08]
739
    mul   dword [BytesPerScanLine]
734
    mul   ebx
-
 
735
    pop   ecx
740
    pop   ecx
736
    add   eax,ecx         ; x
741
    add   eax,ecx         ; x
737
    add   eax,ecx
742
    add   eax,ecx
738
    add   eax,ecx
743
    add   eax,ecx
739
    cmp  [0xfbf1],byte 24     ; 24 or 32 bpp ? - x start
744
    cmp  [ScreenBPP],byte 24     ; 24 or 32 bpp ? - x start
740
    jz   pi2412
745
    jz   pi2412
741
    add  eax,ecx
746
    add  eax,ecx
Line 742... Line 747...
742
 
747
 
Line 743... Line 748...
743
  pi2412:
748
  pi2412:
744
 
749
 
Line 745... Line 750...
745
    add  eax,[0xfe80]
750
    add  eax,[LFBAddress]
Line 746... Line 751...
746
    mov  edi,eax
751
    mov  edi,eax
747
 
-
 
748
    ; x size
-
 
749
 
-
 
750
    movzx eax,word [esp+6]
-
 
751
    mov   ecx,eax
-
 
752
    add   ecx,eax
-
 
753
    add   ecx,eax
-
 
754
    cmp   [0xfbf1],byte 24     ; 24 or 32 bpp ? - x size
-
 
Line 755... Line 752...
755
    jz    pi24312
752
 
756
    add   ecx,eax
753
    ; x size
Line 757... Line 754...
757
 
754
 
Line 758... Line -...
758
  pi24312:
-
 
759
 
755
    movzx ecx,word [esp+6]
760
    mov   esi,[esp+8]
756
 
761
    movzx ebx,word [esp+4]
757
    mov   esi,[esp+8]
762
 
-
 
763
    ; check limits while draw ?
758
    movzx ebx,word [esp+4]
764
 
759
 
765
    push  eax
-
 
766
    push  ecx
760
    ; check limits while draw ?
767
    mov  eax,[0x3010]
761
 
768
    mov  ecx,[eax+draw_data-0x3000+RECT.left]
762
    push  ecx
769
    cmp  ecx,0
763
    mov  eax,[TASK_BASE]
770
    jnz  dbcblimitlset212
764
    cmp  dword [eax+draw_data-CURRENT_TASK+RECT.left], 0
771
    mov  ecx,[eax+draw_data-0x3000+RECT.top]
765
    jnz  dbcblimitlset212
772
    cmp  ecx,0
766
    cmp  dword [eax+draw_data-CURRENT_TASK+RECT.top], 0
773
    jnz  dbcblimitlset212
767
    jnz  dbcblimitlset212
774
    mov  ecx,[eax+draw_data-0x3000+RECT.right]
-
 
775
    cmp  ecx,[0xfe00]
768
    mov  ecx,[eax+draw_data-CURRENT_TASK+RECT.right]
776
    jnz  dbcblimitlset212
769
    cmp  ecx,[ScreenWidth]
Line 777... Line 770...
777
    mov  ecx,[eax+draw_data-0x3000+RECT.bottom]
770
    jnz  dbcblimitlset212
Line 778... Line 771...
778
    cmp  ecx,[0xfe04]
771
    mov  ecx,[eax+draw_data-CURRENT_TASK+RECT.bottom]
779
    jnz  dbcblimitlset212
-
 
780
    pop  ecx
772
    cmp  ecx,[ScreenHeight]
Line 781... Line 773...
781
    pop  eax
773
    jnz  dbcblimitlset212
Line 782... Line 774...
782
    push dword 0
774
    pop  ecx
783
    jmp  dbcblimitlno212
-
 
784
 
775
    push 0
Line 785... Line 776...
785
  dbcblimitlset212:
776
    jmp  dbcblimitlno212
Line 786... Line -...
786
 
-
 
787
    pop  ecx
-
 
788
    pop  eax
-
 
789
    push dword 1
-
 
790
 
-
 
791
  dbcblimitlno212:
-
 
792
 
-
 
793
    cmp  [0xfbf1],byte 24     ; 24 or 32 bpp ?
-
 
794
    jz   pi24bit12
-
 
795
    jmp  pi32bit12
-
 
796
 
-
 
797
  pi24bit12:
-
 
798
 
-
 
799
    cld
777
 
Line 800... Line 778...
800
    push  eax
778
  dbcblimitlset212:
801
    push  ebx
-
 
802
    push  edx
779
 
803
    xor   edx,edx
780
    pop  ecx
Line 804... Line -...
804
    mov   eax,ecx
-
 
805
    mov   ebx,3
781
    push 1
806
    div   ebx
782
 
807
    mov   ecx,eax
783
  dbcblimitlno212:
808
    pop   edx
784
 
809
    pop   ebx
785
    cmp  [ScreenBPP],byte 24     ; 24 or 32 bpp ?
810
    pop   eax
786
    jnz  pi32bit12
811
 
787
 
Line 812... Line 788...
812
  newpi12:
788
  pi24bit12:
Line 813... Line 789...
813
 
789
 
814
    push edi
790
  newpi12:
815
    push esi
791
 
-
 
792
    push edi
-
 
793
    push ecx
816
    push ecx
794
    push ebx
817
    push ebx
795
 
818
 
796
      mov  edx,edi
819
      xor  edx,edx
797
      sub  edx,[LFBAddress]
Line 820... Line 798...
820
      mov  eax,edi
798
      mov  ebx,3
Line 821... Line -...
821
      sub  eax,[0xfe80]
-
 
822
      mov  ebx,3
799
      div  ebx
-
 
800
      add  edx,WinMapAddress
823
      div  ebx
801
      mov  ebx,[CURRENT_TASK]
824
      add  eax,WinMapAddress
802
      mov  bh,[esp+4*3]
825
      mov  ebx,[0x3000]
803
 
826
      mov  bh,[esp+4*4]
804
      np2412:
-
 
805
 
827
 
806
        cmp  bl,[edx]
828
      np2412:
807
        jnz  imp24no12
829
 
808
;        mov  eax,[esi]
830
        cmp  bl,[eax]
809
        push    dword [esp+4*3+20]
831
        jnz  imp24no12
810
        call    ebp
832
        mov  edx,[esi]
-
 
833
        cmp  bh,0
811
;        cmp  bh,0
834
        jz   imp24yes12
-
 
Line 835... Line 812...
835
;        call dbcplimit
812
;        jz   imp24yes12
Line 836... Line 813...
836
;        jnz  imp24no12
813
;        call dbcplimit
837
 
814
;        jnz  imp24no12
838
     imp24yes12:
815
 
839
 
816
     imp24yes12:
840
        push eax
817
 
Line 841... Line 818...
841
        push edi
818
        push edi
Line 842... Line 819...
842
        mov  eax,edi
819
        push eax
843
        sub  eax,[0xfe80]
820
        mov  eax,edi
844
        shr  eax,16
-
 
845
        call set_bank
821
        sub  eax,[LFBAddress]
Line 846... Line 822...
846
        and  edi,0xffff
822
        shr  eax,16
847
        add  edi,0xa0000
-
 
848
        mov  [edi],edx
-
 
849
        shr  edx,2
-
 
850
        mov  [edi+2],dl
823
        call set_bank
851
        sti
824
        pop  eax
852
        pop  edi
-
 
853
        pop  eax
825
        and  edi,0xffff
Line 854... Line 826...
854
 
826
        add  edi,VGABasePtr
Line 855... Line 827...
855
     imp24no12:
827
        mov  [edi],ax
856
 
828
        shr  eax,16
857
        inc  eax
829
        mov  [edi+2],al
Line 858... Line 830...
858
        add  esi,3
830
        pop  edi
Line 859... Line -...
859
        add  edi,3
-
 
860
        dec  ecx
-
 
861
        jnz  np2412
-
 
862
 
831
 
Line 863... Line 832...
863
      np24d12:
832
     imp24no12:
864
 
-
 
865
     pop  ebx
833
 
866
     pop  ecx
834
        inc  edx
Line 867... Line 835...
867
     pop  esi
835
;        add  esi,3
868
     pop  edi
836
        add  edi,3
869
 
837
        dec  ecx
870
    add  edi,[0xfe08]
838
        jnz  np2412
871
    xor  eax,eax
839
 
872
    mov  ax,[esp+4+2+4]
840
      np24d12:
Line 873... Line 841...
873
    lea  eax,[eax+eax*2]
841
 
Line 874... Line 842...
874
    add  esi,eax
842
     pop  ebx
875
    dec  ebx
843
     pop  ecx
876
    jz   nonewpi12
844
     pop  edi
-
 
845
 
-
 
846
    add  edi,[BytesPerScanLine]
877
    jmp  newpi12
847
    add  esi,[esp+32]
878
 
848
    dec  ebx
879
  nonewpi12:
849
    jnz  newpi12
880
 
850
 
Line 881... Line 851...
881
    add  esp,7*4
851
  nonewpi12:
Line 882... Line -...
882
    mov  eax,0
-
 
883
    ret
852
 
-
 
853
        pop     eax edx ecx ebx eax edi esi
884
 
854
        xor     eax, eax
885
 
855
        ret
886
  pi32bit12:
856
 
887
 
857
 
-
 
858
  pi32bit12:
888
    cld
859
 
889
    shr  ecx,2
-
 
890
 
860
   newpi3212:
891
   newpi3212:
-
 
892
 
861
 
893
    push edi
-
 
Line 894... Line 862...
894
    push esi
862
    push edi
Line 895... Line 863...
895
    push ecx
863
    push ecx
896
    push ebx
864
    push ebx
897
 
865
 
898
      mov  eax,edi
866
      mov  edx,edi
899
      sub  eax,[0xfe80]
867
      sub  edx,[LFBAddress]
Line 900... Line 868...
900
      shr  eax,2
868
      shr  edx,2
Line 901... Line 869...
901
      add  eax,WinMapAddress
869
      add  edx,WinMapAddress
902
      mov   ebx,[0x3000]
870
      mov   ebx,[CURRENT_TASK]
903
      mov   bh,[esp+4*4]
-
 
904
 
871
      mov   bh,[esp+4*3]
Line 905... Line 872...
905
      np3212:
872
 
906
 
-
 
907
        cmp  bl,[eax]
-
 
908
        jnz  imp32no12
-
 
909
        mov  edx,[esi]
873
      np3212:
910
        cmp  bh,0
-
 
911
        jz   imp32yes12
874
 
Line 912... Line 875...
912
;        call dbcplimit
875
        cmp  bl,[edx]
Line 913... Line 876...
913
;        jnz  imp32no12
876
        jnz  imp32no12
914
 
877
;        mov  eax,[esi]
915
      imp32yes12:
878
        push    dword [esp+4*3+20]
Line 916... Line 879...
916
 
879
        call    ebp
Line 917... Line 880...
917
        push eax
880
;        cmp  bh,0
918
        push edi
881
;        jz   imp32yes12
919
        mov  eax,edi
882
;        call dbcplimit
920
        sub  eax,[0xfe80]
883
;        jnz  imp32no12
921
        shr  eax,16
884
 
922
        call set_bank
885
      imp32yes12:
923
        and  edi,0xffff
886
 
924
        add  edi,0xa0000
887
        push edi
925
        mov  [edi],edx
888
        push eax
926
        sti
889
        mov  eax,edi
927
        pop  edi
890
        sub  eax,[LFBAddress]
928
        pop  eax
891
        shr  eax,16
929
 
892
        call set_bank
930
      imp32no12:
893
        pop  eax
Line 931... Line 894...
931
 
894
        and  edi,0xffff
932
        inc  eax
895
        mov  [edi+VGABasePtr],eax
933
        add  esi,3
896
        pop  edi
934
        add  edi,4
897
 
935
        dec  ecx
898
      imp32no12:
936
        jnz  np3212
899
 
937
 
900
        inc  edx
938
      np32d12:
901
;        add  esi,3
939
 
902
        add  edi,4