Hi,
alberinfo wrote:
i've made a way to draw through VGA set by the io ports(Yes, I know your recommendations for not setting a video mode through io ports, but I think I'm still at a very early stage of development to start writing specific drivers)which works fine.the max resolution that i can get is 640x480x16, which is not the best, but it's fine.i've seen that theres a horizontal table and a vertical table for the video modes, so i was thinking, can i write another table(in the repo ar tbl_hor(or ver for vertical res)_gra(or txt for text modes)and then the number of pixels), so i can use 800x600x16?
In theory you can misconfigure a VGA controller to get a 800x600x16 video mode. The problem is that pixel clock isn't fast enough to match any standard/established video timing (it'd be something like "800x600x16 at 47 frames per second") so most monitors won't support it because they won't recognise the video timing.
Note that the slowest standard/established video timing would be "800x600 at 56 Hz (non-interlaced)"; and this video timing needs a 36 MHz pixel clock (VGA only has 28.322 MHz). You'd also need to get the horizontal and vertical sync pulse polarities right (both positive not both negative like you'd use for 640*480) and make sure all the other timing (front porch width, sync pulse width, back porch width; for both horizontal and vertical timing) is correct.
To set up a faster pixel clock (to get an 800x600 video mode timing the monitor is more likely to recognise) you need to use "non-standard, non-VGA", and that means you'd need a native driver for each specific video card.
You should also understand that there's "safe mode timings" that all monitors are supposed to support (which includes the "640*480 at 60 Hz" timing that VGA provides); and everything else is optional and may not be supported by the monitor. For this reason, if you're not using a safe mode timing, then you should ask the monitor what it supports (by obtaining and parsing its EDID) before attempting to set a (potentially unsupported) video mode.
Cheers,
Brendan