home *** CD-ROM | disk | FTP | other *** search
- Ever wondered how to set up your own video
- mode without going through the video bios
- interrupt 0x10, service 0x00?
-
- Here's two files that basically tell you
- what VGA registers need to be programmed
- to establish a 256 colour video mode on a
- VGA register level compatible video card,
- and a small piece of code from my graphics
- device driver for Linux which can save the
- current mode, or initialise a new one.
-
- GUIDE.set is a step by step guide which
- documents what has to be sent to what part
- of the VGA, when, in order to establish a
- 256 colour video mode.
-
- GUIDE.get is a step by step guide which
- documents which registers need to be
- preserved in order to restore a current
- video mode.
-
- mode.c contains two C routines,
- vga_mode_set() and vga_mode_get() which
- perform the above operations.
-
- vga.h contains some constants used by
- mode.c, and a struct definition for my
- vgamode_t type.
-
- vgamodes.h contains two sample vgamode_t
- structs, one for the BIOS mode 0x13, and
- another for the standard 320x200x256
- unchained video mode. Obviously, if you
- wanted different video modes, this is the
- file to add them to; I'm too lazy to flesh
- out the funky mode X variants out there,
- but basically you'd just take a mode X
- setting routine, and using the mode 0x13
- parameter block as a template, you'd
- pre-cook the sequencer registers etc that
- needed cooking.
-
- Enjoy, and drop me a line if you find this
- stuff useful/buggy as hell :)
-
- --
- Simon (sjm@it.com.au)
-
- strength through elegance /// beauty in intelligence
-