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.

606 lines
19 KiB

  1. /******************************************************************************\
  2. *
  3. * $Workfile: ESCAPE.C $
  4. *
  5. * Cirrus Logic Escapes.
  6. *
  7. * Copyright (c) 1996-1997 Microsoft Corporation.
  8. * Copyright (c) 1993-1997 Cirrus Logic, Inc.,
  9. *
  10. * $Log: V:/CirrusLogic/CL5446/NT40/Archive/Display/ESCAPE.C_v $
  11. *
  12. * Rev 1.0 24 Jun 1996 16:21:18 frido
  13. * Initial revision.
  14. *
  15. * myf17 11-04-96 Added special escape code must be use 11/5/96 later NTCTRL,
  16. * and added Matterhorn LF Device ID==0x4C
  17. * myf18 11-04-96 Fixed PDR #7075,
  18. * myf19 11-06-96 Fixed Vinking can't work problem, because DEVICEID = 0x30
  19. * is different from data book (CR27=0x2C)
  20. * chu01 12-16-96 Enable color correction.
  21. * pat01 :11-22-96 : Fix panning-scrolling bugs.
  22. * (1) Screen messes up when switch to simulscan(with panning)
  23. * (2) Software cursor problem in panning scrolling mode
  24. * pat07 : : Take care of disappering hardware cursor during simulscan
  25. * myf29 02-12-97 Support 755x gamma collection.
  26. * chu02 02-13-97 More thorough checking for color correction.
  27. * jl01 02-24-97 Implement Feature Connector's functions.
  28. *
  29. \******************************************************************************/
  30. #include "precomp.h"
  31. //
  32. // chu01
  33. //
  34. #ifdef GAMMACORRECT
  35. #include "string.h"
  36. #include "stdio.h"
  37. extern PGAMMA_VALUE GammaFactor ;
  38. extern PGAMMA_VALUE ContrastFactor ;
  39. #endif // GAMMACORRECT
  40. extern
  41. /******************************Public*Routine******************************\
  42. * DrvEscape
  43. *
  44. * Processes the private ESCAPE's for this driver
  45. *
  46. \**************************************************************************/
  47. ULONG DrvEscape(
  48. SURFOBJ *pso,
  49. ULONG iEsc,
  50. ULONG cjIn,
  51. VOID *pvIn,
  52. ULONG cjOut,
  53. VOID *pvOut)
  54. {
  55. ULONG returnLength;
  56. PPDEV ppdev = (PPDEV) pso->dhpdev;
  57. DHPDEV dhpdev = (DHPDEV) pso->dhpdev; //myf17
  58. ULONG ulMode; //myf17
  59. BYTE* pjPorts; //myf17
  60. VIDEO_MODE_INFORMATION VideoModeInfo; //myf17
  61. SHORT i; //myf17
  62. unsigned char savePaletteR[256]; //pat01
  63. unsigned char savePaletteG[256]; //pat01
  64. unsigned char savePaletteB[256]; //pat01
  65. unsigned char R,G,B; //pat01
  66. unsigned char palettecounter; //pat01
  67. LONG savex, savey ; //pat07
  68. UCHAR TempByte; //jl01
  69. //
  70. // chu01
  71. //
  72. #ifdef GAMMACORRECT
  73. PVIDEO_CLUT pScreenClut ;
  74. BYTE ajClutSpace[MAX_CLUT_SIZE] ;
  75. PALETTEENTRY* ppalSrc ;
  76. PALETTEENTRY* ppalDest ;
  77. PALETTEENTRY* ppalEnd ;
  78. UCHAR GammaRed, GammaGreen, GammaBlue, Brightness ;
  79. ULONG ulReturnedDataLength ;
  80. UCHAR tempB ;
  81. ULONG *Signature ;
  82. BOOL status; //myf29
  83. UCHAR* pvLUT; //myf29
  84. #endif // GAMMACORRECT
  85. DISPDBG((2, "---- DrvEscape"));
  86. DISPDBG((4, "cjIn = %d, cjOut = %d, pvIn = 0x%lx, pvOut = 0x%lx",
  87. cjIn, cjOut, pvIn, pvOut));
  88. pjPorts = ppdev->pjPorts;
  89. DISPDBG((2, "CIRRUS:DrvEscape: entered DrvEscape\n"));
  90. if (iEsc == QUERYESCSUPPORT) {
  91. if ( ((*(ULONG *)pvIn) == CIRRUS_PRIVATE_ESCAPE) ||
  92. //myf17 begin
  93. ((*(ULONG *)pvIn) == CLESCAPE_CRT_CONNECTION) ||
  94. ((*(ULONG *)pvIn) == CLESCAPE_SET_VGA_OUTPUT) ||
  95. ((*(ULONG *)pvIn) == CLESCAPE_GET_VGA_OUTPUT) ||
  96. ((*(ULONG *)pvIn) == CLESCAPE_GET_PANEL_SIZE) ||
  97. ((*(ULONG *)pvIn) == CLESCAPE_PANEL_MODE)) {
  98. //myf17 end
  99. return TRUE;
  100. }
  101. //
  102. // chu01
  103. //
  104. #ifdef GAMMACORRECT
  105. else if ((*(USHORT *)pvIn) == CLESCAPE_GET_CHIPID)
  106. {
  107. return TRUE;
  108. }
  109. #endif // GAMMACORRECT
  110. else
  111. {
  112. return FALSE;
  113. }
  114. }
  115. else if (iEsc == CIRRUS_PRIVATE_ESCAPE)
  116. {
  117. if (!IOCONTROL(ppdev->hDriver,
  118. IOCTL_CIRRUS_PRIVATE_BIOS_CALL,
  119. pvIn,
  120. cjIn,
  121. pvIn,
  122. cjIn,
  123. &returnLength))
  124. {
  125. DISPDBG((2, "CIRRUS:DrvEscape: failed private BIOS call.\n"));
  126. return FALSE;
  127. }
  128. else {
  129. DISPDBG((2, "CIRRUS:DrvEscape: private BIOS call GOOD.\n"));
  130. // copy the result to the output buffer
  131. *(VIDEO_X86_BIOS_ARGUMENTS *)pvOut = *(VIDEO_X86_BIOS_ARGUMENTS *)pvIn;
  132. //myf33 begin for TV on bug
  133. if (((*(ULONG *)pvIn & 0x120F) != 0x1200) &&
  134. ((*( ((ULONG *)pvIn)+1) & 0x01B0) == 0x01B0))
  135. {
  136. // bAssertModeHardware((PDEV *) dhpdev, TRUE);
  137. DWORD ReturnedDataLength;
  138. ULONG ulReturn;
  139. VIDEO_MODE_INFORMATION VideoModeInfo;
  140. IOCONTROL(ppdev->hDriver,
  141. IOCTL_VIDEO_QUERY_CURRENT_MODE,
  142. NULL,
  143. 0,
  144. &VideoModeInfo,
  145. sizeof(VideoModeInfo),
  146. &ReturnedDataLength);
  147. #ifdef PANNING_SCROLL
  148. if ((ppdev->ulChipID == 0x38) || (ppdev->ulChipID == 0x2C) ||
  149. (ppdev->ulChipID == 0x30) || (ppdev->ulChipID == 0x34) ||
  150. (ppdev->ulChipID == 0x40) || (ppdev->ulChipID == 0x4C))
  151. {
  152. CirrusLaptopViewPoint(ppdev, &VideoModeInfo);
  153. }
  154. #endif
  155. }
  156. //myf33 end
  157. return TRUE;
  158. }
  159. }
  160. else if (iEsc == CLESCAPE_CRT_CONNECTION) //myf17
  161. {
  162. *(ULONG *)pvOut = (ULONG)0x1200;
  163. *( ((ULONG *)pvOut)+1) = 0xA1;
  164. if (!IOCONTROL(ppdev->hDriver,
  165. IOCTL_CIRRUS_CRT_CONNECTION,
  166. pvOut,
  167. cjOut,
  168. pvOut,
  169. cjOut,
  170. &returnLength))
  171. {
  172. DISPDBG((2, "CIRRUS:DrvEscape: failed CRT CONNECTION.\n"));
  173. return FALSE;
  174. }
  175. else {
  176. DISPDBG((2, "CIRRUS:DrvEscape: CRT CONNECTION GOOD.\n"));
  177. return TRUE;
  178. }
  179. }
  180. else if (iEsc == CLESCAPE_GET_VGA_OUTPUT) //myf17
  181. {
  182. *(ULONG *)pvOut = (ULONG)0x1200;
  183. *( ((ULONG *)pvOut)+1) = 0x9A;
  184. if (!IOCONTROL(ppdev->hDriver,
  185. IOCTL_CIRRUS_GET_VGA_OUTPUT,
  186. pvOut,
  187. cjOut,
  188. pvOut,
  189. cjOut,
  190. &returnLength))
  191. {
  192. DISPDBG((2, "CIRRUS:DrvEscape: failed GET VGA OUTPUT.\n"));
  193. return FALSE;
  194. }
  195. else {
  196. DISPDBG((2, "CIRRUS:DrvEscape: GET VGA OUTPUT GOOD.\n"));
  197. return TRUE;
  198. }
  199. }
  200. else if (iEsc == CLESCAPE_GET_PANEL_SIZE) //myf17
  201. {
  202. *(ULONG *)pvOut = (ULONG)0x1280;
  203. *( ((ULONG *)pvOut)+1) = 0x9C;
  204. if (!IOCONTROL(ppdev->hDriver,
  205. IOCTL_CIRRUS_CRT_CONNECTION,
  206. pvOut,
  207. cjOut,
  208. pvOut,
  209. cjOut,
  210. &returnLength))
  211. {
  212. DISPDBG((2, "CIRRUS:DrvEscape: failed CRT CONNECTION.\n"));
  213. return FALSE;
  214. }
  215. else {
  216. DISPDBG((2, "CIRRUS:DrvEscape: CRT CONNECTION GOOD.\n"));
  217. return TRUE;
  218. }
  219. }
  220. else if (iEsc == CLESCAPE_PANEL_MODE) //myf17
  221. {
  222. *(ULONG *)pvOut = *(ULONG *)pvIn;
  223. *(ULONG *)pvOut |= (ULONG)0x1200;
  224. *( ((ULONG *)pvOut)+1) = 0xA0;
  225. if (!IOCONTROL(ppdev->hDriver,
  226. IOCTL_CIRRUS_PANEL_MODE,
  227. pvOut,
  228. cjOut,
  229. pvOut,
  230. cjOut,
  231. &returnLength))
  232. {
  233. DISPDBG((2, "CIRRUS:DrvEscape: failed PANEL MODE.\n"));
  234. return FALSE;
  235. }
  236. else {
  237. DISPDBG((2, "CIRRUS:DrvEscape: PANEL MODE GOOD.\n"));
  238. return TRUE;
  239. }
  240. }
  241. else if (iEsc == CLESCAPE_SET_VGA_OUTPUT)
  242. {
  243. //pat01, begin
  244. #ifdef PANNING_SCROLL
  245. #if (_WIN32_WINNT < 0x0400) // #pat1
  246. if ((ppdev->ulChipID == CL7541_ID) || (ppdev->ulChipID == CL7543_ID) ||
  247. (ppdev->ulChipID == CL7542_ID) || (ppdev->ulChipID == CL7548_ID) ||
  248. (ppdev->ulChipID == CL7555_ID) || (ppdev->ulChipID == CL7556_ID))
  249. {
  250. palettecounter = 255;
  251. // Save DAC values
  252. while (palettecounter --) {
  253. CP_OUT_BYTE(ppdev->pjPorts, DAC_PEL_READ_ADDR, palettecounter);
  254. savePaletteR[palettecounter] = CP_IN_BYTE(ppdev->pjPorts, DAC_PEL_DATA);
  255. savePaletteG[palettecounter] = CP_IN_BYTE(ppdev->pjPorts, DAC_PEL_DATA);
  256. savePaletteB[palettecounter] = CP_IN_BYTE(ppdev->pjPorts, DAC_PEL_DATA);
  257. }// while
  258. // preserver icons + previous bitmaps
  259. bAssertModeOffscreenHeap(ppdev,FALSE);
  260. }
  261. #endif
  262. #endif
  263. //pat01, end
  264. *(ULONG *)pvOut = *(ULONG *)pvIn;
  265. *(ULONG *)pvOut |= (ULONG)0x1200;
  266. *( ((ULONG *)pvOut)+1) = 0x92;
  267. if (!IOCONTROL(ppdev->hDriver,
  268. IOCTL_CIRRUS_SET_VGA_OUTPUT,
  269. pvOut,
  270. cjOut,
  271. pvOut,
  272. cjOut,
  273. &returnLength))
  274. {
  275. DISPDBG((2, "CIRRUS:DrvEscape: failed SET VGA OUTPUT.\n"));
  276. return FALSE;
  277. }
  278. else {
  279. DISPDBG((2, "CIRRUS:DrvEscape: SET VGA OUTPUT GOOD.\n"));
  280. //#pat01 <start>
  281. #if (_WIN32_WINNT < 0x0400) // #pat01
  282. #ifdef PANNING_SCROLL
  283. // check cursor status
  284. if ((ppdev->ulChipID == CL7541_ID) || (ppdev->ulChipID == CL7543_ID) ||
  285. (ppdev->ulChipID == CL7542_ID) || (ppdev->ulChipID == CL7548_ID) ||
  286. (ppdev->ulChipID == CL7555_ID) || (ppdev->ulChipID == CL7556_ID))
  287. {
  288. if (ppdev->flCaps & CAPS_SW_POINTER) {
  289. bAssertModeHardware(ppdev, TRUE);
  290. vAssertModeText(ppdev, TRUE);
  291. vAssertModeBrushCache(ppdev,TRUE);
  292. // bEnablePointer(ppdev); // pat07
  293. ppdev->flCaps |= CAPS_SW_POINTER; // reset to HW. why???
  294. } else {
  295. // #pat07 start
  296. CP_OUT_BYTE(pjPorts, SR_INDEX,0x10);
  297. savex = CP_IN_BYTE(pjPorts, SR_DATA);
  298. CP_OUT_BYTE(pjPorts, SR_INDEX,0x11);
  299. savey = CP_IN_BYTE(pjPorts, SR_DATA);
  300. //pat07 end
  301. bAssertModeHardware(ppdev, TRUE);
  302. //pat07 vAssertModePointer(ppdev,TRUE);
  303. vAssertModeText(ppdev, TRUE);
  304. vAssertModeBrushCache(ppdev,TRUE);
  305. bEnablePointer(ppdev);
  306. //pat07 begin
  307. CP_OUT_BYTE(pjPorts, SR_INDEX,0x10);
  308. CP_OUT_BYTE(pjPorts, SR_DATA, savex);
  309. CP_OUT_BYTE(pjPorts, SR_INDEX,0x11);
  310. CP_OUT_BYTE(pjPorts, SR_DATA, savey);
  311. CP_PTR_ENABLE(ppdev, pjPorts);
  312. // #pat07 end
  313. }
  314. palettecounter = 255;
  315. // Restore DAC values
  316. while (palettecounter-- ) {
  317. CP_OUT_BYTE(ppdev->pjPorts, DAC_PEL_WRITE_ADDR, palettecounter);
  318. CP_OUT_BYTE(ppdev->pjPorts, DAC_PEL_DATA, savePaletteR[palettecounter]);
  319. CP_OUT_BYTE(ppdev->pjPorts, DAC_PEL_DATA, savePaletteG[palettecounter]);
  320. CP_OUT_BYTE(ppdev->pjPorts, DAC_PEL_DATA, savePaletteB[palettecounter]);
  321. }// while
  322. }
  323. #endif
  324. #else //NT 4.0 code
  325. //ppp begin
  326. palettecounter = 255;
  327. while (palettecounter--)
  328. {
  329. CP_OUT_BYTE(ppdev->pjPorts,DAC_PEL_READ_ADDR,palettecounter);
  330. savePaletteR[palettecounter] =
  331. CP_IN_BYTE(ppdev->pjPorts,DAC_PEL_DATA);
  332. savePaletteG[palettecounter] =
  333. CP_IN_BYTE(ppdev->pjPorts,DAC_PEL_DATA);
  334. savePaletteB[palettecounter] =
  335. CP_IN_BYTE(ppdev->pjPorts,DAC_PEL_DATA);
  336. }
  337. bAssertModeHardware((PDEV *) dhpdev, TRUE);
  338. palettecounter = 255;
  339. while (palettecounter--)
  340. {
  341. CP_OUT_BYTE(ppdev->pjPorts,DAC_PEL_WRITE_ADDR,palettecounter);
  342. CP_OUT_BYTE(ppdev->pjPorts,DAC_PEL_DATA,
  343. savePaletteR[palettecounter]);
  344. CP_OUT_BYTE(ppdev->pjPorts,DAC_PEL_DATA,
  345. savePaletteG[palettecounter]);
  346. CP_OUT_BYTE(ppdev->pjPorts,DAC_PEL_DATA,
  347. savePaletteB[palettecounter]);
  348. }
  349. bEnablePointer(ppdev);
  350. //ppp end
  351. #endif
  352. //pat01, end
  353. return TRUE;
  354. }
  355. }
  356. //
  357. // chu01
  358. //
  359. #ifdef GAMMACORRECT
  360. else if (iEsc == CLESCAPE_GAMMA_CORRECT) // 9000
  361. {
  362. if (!(ppdev->flCaps & CAPS_GAMMA_CORRECT))
  363. return ;
  364. Signature = *((ULONG *)pvIn+0) ;
  365. GammaFactor = *((ULONG *)pvIn+1) ;
  366. ContrastFactor = *((ULONG *)pvIn+2) ;
  367. //
  368. // Is signature "CRUS" ?
  369. //
  370. if (Signature != 0x53555243)
  371. return TRUE ;
  372. // Fill in pScreenClut header info:
  373. pScreenClut = (PVIDEO_CLUT) ajClutSpace;
  374. pScreenClut->NumEntries = 256;
  375. pScreenClut->FirstEntry = 0;
  376. ppalSrc = ppdev->pCurrentPalette;
  377. ppalDest = (PALETTEENTRY*) pScreenClut->LookupTable;
  378. ppalEnd = &ppalDest[256];
  379. for (; ppalDest < ppalEnd; ppalSrc++, ppalDest++)
  380. {
  381. ppalDest->peRed = ppalSrc->peRed ;
  382. ppalDest->peGreen = ppalSrc->peGreen ;
  383. ppalDest->peBlue = ppalSrc->peBlue ;
  384. ppalDest->peFlags = 0 ;
  385. }
  386. //myf29 begin
  387. CP_OUT_BYTE(ppdev->pjPorts, CRTC_INDEX, 0x27) ;
  388. tempB = CP_IN_BYTE(ppdev->pjPorts, CRTC_DATA) ;
  389. if (tempB == 0xBC)
  390. status = bEnableGammaCorrect(ppdev) ;
  391. else if ((tempB == 0x40) || (tempB == 0x4C))
  392. status = bEnableGamma755x(ppdev);
  393. //myf29 end
  394. CalculateGamma(ppdev, pScreenClut, 256) ;
  395. // Set palette registers:
  396. if (!IOCONTROL(ppdev->hDriver,
  397. IOCTL_VIDEO_SET_COLOR_REGISTERS,
  398. pScreenClut,
  399. MAX_CLUT_SIZE,
  400. NULL,
  401. 0,
  402. &ulReturnedDataLength))
  403. {
  404. DISPDBG((2, "Failed bEnablePalette"));
  405. return FALSE ;
  406. }
  407. return TRUE ;
  408. }
  409. else if (iEsc == CLESCAPE_GET_CHIPID) // 9001
  410. {
  411. //
  412. // Return chip ID, graphics and video info
  413. //
  414. CP_OUT_BYTE(ppdev->pjPorts, CRTC_INDEX, 0x27) ;
  415. tempB = CP_IN_BYTE(ppdev->pjPorts, CRTC_DATA) ;
  416. if (tempB == 0xBC) //myf29
  417. *(DWORD *)pvOut = ((DWORD)tempB) | 0x00000100 ; //for Graphic LUT
  418. else if ((tempB == 0x40) || (tempB == 0x4C)) //myf29
  419. *(DWORD *)pvOut = ((DWORD)tempB) | 0x00010100; //myf29 Video LUT
  420. else //myf29
  421. *(DWORD *)pvOut = ((DWORD)tempB); //myf29 non gamma
  422. return TRUE ;
  423. }
  424. //myf29 :02-12-97 add 7555 gamma correction begin
  425. else if (iEsc == CLESCAPE_WRITE_VIDEOLUT) // 9010
  426. {
  427. if (!(ppdev->flCaps & CAPS_GAMMA_CORRECT))
  428. return ;
  429. pvLUT = (ULONG *)pvIn+0;
  430. pScreenClut = (PVIDEO_CLUT) ajClutSpace;
  431. pScreenClut->NumEntries = 256;
  432. pScreenClut->FirstEntry = 0;
  433. ppalDest = (PALETTEENTRY*) pScreenClut->LookupTable;
  434. ppalEnd = &ppalDest[256];
  435. for (; ppalDest < ppalEnd; ppalDest++)
  436. {
  437. ppalDest->peRed = *pvLUT++;
  438. ppalDest->peGreen = *pvLUT++;
  439. ppalDest->peBlue = *pvLUT++;
  440. ppalDest->peFlags = 0 ;
  441. }
  442. CP_OUT_BYTE(ppdev->pjPorts, CRTC_INDEX, 0x27) ;
  443. tempB = CP_IN_BYTE(ppdev->pjPorts, CRTC_DATA) ;
  444. if ((tempB == 0x40) || (tempB == 0x4C))
  445. status = bEnableGammaVideo755x(ppdev);
  446. // if (!status)
  447. // {
  448. // DISPDBG((2, "Failed bEnableGAmmaVodeoCorrect"));
  449. // return FALSE ;
  450. // }
  451. // Set palette registers:
  452. if (!IOCONTROL(ppdev->hDriver,
  453. IOCTL_VIDEO_SET_COLOR_REGISTERS,
  454. pScreenClut,
  455. MAX_CLUT_SIZE,
  456. NULL,
  457. 0,
  458. &ulReturnedDataLength))
  459. {
  460. //restore register
  461. CP_OUT_BYTE(ppdev->pjPorts, CRTC_INDEX, 0x3F) ;
  462. tempB = CP_IN_BYTE(ppdev->pjPorts, CRTC_DATA) ;
  463. CP_OUT_BYTE(ppdev->pjPorts, CRTC_DATA, (tempB & 0xEF)) ;
  464. DISPDBG((2, "Failed bEnablePalette"));
  465. return FALSE ;
  466. }
  467. //restore register
  468. CP_OUT_BYTE(ppdev->pjPorts, CRTC_INDEX, 0x3F) ;
  469. tempB = CP_IN_BYTE(ppdev->pjPorts, CRTC_DATA) ;
  470. CP_OUT_BYTE(ppdev->pjPorts, CRTC_DATA, (tempB & 0xEF)) ;
  471. return TRUE ;
  472. }
  473. //myf29 :02-12-97 add 7555 gamma correction end
  474. #endif // GAMMACORRECT
  475. #if 1 // jl01 Implement Feature Connector's functions.
  476. else if (iEsc == CLESCAPE_FC_Cap) // 9002
  477. {
  478. if ((ppdev->ulChipID == 0xAC) || (ppdev->ulChipID == 0xB8))
  479. return TRUE;
  480. return FALSE;
  481. }
  482. else if (iEsc == CLESCAPE_FC_Status) // 9003
  483. {
  484. if (ppdev->ulChipID == 0xAC) // 5436
  485. {
  486. CP_OUT_BYTE(ppdev->pjPorts, SR_INDEX, 0x08);
  487. TempByte = CP_IN_BYTE(ppdev->pjPorts, SR_DATA);
  488. if ((TempByte & 0x20) == 0)
  489. return TRUE;
  490. else
  491. return FALSE;
  492. }
  493. else if (ppdev->ulChipID == 0xB8) // 5446
  494. {
  495. CP_OUT_BYTE(ppdev->pjPorts, INDEX_REG, 0x17);
  496. TempByte = CP_IN_BYTE(ppdev->pjPorts, DATA_REG);
  497. if ((TempByte & 0x08) == 0)
  498. return TRUE;
  499. else
  500. return FALSE;
  501. }
  502. else return FALSE;
  503. }
  504. else if (iEsc == CLESCAPE_FC_SetOrReset) // 9004
  505. {
  506. if (ppdev->ulChipID == 0xAC) // 5436
  507. {
  508. CP_OUT_BYTE(ppdev->pjPorts, SR_INDEX, 0x08);
  509. TempByte = CP_IN_BYTE(ppdev->pjPorts, SR_DATA);
  510. if (*(UCHAR *)pvIn)
  511. TempByte &= ~0x20;
  512. else
  513. TempByte |= 0x20;
  514. CP_OUT_BYTE(ppdev->pjPorts, SR_DATA, TempByte);
  515. }
  516. else if (ppdev->ulChipID == 0xB8) // 5446
  517. {
  518. CP_OUT_BYTE(ppdev->pjPorts, INDEX_REG, 0x17);
  519. TempByte = CP_IN_BYTE(ppdev->pjPorts, DATA_REG);
  520. if (*(UCHAR *)pvIn)
  521. TempByte &= ~0x08;
  522. else
  523. TempByte |= 0x08;
  524. CP_OUT_BYTE(ppdev->pjPorts, DATA_REG, TempByte);
  525. }
  526. else return TRUE;
  527. }
  528. #endif // jl01 Implement Feature Connector's functions.
  529. else if (iEsc == CLESCAPE_IsItCLChips) // 9005
  530. {
  531. return TRUE;
  532. }
  533. else
  534. return 0xffffffff;
  535. /* we should never be here */
  536. return FALSE;
  537. }
  538.