1 /* 2 * PROJECT: ReactOS VGA Miniport Driver 3 * LICENSE: Microsoft NT4 DDK Sample Code License 4 * PURPOSE: Command Code Definitions for VGA Command Streams 5 * PROGRAMMERS: Copyright (c) 1992 Microsoft Corporation 6 */ 7 8 #pragma once 9 10 //-------------------------------------------------------------------------- 11 // Definition of the set/clear mode command language. 12 // 13 // Each command is composed of a major portion and a minor portion. 14 // The major portion of a command can be found in the most significant 15 // nibble of a command byte, while the minor portion is in the least 16 // significant portion of a command byte. 17 // 18 // maj minor Description 19 // ---- ----- -------------------------------------------- 20 // 00 End of data 21 // 22 // 10 in and out type commands as described by flags 23 // flags: 24 // 25 // xxxx 26 // |||| 27 // |||+-------- unused 28 // ||+--------- 0/1 single/multiple values to output (in's are always 29 // |+---------- 0/1 8/16 bit operation single) 30 // +----------- 0/1 out/in instruction 31 // 32 // Outs 33 // ---------------------------------------------- 34 // 0 reg:W val:B 35 // 2 reg:W cnt:W val1:B val2:B...valN:B 36 // 4 reg:W val:W 37 // 6 reg:W cnt:W val1:W val2:W...valN:W 38 // 39 // Ins 40 // ---------------------------------------------- 41 // 8 reg:W 42 // a reg:W cnt:W 43 // c reg:W 44 // e reg:W cnt:W 45 // 46 // 20 Special purpose outs 47 // 00 do indexed outs for seq, crtc, and gdc 48 // indexreg:W cnt:B startindex:B val1:B val2:B...valN:B 49 // 01 do indexed outs for atc 50 // index-data_reg:W cnt:B startindex:B val1:B val2:B...valN:B 51 // 02 do masked outs 52 // indexreg:W andmask:B xormask:B 53 // 54 // F0 Nop 55 // 56 //--------------------------------------------------------------------------- 57 58 // some useful equates - major commands 59 60 #define EOD 0x000 // end of data 61 #define INOUT 0x010 // do ins or outs 62 #define METAOUT 0x020 // do special types of outs 63 #define NCMD 0x0f0 // Nop command 64 65 66 // flags for INOUT major command 67 68 //#define UNUSED 0x01 // reserved 69 #define MULTI 0x02 // multiple or single outs 70 #define BW 0x04 // byte/word size of operation 71 #define IO 0x08 // out/in instruction 72 73 // minor commands for METAOUT 74 75 #define INDXOUT 0x00 // do indexed outs 76 #define ATCOUT 0x01 // do indexed outs for atc 77 #define MASKOUT 0x02 // do masked outs using and-xor masks 78 79 80 // composite INOUT type commands 81 82 #define OB (INOUT) // output 8 bit value 83 #define OBM (INOUT+MULTI) // output multiple bytes 84 #define OW (INOUT+BW) // output single word value 85 #define OWM (INOUT+BW+MULTI) // output multiple words 86 87 #define IB (INOUT+IO) // input byte 88 #define IBM (INOUT+IO+MULTI) // input multiple bytes 89 #define IW (INOUT+IO+BW) // input word 90 #define IWM (INOUT+IO+BW+MULTI) // input multiple words 91 92 /* EOF */ 93