Page 1 of 1
VESA Programming
Posted: Sun Aug 25, 2002 6:18 am
by PlayOS
Hey again,
I was wondering if anyone knows of some really good protected mode VESA programming tutorials, specifcally information on direct port access or some way to access the hardware directly.
Also, how do I map the Linear Frame Buffer into Physical Memory.
Thanks.
Re:VESA Programming
Posted: Mon Aug 26, 2002 4:15 pm
by K.J.
There are
NO tutorials availible on using VESA. :'( There are docs, but no tutorials. Docs for VESA can be found here:
http://www.vesa.org/
K.J.
Re:VESA Programming
Posted: Mon Aug 26, 2002 5:29 pm
by Matt
I guess I could kinda write one right here...
This partial example uses vesa in protected mode to give you a function to call (inplace of int 10h and mov ax, bankswitchcommand) to switch video memory banks:
ax = 0x4f0a
bx = 0
int 0x10 ; in real mode!
;In protected mode (psudo code)
pmBuffer = alloc cx bytes in pmode
make memory (pmBuffer) executable/read-only (if need be)
copy real mode memory (es:di) to new buffer (cx bytes long, as above)
bankRoutine = (pmBuffer + pmBuffer->setWindow);
BankRoutine is a void-void function (takes no paramaters, returns no paramaters) so you set the registers like you would for a bank switch then instead of calling int 10h, you call bankRoutine.
I still havn't gotten this code to work yet though ( I need a malloc function in ASM)
Hope you can figgure out how to use it.
Re:VESA Programming
Posted: Tue Aug 27, 2002 4:23 am
by none
Ok, check out these tutorials/examples on VBE and protected mode:
1. High-res high-speed VESA tutorial:
"
http://www.monstersoft.com/tutorial1/"
2. Protected Mode, High Resolution Graphics Tutorial:
"
http://courses.ece.uiuc.edu/ece291/arch ... orial.html"
3. VESA coding examples (works in real and/or protected mode):
http://www.monstersoft.com/download/vesa1.zip
Take care. Hope that helps!