Source code of Windows XP (NT5)
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.

198 lines
4.7 KiB

  1. //***************************************************************************
  2. //
  3. // FileName:
  4. // $Workfile: adv.h $
  5. // ADV7175A/ADV7170 Interface
  6. //
  7. // Author:
  8. // TOSHIBA [PCS](PSY) Seiichi Nakamura
  9. // Copyright (c) 1997 TOSHIBA CORPORATION
  10. //
  11. // Description:
  12. //
  13. //***************************************************************************
  14. // $Header: /DVD Drivers/Sources/ZiVAHAL/adv.h 11 98/04/20 7:19p Hero $
  15. // $Modtime: 98/04/20 5:25p $
  16. // $Nokeywords:$
  17. //***************************************************************************
  18. // Date | Author | Description
  19. // -----------+--------------+--------------------------------------------
  20. // 1997.11.11 | Hideki Yagi | Add ADV7170 class for San-Jose.
  21. // | | Adding SetCgmsType method for ADV7170.
  22. // 12.04 | Hideki Yagi | Add support WSS.
  23. //
  24. #ifndef _ADV_H_
  25. #define _ADV_H_
  26. class CVideoPropSet;
  27. class CIOIF;
  28. class CADV
  29. {
  30. public:
  31. virtual BOOL SetNTSC( void ) PURE;
  32. virtual BOOL SetPAL( DWORD Type) PURE;
  33. virtual BOOL SetMacroVision( APSTYPE Type) PURE;
  34. virtual BOOL SetCompPowerOn( BOOL Type ) PURE;
  35. virtual BOOL SetSVideoPowerOn( BOOL Type ) PURE;
  36. virtual BOOL SetCgmsType( CGMSTYPE Type, CVideoPropSet VProp ) PURE;
  37. // by oka
  38. virtual BOOL SetClosedCaptionOn( BOOL Switch ) PURE;
  39. virtual BOOL SetClosedCaptionData( DWORD Data ) PURE;
  40. };
  41. class CIIC // private class for IIC
  42. {
  43. private: // private data
  44. BYTE SubAddr;
  45. CIOIF *m_pioif;
  46. IKernelService *m_pKernelObj;
  47. private: // private function
  48. BOOL IICBusyPoll( void );
  49. public: // public function
  50. CIIC();
  51. void Init(IKernelService *pKernelObj, CIOIF *pioif, BYTE Addr );
  52. DWORD Set( BYTE Data );
  53. DWORD Get( BYTE *Data );
  54. CIIC& operator=(const BYTE &Data )
  55. {
  56. Set( Data );
  57. return *this;
  58. };
  59. operator BYTE()
  60. {
  61. BYTE Data;
  62. Get( &Data );
  63. return Data;
  64. };
  65. };
  66. class CADV7175A : public CADV
  67. {
  68. private: // datas
  69. CIIC ModeRegister0;
  70. CIIC ModeRegister1;
  71. CIIC SubCarrierFreqRegister0;
  72. CIIC SubCarrierFreqRegister1;
  73. CIIC SubCarrierFreqRegister2;
  74. CIIC SubCarrierFreqRegister3;
  75. CIIC SubCarrierPhaseRegister;
  76. CIIC TimingRegister;
  77. CIIC ClosedCapExData0;
  78. CIIC ClosedCapExData1;
  79. CIIC ClosedCapData0;
  80. CIIC ClosedCapData1;
  81. CIIC TimingRegister1;
  82. CIIC ModeRegister2;
  83. CIIC NTSCTTXRegister0;
  84. CIIC NTSCTTXRegister1;
  85. CIIC NTSCTTXRegister2;
  86. CIIC NTSCTTXRegister3;
  87. CIIC ModeRegister3;
  88. CIIC MacrovisionRegister[17];
  89. CIIC TTXRQControlRegister0;
  90. CIIC TTXRQControlRegister; // ??
  91. BOOL bCompPower;
  92. BOOL bSVideoPower;
  93. // by oka
  94. BOOL bClosedCaption;
  95. typedef enum
  96. {
  97. OUTPUT_NTSC = 0,
  98. OUTPUT_PAL
  99. } OUTPUTTYPE;
  100. OUTPUTTYPE m_OutputType;
  101. APSTYPE m_apstype;
  102. public:
  103. CADV7175A( void );
  104. BOOL SetNTSC( void );
  105. BOOL SetPAL( DWORD Type );
  106. BOOL SetMacroVision( APSTYPE Type );
  107. BOOL SetCompPowerOn( BOOL Type );
  108. BOOL SetSVideoPowerOn( BOOL Type );
  109. BOOL SetCgmsType( CGMSTYPE Type, CVideoPropSet VProp );
  110. // by oka
  111. BOOL SetClosedCaptionOn( BOOL Switch );
  112. BOOL SetClosedCaptionData( DWORD Data );
  113. public: // commands
  114. void Init( IKernelService *pKernelObj, CIOIF *pioif );
  115. };
  116. class CADV7170 : public CADV
  117. {
  118. private: // datas
  119. CIIC ModeRegister0;
  120. CIIC ModeRegister1;
  121. CIIC ModeRegister2;
  122. CIIC ModeRegister3;
  123. CIIC ModeRegister4;
  124. CIIC TimingRegister0;
  125. CIIC TimingRegister1;
  126. CIIC SubCarrierFreqRegister0;
  127. CIIC SubCarrierFreqRegister1;
  128. CIIC SubCarrierFreqRegister2;
  129. CIIC SubCarrierFreqRegister3;
  130. CIIC SubCarrierPhaseRegister;
  131. CIIC ClosedCapExData0;
  132. CIIC ClosedCapExData1;
  133. CIIC ClosedCapData0;
  134. CIIC ClosedCapData1;
  135. CIIC NTSCTTXRegister0;
  136. CIIC NTSCTTXRegister1;
  137. CIIC NTSCTTXRegister2;
  138. CIIC NTSCTTXRegister3;
  139. CIIC CgmsWssRegister0;
  140. CIIC CgmsWssRegister1;
  141. CIIC CgmsWssRegister2;
  142. CIIC TTXRQPositionRegister;
  143. CIIC MacrovisionRegister[18];
  144. BOOL bCompPower;
  145. BOOL bSVideoPower;
  146. // by oka
  147. BOOL bClosedCaption;
  148. typedef enum
  149. {
  150. OUTPUT_NTSC = 0,
  151. OUTPUT_PAL
  152. } OUTPUTTYPE;
  153. OUTPUTTYPE m_OutputType;
  154. APSTYPE m_apstype;
  155. CGMSTYPE m_cgmstype; // CGMS setting
  156. public:
  157. CADV7170( void );
  158. BOOL SetNTSC( void );
  159. BOOL SetPAL( DWORD Type );
  160. BOOL SetMacroVision( APSTYPE Type );
  161. BOOL SetCompPowerOn( BOOL Type );
  162. BOOL SetSVideoPowerOn( BOOL Type );
  163. BOOL SetCgmsType( CGMSTYPE Type, CVideoPropSet VProp );
  164. // by oka
  165. BOOL SetClosedCaptionOn( BOOL Switch );
  166. BOOL SetClosedCaptionData( DWORD Data );
  167. public: // commands
  168. void Init( IKernelService *pKernelObj, CIOIF *pioif );
  169. };
  170. #endif // _ADV_H_
  171. //***************************************************************************
  172. // End of
  173. //***************************************************************************