Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

871 lines
38 KiB

  1. //*************************************************************************
  2. //** **
  3. //** AMACH.H **
  4. //** **
  5. //** Copyright (c) 1993, ATI Technologies Inc. **
  6. //*************************************************************************
  7. //
  8. // Created from the 68800.H and 68801.H in the Windows NT Group
  9. // as a simple merging of the files so ALL Mach8 and Mach32 defines
  10. // are located in one H file.
  11. //
  12. // Created the 68800.inc file which includes equates, macros, etc
  13. // from the following include files:
  14. // 8514vesa.inc, vga1regs.inc, m32regs.inc, 8514.inc
  15. //
  16. // supplement Defines and values to the 68800 Family.
  17. //
  18. // This is a "C" only file and is NOT derived from any Assembler INC files.
  19. /********************** PolyTron RCS Utilities
  20. $Revision: 1.2 $
  21. $Date: 23 Dec 1994 10:48:28 $
  22. $Author: ASHANMUG $
  23. $Log: S:/source/wnt/ms11/miniport/vcs/amach.h $
  24. *
  25. * Rev 1.2 23 Dec 1994 10:48:28 ASHANMUG
  26. * ALPHA/Chrontel-DAC
  27. *
  28. * Rev 1.1 20 May 1994 13:55:52 RWOLFF
  29. * Ajith's change: removed unused register SRC_CMP_COLOR from enumeration.
  30. *
  31. * Rev 1.0 31 Jan 1994 11:26:18 RWOLFF
  32. * Initial revision.
  33. *
  34. * Rev 1.4 14 Jan 1994 15:15:30 RWOLFF
  35. * Added offsets of VGA registers from start of VGA_BASE_IO_PORT and
  36. * VGA_END_BREAK_PORT blocks, definition for bit in MISC_OPTIONS to
  37. * enable block write.
  38. *
  39. * Rev 1.3 15 Dec 1993 15:23:14 RWOLFF
  40. * Removed EISA configuration registers and (implied) placeholder for
  41. * linear framebuffer from register enumeration.
  42. *
  43. * Rev 1.2 10 Nov 1993 19:20:18 RWOLFF
  44. * Added definitions for DATA_READY bit of GE_STAT (ready to read from
  45. * PIX_TRANS in screen-to-host blit) and READ_WRITE bit of DP_CONFIG (indicates
  46. * whether we are reading from or writing to drawing trajectory).
  47. *
  48. * Rev 1.1 08 Oct 1993 10:58:52 RWOLFF
  49. * Added definitions for bit fields in MISC_OPTIONS and EXT_GE_CONFIG.
  50. *
  51. * Rev 1.0 03 Sep 1993 14:25:54 RWOLFF
  52. * Initial revision.
  53. Rev 1.4 06 Jul 1993 15:53:42 RWOLFF
  54. Added definitions for ATI 68860 and AT&T 491 DACs.
  55. Rev 1.3 07 Jun 1993 12:57:32 BRADES
  56. add EXT_SRC_Y, EXT_CUR_Y for Mach8 512k minimum mode.
  57. add enums for 24 and 32 bpp formats.
  58. Rev 1.2 30 Apr 1993 15:57:06 BRADES
  59. fix DISP_STATUS, SEQ_IND and 1CE registers to use table.
  60. Rev 1.0 14 Apr 1993 15:38:38 BRADES
  61. Initial revision.
  62. Rev 1.6 15 Mar 1993 22:22:12 BRADES
  63. add mode_table.m_screen_pitch for the # pixels on a display line.
  64. Used with Mach8 800 by 600 where pitch is 896.
  65. Rev 1.5 08 Mar 1993 19:58:10 BRADES
  66. added DEC Alpha and update to Build 390. Thsi is from Miniport source.
  67. Rev 1.3 15 Jan 1993 10:19:32 Robert_Wolff
  68. Added definitions for video card type, amount of video memory,
  69. and resolutions supported (formerly in VIDFIND.H).
  70. Rev 1.2 17 Dec 1992 18:09:10 Robert_Wolff
  71. Added definitions for various bits in the CMD and GE_STAT registers.
  72. Definitions originally were in the now-obsolete S3.H for the
  73. engine-only driver.
  74. Rev 1.1 13 Nov 1992 13:29:48 Robert_Wolff
  75. Fixed list of memory types (based on table on p. 9-66 of Programmer's
  76. Guide to the Mach 32 Registers, release 1.2, which swapped 2 types and
  77. omitted the second flavour of 256kx4 VRAM).
  78. Rev 1.0 13 Nov 1992 09:31:02 Chris_Brady
  79. Initial revision.
  80. End of PolyTron RCS section *****************/
  81. #define REVISION 0x0002 // No one should use this
  82. //-------------------------------------------------------------------------
  83. // REGISTER PORT ADDRESSES
  84. //
  85. // PS/2 POS registers
  86. #define SETUP_ID1 0x0100 // Setup Mode Identification (Byte 1)
  87. #define SETUP_ID2 0x0101 // Setup Mode Identification (Byte 2)
  88. #define SETUP_OPT 0x0102 // Setup Mode Option Select
  89. #define ROM_SETUP 0x0103 //
  90. #define SETUP_1 0x0104 //
  91. #define SETUP_2 0x0105 //
  92. // Lowest and highest I/O ports used by the VGAWonder.
  93. #define VGA_BASE_IO_PORT 0x03B0
  94. #define VGA_START_BREAK_PORT 0x03BB
  95. #define VGA_END_BREAK_PORT 0x03C0
  96. #define VGA_MAX_IO_PORT 0x03DF
  97. // Registers used in reading/writing EEPROM
  98. #define IO_SEQ_IND 0x03C4 // Sequencer index register
  99. #define IO_HI_SEQ_ADDR IO_SEQ_IND // word register
  100. #define IO_SEQ_DATA 0x03C5 // Sequencer data register
  101. /*
  102. * Offsets for VGA registers from regVGA_BASE_IO_PORT or
  103. * regVGA_END_BREAK_PORT (depending on which block they're in)
  104. */
  105. #define GENMO_OFFSET 0x0002 /* 0x03C2 */
  106. #define DAC_W_INDEX_OFFSET 0x0008 /* 0x03C8 */
  107. #define DAC_DATA_OFFSET 0x0009 /* 0x03C9 */
  108. #define CRTX_COLOUR_OFFSET 0x0014 /* 0x03D4 */
  109. #define GENS1_COLOUR_OFFSET 0x001A /* 0x03DA */
  110. // define registers in IO space
  111. #define IO_DAC_MASK 0x02EA // DAC Mask
  112. #define IO_DAC_R_INDEX 0x02EB // DAC Read Index
  113. #define IO_DAC_W_INDEX 0x02EC // DAC Write Index
  114. #define IO_DAC_DATA 0x02ED // DAC Data
  115. #define IO_DISP_STATUS 0x02E8 // Display Status
  116. #define IO_H_TOTAL 0x02E8 // Horizontal Total
  117. #define IO_OVERSCAN_COLOR_8 0x02EE
  118. #define IO_OVERSCAN_BLUE_24 0x02EF
  119. #define IO_H_DISP 0x06E8 // Horizontal Displayed
  120. #define IO_OVERSCAN_GREEN_24 0x06EE
  121. #define IO_OVERSCAN_RED_24 0x06EF
  122. #define IO_H_SYNC_STRT 0x0AE8 // Horizontal Sync Start
  123. #define IO_CURSOR_OFFSET_LO 0x0AEE
  124. #define IO_H_SYNC_WID 0x0EE8 // Horizontal Sync Width
  125. #define IO_CURSOR_OFFSET_HI 0x0EEE
  126. #define IO_V_TOTAL 0x12E8 // Vertical Total
  127. #define IO_CONFIG_STATUS_1 0x12EE // Read only equivalent to HORZ_CURSOR_POSN
  128. #define IO_HORZ_CURSOR_POSN 0x12EE
  129. #define IO_V_DISP 0x16E8 // Vertical Displayed
  130. #define IO_CONFIG_STATUS_2 0x16EE // Read only equivalent to VERT_CURSOR_POSN
  131. #define IO_VERT_CURSOR_POSN 0x16EE
  132. #define IO_V_SYNC_STRT 0x1AE8 // Vertical Sync Start
  133. #define IO_CURSOR_COLOR_0 0x1AEE
  134. #define IO_FIFO_TEST_DATA 0x1AEE
  135. #define IO_CURSOR_COLOR_1 0x1AEF
  136. #define IO_V_SYNC_WID 0x1EE8 // Vertical Sync Width
  137. #define IO_HORZ_CURSOR_OFFSET 0x1EEE
  138. #define IO_VERT_CURSOR_OFFSET 0x1EEF
  139. #define IO_DISP_CNTL 0x22E8 // Display Control
  140. #define IO_CRT_PITCH 0x26EE
  141. #define IO_CRT_OFFSET_LO 0x2AEE
  142. #define IO_CRT_OFFSET_HI 0x2EEE
  143. #define IO_LOCAL_CONTROL 0x32EE
  144. #define IO_FIFO_OPT 0x36EE
  145. #define IO_MISC_OPTIONS 0x36EE
  146. #define IO_EXT_CURSOR_COLOR_0 0x3AEE
  147. #define IO_FIFO_TEST_TAG 0x3AEE
  148. #define IO_EXT_CURSOR_COLOR_1 0x3EEE
  149. #define IO_SUBSYS_CNTL 0x42E8 // Subsystem Control
  150. #define IO_SUBSYS_STAT 0x42E8 // Subsystem Status
  151. #define IO_MEM_BNDRY 0x42EE
  152. #define IO_SHADOW_CTL 0x46EE
  153. #define IO_ROM_PAGE_SEL 0x46E8 // ROM Page Select (not in manual)
  154. #define IO_ADVFUNC_CNTL 0x4AE8 // Advanced Function Control
  155. #define IO_CLOCK_SEL 0x4AEE
  156. #define IO_ROM_ADDR_1 0x52EE
  157. #define IO_ROM_ADDR_2 0x56EE
  158. #define IO_SCRATCH_PAD_0 0x52EE
  159. #define IO_SCRATCH_PAD_1 0x56EE
  160. #define IO_SHADOW_SET 0x5AEE
  161. #define IO_MEM_CFG 0x5EEE
  162. #define IO_EXT_GE_STATUS 0x62EE
  163. #define IO_HORZ_OVERSCAN 0x62EE
  164. #define IO_VERT_OVERSCAN 0x66EE
  165. #define IO_MAX_WAITSTATES 0x6AEE
  166. #define IO_GE_OFFSET_LO 0x6EEE
  167. #define IO_BOUNDS_LEFT 0x72EE
  168. #define IO_GE_OFFSET_HI 0x72EE
  169. #define IO_BOUNDS_TOP 0x76EE
  170. #define IO_GE_PITCH 0x76EE
  171. #define IO_BOUNDS_RIGHT 0x7AEE
  172. #define IO_EXT_GE_CONFIG 0x7AEE
  173. #define IO_BOUNDS_BOTTOM 0x7EEE
  174. #define IO_MISC_CNTL 0x7EEE
  175. #define IO_CUR_Y 0x82E8 // Current Y Position
  176. #define IO_PATT_DATA_INDEX 0x82EE
  177. #define IO_CUR_X 0x86E8 // Current X Position
  178. #define IO_SRC_Y 0x8AE8 //
  179. #define IO_DEST_Y 0x8AE8 //
  180. #define IO_AXSTP 0x8AE8 // Destination Y Position
  181. #define IO_SRC_X 0x8EE8 // Axial Step Constant
  182. #define IO_DEST_X 0x8EE8 //
  183. #define IO_DIASTP 0x8EE8 // Destination X Position
  184. #define IO_PATT_DATA 0x8EEE
  185. #define IO_R_EXT_GE_CONFIG 0x8EEE
  186. #define IO_ERR_TERM 0x92E8 // Error Term
  187. #define IO_R_MISC_CNTL 0x92EE
  188. #define IO_MAJ_AXIS_PCNT 0x96E8 // Major Axis Pixel Count
  189. #define IO_BRES_COUNT 0x96EE
  190. #define IO_CMD 0x9AE8 // Command
  191. #define IO_GE_STAT 0x9AE8 // Graphics Processor Status
  192. #define IO_EXT_FIFO_STATUS 0x9AEE
  193. #define IO_LINEDRAW_INDEX 0x9AEE
  194. #define IO_SHORT_STROKE 0x9EE8 // Short Stroke Vector Transfer
  195. #define IO_BKGD_COLOR 0xA2E8 // Background Color
  196. #define IO_LINEDRAW_OPT 0xA2EE
  197. #define IO_FRGD_COLOR 0xA6E8 // Foreground Color
  198. #define IO_DEST_X_START 0xA6EE
  199. #define IO_WRT_MASK 0xAAE8 // Write Mask
  200. #define IO_DEST_X_END 0xAAEE
  201. #define IO_RD_MASK 0xAEE8 // Read Mask
  202. #define IO_DEST_Y_END 0xAEEE
  203. #define IO_CMP_COLOR 0xB2E8 // Compare Color
  204. #define IO_R_H_TOTAL 0xB2EE
  205. #define IO_R_H_DISP 0xB2EE
  206. #define IO_SRC_X_START 0xB2EE
  207. #define IO_BKGD_MIX 0xB6E8 // Background Mix
  208. #define IO_ALU_BG_FN 0xB6EE
  209. #define IO_R_H_SYNC_STRT 0xB6EE
  210. #define IO_FRGD_MIX 0xBAE8 // Foreground Mix
  211. #define IO_ALU_FG_FN 0xBAEE
  212. #define IO_R_H_SYNC_WID 0xBAEE
  213. #define IO_MULTIFUNC_CNTL 0xBEE8 // Multi-Function Control (mach 8)
  214. #define IO_MIN_AXIS_PCNT 0xBEE8
  215. #define IO_SCISSOR_T 0xBEE8
  216. #define IO_SCISSOR_L 0xBEE8
  217. #define IO_SCISSOR_B 0xBEE8
  218. #define IO_SCISSOR_R 0xBEE8
  219. #define IO_MEM_CNTL 0xBEE8
  220. #define IO_PATTERN_L 0xBEE8
  221. #define IO_PATTERN_H 0xBEE8
  222. #define IO_PIXEL_CNTL 0xBEE8
  223. #define IO_SRC_X_END 0xBEEE
  224. #define IO_SRC_Y_DIR 0xC2EE
  225. #define IO_R_V_TOTAL 0xC2EE
  226. #define IO_EXT_SSV 0xC6EE // (used for MACH 8)
  227. #define IO_EXT_SHORT_STROKE 0xC6EE
  228. #define IO_R_V_DISP 0xC6EE
  229. #define IO_SCAN_X 0xCAEE
  230. #define IO_R_V_SYNC_STRT 0xCAEE
  231. #define IO_DP_CONFIG 0xCEEE
  232. #define IO_VERT_LINE_CNTR 0xCEEE
  233. #define IO_PATT_LENGTH 0xD2EE
  234. #define IO_R_V_SYNC_WID 0xD2EE
  235. #define IO_PATT_INDEX 0xD6EE
  236. #define IO_EXT_SCISSOR_L 0xDAEE // "extended" left scissor (12 bits precision)
  237. #define IO_R_SRC_X 0xDAEE
  238. #define IO_EXT_SCISSOR_T 0xDEEE // "extended" top scissor (12 bits precision)
  239. #define IO_R_SRC_Y 0xDEEE
  240. #define IO_PIX_TRANS 0xE2E8 // Pixel Data Transfer
  241. #define IO_PIX_TRANS_HI 0xE2E9 // Pixel Data Transfer
  242. #define IO_EXT_SCISSOR_R 0xE2EE // "extended" right scissor (12 bits precision)
  243. #define IO_EXT_SCISSOR_B 0xE6EE // "extended" bottom scissor (12 bits precision)
  244. #define IO_SRC_CMP_COLOR 0xEAEE // (used for MACH 8)
  245. #define IO_DEST_CMP_FN 0xEEEE
  246. #define IO_EXT_CUR_Y 0xF6EE // Mach8 only
  247. #define IO_ASIC_ID 0xFAEE // Mach32 rev 6
  248. #define IO_LINEDRAW 0xFEEE
  249. // Internal registers (read only, for test purposes only)
  250. #define IO__PAR_FIFO_DATA 0x1AEE
  251. #define IO__PAR_FIFO_ADDR 0x3AEE
  252. #define IO__MAJOR_DEST_CNT 0x42EE
  253. #define IO__MAJOR_SRC_CNT 0x5EEE
  254. #define IO__MINOR_DEST_CNT 0x66EE
  255. #define IO__MINOR_SRC_CNT 0x8AEE
  256. #define IO__HW_TEST 0x32EE
  257. //---------------------------------------------------------
  258. // define the registers locations in Memory Mapped space
  259. // take the IO address and and with 0xFC00 works for offset
  260. //--- IF (port AND 0FFh) EQ 0E8h
  261. //--- mov word ptr seg:[edx+(3FFE00h+((port AND 0FC00h)shr 8))],ax
  262. //--- ELSE
  263. //--- IF (port AND 0FFh) EQ 0EEh
  264. //--- mov word ptr seg:[edx+(3FFF00h+((port AND 0FC00h)shr 8))],ax
  265. //--- 0x3FFE00
  266. #define MM_DISP_STATUS (IO_DISP_STATUS & 0xFC00) >> 8
  267. #define MM_DISP_CNTL (IO_DISP_CNTL & 0xFC00) >> 8
  268. #define MM_SUBSYS_CNTL (IO_SUBSYS_CNTL & 0xFC00) >> 8
  269. #define MM_SUBSYS_STAT (IO_SUBSYS_STAT & 0xFC00) >> 8
  270. #define MM_ADVFUNC_CNTL (IO_ADVFUNC_CNTL & 0xFC00) >> 8
  271. #define MM_CUR_Y (IO_CUR_Y & 0xFC00) >> 8
  272. #define MM_CUR_X (IO_CUR_X & 0xFC00) >> 8
  273. #define MM_SRC_Y (IO_SRC_Y & 0xFC00) >> 8
  274. #define MM_DEST_Y (IO_DEST_Y & 0xFC00) >> 8
  275. #define MM_AXSTP (IO_AXSTP & 0xFC00) >> 8
  276. #define MM_SRC_X (IO_SRC_X & 0xFC00) >> 8
  277. #define MM_DEST_X (IO_DEST_X & 0xFC00) >> 8
  278. #define MM_DIASTP (IO_DIASTP & 0xFC00) >> 8
  279. #define MM_ERR_TERM (IO_ERR_TERM & 0xFC00) >> 8
  280. #define MM_MAJ_AXIS_PCNT (IO_MAJ_AXIS_PCNT & 0xFC00) >> 8
  281. #define MM_GE_STAT (IO_GE_STAT & 0xFC00) >> 8
  282. #define MM_SHORT_STROKE (IO_SHORT_STROKE & 0xFC00) >> 8
  283. #define MM_BKGD_COLOR (IO_BKGD_COLOR & 0xFC00) >> 8
  284. #define MM_FRGD_COLOR (IO_FRGD_COLOR & 0xFC00) >> 8
  285. #define MM_WRT_MASK (IO_WRT_MASK & 0xFC00) >> 8
  286. #define MM_RD_MASK (IO_RD_MASK & 0xFC00) >> 8
  287. #define MM_CMP_COLOR (IO_CMP_COLOR & 0xFC00) >> 8
  288. #define MM_BKGD_MIX (IO_BKGD_MIX & 0xFC00) >> 8
  289. #define MM_FRGD_MIX (IO_FRGD_MIX & 0xFC00) >> 8
  290. #define MM_MULTIFUNC_CNTL (IO_MULTIFUNC_CNTL & 0xFC00) >> 8
  291. #define MM_MIN_AXIS_PCNT (IO_MIN_AXIS_PCNT & 0xFC00) >> 8
  292. //--- #define MM_MEM_CNTL (IO_MEM_CNTL & 0xFC00) >> 8
  293. #define MM_PIXEL_CNTL (IO_PIXEL_CNTL & 0xFC00) >> 8
  294. #define MM_PIX_TRANS (IO_PIX_TRANS & 0xFC00) >> 8
  295. #define MM_PIX_TRANS_HI (IO_PIX_TRANS_HI & 0xFC00) >> 8
  296. #define MM_CURSOR_OFFSET_LO 0x100+((IO_CURSOR_OFFSET_LO & 0xFC00) >> 8) + (IO_CURSOR_OFFSET_LO & 1)
  297. #define MM_CURSOR_OFFSET_HI 0x100+((IO_CURSOR_OFFSET_HI & 0xFC00) >> 8) + (IO_CURSOR_OFFSET_HI & 1)
  298. #define MM_CONFIG_STATUS_1 0x100+((IO_CONFIG_STATUS_1 & 0xFC00) >> 8) + (IO_CONFIG_STATUS_1 & 1)
  299. #define MM_HORZ_CURSOR_POSN 0x100+((IO_HORZ_CURSOR_POSN & 0xFC00) >> 8) + (IO_HORZ_CURSOR_POSN & 1)
  300. #define MM_CONFIG_STATUS_2 0x100+((IO_CONFIG_STATUS_2 & 0xFC00) >> 8) + (IO_CONFIG_STATUS_2 & 1)
  301. #define MM_VERT_CURSOR_POSN 0x100+((IO_VERT_CURSOR_POSN & 0xFC00) >> 8) + (IO_VERT_CURSOR_POSN & 1)
  302. #define MM_CURSOR_COLOR_0 0x100+((IO_CURSOR_COLOR_0 & 0xFC00) >> 8) + (IO_CURSOR_COLOR_0 & 1)
  303. #define MM_CURSOR_COLOR_1 0x100+((IO_CURSOR_COLOR_1 & 0xFC00) >> 8) + (IO_CURSOR_COLOR_1 & 1)
  304. #define MM_HORZ_CURSOR_OFFSET 0x100+((IO_HORZ_CURSOR_OFFSET & 0xFC00) >> 8) + (IO_HORZ_CURSOR_OFFSET & 1)
  305. #define MM_VERT_CURSOR_OFFSET 0x100+((IO_VERT_CURSOR_OFFSET & 0xFC00) >> 8) + (IO_VERT_CURSOR_OFFSET & 1)
  306. #define MM_CRT_PITCH 0x100+((IO_CRT_PITCH & 0xFC00) >> 8) + (IO_CRT_PITCH & 1)
  307. #define MM_CRT_OFFSET_LO 0x100+((IO_CRT_OFFSET_LO & 0xFC00) >> 8) + (IO_CRT_OFFSET_LO & 1)
  308. #define MM_CRT_OFFSET_HI 0x100+((IO_CRT_OFFSET_HI & 0xFC00) >> 8) + (IO_CRT_OFFSET_HI & 1)
  309. #define MM_MISC_OPTIONS 0x100+((IO_MISC_OPTIONS & 0xFC00) >> 8) + (IO_MISC_OPTIONS & 1)
  310. #define MM_EXT_CURSOR_COLOR_0 0x100+((IO_EXT_CURSOR_COLOR_0 & 0xFC00) >> 8) + (IO_EXT_CURSOR_COLOR_0 & 1)
  311. #define MM_EXT_CURSOR_COLOR_1 0x100+((IO_EXT_CURSOR_COLOR_1 & 0xFC00) >> 8) + (IO_EXT_CURSOR_COLOR_1 & 1)
  312. #define MM_CLOCK_SEL 0x100+((IO_CLOCK_SEL & 0xFC00) >> 8) + (IO_CLOCK_SEL & 1)
  313. #define MM_EXT_GE_STATUS 0x100+((IO_EXT_GE_STATUS & 0xFC00) >> 8) + (IO_EXT_GE_STATUS & 1)
  314. #define MM_GE_OFFSET_LO 0x100+((IO_GE_OFFSET_LO & 0xFC00) >> 8) + (IO_GE_OFFSET_LO & 1)
  315. #define MM_BOUNDS_LEFT 0x100+((IO_BOUNDS_LEFT & 0xFC00) >> 8) + (IO_BOUNDS_LEFT & 1)
  316. #define MM_GE_OFFSET_HI 0x100+((IO_GE_OFFSET_HI & 0xFC00) >> 8) + (IO_GE_OFFSET_HI & 1)
  317. #define MM_BOUNDS_TOP 0x100+((IO_BOUNDS_TOP & 0xFC00) >> 8) + (IO_BOUNDS_TOP & 1)
  318. #define MM_GE_PITCH 0x100+((IO_GE_PITCH & 0xFC00) >> 8) + (IO_GE_PITCH & 1)
  319. #define MM_BOUNDS_RIGHT 0x100+((IO_BOUNDS_RIGHT & 0xFC00) >> 8) + (IO_BOUNDS_RIGHT & 1)
  320. #define MM_EXT_GE_CONFIG 0x100+((IO_EXT_GE_CONFIG & 0xFC00) >> 8) + (IO_EXT_GE_CONFIG & 1)
  321. #define MM_BOUNDS_BOTTOM 0x100+((IO_BOUNDS_BOTTOM & 0xFC00) >> 8) + (IO_BOUNDS_BOTTOM & 1)
  322. #define MM_MISC_CNTL 0x100+((IO_MISC_CNTL & 0xFC00) >> 8) + (IO_MISC_CNTL & 1)
  323. #define MM_PATT_DATA_INDEX 0x100+((IO_PATT_DATA_INDEX & 0xFC00) >> 8) + (IO_PATT_DATA_INDEX & 1)
  324. #define MM_PATT_DATA 0x100+((IO_PATT_DATA & 0xFC00) >> 8) + (IO_PATT_DATA & 1)
  325. #define MM_BRES_COUNT 0x100+((IO_BRES_COUNT & 0xFC00) >> 8) + (IO_BRES_COUNT & 1)
  326. #define MM_EXT_FIFO_STATUS 0x100+((IO_EXT_FIFO_STATUS & 0xFC00) >> 8) + (IO_EXT_FIFO_STATUS & 1)
  327. #define MM_LINEDRAW_INDEX 0x100+((IO_LINEDRAW_INDEX & 0xFC00) >> 8) + (IO_LINEDRAW_INDEX & 1)
  328. #define MM_LINEDRAW_OPT 0x100+((IO_LINEDRAW_OPT & 0xFC00) >> 8) + (IO_LINEDRAW_OPT & 1)
  329. #define MM_DEST_X_START 0x100+((IO_DEST_X_START & 0xFC00) >> 8) + (IO_DEST_X_START & 1)
  330. #define MM_DEST_X_END 0x100+((IO_DEST_X_END & 0xFC00) >> 8) + (IO_DEST_X_END & 1)
  331. #define MM_DEST_Y_END 0x100+((IO_DEST_Y_END & 0xFC00) >> 8) + (IO_DEST_Y_END & 1)
  332. #define MM_SRC_X_START 0x100+((IO_SRC_X_START & 0xFC00) >> 8) + (IO_SRC_X_START & 1)
  333. #define MM_ALU_BG_FN 0x100+((IO_ALU_BG_FN & 0xFC00) >> 8) + (IO_ALU_BG_FN & 1)
  334. #define MM_ALU_FG_FN 0x100+((IO_ALU_FG_FN & 0xFC00) >> 8) + (IO_ALU_FG_FN & 1)
  335. #define MM_SRC_X_END 0x100+((IO_SRC_X_END & 0xFC00) >> 8) + (IO_SRC_X_END & 1)
  336. #define MM_SRC_Y_DIR 0x100+((IO_SRC_Y_DIR & 0xFC00) >> 8) + (IO_SRC_Y_DIR & 1)
  337. #define MM_EXT_SSV 0x100+((IO_EXT_SSV & 0xFC00) >> 8) + (IO_EXT_SSV & 1)
  338. #define MM_EXT_SHORT_STROKE 0x100+((IO_EXT_SHORT_STROKE & 0xFC00) >> 8) + (IO_EXT_SHORT_STROKE & 1)
  339. #define MM_SCAN_X 0x100+((IO_SCAN_X & 0xFC00) >> 8) + (IO_SCAN_X & 1)
  340. #define MM_DP_CONFIG 0x100+((IO_DP_CONFIG & 0xFC00) >> 8) + (IO_DP_CONFIG & 1)
  341. #define MM_VERT_LINE_CNTR 0x100+((IO_VERT_LINE_CNTR & 0xFC00) >> 8) + (IO_VERT_LINE_CNTR & 1)
  342. #define MM_PATT_LENGTH 0x100+((IO_PATT_LENGTH & 0xFC00) >> 8) + (IO_PATT_LENGTH & 1)
  343. #define MM_PATT_INDEX 0x100+((IO_PATT_INDEX & 0xFC00) >> 8) + (IO_PATT_INDEX & 1)
  344. #define MM_EXT_SCISSOR_L 0x100+((IO_EXT_SCISSOR_L & 0xFC00) >> 8) + (IO_EXT_SCISSOR_L & 1)
  345. #define MM_EXT_SCISSOR_T 0x100+((IO_EXT_SCISSOR_T & 0xFC00) >> 8) + (IO_EXT_SCISSOR_T & 1)
  346. #define MM_EXT_SCISSOR_R 0x100+((IO_EXT_SCISSOR_R & 0xFC00) >> 8) + (IO_EXT_SCISSOR_R & 1)
  347. #define MM_EXT_SCISSOR_B 0x100+((IO_EXT_SCISSOR_B & 0xFC00) >> 8) + (IO_EXT_SCISSOR_B & 1)
  348. #define MM_SRC_CMP_COLOR 0x100+((IO_SRC_CMP_COLOR & 0xFC00) >> 8) + (IO_SRC_CMP_COLOR & 1)
  349. #define MM_DEST_CMP_FN 0x100+((IO_DEST_CMP_FN & 0xFC00) >> 8) + (IO_DEST_CMP_FN & 1)
  350. #define MM_EXT_CUR_Y 0x100+((IO_EXT_CUR_Y & 0xFC00) >> 8) + (IO_ASIC_ID & 1)
  351. #define MM_LINEDRAW 0x100+((IO_LINEDRAW & 0xFC00) >> 8) + (IO_LINEDRAW & 1)
  352. //---------------------------------------------------------
  353. // define the registers as subscripts to an array
  354. // this order MATCHES SETUP_M.H Driver<space type>Range_m[] structures
  355. // all entries are in INCREASING IO address.
  356. // // Alternate names AT same IO address
  357. enum {
  358. DAC_MASK=0 ,
  359. DAC_R_INDEX ,
  360. DAC_W_INDEX ,
  361. DAC_DATA ,
  362. DISP_STATUS , // H_TOTAL
  363. OVERSCAN_COLOR_8 , // OVERSCAN_BLUE_24 at 2EF
  364. H_DISP ,
  365. OVERSCAN_GREEN_24 , // OVERSCAN_RED_24 at 6EF
  366. H_SYNC_STRT ,
  367. CURSOR_OFFSET_LO ,
  368. H_SYNC_WID ,
  369. CURSOR_OFFSET_HI ,
  370. V_TOTAL ,
  371. CONFIG_STATUS_1 , // HORZ_CURSOR_POSN
  372. V_DISP ,
  373. CONFIG_STATUS_2 , // VERT_CURSOR_POSN
  374. V_SYNC_STRT ,
  375. CURSOR_COLOR_0 , // FIFO_TEST_DATA
  376. CURSOR_COLOR_1 ,
  377. V_SYNC_WID ,
  378. HORZ_CURSOR_OFFSET ,
  379. VERT_CURSOR_OFFSET ,
  380. DISP_CNTL ,
  381. CRT_PITCH ,
  382. CRT_OFFSET_LO ,
  383. CRT_OFFSET_HI ,
  384. LOCAL_CONTROL ,
  385. FIFO_OPT , // MISC_OPTIONS
  386. EXT_CURSOR_COLOR_0 , // FIFO_TEST_TAG
  387. EXT_CURSOR_COLOR_1 ,
  388. SUBSYS_CNTL , // SUBSYS_STAT
  389. MEM_BNDRY ,
  390. ROM_PAGE_SEL ,
  391. SHADOW_CTL ,
  392. ADVFUNC_CNTL ,
  393. CLOCK_SEL ,
  394. ROM_ADDR_1 , // SCRATCH_PAD_0
  395. ROM_ADDR_2 , // SCRATCH_PAD_1
  396. SHADOW_SET ,
  397. MEM_CFG ,
  398. EXT_GE_STATUS , // HORZ_OVERSCAN
  399. VERT_OVERSCAN ,
  400. MAX_WAITSTATES ,
  401. GE_OFFSET_LO ,
  402. BOUNDS_LEFT , // GE_OFFSET_HI
  403. BOUNDS_TOP , // GE_PITCH
  404. BOUNDS_RIGHT , // EXT_GE_CONFIG
  405. BOUNDS_BOTTOM , // MISC_CNTL
  406. CUR_Y ,
  407. PATT_DATA_INDEX ,
  408. CUR_X ,
  409. SRC_Y , // DEST_Y AXSTP
  410. SRC_X , // DEST_X DIASTP
  411. PATT_DATA , // R_EXT_GE_CONFIG
  412. ERR_TERM ,
  413. R_MISC_CNTL ,
  414. MAJ_AXIS_PCNT ,
  415. BRES_COUNT ,
  416. CMD , // GE_STAT
  417. LINEDRAW_INDEX , // EXT_FIFO_STATUS
  418. SHORT_STROKE ,
  419. BKGD_COLOR ,
  420. LINEDRAW_OPT ,
  421. FRGD_COLOR ,
  422. DEST_X_START ,
  423. WRT_MASK ,
  424. DEST_X_END ,
  425. RD_MASK ,
  426. DEST_Y_END ,
  427. CMP_COLOR ,
  428. SRC_X_START , // R_H_TOTAL R_H_DISP
  429. BKGD_MIX ,
  430. ALU_BG_FN , // R_H_SYNC_STRT
  431. FRGD_MIX ,
  432. ALU_FG_FN , // R_H_SYNC_WID
  433. MULTIFUNC_CNTL , // MIN_AXIS_PCNT SCISSOR_T SCISSOR_L
  434. // SCISSOR_B SCISSOR_R MEM_CNTL
  435. // PATTERN_L PATTERN_H PIXEL_CNTL
  436. SRC_X_END ,
  437. SRC_Y_DIR , // R_V_TOTAL
  438. EXT_SSV , // EXT_SHORT_STROKE R_V_DISP
  439. SCAN_X , // R_V_SYNC_STRT
  440. DP_CONFIG , // VERT_LINE_CNTR
  441. PATT_LENGTH , // R_V_SYNC_WID
  442. PATT_INDEX ,
  443. EXT_SCISSOR_L , // R_SRC_X
  444. EXT_SCISSOR_T , // R_SRC_Y
  445. PIX_TRANS ,
  446. PIX_TRANS_HI ,
  447. EXT_SCISSOR_R ,
  448. EXT_SCISSOR_B ,
  449. DEST_CMP_FN ,
  450. ASIC_ID ,
  451. LINEDRAW ,
  452. SEQ_IND ,
  453. HI_SEQ_ADDR ,
  454. SEQ_DATA ,
  455. regVGA_BASE_IO_PORT ,
  456. regVGA_END_BREAK_PORT,
  457. reg1CE , // ati_reg == 0x1CE
  458. reg1CF , // ati_reg == 0x1CF
  459. EXT_CUR_Y ,
  460. reg3CE , //
  461. // Internal registers (read only, for test purposes only)
  462. _PAR_FIFO_DATA ,
  463. _PAR_FIFO_ADDR ,
  464. _MAJOR_DEST_CNT ,
  465. _MAJOR_SRC_CNT ,
  466. _MINOR_DEST_CNT ,
  467. _MINOR_SRC_CNT ,
  468. _HW_TEST
  469. };
  470. // define the registers located at the same I/O addresses
  471. #define H_TOTAL DISP_STATUS
  472. #define HORZ_CURSOR_POSN CONFIG_STATUS_1
  473. #define VERT_CURSOR_POSN CONFIG_STATUS_2
  474. #define FIFO_TEST_DATA CURSOR_COLOR_0
  475. #define MISC_OPTIONS FIFO_OPT
  476. #define FIFO_TEST_TAG EXT_CURSOR_COLOR_0
  477. #define SUBSYS_STAT SUBSYS_CNTL
  478. #define SCRATCH_PAD_0 ROM_ADDR_1
  479. #define SCRATCH_PAD_1 ROM_ADDR_2
  480. #define HORZ_OVERSCAN EXT_GE_STATUS
  481. #define GE_STAT CMD
  482. #define GE_OFFSET_HI BOUNDS_LEFT
  483. #define GE_PITCH BOUNDS_TOP
  484. #define EXT_GE_CONFIG BOUNDS_RIGHT
  485. #define MISC_CNTL BOUNDS_BOTTOM
  486. #define DEST_Y SRC_Y
  487. #define AXSTP SRC_Y
  488. #define DEST_X SRC_X
  489. #define DIASTP SRC_X
  490. #define R_EXT_GE_CONFIG PATT_DATA
  491. #define EXT_FIFO_STATUS LINEDRAW_INDEX
  492. #define R_H_TOTAL SRC_X_START
  493. #define R_H_DISP SRC_X_START
  494. #define R_H_SYNC_STRT ALU_BG_FN
  495. #define R_H_SYNC_WID ALU_FG_FN
  496. #define MEM_CNTL MULTIFUNC_CNTL
  497. #define R_V_TOTAL SRC_Y_DIR
  498. #define EXT_SHORT_STROKE EXT_SSV
  499. #define R_V_DISP EXT_SSV
  500. #define R_V_SYNC_STRT SCAN_X
  501. #define VERT_LINE_CNTR DP_CONFIG
  502. #define R_V_SYNC_WID PATT_LENGTH
  503. #define R_SRC_X EXT_SCISSOR_L
  504. #define R_SRC_Y EXT_SCISSOR_T
  505. #define EXT_SRC_Y ASIC_ID
  506. //---------------------------------------------------------
  507. //---------------------------------------------------------
  508. // Define the ASIC revisions into something Useful
  509. // Values are reported by the ASIC_ID register.
  510. #define MACH32_REV3 0
  511. #define MACH32_REV5 1 // not in production
  512. #define MACH32_REV6 2
  513. //---------------------------------------------------------
  514. //
  515. #define MIX_FN_NOT_D 0x0000 //NOT dest
  516. #define MIX_FN_ZERO 0x0001 //dest = 0
  517. #define MIX_FN_ONE 0x0002 //dest = 1
  518. #define MIX_FN_LEAVE_ALONE 0x0003 //dest
  519. #define MIX_FN_NOT_S 0x0004 //NOT source
  520. #define MIX_FN_XOR 0x0005 //source XOR dest
  521. #define MIX_FN_XNOR 0x0006 //source XOR NOT dest
  522. #define MIX_FN_PAINT 0x0007 //source
  523. #define MIX_FN_NAND 0x0008 //NOT source OR NOT dest
  524. #define MIX_FN_D_OR_NOT_S 0x0009 //NOT source OR dest
  525. #define MIX_FN_NOT_D_OR_S 0x000A //source OR NOT dest
  526. #define MIX_FN_OR 0x000B //source OR dest
  527. #define MIX_FN_AND 0x000C //dest AND source
  528. #define MIX_FN_NOT_D_AND_S 0x000D //NOT dest AND source
  529. #define MIX_FN_D_AND_NOT_S 0x000E //dest AND NOT source
  530. #define MIX_FN_NOR 0x000F //NOT dest AND NOT source
  531. #define MIX_FN_MIN 0x0010 //minimum
  532. #define MIX_FN_SUBSZ 0x0011 //(dest - source), with saturate
  533. #define MIX_FN_SUBDZ 0x0012 //(source - dest), with saturate
  534. #define MIX_FN_ADDS 0x0013 //add with saturation
  535. #define MIX_FN_MAX 0x0014 //maximum
  536. //
  537. //
  538. //---------------------------------------------------------
  539. //
  540. //Following are the FIFO checking macros:
  541. //
  542. #define ONE_WORD 0x8000
  543. #define TWO_WORDS 0xC000
  544. #define THREE_WORDS 0xE000
  545. #define FOUR_WORDS 0xF000
  546. #define FIVE_WORDS 0xF800
  547. #define SIX_WORDS 0xFC00
  548. #define SEVEN_WORDS 0xFE00
  549. #define EIGHT_WORDS 0xFF00
  550. #define NINE_WORDS 0xFF80
  551. #define TEN_WORDS 0xFFC0
  552. #define ELEVEN_WORDS 0xFFE0
  553. #define TWELVE_WORDS 0xFFF0
  554. #define THIRTEEN_WORDS 0xFFF8
  555. #define FOURTEEN_WORDS 0xFFFC
  556. #define FIFTEEN_WORDS 0xFFFE
  557. #define SIXTEEN_WORDS 0xFFFF
  558. //
  559. //
  560. //
  561. //---------------------------------------
  562. //
  563. //
  564. // Draw Command (IBM 8514 compatible CMD register)
  565. //
  566. // opcode field
  567. #define OP_CODE 0xE000
  568. #define SHIFT_op_code 0x000D
  569. #define DRAW_SETUP 0x0000
  570. #define DRAW_LINE 0x2000
  571. #define FILL_RECT_H1H4 0x4000
  572. #define FILL_RECT_V1V2 0x6000
  573. #define FILL_RECT_V1H4 0x8000
  574. #define DRAW_POLY_LINE 0xA000
  575. #define BITBLT_OP 0xC000
  576. #define DRAW_FOREVER 0xE000
  577. // swap field
  578. #define LSB_FIRST 0x1000
  579. // data width field
  580. #define DATA_WIDTH 0x0200
  581. #define BIT16 0x0200
  582. #define BIT8 0x0000
  583. // CPU wait field
  584. #define CPU_WAIT 0x0100
  585. // octant field
  586. #define OCTANT 0x00E0
  587. #define SHIFT_octant 0x0005
  588. #define YPOSITIVE 0x0080
  589. #define YMAJOR 0x0040
  590. #define XPOSITIVE 0x0020
  591. // draw field
  592. #define DRAW 0x0010
  593. // direction field
  594. #define DIR_TYPE 0x0008
  595. #define DEGREE 0x0008
  596. #define XY 0x0000
  597. #define RECT_RIGHT_AND_DOWN 0x00E0 // quadrant 3
  598. #define RECT_LEFT_AND_UP 0x0000 // quadrant 1
  599. // last pel off field
  600. #define SHIFT_last_pel_off 0x0002
  601. #define LAST_PEL_OFF 0x0004
  602. #define LAST_PEL_ON 0x0000
  603. #define LAST_PIXEL_OFF 0x0004
  604. #define LAST_PIXEL_ON 0x0000
  605. #define MULTIPLE_PIXELS 0x0002
  606. #define SINGLE_PIXEL 0x0000
  607. // pixel mode
  608. #define PIXEL_MODE 0x0002
  609. #define MULTI 0x0002
  610. #define SINGLE 0x0000
  611. // read/write
  612. #define RW 0x0001
  613. #define WRITE 0x0001
  614. #define READ 0x0000
  615. //
  616. // ---------------------------------------------------------
  617. //
  618. //
  619. // GE_STAT (9AE8) is set if the engine is busy.
  620. //
  621. #define HARDWARE_BUSY 0x0200
  622. #define DATA_READY 0x0100
  623. /*
  624. * Miscelaneous Options (MISC_OPTIONS)
  625. */
  626. #define MEM_SIZE_ALIAS 0x0000C
  627. #define MEM_SIZE_STRIPPED 0x0FFF3
  628. #define MEM_SIZE_512K 0x00000
  629. #define MEM_SIZE_1M 0x00004
  630. #define MEM_SIZE_2M 0x00008
  631. #define MEM_SIZE_4M 0x0000C
  632. #define BLK_WR_ENA 0x00400
  633. //
  634. // Extended Graphics Engine Status (EXT_GE_STATUS)
  635. //
  636. #define POINTS_INSIDE 0x8000
  637. #define EE_DATA_IN 0x4000
  638. #define GE_ACTIVE 0x2000
  639. #define CLIP_ABOVE 0x1000
  640. #define CLIP_BELOW 0x0800
  641. #define CLIP_LEFT 0x0400
  642. #define CLIP_RIGHT 0x0200
  643. #define CLIP_FLAGS 0x1E00
  644. #define CLIP_INSIDE 0x0100
  645. #define EE_CRC_VALID 0x0080
  646. #define CLIP_OVERRUN 0x000F
  647. /*
  648. * Extended Graphics Engine Configuration (EXT_GE_CONFIG)
  649. */
  650. #define PIX_WIDTH_4BPP 0x0000
  651. #define PIX_WIDTH_8BPP 0x0010
  652. #define PIX_WIDTH_16BPP 0x0020
  653. #define PIX_WIDTH_24BPP 0x0030
  654. #define ORDER_16BPP_555 0x0000
  655. #define ORDER_16BPP_565 0x0040
  656. #define ORDER_16BPP_655 0x0080
  657. #define ORDER_16BPP_664 0x00C0
  658. #define ORDER_24BPP_RGB 0x0000
  659. #define ORDER_24BPP_RGBx 0x0200
  660. #define ORDER_24BPP_BGR 0x0400
  661. #define ORDER_24BPP_xBGR 0x0600
  662. //
  663. // Datapath Configuration Register (DP_CONFIG)
  664. #define FG_COLOR_SRC 0xE000
  665. #define SHIFT_fg_color_src 0x000D
  666. #define DATA_ORDER 0x1000
  667. #define DATA_WIDTH 0x0200
  668. #define BG_COLOR_SRC 0x0180
  669. #define SHIFT_bg_color_src 0x0007
  670. #define EXT_MONO_SRC 0x0060
  671. #define SHIFT_ext_mono_src 0x0005
  672. #define DRAW 0x0010
  673. #define READ_MODE 0x0004
  674. #define POLY_FILL_MODE 0x0002
  675. #define READ_WRITE 0x0001
  676. #define SRC_SWAP 0x0800
  677. //
  678. #define FG_COLOR_SRC_BG 0x0000 // Background Color Register
  679. #define FG_COLOR_SRC_FG 0x2000 // Foreground Color Register
  680. #define FG_COLOR_SRC_HOST 0x4000 // CPU Data Transfer Reg
  681. #define FG_COLOR_SRC_BLIT 0x6000 // VRAM blit source
  682. #define FG_COLOR_SRC_GS 0x8000 // Grey-scale mono blit
  683. #define FG_COLOR_SRC_PATT 0xA000 // Color Pattern Shift Reg
  684. #define FG_COLOR_SRC_CLUH 0xC000 // Color lookup of Host Data
  685. #define FG_COLOR_SRC_CLUB 0xE000 // Color lookup of blit src
  686. //
  687. #define BG_COLOR_SRC_BG 0x0000 // Background Color Reg
  688. #define BG_COLOR_SRC_FG 0x0080 // Foreground Color Reg
  689. #define BG_COLOR_SRC_HOST 0x0100 // CPU Data Transfer Reg
  690. #define BG_COLOR_SRC_BLIT 0x0180 // VRAM blit source
  691. //
  692. // Note that "EXT_MONO_SRC" and "MONO_SRC" are mutually destructive, but that
  693. // "EXT_MONO_SRC" selects the ATI pattern registers.
  694. //
  695. #define EXT_MONO_SRC_ONE 0x0000 // Always '1'
  696. #define EXT_MONO_SRC_PATT 0x0020 // ATI Mono Pattern Regs
  697. #define EXT_MONO_SRC_HOST 0x0040 // CPU Data Transfer Reg
  698. #define EXT_MONO_SRC_BLIT 0x0060 // VRAM Blit source plane
  699. //
  700. // Linedraw Options Register (LINEDRAW_OPT)
  701. //
  702. #define CLIP_MODE 0x0600
  703. #define SHIFT_clip_mode 0x0009
  704. #define CLIP_MODE_DIS 0x0000
  705. #define CLIP_MODE_LINE 0x0200
  706. #define CLIP_MODE_PLINE 0x0400
  707. #define CLIP_MODE_PATT 0x0600
  708. #define BOUNDS_RESET 0x0100
  709. #define OCTANT 0x00E0
  710. #define SHIFT_ldo_octant 0x0005
  711. #define YDIR 0x0080
  712. #define XMAJOR 0x0040
  713. #define XDIR 0x0020
  714. #define DIR_TYPE 0x0008
  715. #define DIR_TYPE_DEGREE 0x0008
  716. #define DIR_TYPE_OCTANT 0x0000
  717. #define LAST_PEL_OFF 0x0004
  718. #define POLY_MODE 0x0002
  719. //
  720. //
  721. //-------------- was in 68801.H --------------------------------------
  722. //*** 8514 EEPROM command codes *************************************
  723. // format is 0111 1100 0000b
  724. #define EE_READ 0x0600 // read address
  725. #define EE_ERASE 0x0700 // erase address
  726. #define EE_WRITE 0x0500 // write address
  727. #define EE_ENAB 0x0980 // enable EEPROM
  728. #define EE_DISAB 0x0800 // disable EEPROM
  729. //-------------------------------------------------------------------------
  730. // REGISTER bit definitions
  731. // Configuration Status 1 (CONFIG_STATUS_1)
  732. //
  733. //
  734. #define ROM_LOCATION 0xFE00
  735. #define SHIFT_rom_location 0x0009
  736. #define ROM_PAGE_ENA 0x0100
  737. #define ROM_ENA 0x0080
  738. #define MEM_INSTALLED 0x0060
  739. #define SHIFT_mem_installed 0x0005
  740. #define MEM_INSTALLED_128k 0x0000
  741. #define MEM_INSTALLED_256k 0x0020
  742. #define MEM_INSTALLED_512k 0x0040
  743. #define MEM_INSTALLED_1024k 0x0060
  744. #define DRAM_ENA 0x0010
  745. #define EEPROM_ENA 0x0008
  746. #define MC_BUS 0x0004
  747. #define BUS_16 0x0002
  748. #define CLK_MODE 0x0001
  749. //
  750. //
  751. // Configuration Status 2 (CONFIG_STATUS_2)
  752. //
  753. //
  754. //
  755. #define FLASH_ENA 0x0010
  756. #define WRITE_PER_BIT 0x0008
  757. #define EPROM16_ENA 0x0004
  758. #define HIRES_BOOT 0x0002
  759. #define SHARE_CLOCK 0x0001
  760. //-------------------------------------------------------------------------
  761. // For the Mach32 - 68800 class of adapters, the eeprom location
  762. // is different for an 8514/Ultra in an 8 bit bus, 16 bit bus, and 68800.
  763. //
  764. #define EE_DATA_IN 0x4000 // Inputs are OK
  765. // Mach 32 values
  766. #define EE_SELECT_M32 8
  767. #define EE_CS_M32 4
  768. #define EE_CLK_M32 2
  769. #define EE_DATA_OUT_M32 1
  770. // Mach 8 values in a 16 bit bus
  771. #define EE_SELECT_M8_16 0x8000
  772. #define EE_CS_M8_16 0x4000
  773. #define EE_CLK_M8_16 0x2000
  774. #define EE_DATA_OUT_M8_16 0x1000
  775. // Mach 8 values in an 8 bit bus OR jumpered to 8 bit I/O operation
  776. #define EE_SELECT_M8_8 0x80
  777. #define EE_CS_M8_8 0x04
  778. #define EE_CLK_M8_8 0x02
  779. #define EE_DATA_OUT_M8_8 0x01
  780. //-------------------------------------------------------------------------
  781. // Context indices
  782. //
  783. #define PATT_COLOR_INDEX 0
  784. #define PATT_MONO_INDEX 16
  785. #define PATT_INDEX_INDEX 19
  786. #define DP_CONFIG_INDEX 27
  787. #define LINEDRAW_OPTION_INDEX 26
  788. //********************** end of AMACH.H ****************************