00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #define MEM_VGA 0xA0000
00034 #define MEM_VGA_SIZE 0x20000
00035
00036
00037
00038
00039
00040
00041 #define VGA_MEMORY 2
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055 #define VGA_BASE_IO_PORT 0x000003B0
00056 #define VGA_START_BREAK_PORT 0x000003BB
00057 #define VGA_END_BREAK_PORT 0x000003C0
00058 #define VGA_MAX_IO_PORT 0x000003DF
00059
00060
00061
00062
00063
00064 #define CRTC_ADDRESS_PORT_MONO 0x0004 // CRT Controller Address and
00065 #define CRTC_DATA_PORT_MONO 0x0005 // Data registers in mono mode
00066 #define FEAT_CTRL_WRITE_PORT_MONO 0x000A // Feature Control write port
00067
00068 #define INPUT_STATUS_1_MONO 0x000A // Input Status 1 register read
00069
00070 #define ATT_INITIALIZE_PORT_MONO INPUT_STATUS_1_MONO
00071
00072
00073
00074 #define ATT_ADDRESS_PORT 0x0010 // Attribute Controller Address and
00075 #define ATT_DATA_WRITE_PORT 0x0010 // Data registers share one port
00076
00077
00078 #define ATT_DATA_READ_PORT 0x0011 // Attribute Controller Data reg is
00079
00080 #define MISC_OUTPUT_REG_WRITE_PORT 0x0012 // Miscellaneous Output reg write
00081
00082 #define INPUT_STATUS_0_PORT 0x0012 // Input Status 0 register read
00083
00084 #define VIDEO_SUBSYSTEM_ENABLE_PORT 0x0013 // Bit 0 enables/disables the
00085
00086 #define SEQ_ADDRESS_PORT 0x0014 // Sequence Controller Address and
00087 #define SEQ_DATA_PORT 0x0015 // Data registers
00088 #define DAC_PIXEL_MASK_PORT 0x0016 // DAC pixel mask reg
00089 #define DAC_ADDRESS_READ_PORT 0x0017 // DAC register read index reg,
00090
00091 #define DAC_STATE_PORT 0x0017 // DAC state (read/write),
00092
00093 #define DAC_ADDRESS_WRITE_PORT 0x0018 // DAC register write index reg
00094 #define DAC_DATA_REG_PORT 0x0019 // DAC data transfer reg
00095 #define FEAT_CTRL_READ_PORT 0x001A // Feature Control read port
00096 #define MISC_OUTPUT_REG_READ_PORT 0x001C // Miscellaneous Output reg read
00097
00098 #define GRAPH_ADDRESS_PORT 0x001E // Graphics Controller Address
00099 #define GRAPH_DATA_PORT 0x001F // and Data registers
00100
00101 #define CRTC_ADDRESS_PORT_COLOR 0x0024 // CRT Controller Address and
00102 #define CRTC_DATA_PORT_COLOR 0x0025 // Data registers in color mode
00103 #define FEAT_CTRL_WRITE_PORT_COLOR 0x002A // Feature Control write port
00104 #define INPUT_STATUS_1_COLOR 0x002A // Input Status 1 register read
00105
00106 #define ATT_INITIALIZE_PORT_COLOR INPUT_STATUS_1_COLOR
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116 #define IND_CURSOR_START 0x0A // index in CRTC of the Cursor Start
00117 #define IND_CURSOR_END 0x0B // and End registers
00118 #define IND_CURSOR_HIGH_LOC 0x0E // index in CRTC of the Cursor Location
00119 #define IND_CURSOR_LOW_LOC 0x0F // High and Low Registers
00120 #define IND_VSYNC_END 0x11 // index in CRTC of the Vertical Sync
00121
00122
00123
00124 #define IND_SET_RESET_ENABLE 0x01 // index of Set/Reset Enable reg in GC
00125 #define IND_DATA_ROTATE 0x03 // index of Data Rotate reg in GC
00126 #define IND_READ_MAP 0x04 // index of Read Map reg in Graph Ctlr
00127 #define IND_GRAPH_MODE 0x05 // index of Mode reg in Graph Ctlr
00128 #define IND_GRAPH_MISC 0x06 // index of Misc reg in Graph Ctlr
00129 #define IND_BIT_MASK 0x08 // index of Bit Mask reg in Graph Ctlr
00130 #define IND_SYNC_RESET 0x00 // index of Sync Reset reg in Seq
00131 #define IND_MAP_MASK 0x02 // index of Map Mask in Sequencer
00132 #define IND_MEMORY_MODE 0x04 // index of Memory Mode reg in Seq
00133 #define IND_CRTC_PROTECT 0x11 // index of reg containing regs 0-7 in
00134
00135 #define IND_START_ADRS_H 0x0C // index in CRTC of Start Address (high)
00136 #define IND_START_ADRS_L 0x0D // index in CRTC of Start Address (low)
00137 #define IND_LINE_COMPARE 0x18 // index in CRTC of Line Compare (bit7-0)
00138 #define IND_LINE_COMPARE8 0x07 // index in CRTC of Line Compare (bit8)
00139 #define IND_LINE_COMPARE9 0x09 // index in CRTC of Line Compare (bit9)
00140 #define IND_SET_RESET 0x00 // index of Set/Reset Plane Color Register in Graph Ctrl
00141 #define IND_COLOR_DONT_CARE 0x07 // index of Color Don't Care Register in Graph Ctrl
00142
00143 #define START_SYNC_RESET_VALUE 0x01 // value for Sync Reset reg to start
00144
00145 #define END_SYNC_RESET_VALUE 0x03 // value for Sync Reset reg to end
00146
00147
00148
00149
00150
00151
00152
00153 #define VIDEO_DISABLE 0
00154 #define VIDEO_ENABLE 0x20
00155
00156
00157
00158
00159
00160
00161
00162 #define READ_MAP_TEST_SETTING 0x03
00163
00164
00165
00166
00167
00168
00169
00170
00171 #define GRAPH_ADDR_MASK 0x0F
00172 #define SEQ_ADDR_MASK 0x07
00173
00174
00175
00176
00177 #define DR_ROT_CNT 0x07 // Data Rotate Count
00178 #define DR_SET 0x00 // Data Unmodified
00179 #define DR_AND 0x08 // Data ANDed with latches
00180 #define DR_OR 0x10 // Data ORed with latches
00181 #define DR_XOR 0x18 // Data XORed with latches
00182
00183
00184
00185
00186 #define M_PROC_WRITE 0x00 // Write processor data rotated
00187 #define M_LATCH_WRITE 0x01 // Write latched data
00188 #define M_COLOR_WRITE 0x02 // Write processor data as color
00189 #define M_AND_WRITE 0x03 // Write (procdata AND bitmask)
00190 #define M_DATA_READ 0x00 // Read selected plane
00191 #define M_COLOR_READ 0x08 // Read color compare
00192
00193
00194
00195
00196
00197 #define CHAIN4_MASK 0x08
00198
00199
00200
00201
00202
00203
00204 #define MEMORY_MODE_TEXT_DEFAULT 0x02
00205 #define BIT_MASK_DEFAULT 0xFF
00206 #define READ_MAP_DEFAULT 0x00
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216 #define VIDEO_MAX_COLOR_REGISTER 0xFF
00217
00218
00219
00220
00221
00222 #define VIDEO_MAX_PALETTE_REGISTER 0x0F
00223