Where the mapped Video Memory goes?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
Masterkiller
Member
Member
Posts: 153
Joined: Sat May 05, 2007 6:20 pm

Where the mapped Video Memory goes?

Post by Masterkiller »

I am trying to make some graphic modes on my OS, but it appears that changing to VESA video mode moves the mapped video memory to another address, because actually nothing is displayed to the screen. I have tried A0000h and B8000h location for Video memory, but writing thee do nothing. I've tried mode 118h (VESA BIOS Set Video Mode function 4F02h - INT 10h), and according to calculation I need 3MB of linear framebuffer (1024x768x32) and it is obvious that 1MB real-mode memory cannot map this. Also it seems that changing to VESA video mode is device dependent (it writes to ports for enabling S3 Extension ports). Is there general way for going to VESA Video Mode from real or protected mode, without writing a driver? And how I can locate where Video Memory is mapped? :roll:
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

Frequently asked question. Ask the bios for the address of the framebuffer. Get the VBE3 specification if you don't know how that works.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Post Reply