1 /*---------------------------------------------------------------------------*
2   Project:  Dolphin VI library
3   File:     vifuncs.h
4 
5   Copyright 1998- 2001 Nintendo. All rights reserved.
6 
7   These coded instructions, statements, and computer programs contain
8   proprietary information of Nintendo of America Inc. and/or Nintendo
9   Company Ltd., and are protected by Federal copyright law.  They may
10   not be disclosed to third parties or copied or duplicated in any form,
11   in whole or in part, without the prior written consent of Nintendo.
12 
13   $Log: vifuncs.h,v $
14   Revision 1.18  2007/07/12 02:19:05  urata
15   Added VIResetDimmingCount.
16 
17   Revision 1.17  2006/11/28 23:56:21  urata
18   Removed VIResetDimmingCount
19 
20   Revision 1.16  2006/11/28 06:01:10  urata
21   Added VIResetDimmingCount.
22 
23   Revision 1.15  2006/10/27 00:29:58  urata
24   Removed VI[Set/Get]ScreenSaverMode and added VIEnableDimming.
25 
26   Revision 1.14  2006/10/26 01:53:22  urata
27   Added VI_SCREEN_SAVER_MODE_OFF/VI_SCREEN_SAVER_MODE_ON.
28 
29   Revision 1.13  2006/10/26 01:11:01  urata
30   Added VI[Set/Get]ScreenSaverMode.
31 
32   Revision 1.12  2006/10/24 16:19:05  urata
33   Added VISetTimeToDimming and removed VIEnableDimming.
34 
35   Revision 1.11  2006/09/14 04:31:27  urata
36   Removed VIGetDVDStopMotorCount.
37 
38   Revision 1.10  2006/09/06 12:17:23  urata
39   Removed VIEnableDVDStopMotor.
40 
41   Revision 1.9  2006/08/28 12:24:19  urata
42   Added some functions for VIDimming and DVDStopMotor.
43 
44   Revision 1.8  2006/08/17 11:53:59  urata
45   Revised the argument type of "VISetDimming".
46 
47   Revision 1.7  2006/08/17 08:42:23  urata
48   Added VISetDimming.
49 
50   Revision 1.6  2006/06/06 14:05:28  urata
51   Renamed VI[Set/Get]ProgressiveTest to VI[Set/Get]VSyncTimingTest.
52 
53   Revision 1.5  2006/06/06 13:04:27  urata
54     Changed the return's type of VISetProgressiveTest from "VIRetraceCallback"
55     to "void".
56 
57   Revision 1.4  2006/06/05 00:21:51  urata
58   Changed the return's type of VISetProgressiveTest to "VIRetraceCallback"
59   from "void".
60 
61   Revision 1.3  2006/05/29 13:26:14  urata
62   Added VISetProgressiveTest and VIGetProgressiveTest.
63 
64   Revision 1.2  2006/02/04 11:56:48  hashida
65   (none)
66 
67   Revision 1.1.1.1  2005/12/29 06:53:28  hiratsu
68   Initial import.
69 
70   Revision 1.1.1.1  2005/05/12 02:41:07  yasuh-to
71   Ported from dolphin source tree.
72 
73 
74     10    2003/11/19 11:57 Hashida
75     Added VIGetScanMode.
76 
77     9     2002/08/05 15:53 Shiki
78     Added const keyword to the VIConfigure() function prototype.
79 
80     8     2002/03/14 18:50 Hashida
81     Added VIGetNextFrameBuffer and VIGetCurrentFrameBuffer.
82 
83     7     2001/07/11 5:10p Hashida
84     Updated header.
85 
86     6     2001/06/25 3:29p Hashida
87     Added VIGetDTVStatus.
88 
89     5     2000/04/28 4:26p Carl
90     Changed set callback routines to return old callback.
91 
92     4     2000/02/25 11:30a Hashida
93     Added VISetPreRetraceCallback and VISetPostRetraceCallback
94 
95     3     2000/02/17 4:17p Hashida
96     Added VIGetTvFormat
97 
98     2     2000/01/28 11:01p Hashida
99     Added VIFlush().
100 
101     1     2000/01/26 3:51p Hashida
102     Initial revision
103 
104   $NoKeywords: $
105  *---------------------------------------------------------------------------*/
106 
107 #ifndef __VIFUNCS_H
108 #define __VIFUNCS_H
109 
110 #ifdef __cplusplus
111 extern "C" {
112 #endif
113 
114 #include <revolution/types.h>
115 #include <revolution/vi/vitypes.h>
116 #include <revolution/gx/GXStruct.h>     // For GXRenderModeObj structure
117 
118 
119 #define VIPadFrameBufferWidth(width)     ((u16)(((u16)(width) + 15) & ~15))
120 
121 
122 typedef enum _VITimeToDIM
123 {
124     VI_DM_DEFAULT=0,
125     VI_DM_10M,
126     VI_DM_15M
127 } VITimeToDIM;
128 
129 
130 
131 void VIInit                  ( void );
132 void VIFlush                 ( void );
133 void VIWaitForRetrace        ( void );
134 
135 void VIConfigure             ( const GXRenderModeObj* rm );
136 void VIConfigurePan          ( u16 PanPosX, u16 PanPosY,
137                                u16 PanSizeX, u16 PanSizeY );
138 void VISetNextFrameBuffer    ( void *fb );
139 
140 void *VIGetNextFrameBuffer   ( void );
141 void *VIGetCurrentFrameBuffer( void );
142 
143 VIRetraceCallback VISetPreRetraceCallback  (VIRetraceCallback callback);
144 VIRetraceCallback VISetPostRetraceCallback (VIRetraceCallback callback);
145 
146 void VISetBlack              ( BOOL black );
147 u32  VIGetRetraceCount       ( void );
148 u32  VIGetNextField          ( void );
149 u32  VIGetCurrentLine        ( void );
150 u32  VIGetTvFormat           ( void );
151 u32  VIGetScanMode           ( void );
152 u32  VIGetDTVStatus          ( void );
153 
154 BOOL VIEnableDimming           ( BOOL enable );
155 u32  VIGetDimmingCount         ( void );
156 VITimeToDIM VISetTimeToDimming ( VITimeToDIM time );
157 extern BOOL VIResetDimmingCount( void );
158 
159 
160 // For test of switch to Progressive from Interlace
161 void VISetVSyncTimingTest    ( void );
162 u32  VIGetVSyncTimingTest    ( void );
163 /********************************/
164 #ifdef __cplusplus
165 }
166 #endif
167 
168 #endif
169