18,29 → 18,6 |
$Revision$ |
|
|
TRIDENT equ 0 |
S3_VIDEO equ 0 |
INTEL_VIDEO equ 0 |
|
if TRIDENT |
if S3_VIDEO or INTEL_VIDEO |
stop |
end if |
end if |
|
if S3_VIDEO |
if TRIDENT or INTEL_VIDEO |
stop |
end if |
end if |
|
if INTEL_VIDEO |
if S3_VIDEO or TRIDENT |
stop |
end if |
end if |
|
|
; A complete video driver should include the following types of function |
; |
; Putpixel |
58,35 → 35,28 |
;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
; set_bank for Trident videocards, work on Trident 9440 |
; modified by Mario79 |
;set_bank: |
;cli |
;cmp al,[BANK_RW] |
;je retsb |
;mov [BANK_RW],al |
;push dx |
;mov dx,3D8h |
;out dx,al |
;pop dx |
;retsb: |
;sti |
;ret |
|
if TRIDENT |
set_bank: |
pushfd |
cli |
cmp al,[BANK_RW] |
je .retsb |
|
mov [BANK_RW],al |
push dx |
mov dx,3D8h |
out dx,al |
pop dx |
.retsb: |
popfd |
ret |
end if |
|
;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
; set_bank for S3 videocards, work on S3 ViRGE PCI (325) |
; modified by kmeaw |
|
if S3_VIDEO |
set_bank: |
pushfd |
cli |
cmp al,[BANK_RW] |
je .retsb |
|
je retsb |
mov [BANK_RW],al |
push ax |
push dx |
156,90 → 126,77 |
pop cx |
pop dx |
pop ax |
.retsb: |
retsb: |
popfd |
ret |
end if |
|
;Set bank function for Intel 810/815 chipsets |
; *****Modified by Protopopius, Russia.***** |
; ********* http://menuetos.hut.ru ************** |
; ************************************************ |
; |
;set_bank: |
;cli |
;cmp al,[BANK_RW] |
;je retsb |
;mov [BANK_RW],al |
;push ax |
;push dx |
;mov dx,3CEh |
;mov ah,al ; Save value for later use |
;mov al,10h ; Index GR10 (Address Mapping) |
;out dx,al ; Select GR10 |
;inc dl |
;mov al,3 ; Set bits 0 and 1 (Enable linear page mapping) |
;out dx,al ; Write value |
;dec dl |
;mov al,11h ; Index GR11 (Page Selector) |
;out dx,al ; Select GR11 |
;inc dl |
;mov al,ah ; Write address |
;out dx,al ; Write the value |
;pop dx |
;pop ax |
;retsb: |
;sti |
;ret |
|
if INTEL_VIDEO |
|
set_bank: |
pushfd |
cli |
|
cmp al,[BANK_RW] |
je .retsb |
|
mov [BANK_RW],al |
push ax |
push dx |
mov dx,3CEh |
mov ah,al ; Save value for later use |
mov al,10h ; Index GR10 (Address Mapping) |
out dx,al ; Select GR10 |
inc dl |
mov al,3 ; Set bits 0 and 1 (Enable linear page mapping) |
out dx,al ; Write value |
dec dl |
mov al,11h ; Index GR11 (Page Selector) |
out dx,al ; Select GR11 |
inc dl |
mov al,ah ; Write address |
out dx,al ; Write the value |
pop dx |
pop ax |
.retsb: |
popfd |
ret |
end if |
|
;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!} |
|
if (TRIDENT or S3_VIDEO or INTEL_VIDEO) |
else |
set_bank: |
pushfd |
cli |
;set_bank: |
; cli |
; cmp al,[BANK_RW] |
; je retsb |
; mov [BANK_RW],al |
; push ax |
; push dx |
; mov ah,al |
; mov dx,0x03D4 |
; mov al,0x39 |
; out dx,al |
; inc dl |
; mov al,0xA5 |
; out dx,al |
; dec dl |
; mov al,6Ah |
; out dx,al |
; inc dl |
; mov al,ah |
; out dx,al |
; dec dl |
; mov al,0x39 |
; out dx,al |
; inc dl |
; mov al,0x5A |
; out dx,al |
; dec dl |
; pop dx |
; pop ax |
; |
; retsb: |
; ret |
|
cmp al,[BANK_RW] |
je .retsb |
|
mov [BANK_RW],al |
push ax |
push dx |
mov ah,al |
mov dx,0x03D4 |
mov al,0x39 |
out dx,al |
inc dl |
mov al,0xA5 |
out dx,al |
dec dl |
mov al,6Ah |
out dx,al |
inc dl |
mov al,ah |
out dx,al |
dec dl |
mov al,0x39 |
out dx,al |
inc dl |
mov al,0x5A |
out dx,al |
dec dl |
pop dx |
pop ax |
|
.retsb: |
popfd |
ret |
end if |
|
vesa12_drawbackground: |
|
call [disable_mouse] |
333,7 → 290,8 |
mov ebx,edi |
mul ebx |
add eax, esi |
lea eax, [VGABasePtr+eax+esi*2] |
add eax,esi |
add eax,esi |
cmp [ScreenBPP],byte 24 |
jz v12bgl3 |
add eax,esi |
343,7 → 301,7 |
push ebx |
push eax |
|
sub eax,VGABasePtr |
sub eax,[LFBAddress] |
|
shr eax,16 |
call set_bank |
414,7 → 372,7 |
|
dbpi2412: |
|
add eax,VGABasePtr |
add eax,[LFBAddress] |
mov edi,eax |
|
; x size |
491,7 → 449,7 |
|
xor edx,edx |
mov eax,edi |
sub eax,VGABasePtr |
sub eax,[LFBAddress] |
mov ebx,3 |
div ebx |
add eax,WinMapAddress |
514,7 → 472,7 |
|
push edi |
mov eax,edi |
sub eax,VGABasePtr |
sub eax,[LFBAddress] |
shr eax,16 |
call set_bank |
and edi,0xffff |
583,7 → 541,7 |
push ecx |
|
mov eax,edi |
sub eax,VGABasePtr |
sub eax,[LFBAddress] |
shr eax,2 |
add eax,WinMapAddress |
mov ebx,[CURRENT_TASK] |
605,7 → 563,7 |
|
push edi |
mov eax,edi |
sub eax,VGABasePtr |
sub eax,[LFBAddress] |
shr eax,16 |
call set_bank |
and edi,0xffff |
780,7 → 738,7 |
|
pi2412: |
|
add eax,VGABasePtr |
add eax,[LFBAddress] |
mov edi,eax |
|
; x size |
827,7 → 785,7 |
push ebx |
|
mov edx,edi |
sub edx,VGABasePtr |
sub edx,[LFBAddress] |
mov ebx,3 |
div ebx |
add edx,WinMapAddress |
851,7 → 809,7 |
push edi |
push eax |
mov eax,edi |
sub eax,VGABasePtr |
sub eax,[LFBAddress] |
shr eax,16 |
call set_bank |
pop eax |
897,7 → 855,7 |
push ebx |
|
mov edx,edi |
sub edx,VGABasePtr |
sub edx,[LFBAddress] |
shr edx,2 |
add edx,WinMapAddress |
mov ebx,[CURRENT_TASK] |
920,7 → 878,7 |
push edi |
push eax |
mov eax,edi |
sub eax,VGABasePtr |
sub eax,[LFBAddress] |
shr eax,16 |
call set_bank |
pop eax |