[SOLVED] Trio64V+ Hardware Accelerator / LFP
Posted: Wed Jul 08, 2015 10:56 am
So; I started my this endeavor about two weeks ago in protected mode, and accelerating standard VGA mode 640x480x8 was not working too well - plus I wanted a higher resolution.
I have been using Grub to boot my OS, but its lack for VBE support frustrated me - either because the real hardware does not support LFP by default VBE spec or because I had no clue what I was doing.
So I decided to tackle my "long dreaded" bootloader, so far I am in (un)real mode in the stage two loader (way incomplete)
I can now use 1024x768x16, unfortunately at this resolution I am double imaging, while at 640x480x16 the image displays perfectly.
The only reference I can find on this card is (Com)Buster's user article "Trio64 Hardware"
Is there a register that controls the height of the resolution that I am unaware of?
and as always code:
In the above:
640x480x16 VBEMode = 0x0111 & VBEWidth = 640
1024x768x16 VBEMode = 0x0117 & VBEWidth = 1024
I have been using Grub to boot my OS, but its lack for VBE support frustrated me - either because the real hardware does not support LFP by default VBE spec or because I had no clue what I was doing.
So I decided to tackle my "long dreaded" bootloader, so far I am in (un)real mode in the stage two loader (way incomplete)
I can now use 1024x768x16, unfortunately at this resolution I am double imaging, while at 640x480x16 the image displays perfectly.
The only reference I can find on this card is (Com)Buster's user article "Trio64 Hardware"
Is there a register that controls the height of the resolution that I am unaware of?
and as always code:
Code: Select all
mov ax, 0x4F02
mov bx, WORD [VBEMode]
int 0x10
cmp al, 0x4F
jne ERROR_STUB
test ah, ah
jz ERROR_STUB
push dx
push ax
mov dx, 0x3C4
mov al, 0x08
out dx, al
inc dx
mov al, 0x06
out dx, al
mov dx, 0x3D4
mov al, 0x38
out dx, al
inc dx
mov al, 0x48
out dx, al
dec dx
mov al, 0x39
out dx, al
inc dx
mov al, 0xA5
out dx, al
dec dx
mov al, 0x33
out dx, al
inc dx
mov al, 0x48
out dx, al
in al, dx
dec dx
push ax
mov al, 0x33
out dx, al
pop ax
inc dx
and al, 0xAD
out dx, al
mov dx, 0x4AE8
mov ax, 1
out dx, ax
mov dx, 0x3D4
mov al, 0x31
out dx, al
inc dx
in al, dx
push ax
dec dx
mov al, 0x31
out dx, al
pop ax
or al, 9
inc dx
out dx, al
dec dx
mov al, 0x58
out dx, al
inc dx
in al, dx
push ax
dec dx
mov al, 0x58
out dx, al
pop ax
inc dx
or al, 0x13
out dx, al
dec dx
mov al, 0x13
out dx, al
inc dx
mov ax, WORD [VBEWidth]
shr ax, 2 ; Multiply by 2 (this takes 2 bytes per pix) Divide by 8 (or just divide by 4)
out dx, ax
pop ax
pop dx
640x480x16 VBEMode = 0x0111 & VBEWidth = 640
1024x768x16 VBEMode = 0x0117 & VBEWidth = 1024