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