Massimo Dentico wrote:
Jeff Garzik wrote:
Massimo Dentico wrote:
Sorry for the delay. No distractions this time, only assembly code for swithing video modes. ;-) This work, at least for me. Obviously, I'm not writing BIOS usually :o) .. so, I don't know if it lacks something for functioning as part of firmware.
Thanks for posting code, unfortunately this code does not call the VGA BIOS to initialize the video card -- this code directly programs the VGA registers to switch modes, just like vga16fb in the Linux kernel.
BIOS init must have already executed in order for this code to work.
Ops .. an error due to my scarce knowledge of PC hardware and this phrase on the Linux BIOS home page: ".. simple VGA capability up WITHOUT a VGA BIOS ..". So, is there an absolutely necessary initialization phase that precede the setting of a video mode? To switch a video mode requires the setting of dozens of registers .. I hope that the init phase isn't so complicated.
The init phase is not complicated at all -- when your computer is booted, one of the first things it does is run the video BIOS. The video BIOS is the only place which contains the information necessary to set up VGA compatibility. The video BIOS must, for example, program chipset-specific registers before it may access framebuffer memory.
Once all that initialization is complete, you can access the video card in one of two ways -- indirectly, by issuing BIOS calls, or directly, by programming the VGA and/or extended registers built into the video chip. vesafb in the Linux kernel is an example of using BIOS calls. vga16fb is an example of directly programming the VGA registers.
Sorry again, my intention was only to help.
no problem at all... all contributions, especially ones with code included, are valuable
Jeff