OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 6:11 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: VESA Programming
PostPosted: Sun Aug 25, 2002 6:18 am 
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.


Top
  
 
 Post subject: Re:VESA Programming
PostPosted: Mon Aug 26, 2002 4:15 pm 
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.


Top
  
 
 Post subject: Re:VESA Programming
PostPosted: Mon Aug 26, 2002 5:29 pm 
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.


Top
  
 
 Post subject: Re:VESA Programming
PostPosted: Tue Aug 27, 2002 4:23 am 
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/archive/mp/f99/mp5/tutorial.html"

3. VESA coding examples (works in real and/or protected mode):

http://www.monstersoft.com/download/vesa1.zip

Take care. Hope that helps!


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 73 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group