Graphics in long mode

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
zyp

Graphics in long mode

Post by zyp »

I'm just wondering, isn't there a sensible way to do graphics in long mode, since V8086 mode aren't aviable?
This goes for protected mode aswell, isn't it a standard way to do graphics without dropping to realmode or using V8086?
The graphics-system shouldn't need any special support from the kernel, like dropping from long to protected mode.
AR

Re:Graphics in long mode

Post by AR »

No it doesn't need special support by dropping back to real mode, it's just we hoobyists have trouble getting nVidia and ATi to provide drivers for our OS'. Proper drivers will manipulate the IO Address space and memory mapped registers directly, if you would rather not write a driver for every card then you'll most likely have to at least drop back to 32bit protected mode to use V8086. Someone else will know more though.

Sanik also has a mini-emulator for realmode code that you might be able to find by searching the forums.
zyp

Re:Graphics in long mode

Post by zyp »

Can it emulate real mode bios calls then? If not, the point of using real mode for real mode bios calls are gone.
Or if it's possible to emulate real mode bios calls, then you don't need an emulator, it should be enough to implement the emulation of the bios call.
AR

Re:Graphics in long mode

Post by AR »

I'm not exactly sure what you are talking about. Sanik's program is like Bochs, it emulates the CPU state and parses the instructions except that when it accesses IO ports they fall through onto the real IO ports. (At least that's what I got from the topic)

If you are referring to emulating the VESA BIOS by writing something that does the same thing, the VESA BIOS is onboard the Video card and is different for every card.
mystran

Re:Graphics in long mode

Post by mystran »

zyp wrote: Can it emulate real mode bios calls then? If not, the point of using real mode for real mode bios calls are gone.
Or if it's possible to emulate real mode bios calls, then you don't need an emulator, it should be enough to implement the emulation of the bios call.
If I'm not mistaken, Sanik's emulator is specifically aimed at supporting sufficient subset of the realmode to run the BIOS calls.
viral

Re:Graphics in long mode

Post by viral »

I dont know will this help to you.... but u should see it... its modes.c file which can init graphics in different vga modes.
srg_13

Re:Graphics in long mode

Post by srg_13 »

If you are using C, you can try this

It can change to an int 13h graphics mode without using the BIOS.

-Stephen
mystran

Re:Graphics in long mode

Post by mystran »

The VM86 mode most definitely isn't about VGA-class modes. Switching to those (as long as you have VGA-compatible videocard) is easy, and documented in about ten thousand places around the net.

Even many oldschool intros/demos did that directly, because they wanted access to so called "modeX" (which there are several) which BIOS wouldn't provide for them.

The whole problem with drivers started when people wanted to get bigger resolutions that VGA could provide. So the VBE standard was born, that defines the BIOS interfaces that a video card must provide. So basicly, the video-card would have a small amount of ROM (the VGA-BIOS) which would work as a basic driver. The only problem being, that the whole stuff works in realmode.

The other thing that happened was Microsoft Windows, and so people won't care (other than us hobbyists) that the VBE standard still sucks.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Graphics in long mode

Post by Pype.Clicker »

well, there still exists the "SNAP" alternative from SciTech, but i don't know too much how free it makes you. Iirc, they at least use some COM/OLE stuff ... don't know too much about licensing, either.
Post Reply