Octocontrabass wrote:
YDeeps1 wrote:
I'm attempting to implement and make use of V86 mode to use the bios for easy switching of graphics and resolutions.
Modern PCs have UEFI and GOP, so v86 mode won't help you there.
Slightly older PCs have a BIOS that assumes you'll run a 64-bit version of Windows, and 64-bit Windows never uses v86 mode, so the BIOS code may not run correctly in v86 mode.
Have your bootloader set the graphics mode instead. How often do you expect users of your OS to change the resolution, anyway?
Sounds strange but I want to switch to and from text mode and graphics mode as per my design for now instead of implementing fonts and position tracking (for now).
I did have some luck doing so via interacting with the VGA hardware with IO ports following
http://files.osdev.org/mirrors/geezer/o ... cs/modes.c .
I was able to setup switching to and from text mode however I was only able to get 320x200x256 (oddly enough I was only able to use 64 colours, after the 63rd colour it all just came out as black pixels) working; and to implement any decently looking and sized text/images I'd need a higher resolution with at least 256 colours.
I was trying to use the BIOS in hopes of achieving a better resolution and better colour range.
If all else fails I will probably get the BIOS to set the resolution and colour depth for me and proceed by implementing my own fonts to mimic the VGA text mode.
I also realised I fell into the trap of the XY problem.