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.

1083 lines
28 KiB

  1. ;===============================================================================
  2. ;
  3. ; $Workfile: LAGUNA.INC $
  4. ;
  5. ; Contents:
  6. ; Laguna family structures and registers.
  7. ;
  8. ; Copyright (c) 1996, Cirrus Logic, Inc.
  9. ;
  10. ; $Log: X:/log/laguna/nt35/displays/cl546x/i386/LAGUNA.INC $
  11. ;
  12. ; Rev 1.59 Mar 25 1998 16:35:22 frido
  13. ; Added dwOverlayContr and dwCONTROL2Save variables.
  14. ;
  15. ; Rev 1.58 Mar 04 1998 14:43:10 frido
  16. ; Added shadowFGCOLOR.
  17. ;
  18. ; Rev 1.57 Feb 27 1998 17:03:34 frido
  19. ; Added shadowQFREE register and updated REQUIRE macro to use it.
  20. ;
  21. ; Rev 1.56 Jan 20 1998 11:45:54 frido
  22. ; Changed the REQUIRE macro for GBP on.
  23. ; Synchronized PDEV structure with C version.
  24. ;
  25. ; Rev 1.55 Jan 16 1998 14:06:26 frido
  26. ; Changed SOLID_COLOR_FILL so it uses the pattern.
  27. ;
  28. ; Rev 1.54 Nov 04 1997 09:25:22 frido
  29. ; Fixed a typo in DATASTREAMING switch.
  30. ;
  31. ; Rev 1.53 Nov 03 1997 16:26:04 frido
  32. ; Added fDataStreaming flag to PDEV structure.
  33. ; Changed REQUIRE macro.
  34. ;
  35. ; Rev 1.52 16 Oct 1997 09:50:34 bennyn
  36. ;
  37. ; Added bPrevModeDDOutOfVideoMem to PDEV
  38. ;
  39. ; Rev 1.51 18 Sep 1997 16:02:18 bennyn
  40. ; Fixed compile/link problem of NT3.51
  41. ;
  42. ; Rev 1.50 16 Sep 1997 11:09:06 bennyn
  43. ; Fixed the DRIVERDATA mismatch in laguna.inc and driver.h
  44. ;
  45. ; Rev 1.49 12 Sep 1997 11:57:18 bennyn
  46. ; Fixed the PDEV misalignment and added overlay structures.
  47. ;
  48. ; Rev 1.48 18 Aug 1997 09:19:02 FRIDO
  49. ;
  50. ; Added fields for bitmap filter.
  51. ;
  52. ; Rev 1.47 08 Aug 1997 17:19:18 FRIDO
  53. ;
  54. ; Moved mmCore include file to after OFMHDL definition.
  55. ;
  56. ; Rev 1.46 08 Aug 1997 15:11:58 FRIDO
  57. ; Added automatic include file dependencies.
  58. ;
  59. ; Rev 1.45 08 Aug 1997 14:51:52 FRIDO
  60. ; Added support for new memory manager.
  61. ;
  62. ; Rev 1.44 01 Jul 1997 09:56:18 einkauf
  63. ;
  64. ;
  65. ; add dither x,y offsets to TMCDSYSTEM structs, to mirror PDEV changes
  66. ;
  67. ; Rev 1.43 23 May 1997 15:41:56 noelv
  68. ;
  69. ; Added chip revision to pdev
  70. ;
  71. ; Rev 1.42 29 Apr 1997 16:29:42 noelv
  72. ; Merged in new SWAT code.
  73. ; SWAT:
  74. ; SWAT: Rev 1.4 24 Apr 1997 10:55:42 frido
  75. ; SWAT: NT140b09 merge.
  76. ; SWAT: Removed all memory manager changes for now.
  77. ; SWAT:
  78. ; SWAT: Rev 1.3 18 Apr 1997 00:26:10 frido
  79. ; SWAT: NT140b07 merge.
  80. ; SWAT:
  81. ; SWAT: Rev 1.2 11 Apr 1997 12:38:18 frido
  82. ; SWAT: Added OFM_HandleChain.
  83. ; SWAT:
  84. ; SWAT: Rev 1.1 09 Apr 1997 17:34:22 frido
  85. ; SWAT: Added fPreAllocate and nPages.
  86. ; SWAT: Added FONTCELL structure and variables.
  87. ;
  88. ; Rev 1.41 08 Apr 1997 11:49:34 einkauf
  89. ;
  90. ; clean up TMCDSYSTEM struct, adds to PDEV to complete MCD
  91. ;
  92. ; Rev 1.40 04 Apr 1997 16:50:52 noelv
  93. ; Added pointer for new DDraw functions.
  94. ;
  95. ; Rev 1.39 27 Mar 1997 14:32:18 noelv
  96. ; Added new DDRAW function.
  97. ;
  98. ; Rev 1.38 21 Mar 1997 10:08:42 noelv
  99. ; Synced PDEV between C code and ASM code.
  100. ; Added macro to log QFREE data.
  101. ; Consolidated do_flag and sw_test_flag into a single pointer_switch flag.
  102. ;
  103. ; Rev 1.37 07 Mar 1997 09:35:48 SueS
  104. ; Define DO_FLAG based on NULL driver flags.
  105. ;
  106. ; Rev 1.36 26 Feb 1997 13:20:48 noelv
  107. ;
  108. ; disable MCD code for NT 3.5x
  109. ;
  110. ; Rev 1.35 26 Feb 1997 09:24:50 noelv
  111. ;
  112. ; Added support form OpenGL MCD driver
  113. ;
  114. ; Rev 1.33 28 Jan 1997 16:11:02 SueS
  115. ; Added clipping support for the 5465.
  116. ;
  117. ; Rev 1.32 23 Jan 1997 16:36:16 bennyn
  118. ;
  119. ; Added 5465 DD support
  120. ;
  121. ; Rev 1.31 16 Jan 1997 11:32:38 bennyn
  122. ; Added power manager variables to PDEV
  123. ;
  124. ; Rev 1.30 10 Dec 1996 13:28:48 bennyn
  125. ;
  126. ; Added ulFreq to PDEV
  127. ;
  128. ; Rev 1.29 27 Nov 1996 11:33:04 noelv
  129. ; Disabled Magic Bitmap
  130. ;
  131. ; Rev 1.28 18 Nov 1996 10:18:24 bennyn
  132. ;
  133. ; Added grFormat to PDEV
  134. ;
  135. ; Rev 1.27 12 Nov 1996 15:17:16 bennyn
  136. ;
  137. ; Added handle for DD blt scratch buffer
  138. ;
  139. ; Rev 1.26 07 Nov 1996 16:16:24 bennyn
  140. ;
  141. ; Added support to alloc offscn mem in DD createsurface
  142. ;
  143. ; Rev 1.25 01 Nov 1996 09:21:12 BENNYN
  144. ;
  145. ; Added support for DD blt code
  146. ;
  147. ; Rev 1.24 31 Oct 1996 11:13:44 noelv
  148. ; Split common buffer into two buffers.
  149. ;
  150. ; Rev 1.23 25 Oct 1996 11:53:06 noelv
  151. ;
  152. ; added second common buffer
  153. ;
  154. ; Rev 1.22 23 Oct 1996 14:40:26 BENNYN
  155. ;
  156. ; Added YUV cursor variables to PDEV
  157. ;
  158. ; Rev 1.21 04 Oct 1996 16:46:56 bennyn
  159. ; Added DirectDraw YUV support
  160. ;
  161. ; Rev 1.20 18 Sep 1996 13:56:08 bennyn
  162. ; Modified to support DD stretchBLT
  163. ;
  164. ; Rev 1.19 20 Aug 1996 11:29:00 noelv
  165. ; Bugfix release from Frido 8-19-96
  166. ;
  167. ; Rev 1.1 17 Aug 1996 12:32:50 frido
  168. ; New release from Bellevue.
  169. ;
  170. ; Rev 1.18 16 Aug 1996 08:59:02 bennyn
  171. ;
  172. ; Moved bUseSWPtr outside of #ifdef WINNT_VER40
  173. ;
  174. ; Rev 1.17 16 Aug 1996 08:47:58 bennyn
  175. ; Modified to fix DirectDraw cursor problem
  176. ;
  177. ; Rev 1.16 25 Jul 1996 15:50:32 bennyn
  178. ;
  179. ; Modified to support DirectDraw
  180. ;
  181. ; Rev 1.15 16 Jul 1996 14:26:44 BENNYN
  182. ;
  183. ;
  184. ; Rev 1.14 11 Jul 1996 15:51:00 bennyn
  185. ;
  186. ; Added DirectDraw support
  187. ;
  188. ; Rev 1.13 23 May 1996 16:23:06 BENNYN
  189. ;
  190. ; Added SubFreeQ declarations
  191. ;
  192. ; Rev 1.12 08 May 1996 17:03:52 noelv
  193. ; preallocate device bitmap.
  194. ;
  195. ; Rev 1.11 03 May 1996 15:22:44 noelv
  196. ; added switch to turn font cache on and off
  197. ;
  198. ; Rev 1.10 01 May 1996 11:06:00 bennyn
  199. ; Modified for NT 4.0
  200. ;
  201. ; Rev 1.9 10 Apr 1996 13:40:02 NOELV
  202. ; Frido release 27
  203. ;
  204. ; Rev 1.18 07 Apr 1996 17:12:30 frido
  205. ; Added solid brush cache.
  206. ;
  207. ; Rev 1.17 01 Apr 1996 13:58:40 frido
  208. ; Changed layout of brush cache.
  209. ;
  210. ; Rev 1.16 25 Mar 1996 11:42:18 frido
  211. ; Bellevue 102B3.
  212. ;
  213. ; Rev 1.7 14 Mar 1996 09:40:08 andys
  214. ;
  215. ; Added dcTileWidth and dsSRAMWidth
  216. ;
  217. ; Rev 1.6 12 Mar 1996 15:47:24 noelv
  218. ; Added support for stroke and fill path
  219. ;
  220. ; Rev 1.5 11 Mar 1996 11:53:40 noelv
  221. ; Added file pointer to PDEV
  222. ;
  223. ; Rev 1.4 08 Mar 1996 11:07:32 BENNYN
  224. ;
  225. ; Rev 1.3 05 Mar 1996 12:03:48 noelv
  226. ; Frido version 19
  227. ;
  228. ; Rev 1.13 29 Feb 1996 19:57:10 frido
  229. ; Added bEnable to PDEV structure.
  230. ;
  231. ; Rev 1.12 27 Feb 1996 16:39:42 frido
  232. ; Added device bitmap store/restore.
  233. ; Changed DSURF structure.
  234. ;
  235. ; Rev 1.11 26 Feb 1996 23:39:10 frido
  236. ; Added function pointers for ScreenToHost and HostToScreen.
  237. ;
  238. ; Rev 1.10 24 Feb 1996 01:22:40 frido
  239. ; Added device bitmaps.
  240. ;
  241. ; Rev 1.9 19 Feb 1996 05:10:50 frido
  242. ; Changed broken_FIFO to 0.
  243. ;
  244. ; Rev 1.8 17 Feb 1996 21:46:22 frido
  245. ; Revamped brushing algorithmn.
  246. ;
  247. ; Rev 1.7 13 Feb 1996 16:51:44 frido
  248. ; Changed the layout of the PDEV structure.
  249. ; Changed the layout of all brush caches.
  250. ; Changed the number of brush caches.
  251. ;
  252. ; Rev 1.6 10 Feb 1996 21:48:36 frido
  253. ; Split monochrome and colored translation cache.
  254. ;
  255. ; Rev 1.5 08 Feb 1996 00:03:06 frido
  256. ; Added some extra definitions from Driver.h.
  257. ; Changed number of XLATE caches to 8.
  258. ;
  259. ; Rev 1.4 05 Feb 1996 17:35:10 frido
  260. ; Added translation cache.
  261. ;
  262. ; Rev 1.3 31 Jan 1996 13:48:32 frido
  263. ; Added engine macros.
  264. ;
  265. ; Rev 1.2 25 Jan 1996 22:03:10 frido
  266. ; Added some more structures for the PatBLT.
  267. ;
  268. ; Rev 1.1 25 Jan 1996 12:44:44 frido
  269. ; Added font cache ID counter.
  270. ;
  271. ; Rev 1.0 24 Jan 1996 23:13:40 frido
  272. ; Initial release.
  273. ;
  274. ;===============================================================================
  275. .NOLIST
  276. INCLUDE Optimize.h
  277. INCLUDE SWAT.h
  278. COMMENT ~ ;automatic include file dependencies for BUILD.EXE
  279. #include "Optimize.h"
  280. #include "SWAT.h"
  281. ~
  282. .LIST
  283. ; DirectDraw
  284. ; Be sure to synchronize these structures with those in driver.h!
  285. ACCUM = 0
  286. MAJ = 1
  287. MIN = 2
  288. MAX_REGS = 3
  289. MAX_FOURCCS = 3
  290. MAX_VIDEO_WINDOWS = 8
  291. ; Bits defined in DrvSemaphore
  292. ; Be sure to synchronize these structures with those in driver.h!
  293. DRVSEM_CURSOR_REMOVED_BIT = 0
  294. DRVSEM_HW_CURSOR_BIT = 1
  295. DRVSEM_IN_USE_BIT = 2
  296. DRVSEM_NEW_CURSOR_XY_BIT = 3
  297. DRVSEM_CHECK_CURSOR_BIT = 4
  298. DRVSEM_CURSOR_IN_USE_BIT = 5
  299. DRVSEM_CURSOR_CHANGED_BIT = 6
  300. DRVSEM_3D_BUSY_BIT = 7
  301. DRVSEM_MISSED_SET_BIT = 8
  302. DRVSEM_YUV_ON_BIT = 9
  303. DRVSEM_DISABLE_SETS_BIT = 10
  304. DRVSEM_YUV_RECT_VALID_BIT = 11
  305. ; the corresponding mask values
  306. ; Be sure to synchronize these structures with those in driver.h!
  307. DRVSEM_CURSOR_REMOVED = 00000001h
  308. DRVSEM_HW_CURSOR = 00000002h
  309. DRVSEM_IN_USE = 00000004h
  310. DRVSEM_NEW_CURSOR_XY = 00000008h
  311. DRVSEM_CHECK_CURSOR = 00000010h
  312. DRVSEM_CURSOR_IN_USE = 00000020h
  313. DRVSEM_CURSOR_CHANGED = 00000040h
  314. DRVSEM_3D_BUSY = 00000080h
  315. DRVSEM_MISSED_SET = 00000100h
  316. DRVSEM_YUV_ON = 00000200h
  317. DRVSEM_DISABLE_SETS = 00000400h
  318. DRVSEM_YUV_RECT_VALID = 00000800h
  319. broken_FIFO = 0
  320. autoblt_regs STRUCT
  321. LNCNTL WORD ?
  322. SHRINKINC WORD ?
  323. DRAWBLTDEF DWORD ?
  324. FGCOLOR DWORD ?
  325. BGCOLOR DWORD ?
  326. OP0_opRDRAM DWORD ?
  327. MAJ_Y WORD ?
  328. MIN_Y WORD ?
  329. OP1_opRDRAM DWORD ?
  330. ACCUM_Y WORD ?
  331. PATOFF WORD ?
  332. OP2_opRDRAM DWORD ?
  333. MAJ_X WORD ?
  334. MIN_X WORD ?
  335. BLTEXT DWORD ?
  336. ACCUM_X WORD ?
  337. OP0_opSRAM WORD ?
  338. SRCX WORD ?
  339. OP2_opSRAM WORD ?
  340. BLTEXTR_EX DWORD ?
  341. MBLTEXTR_EX DWORD ?
  342. OP0_opMRDRAM DWORD ?
  343. OP1_opMRDRAM DWORD ?
  344. STRETCH_CNTL WORD ?
  345. RESERVED WORD ?
  346. CLIPULE DWORD ?
  347. CLIPLOR DWORD ?
  348. NEXT_HEAD DWORD ?
  349. autoblt_regs ENDS
  350. NUM_MONO_BRUSHES = 32
  351. NUM_4BPP_BRUSHES = 8
  352. NUM_DITHER_BRUSHES = 8
  353. NUM_COLOR_BRUSHES = 32
  354. NUM_8BPP_BRUSHES = (NUM_COLOR_BRUSHES)
  355. NUM_16BPP_BRUSHES = (NUM_COLOR_BRUSHES/2)
  356. NUM_TC_BRUSHES = (NUM_COLOR_BRUSHES/4)
  357. ;//frido BEGIN 07-Apr-96
  358. NUM_SOLID_BRUSHES = 4
  359. ;//frido END 07-Apr-96
  360. ;//frido BEGIN 01-Apr-96
  361. ;FIRST_MONO_ROW = 0
  362. ;NUM_MONO_ROWS = (NUM_MONO_BRUSHES/16)
  363. ;FIRST_4BPP_ROW = (FIRST_MONO_ROW + NUM_MONO_ROWS)
  364. ;NUM_4BPP_ROWS = (NUM_4BPP_BRUSHES*2)
  365. ;FIRST_DITHER_ROW = (FIRST_4BPP_ROW + NUM_4BPP_ROWS)
  366. ;NUM_DITHER_ROWS = (NUM_DITHER_BRUSHES/2)
  367. ;FIRST_COLOR_ROW = (FIRST_DITHER_ROW + NUM_DITHER_ROWS)
  368. ;NUM_COLOR_ROWS = (NUM_COLOR_BRUSHES/2)
  369. ;//frido END 01-Apr-96
  370. RBRUSH STRUCT
  371. nPatSize ULONG ?
  372. iBitmapFormat ULONG ?
  373. ulForeColor ULONG ?
  374. ulBackColor ULONG ?
  375. iType ULONG ?
  376. BRUSH_MONO = 1
  377. BRUSH_4BPP = 2
  378. BRUSH_DITHER = 3
  379. BRUSH_COLOR = 4
  380. iUniq ULONG ?
  381. cache_slot ULONG ?
  382. cache_xy ULONG ?
  383. cjMask ULONG ?
  384. ajPattern BYTE 0 DUP(?)
  385. RBRUSH ENDS
  386. BC_ENTRY STRUCT
  387. xy ULONG ?
  388. pjLinear DWORD ?
  389. brushID DWORD ?
  390. BC_ENTRY ENDS
  391. DC_ENTRY STRUCT
  392. xy ULONG ?
  393. pjLinear DWORD ?
  394. ulColor ULONG ?
  395. DC_ENTRY ENDS
  396. MC_ENTRY STRUCT
  397. xy ULONG ?
  398. pjLinear DWORD ?
  399. iUniq ULONG ?
  400. ajPattern BYTE 8 DUP(?)
  401. MC_ENTRY ENDS
  402. XC_ENTRY STRUCT
  403. xy ULONG ?
  404. pjLinear DWORD ?
  405. iUniq ULONG ?
  406. ajPattern BYTE 8 * 4 DUP(?)
  407. ajPalette ULONG 16 DUP(?)
  408. XC_ENTRY ENDS
  409. POFM_CALLBACK TYPEDEF PTR
  410. OFMHDL STRUCT
  411. x ULONG ?
  412. y ULONG ?
  413. aligned_x ULONG ?
  414. aligned_y ULONG ?
  415. sizex LONG ?
  416. sizey LONG ?
  417. alignflag ULONG ?
  418. flag ULONG ?
  419. pcallback POFM_CALLBACK ?
  420. prevhdl DWORD ?
  421. nexthdl DWORD ?
  422. subprvhdl DWORD ?
  423. subnxthdl DWORD ?
  424. prvFonthdl DWORD ?
  425. nxtFonthdl DWORD ?
  426. pdsurf DWORD ?
  427. OFMHDL ENDS
  428. POFMHDL TYPEDEF PTR OFMHDL
  429. IF MEMMGR
  430. INCLUDE mmCore.h
  431. ENDIF
  432. COMMENT ~
  433. #include "mmCore.h" //automatic include file dependencies for BUILD.EXE
  434. ~
  435. DDOFM STRUCT
  436. prevhdl DWORD ?
  437. nexthdl DWORD ?
  438. phdl POFMHDL ?
  439. DDOFM ENDS
  440. PDDOFM TYPEDEF PTR DDOFM
  441. MAX_GLYPHS = 256
  442. FONTMEMORY STRUCT
  443. pTile DWORD ?
  444. ulLastX DWORD ?
  445. pNext DWORD ?
  446. FONTMEMORY ENDS
  447. GLYPHCACHE STRUCT
  448. xyPos DWORD ?
  449. cSize DWORD ?
  450. ptlOrigin POINTL {}
  451. GLYPHCACHE ENDS
  452. ; New SWAT3 structure.
  453. FONTCELL STRUCT
  454. x DWORD ?
  455. y DWORD ?
  456. pfc DWORD ?
  457. ulLastX DWORD ?
  458. pNext DWORD ?
  459. FONTCELL ENDS
  460. PFONTCELL TYPEDEF PTR FONTCELL
  461. FONTCACHE STRUCT
  462. ppdev DWORD ?
  463. pFontMemory DWORD ?
  464. pFontCell PFONTCELL ? ;SWAT3
  465. ulFontCount ULONG ?
  466. aGlyphs GLYPHCACHE MAX_GLYPHS DUP({})
  467. pfo DWORD ?
  468. pfcPrev DWORD ?
  469. pfcNext DWORD ?
  470. FONTCACHE ENDS
  471. PFONTCACHE TYPEDEF PTR FONTCACHE
  472. OFFSCR_YUV STRUCT
  473. SrcRect RECTL {}
  474. nInUse WORD ?
  475. ratio WORD ?
  476. OFFSCR_YUV ENDS
  477. POFFSCR_YUV TYPEDEF PTR OFFSCR_YUV
  478. if DRIVER_5465
  479. ifdef OVERLAY
  480. VIDCONFIG STRUCT
  481. sizXfer SIZEL {}
  482. sizCap SIZEL {}
  483. sizSrc SIZEL {}
  484. sizDisp SIZEL {}
  485. uXferDepth DWORD ?
  486. uCapDepth DWORD ?
  487. uSrcDepth DWORD ?
  488. uDispDepth DWORD ?
  489. uGfxDepth DWORD ?
  490. dwXferRate DWORD ?
  491. dwFlags DWORD ?
  492. VIDCONFIG ENDS
  493. LPVIDCONFIG TYPEDEF PTR VIDCONFIG
  494. PROGREGS STRUCT
  495. VW0_FIFO_THRSH WORD ?
  496. DispThrsTiming WORD ?
  497. PROGREGS ENDS
  498. LPPROGREGS TYPEDEF PTR PROGREGS
  499. OVERLAYFLIPRECORD STRUCT
  500. fpFlipFrom PBYTE ?
  501. liFlipTime DWORD ?
  502. DWORD ?
  503. DWORD ?
  504. DWORD ?
  505. dwFlipDuration DWORD ?
  506. dwFlipScanline DWORD ?
  507. bFlipFlag BOOL ?
  508. bHaveEverCrossedVBlank BOOL ?
  509. bWasEverInDisplay BOOL ?
  510. OVERLAYFLIPRECORD ENDS
  511. OVERLAYTABLE STRUCT
  512. pfnCanCreateSurface DWORD ?
  513. pfnCreateSurface DWORD ?
  514. pfnDestroySurface DWORD ?
  515. pfnLock DWORD ?
  516. pfnUnlock DWORD ?
  517. pfnSetColorKey DWORD ?
  518. pfnFlip DWORD ?
  519. pfnUpdateOverlay DWORD ?
  520. pfnSetOverlayPos DWORD ?
  521. pfnGetFlipStatus DWORD ?
  522. OVERLAYTABLE ENDS
  523. LPOVERLAYTABLE TYPEDEF PTR OVERLAYTABLE
  524. endif ; OVERLAY
  525. endif ; DRIVER_5465
  526. DRIVERDATA STRUCT
  527. PTAGFooPixel DWORD ?
  528. fNineBitRDRAMS WORD ?
  529. fReset BOOL ?
  530. ScreenAddress PBYTE ?
  531. VideoBase PBYTE ?
  532. RegsAddress DWORD ?
  533. DrvSemaphore WORD ?
  534. EdgeTrim WORD ?
  535. YUVTop WORD ?
  536. YUVLeft WORD ?
  537. YUVXExt WORD ?
  538. YUVYExt WORD ?
  539. VideoSemaphore WORD ?
  540. CurrentVideoFormat WORD ?
  541. NumVideoSurfaces WORD ?
  542. ScratchBufferOrg DWORD ?
  543. ifdef WINNT_VER40
  544. if DRIVER_5465
  545. ifdef OVERLAY
  546. fOverlaySupport BOOL ?
  547. OverlayTable OVERLAYTABLE {}
  548. dwOverlayCount DWORD ?
  549. dwCONTROL2Save DWORD ?
  550. ; Win95 5465over.c static vars
  551. bUseBWEqn BOOL ?
  552. bNoOverlayInThisMode BOOL ?
  553. lpHardwareOwner DWORD MAX_VIDEO_WINDOWS DUP (?)
  554. lpColorSurfaceVW DWORD MAX_VIDEO_WINDOWS DUP (?)
  555. lpSrcColorSurfaceVW DWORD MAX_VIDEO_WINDOWS DUP (?)
  556. grOverlaySrc RECTL MAX_VIDEO_WINDOWS DUP ({})
  557. grOverlayDest RECTL MAX_VIDEO_WINDOWS DUP ({})
  558. gdwFourccVW DWORD MAX_VIDEO_WINDOWS DUP (?)
  559. bIsVWMirrored BOOL MAX_VIDEO_WINDOWS DUP (?)
  560. gdwAvailVW DWORD ?
  561. gdwColorKey DWORD ?
  562. gdwSrcColorKeyLow DWORD ?
  563. gdwSrcColorKeyHigh DWORD ?
  564. gdwDestColorKeyOwnerVW DWORD ?
  565. gdwSrcColorKeyOwnerVW DWORD ?
  566. giOvlyCnt DWORD MAX_VIDEO_WINDOWS DUP (?)
  567. giPlanarCnt DWORD ?
  568. bCLPLLobotomyMode BOOL ?
  569. ; Win95 5465over.c global vars
  570. gsOverlayFlip OVERLAYFLIPRECORD {}
  571. gsProgRegs PROGREGS {}
  572. gvidConfig VIDCONFIG {}
  573. gwNormalDTTR WORD ?
  574. dwNumVideoWindows DWORD ?
  575. bEnableCLPL BOOL ?
  576. ; NT only data
  577. dwMaxOverlayStretch DWORD ?
  578. dwMinOverlayStretch DWORD ?
  579. dwFourCC DWORD MAX_FOURCCS DUP (?)
  580. else
  581. dwFourCC DWORD ?
  582. endif ; OVERLAY
  583. else
  584. dwFourCC DWORD ?
  585. endif ; DRIVER_5465
  586. endif ; WINNT_VER40
  587. signature DWORD ?
  588. DRIVERDATA ENDS
  589. PDRIVERDATA TYPEDEF PTR DRIVERDATA
  590. FLIPRECORD STRUCT
  591. ifdef WINNT_VER40
  592. fpFlipFrom PBYTE ?
  593. endif
  594. liFlipTime DWORD ?
  595. DWORD ?
  596. liFlipDuration DWORD ?
  597. DWORD ?
  598. bFlipFlag BOOL ?
  599. bHaveEverCrossedVBlank BOOL ?
  600. bWasEverInDisplay BOOL ?
  601. dwFlipScanLine WORD ?
  602. FLIPRECORD ENDS
  603. PFLIPRECORD TYPEDEF PTR FLIPRECORD
  604. LL_RECT STRUCT
  605. DWORD left ?
  606. DWORD top ?
  607. DWORD right ?
  608. DWORD bottom ?
  609. LL_RECT ENDS
  610. TDISPLAYLIST STRUCT
  611. pdwNext DWORD ?
  612. hMem DWORD ?
  613. pdwLinPtr DWORD ?
  614. pdwStartOutPtr DWORD ?
  615. dwPhyPtr DWORD ?
  616. dwLen DWORD ?
  617. dwMargin DWORD ?
  618. TDISPLAYLIST ENDS
  619. PTRDL TYPEDEF PTR TDISPLAYLIST
  620. NUM_DL = 2
  621. LL_PATTERN STRUCT
  622. pat DWORD 8 DUP(?)
  623. LL_PATTERN ENDS
  624. TMCDSYSTEM STRUCT
  625. rColor_Min_Bounds DWORD ?
  626. rColor_Max_Bounds DWORD ?
  627. AlphaConstSource DWORD ?
  628. AlphaConstDest DWORD ?
  629. Displists TDISPLAYLIST NUM_DL DUP({})
  630. pDL PTRDL ?
  631. dwCdl DWORD ?
  632. pRegs DWORD ?
  633. pFrame PBYTE ?
  634. pattern_ram_state DWORD ?
  635. dither_array LL_PATTERN {}
  636. dither_x_offset WORD ?
  637. dither_y_offset WORD ?
  638. TMCDSYSTEM ENDS
  639. ;temporary mem for MCD display lists
  640. SIZE_TEMP_DL = 2048
  641. SIZE_FRECIP = 2048+1
  642. PDEV STRUCT
  643. hDriver HANDLE ?
  644. hdevEng HANDLE ?
  645. hsurfEng HANDLE ?
  646. hPalDefault HANDLE ?
  647. pjScreen PBYTE ?
  648. cxScreen ULONG ?
  649. cyScreen ULONG ?
  650. cxMemory ULONG ?
  651. cyMemory ULONG ?
  652. cyMemoryReal ULONG ?
  653. ulMode ULONG ?
  654. ulFreq ULONG ?
  655. lDeltaScreen LONG ?
  656. flRed FLONG ?
  657. flGreen FLONG ?
  658. flBlue FLONG ?
  659. cPaletteShift ULONG ?
  660. ptlHotSpot POINTL {}
  661. cPatterns ULONG ?
  662. ahbmPat HANDLE HS_DDI_MAX DUP(?)
  663. pPal DWORD ?
  664. pjOffScreen PBYTE ?
  665. iBitmapFormat ULONG ?
  666. ulBitCount ULONG ?
  667. iBytesPerPixel ULONG ?
  668. PtrABlt autoblt_regs 3 DUP({})
  669. ifdef WINNT_VER40
  670. CShsem HANDLE ?
  671. else
  672. PtrCritSec CRITICAL_SECTION {}
  673. endif
  674. prcl RECTL {}
  675. PtrBusy BOOL ?
  676. fHwCursorActive BOOL ?
  677. CursorHidden BOOL ?
  678. PtrMaskHandle POFMHDL ?
  679. PtrImageHandle POFMHDL ?
  680. PtrABltHandle POFMHDL ?
  681. PtrXHotSpot ULONG ?
  682. PtrYHotSpot ULONG ?
  683. PtrX ULONG ?
  684. PtrY ULONG ?
  685. PtrSzX ULONG ?
  686. PtrSzY ULONG ?
  687. PointerUsage LONG ?
  688. grCONTROL DWORD ?
  689. grFORMAT DWORD ?
  690. grVSCONTROL DWORD ?
  691. lOffset_2D LONG ?
  692. lTileSize LONG ?
  693. lTotalMem LONG ?
  694. OFM_init BOOL ?
  695. ifdef WINNT_VER40
  696. MMhsem HANDLE ?
  697. else
  698. MutexHdl HANDLE ?
  699. endif
  700. bDirectDrawInUse BOOL ?
  701. ScrnHandle POFMHDL ?
  702. OFM_UsedQ POFMHDL ?
  703. OFM_FreeQ POFMHDL ?
  704. OFM_SubFreeQ1 POFMHDL ?
  705. OFM_SubFreeQ2 POFMHDL ?
  706. pfcChain PFONTCACHE ?
  707. Bcache POFMHDL ?
  708. Mtable MC_ENTRY NUM_MONO_BRUSHES DUP({})
  709. Xtable XC_ENTRY NUM_4BPP_BRUSHES DUP({})
  710. Dtable DC_ENTRY NUM_DITHER_BRUSHES DUP({})
  711. Ctable BC_ENTRY NUM_COLOR_BRUSHES DUP({})
  712. ;frido BEGIN 07-Apr-96
  713. Stable DC_ENTRY NUM_SOLID_BRUSHES DUP({})
  714. SNext ULONG ?
  715. ;frido END 07-Apr-96
  716. CLast ULONG ?
  717. MNext ULONG ?
  718. XNext ULONG ?
  719. DNext ULONG ?
  720. CNext ULONG ?
  721. ulFontCount ULONG ?
  722. UseFontCache ULONG ?
  723. ptlOffset POINTL {}
  724. bEnable BOOL ?
  725. pfnHostToScreen DWORD ?
  726. pfnScreenToHost DWORD ?
  727. pLgREGS_real DWORD ?
  728. pLgREGS DWORD ?
  729. dcTileWidth WORD ?
  730. dcSRAMWidth WORD ?
  731. uBLTDEF ULONG ?
  732. uRop ULONG ?
  733. pvTmpBuffer DWORD ?
  734. IF ENABLE_LOG_FILE
  735. pmfile DWORD ?
  736. TxtBuff DWORD 1000h DUP(?)
  737. TxtBuffIndex DWORD ?
  738. ENDIF
  739. IF NULL_HW
  740. buffer BYTE 1000h DUP(?)
  741. ENDIF
  742. IF WINBENCH96
  743. pofmMagic POFMHDL ?
  744. bMagicUsed ULONG ?
  745. ENDIF
  746. ; SWAT1 changes.
  747. fPreAllocate BOOL ?
  748. nPages DWORD ?
  749. ; SWAT3 changes.
  750. FONTCELL_COUNT = 64
  751. FONTCELL_X = 128
  752. FONTCELL_y = 16
  753. pofmFontCache POFMHDL ?
  754. fcGrid FONTCELL FONTCELL_COUNT DUP({})
  755. IF MEMMGR
  756. ; MEMMGR changes.
  757. mmMemMgr IIMEMMGR {}
  758. must_have_width LONG ?
  759. bBitmapFilter BOOL ?
  760. szlBitmapMin SIZEL {}
  761. szlBitmapMax SIZEL {}
  762. ENDIF
  763. ; For DirectDraw
  764. bPrevModeDDOutOfVideoMem BOOL ?
  765. DirectDrawHandle POFMHDL ?
  766. flipRecord FLIPRECORD {}
  767. DriverData DRIVERDATA {}
  768. offscr_YUV OFFSCR_YUV {}
  769. dwDDLinearCnt DWORD ?
  770. pPtrMaskHost PBYTE ?
  771. bYUVuseSWPtr BOOL ?
  772. dwLgDevID DWORD ?
  773. dwLgDevRev DWORD ?
  774. bYUVSurfaceOn BOOL ?
  775. InitBPP WORD ?
  776. lRegVals DWORD 2 * MAX_REGS DUP(?)
  777. sShrinkInc DWORD ?
  778. usLnCntl DWORD ?
  779. usStretchCtrl DWORD ?
  780. pPMdatabuf PBYTE ?
  781. ifdef WINNT_VER40
  782. pfnDelay9BitBlt DWORD ?
  783. pfnEdgeFillBlt DWORD ?
  784. pfnMEdgeFillBlt DWORD ?
  785. pfnDrvDstBlt DWORD ?
  786. pfnDrvDstMBlt DWORD ?
  787. pfnDrvSrcBlt DWORD ?
  788. pfnDrvSrcMBlt DWORD ?
  789. pfnDrvStrBlt DWORD ?
  790. pfnDrvStrMBlt DWORD ?
  791. pfnDrvStrMBltY DWORD ?
  792. pfnDrvStrMBltX DWORD ?
  793. pfnDrvStrBltY DWORD ?
  794. pfnDrvStrBltX DWORD ?
  795. endif
  796. DDScratchBufHandle POFMHDL ?
  797. DDOffScnMemQ PDDOFM ?
  798. IFDEF BUS_MASTER
  799. Buf1VirtAddr DWORD ?
  800. Buf2VirtAddr DWORD ?
  801. Buf1PhysAddr DWORD ?
  802. Buf2PhysAddr DWORD ?
  803. BufLength ULONG ?
  804. ENDIF
  805. ;START OpenGL MCD additions
  806. IFNDEF WINNT_VER35
  807. hMCD HANDLE ?
  808. pMCDFilterFunc DWORD ?
  809. cDoubleBufferRef DWORD ?
  810. cZBufferRef DWORD ?
  811. pohBackBuffer POFMHDL ?
  812. pohZBuffer POFMHDL ?
  813. temp_DL_chunk DWORD SIZE_TEMP_DL DUP(?)
  814. LL_State TMCDSYSTEM {}
  815. pAllocOffScnMem DWORD ?
  816. pFreeOffScnMem DWORD ?
  817. pAssertModeMCD DWORD ?
  818. frecips DWORD SIZE_FRECIP DUP(?)
  819. pLastDevRC DWORD ?
  820. NumMCDContexts DWORD ?
  821. iUniqueness DWORD ?
  822. pFirstTexture DWORD ?
  823. pLastTexture DWORD ?
  824. ENDIF
  825. ;END OpenGL MCD additions
  826. XlateCache POFMHDL ?
  827. XlateCacheId ULONG ?
  828. CachedChromaCtrl WORD ?
  829. CachedStretchCtrl WORD ?
  830. signature DWORD ?
  831. if DATASTREAMING
  832. dwDataStreaming DWORD ?
  833. shadowFGCOLOR DWORD ?
  834. shadowBGCOLOR DWORD ?
  835. shadowDRAWBLTDEF DWORD ?
  836. shadowQFREE BYTE ?
  837. endif
  838. PDEV ENDS
  839. DSURF STRUCT
  840. ppdev DWORD ?
  841. pofm DWORD ?
  842. pso DWORD ?
  843. ptl POINTL {}
  844. sizl SIZEL {}
  845. packedXY DWORD ?
  846. DSURF ENDS
  847. TEXT_EXPAND_XPAR = 106601F0h
  848. TEXT_EXPAND_OPAQUE = 100600F0h
  849. SOLID_COLOR_FILL = 100700F0h
  850. CLIPEN = 0800h
  851. grSTATUS = 400h
  852. grCONTROL = 402h
  853. grQFREE = 404h
  854. grOFFSET_2D = 405h
  855. grTIMEOUT = 406h
  856. grTILE_CTRL = 407h
  857. grRESIZE_A_opRDRAM = 408h
  858. grRESIZE_B_opRDRAM = 40Ch
  859. grRESIZE_C_opRDRAM = 410h
  860. grCOMMAND = 480h
  861. grMIN_Y = 500h
  862. grMAJ_Y = 502h
  863. grACCUM_Y = 504h
  864. grMIN_X = 508h
  865. grMAJ_X = 50Ah
  866. grACCUM_X = 50Ch
  867. grLNCNTL = 50Eh
  868. grBLTEXT = 518h
  869. grMBLTEXT = 51Ch
  870. grOP0_opRDRAM = 520h
  871. grOP0_opMRDRAM = 524h
  872. grOP0_opSRAM = 528h
  873. grPATOFF = 52Ah
  874. grOP1_opRDRAM = 540h
  875. grOP1_opMRDRAM = 544h
  876. grOP1_opSRAM = 548h
  877. grOP1_opMSRAM = 54Ah
  878. grOP2_opRDRAM = 560h
  879. grOP2_opMRDRAM = 564h
  880. grOP2_opSRAM = 568h
  881. grOP2_opMSRAM = 56Ah
  882. grSRCX = 580h
  883. grSHRINKINC = 582h
  884. grDRAWBLTDEF = 584h
  885. grDRAWDEF = 584h
  886. grBLTDEF = 586h
  887. grMONOQW = 588h
  888. grCLIPULE = 590h
  889. grCLIPLOR = 594h
  890. grMCLIPULE = 598h
  891. grMCLIPLOR = 59Ch
  892. grOP_opFGCOLOR = 5E0h
  893. grOP_opBGCOLOR = 5E4h
  894. grBITMASK = 5E8h
  895. grPTAG = 5ECh
  896. grBOGUS = 5FCh
  897. grBLTEXT_XEX = 600h
  898. grBLTEXTFF_XEX = 604h
  899. grBLTEXTR_XEX = 608h
  900. grBLTEXT_LN_EX = 60Ch
  901. grMBLTEXT_XEX = 620h
  902. grMBLTEXTR_XEX = 628h
  903. grBLTEXT_EX = 700h
  904. grBLTEXTFF_EX = 704h
  905. grBLTEXTR_EX = 708h
  906. grMBLTEXT_EX = 720h
  907. grMBLTEXTR_EX = 728h
  908. grCLIPULE_EX = 760h
  909. grCLIPLOR_EX = 770h
  910. grMCLIPULE_EX = 780h
  911. grMCLIPLOR_EX = 790h
  912. grHOSTDATA = 800h
  913. SWIZ_CNTL = 0400h
  914. ENUMRECTS8 STRUCT
  915. _c DWORD ?
  916. arcl RECTL 8 DUP({})
  917. ENUMRECTS8 ENDS
  918. FUDGE = 2 ;fudge factor for QFREE register
  919. REQUIRE MACRO n:REQ, ppdev:REQ, base:=<ebp>
  920. LOCAL WaitFIFO, SkipWait, WaitIdle, SkipWaitUpdate, WaitLoop
  921. IF DATASTREAMING
  922. TEMPREG8 TEXTEQU <>
  923. TEMPREG32 TEXTEQU <>
  924. IFDIFI <ppdev>, <eax>
  925. IFDIFI <base>, <eax>
  926. TEMPREG8 TEXTEQU <al>
  927. TEMPREG32 TEXTEQU <aex>
  928. ENDIF
  929. ENDIF
  930. IFDIFI <ppdev>, <ebx>
  931. IFDIFI <base>, <ebx>
  932. TEMPREG8 TEXTEQU <bl>
  933. TEMPREG32 TEXTEQU <ebx>
  934. ENDIF
  935. ENDIF
  936. IFDIFI <ppdev>, <ecx>
  937. IFDIFI <base>, <ecx>
  938. TEMPREG8 TEXTEQU <cl>
  939. TEMPREG32 TEXTEQU <ecx>
  940. ENDIF
  941. ENDIF
  942. IFDIFI <ppdev>, <edx>
  943. IFDIFI <base>, <edx>
  944. TEMPREG8 TEXTEQU <dl>
  945. TEMPREG32 TEXTEQU <edx>
  946. ENDIF
  947. ENDIF
  948. test [ppdev].dwDataStreaming, -1
  949. js WaitFIFO
  950. jz SkipWait
  951. cmp BYTE PTR [base + grQFREE], n + FUDGE
  952. jnb SkipWait
  953. WaitIdle:
  954. test WORD PTR [base + grSTATUS], 8005h
  955. jnz WaitIdle
  956. mov byte ptr [ppdev].dwDataStreaming, 0
  957. jmp SkipWait
  958. WaitFIFO:
  959. push TEMPREG32
  960. mov TEMPREG8, [ppdev].shadowQFREE
  961. WaitLoop:
  962. cmp TEMPREG8, n + FUDGE
  963. jnb SkipWaitUpdate
  964. mov TEMPREG8, [base + grQFREE]
  965. jmp WaitLoop
  966. SkipWaitUpdate:
  967. sub TEMPREG8, n
  968. mov [ppdev].shadowQFREE, TEMPREG8
  969. pop TEMPREG32
  970. SkipWait:
  971. ENDIF
  972. ENDM
  973. IDLE MACRO base:=<ebp>
  974. LOCAL WaitFIFO
  975. WaitFIFO:
  976. cmp WORD PTR [base + grSTATUS], 0
  977. jne WaitFIFO
  978. ENDM
  979. ENDREQUIRE MACRO ppdev:REQ
  980. IF DATASTREAMING
  981. or [ppdev].dwDataStreaming, 1
  982. ENDIF
  983. ENDM