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.6  06/06/2006 14:05:28  urata
15   Renamed VI[Set/Get]ProgressiveTest to VI[Set/Get]VSyncTimingTest.
16 
17   Revision 1.5  06/06/2006 13:04:27  urata
18     Change the return's type of VISetProgressiveTest from "VIRetraceCallback"
19     to "void".
20 
21   Revision 1.4  06/05/2006 00:21:51  urata
22   Change the return's type of VISetProgressiveTest to "VIRetraceCallback"
23   from "void".
24 
25   Revision 1.3  05/29/2006 13:26:14  urata
26   Added VISetProgressiveTest and VIGetProgressiveTest.
27 
28   Revision 1.2  2006/02/04 11:56:48  hashida
29   (none)
30 
31   Revision 1.1.1.1  2005/12/29 06:53:28  hiratsu
32   Initial import.
33 
34   Revision 1.1.1.1  2005/05/12 02:41:07  yasuh-to
35   transitioned from the Dolphin source tree
36 
37 
38     10    03/11/19 11:57 Hashida
39     Added VIGetScanMode.
40 
41     9     8/05/02 15:53:00 Shiki
42     Added const keyword to the VIConfigure() function prototype.
43 
44     8     02/03/14 18:50 Hashida
45     Added VIGetNextFrameBuffer and VIGetCurrentFrameBuffer.
46 
47     7     7/11/01 5:10p Hashida
48     Updated header.
49 
50     6     6/25/01 3:29p Hashida
51     Added VIGetDTVStatus.
52 
53     5     4/28/00 4:26p Carl
54     Changed set callback routines to return old callback.
55 
56     4     2/25/00 11:30a Hashida
57     Added VISetPreRetraceCallback and VISetPostRetraceCallback
58 
59     3     2/17/00 4:17p Hashida
60     Added VIGetTvFormat
61 
62     2     1/28/00 11:01p Hashida
63     Added VIFlush().
64 
65     1     1/26/00 3:51p Hashida
66     initial revision
67 
68   $NoKeywords: $
69  *---------------------------------------------------------------------------*/
70 
71 #ifndef __VIFUNCS_H
72 #define __VIFUNCS_H
73 
74 #ifdef __cplusplus
75 extern "C" {
76 #endif
77 
78 #include <revolution/types.h>
79 #include <revolution/vi/vitypes.h>
80 #include <revolution/gx/GXStruct.h>     // for GXRenderModeObj structure
81 
82 
83 #define VIPadFrameBufferWidth(width)     ((u16)(((u16)(width) + 15) & ~15))
84 
85 void VIInit                  ( void );
86 void VIFlush                 ( void );
87 void VIWaitForRetrace        ( void );
88 
89 void VIConfigure             ( const GXRenderModeObj* rm );
90 void VIConfigurePan          ( u16 PanPosX, u16 PanPosY,
91                                u16 PanSizeX, u16 PanSizeY );
92 void VISetNextFrameBuffer    ( void *fb );
93 
94 void *VIGetNextFrameBuffer   ( void );
95 void *VIGetCurrentFrameBuffer( void );
96 
97 VIRetraceCallback VISetPreRetraceCallback  (VIRetraceCallback callback);
98 VIRetraceCallback VISetPostRetraceCallback (VIRetraceCallback callback);
99 
100 void VISetBlack              ( BOOL black );
101 u32  VIGetRetraceCount       ( void );
102 u32  VIGetNextField          ( void );
103 u32  VIGetCurrentLine        ( void );
104 u32  VIGetTvFormat           ( void );
105 u32  VIGetScanMode           ( void );
106 
107 u32  VIGetDTVStatus          ( void );
108 
109 // For test of switch to Progressive from Interlace
110 void  VISetVSyncTimingTest ( void );
111 u32   VIGetVSyncTimingTest ( void );
112 
113 
114 /********************************/
115 #ifdef __cplusplus
116 }
117 #endif
118 
119 #endif
120