Thanks.

Your choices are:osmiumusa wrote:Sorry. I'm used to refering to SVGA as Vesa.
You can not use VESA VBE from C. It's a real mode assembly interface. I see Brendan gave a fully rephrased version of the FAQ page on the subject, but most likely you want to either use GRUB to do the dirty work of setting a video mode, or not use VBE and write a VGA driver: they are the fastest way to get into a working graphics mode.osmiumusa wrote:I'd like to know how to use VESA in C.
If you want to stick with using C, either add support for v86 tasks and use VBE, or find the specification for your video card and build an implementation to support it. Sorry, but it doesnt get much simpler, and both solutions require a bit of support code.osmiumusa wrote:OK. So then from C, in simplest terms, how do I set a SVGA mode and print a pixel - using GCC inline assembly or otherwise. I've gotten basic IN/OUT functions on my OS to work.But I'd like to move into graphics.
This is NOT entirely true Combuster, the VBE setup is required to be in RM assembly yes, but, once you have it initialized, and have a pointer the the video memory, C is not unrealistic to use.Combuster wrote:You can not use VESA VBE from C. It's a real mode assembly interface. I see Brendan gave a fully rephrased version of the FAQ page on the subject, but most likely you want to either use GRUB to do the dirty work of setting a video mode, or not use VBE and write a VGA driver: they are the fastest way to get into a working graphics mode.osmiumusa wrote:I'd like to know how to use VESA in C.
V8086 (hardware) and software emulation are by general consensus the best way into a VESA mode, but they are also more elaborate and therefore much more demanding on the rest of your system, and my crystal ball suggests you're not quite there yet. And at the far end, writing a plethora of graphics drivers is pretty much reserved for the nutcases like yours truly
< This is how i do it aswell, my bootloader handles the RM VBE interface. But since i run in longmode... switching to PM then to V86 is a real pain. So the reboot option works well.Setup a video mode during boot (e.g. before you switch to protected mode or long mode). If the user wants to switch video modes after boot then they either need a native video driver or they need to reboot.
You are implying that modifying the video memory using C is equal to using the VESA VBE interface.iLewis wrote:This is NOT entirely true Combuster, the VBE setup is required to be in RM assembly yes, but, once you have it initialized, and have a pointer the the video memory, C is not unrealistic to use.Combuster wrote:You can not use VESA VBE from C. It's a real mode assembly interface. I see Brendan gave a fully rephrased version of the FAQ page on the subject, but most likely you want to either use GRUB to do the dirty work of setting a video mode, or not use VBE and write a VGA driver: they are the fastest way to get into a working graphics mode.osmiumusa wrote:I'd like to know how to use VESA in C.
V8086 (hardware) and software emulation are by general consensus the best way into a VESA mode, but they are also more elaborate and therefore much more demanding on the rest of your system, and my crystal ball suggests you're not quite there yet. And at the far end, writing a plethora of graphics drivers is pretty much reserved for the nutcases like yours truly
Not to mention that the above is only true for modes that support a LFB. If not you would still need to use the VBE interface from within your C code.StephanVanSchaik wrote:You are implying that modifying the video memory using C is equal to using the VESA VBE interface.iLewis wrote:This is NOT entirely true Combuster, the VBE setup is required to be in RM assembly yes, but, once you have it initialized, and have a pointer the the video memory, C is not unrealistic to use.
Yes you are correct, that is my mistake. I need to remember not everyone lives in the future...neon wrote:Not to mention that the above is only true for modes that support a LFB. If not you would still need to use the VBE interface from within your C code.StephanVanSchaik wrote:You are implying that modifying the video memory using C is equal to using the VESA VBE interface.iLewis wrote:This is NOT entirely true Combuster, the VBE setup is required to be in RM assembly yes, but, once you have it initialized, and have a pointer the the video memory, C is not unrealistic to use.