1 /*---------------------------------------------------------------------------*
2   Project:  Dolphin VI library
3   File:     vitypes.h
4 
5   Copyright 1998, 1999 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: vitypes.h,v $
14   Revision 1.5  2006/08/10 13:34:54  urata
15   Removed "VI_TVMODE_PAL_PROG" (50Hz Progressive).
16 
17   Revision 1.4  07/12/2006 16:00:50  urata
18   Clean up.
19 
20   Revision 1.3  03/02/2006 07:52:51  urata
21   Added PAL, MPAL and EURGB60 progressive mode.
22 
23   Revision 1.2  2006/02/04 11:56:48  hashida
24   (none)
25 
26   Revision 1.1.1.1  2005/12/29 06:53:28  hiratsu
27   Initial import.
28 
29   Revision 1.1.1.1  2005/05/12 02:41:07  yasuh-to
30   Ported from dolphin source tree.
31 
32 
33     11    2003/11/19 11:08 Hashida
34     Added a comment.
35 
36     10    2001/11/02 5:33p Hashida
37     Renamed eu60 -> eurgb60
38 
39     9     2001/11/01 3:37p Hashida
40     Added EURGB60 mode support.
41 
42     8     2001/10/18 12:06p Hashida
43     No change.
44 
45     7     2001/10/12 2:49a Hashida
46     Added EU60 mode.
47 
48     6     2001/09/19 12:26a Hashida
49     Added DEBUG_PAL (NTSC 50Hz).
50 
51     5     2000/08/11 6:26p Hashida
52     Added 3D and progressive mode support
53 
54     4     2000/5/15 1:52p Hashida
55     Added definitions VI_MAX_WIDTH_NTSC, etc.
56 
57     3     2000/02/25 11:29a Hashida
58     Added VIRetraceCallback definition.
59 
60     2     2000/01/26 6:32p Hashida
61     Added VI_FIELD_ABOVE/BELOW definitions.
62 
63     1     2000/1/26 3:51p Hashida
64     Initial revision
65 
66   $NoKeywords: $
67  *---------------------------------------------------------------------------*/
68 
69 #ifndef __VITYPES_H
70 #define __VITYPES_H
71 
72 #ifdef __cplusplus
73 extern "C" {
74 #endif
75 
76 #include <revolution/types.h>
77 
78 #define VI_DISPLAY_PIX_SZ           2
79 
80 #define VI_INTERLACE                0
81 #define VI_NON_INTERLACE            1
82 #define VI_PROGRESSIVE              2
83 // 3 is reserved
84 
85 #define VI_NTSC                     0
86 #define VI_PAL                      1
87 #define VI_MPAL                     2
88 #define VI_DEBUG                    3
89 #define VI_DEBUG_PAL                4
90 #define VI_EURGB60                  5
91 // 6,7,8,9 are reserved
92 
93 #define VI_TVMODE(FMT, INT)   ( ((FMT) << 2) + (INT) )
94 
95 typedef enum
96 {
97     VI_TVMODE_NTSC_INT      = VI_TVMODE(VI_NTSC,        VI_INTERLACE),
98     VI_TVMODE_NTSC_DS       = VI_TVMODE(VI_NTSC,        VI_NON_INTERLACE),
99     VI_TVMODE_NTSC_PROG     = VI_TVMODE(VI_NTSC,        VI_PROGRESSIVE),
100 
101     VI_TVMODE_PAL_INT       = VI_TVMODE(VI_PAL,         VI_INTERLACE),
102     VI_TVMODE_PAL_DS        = VI_TVMODE(VI_PAL,         VI_NON_INTERLACE),
103 
104 
105     VI_TVMODE_EURGB60_INT   = VI_TVMODE(VI_EURGB60,     VI_INTERLACE),
106     VI_TVMODE_EURGB60_DS    = VI_TVMODE(VI_EURGB60,     VI_NON_INTERLACE),
107     VI_TVMODE_EURGB60_PROG  = VI_TVMODE(VI_EURGB60,     VI_PROGRESSIVE),
108 
109     VI_TVMODE_MPAL_INT      = VI_TVMODE(VI_MPAL,        VI_INTERLACE),
110     VI_TVMODE_MPAL_DS       = VI_TVMODE(VI_MPAL,        VI_NON_INTERLACE),
111     VI_TVMODE_MPAL_PROG     = VI_TVMODE(VI_MPAL,        VI_PROGRESSIVE),
112 
113     VI_TVMODE_DEBUG_INT     = VI_TVMODE(VI_DEBUG,       VI_INTERLACE),
114 
115     VI_TVMODE_DEBUG_PAL_INT = VI_TVMODE(VI_DEBUG_PAL,   VI_INTERLACE),
116     VI_TVMODE_DEBUG_PAL_DS  = VI_TVMODE(VI_DEBUG_PAL,   VI_NON_INTERLACE)
117 } VITVMode;
118 
119 typedef enum
120 {
121     VI_XFBMODE_SF = 0,
122     VI_XFBMODE_DF
123 } VIXFBMode;
124 
125 
126 #define VI_FIELD_ABOVE              1
127 #define VI_FIELD_BELOW              0
128 
129 // Maximum screen space
130 #define VI_MAX_WIDTH_NTSC           720
131 #define VI_MAX_HEIGHT_NTSC          480
132 
133 #define VI_MAX_WIDTH_PAL            720
134 #define VI_MAX_HEIGHT_PAL           574
135 
136 #define VI_MAX_WIDTH_MPAL           720
137 #define VI_MAX_HEIGHT_MPAL          480
138 
139 #define VI_MAX_WIDTH_EURGB60        VI_MAX_WIDTH_NTSC
140 #define VI_MAX_HEIGHT_EURGB60       VI_MAX_HEIGHT_NTSC
141 
142 
143 typedef void (*VIRetraceCallback)(u32 retraceCount);
144 
145 #ifdef __cplusplus
146 }
147 #endif
148 
149 #endif
150