Annotation of lucent/sys/src/9/pc/vga.h, revision 1.1

1.1     ! root        1: /*
        !             2:  * Generic VGA registers.
        !             3:  */
        !             4: enum {
        !             5:        MiscW           = 0x03C2,       /* Miscellaneous Output (W) */
        !             6:        MiscR           = 0x03CC,       /* Miscellaneous Output (R) */
        !             7:        Status0         = 0x03C2,       /* Input status 0 (R) */
        !             8:        Status1         = 0x03DA,       /* Input Status 1 (R) */
        !             9:        FeatureR        = 0x03CA,       /* Feature Control (R) */
        !            10:        FeatureW        = 0x03DA,       /* Feature Control (W) */
        !            11: 
        !            12:        Seqx            = 0x03C4,       /* Sequencer Index, Data at Seqx+1 */
        !            13:        Crtx            = 0x03D4,       /* CRT Controller Index, Data at Crtx+1 */
        !            14:        Grx             = 0x03CE,       /* Graphics Controller Index, Data at Grx+1 */
        !            15:        Attrx           = 0x03C0,       /* Attribute Controller Index and Data */
        !            16: 
        !            17:        PaddrW          = 0x03C8,       /* Palette Address Register, write */
        !            18:        Pdata           = 0x03C9,       /* Palette Data Register */
        !            19:        Pixmask         = 0x03C6,       /* Pixel Mask Register */
        !            20:        PaddrR          = 0x03C7,       /* Palette Address Register, read */
        !            21:        Pstatus         = 0x03C7,       /* DAC Status (RO) */
        !            22: 
        !            23:        Pcolours        = 256,          /* Palette */
        !            24:        Pred            = 0,
        !            25:        Pgreen          = 1,
        !            26:        Pblue           = 2,
        !            27: };
        !            28: 
        !            29: #define vgai(port)             inb(port)
        !            30: #define vgao(port, data)       outb(port, data)
        !            31: 
        !            32: extern int vgaxi(long, uchar);
        !            33: extern int vgaxo(long, uchar, uchar);
        !            34: 
        !            35: /*
        !            36:  * Definitions of known VGA controllers.
        !            37:  */
        !            38: typedef struct Vgac Vgac;
        !            39: struct Vgac {
        !            40:        char    *name;
        !            41:        void    (*page)(int);
        !            42: 
        !            43:        Vgac*   link;
        !            44: };
        !            45: 
        !            46: /*
        !            47:  * Definition of known hardware graphics cursors.
        !            48:  */
        !            49: typedef struct Hwgc Hwgc;
        !            50: struct Hwgc {
        !            51:        char*   name;
        !            52:        void    (*enable)(void);
        !            53:        void    (*load)(Cursor*);
        !            54:        int     (*move)(Point);
        !            55:        void    (*disable)(void);
        !            56: 
        !            57:        Hwgc*   link;
        !            58: };
        !            59: 
        !            60: extern void addvgaclink(Vgac*);
        !            61: extern void addhwgclink(Hwgc*);
        !            62: 
        !            63: extern Hwgc *hwgc;
        !            64: 
        !            65: extern Lock palettelock;

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.