VGA mode 0x13 in pmode

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
HOS

VGA mode 0x13 in pmode

Post by HOS »

Hello,

without using the BIOS routines are their ports to write to or some other method to switch between 80x25 character mode and VGA graphics mode 0x13?

thanks
Dreamsmith

Re:VGA mode 0x13 in pmode

Post by Dreamsmith »

You can always switch from any one video mode to any other without using the BIOS. However, what I/O ports and/or memory mapped I/O locations you need to access will vary from card to card. If you have a Virtual-8086 monitor, you can log which I/O ports and such are being accessed by the BIOS to enable a particular video mode. OTOH, if you have a Virtual-8086 monitor, you don't need to bother...

That having been said, the good old-fashioned VGA video modes can usually be enabled in a fairly standard manner, due to backwards compatibility concerns with most video card makers. You might want to check here: http://my.execpc.com/~geezer/osd/graphics/modes.c
HOS

Re:VGA mode 0x13 in pmode

Post by HOS »

OK thank you, that looks like it will do what i want to do... i tried searching for a vga specification - does such a thing exist? something that says what each byte going to each port does? or is it better to mimic and not ask questions?
User avatar
Colonel Kernel
Member
Member
Posts: 1437
Joined: Tue Oct 17, 2006 6:06 pm
Location: Vancouver, BC, Canada
Contact:

Re:VGA mode 0x13 in pmode

Post by Colonel Kernel »

This is a pretty good reference:

http://osdev.neopages.net/FreeVGA/vga/vga.htm

Unfortunately, it doesn't have anything like a "how-to" on mode switching (I've been looking for the same thing recently). But with the above reference, it ought to be possible to figure out what the sample code is doing... hopefully...
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!
User avatar
bubach
Member
Member
Posts: 1223
Joined: Sat Oct 23, 2004 11:00 pm
Location: Sweden
Contact:

Re:VGA mode 0x13 in pmode

Post by bubach »

"Simplicity is the ultimate sophistication."
http://bos.asmhackers.net/ - GitHub
Post Reply