1 /*---------------------------------------------------------------------------*
2 Project: Dolphin GX library
3 File: GXDispList.h
4
5 Copyright 1998- 2002 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: GXDispList.h,v $
14 Revision 1.2 2006/02/04 11:56:46 hashida
15 (none)
16
17 Revision 1.1.1.1 2005/12/29 06:53:28 hiratsu
18 Initial import.
19
20 Revision 1.1.1.1 2005/05/12 02:41:07 yasuh-to
21 Ported from dolphin source tree.
22
23
24 4 2002/07/24 9:06 Hirose
25 Resolved version conflicts.
26
27 5 2002/04/10 13:12 Hirose
28 Made a constant for GXFastCallDisplayList also.
29
30 4 2002/04/09 15:14 Hirose
31 const type specifier support. (worked by hiratsu@IRD)
32
33 3 2001/06/11 9:08p Tian
34 Made GXFastCallDisplayList static inline
35
36 2 2001/05/22 8:08p Carl
37 Added GXFastCallDisplayList.
38
39 4 1999/11/10 3:59p Tian
40 Updated GXEndDisplayList API
41
42 3 1999/09/02 11:04a Ryan
43
44 2 1999/07/28 4:07p Alligator
45 update header files and emulator for hw changes
46
47 1 1999/07/14 4:20p Alligator
48 Split gx.h into individual header files for each major section of API
49 $NoKeywords: $
50 *---------------------------------------------------------------------------*/
51
52 #ifndef __GXDISPLIST_H__
53 #define __GXDISPLIST_H__
54
55 #ifdef __cplusplus
56 extern "C" {
57 #endif
58
59 /*---------------------------------------------------------------------------*/
60 #include <revolution/types.h>
61
62 /*---------------------------------------------------------------------------*/
63 void GXBeginDisplayList ( void *list, u32 size );
64 u32 GXEndDisplayList ( void );
65 void GXCallDisplayList ( const void *list, u32 nbytes );
66
67 #ifndef EMU
68 // Note: GXCommandList.h and GXVert.h must be #included first
69
70 // Note: This function can only be used in certain situations.
71 // There must be no dirty state pending. Thus this function
72 // is safe when called after a GXCallDisplayList or GXEnd call
73 // (without any other GX calls in between). It is also safe to
74 // call this function multiple times in a row.
75 // Please refer to the online man page for complete details.
76
77 // Note: No error checking is done; be careful!
78
GXFastCallDisplayList(const void * list,u32 nbytes)79 static inline void GXFastCallDisplayList ( const void *list, u32 nbytes )
80 {
81 GXWGFifo.u8 = (u8) GX_CMD_CALL_DL;
82 // XXX UNSAFE: Assumes GP ignores all extra padding/unused bits.
83 GXWGFifo.u32 = (u32) list;
84 GXWGFifo.u32 = (u32) nbytes;
85 }
86 #else
GXFastCallDisplayList(const void * list,u32 nbytes)87 static inline void GXFastCallDisplayList ( const void *list, u32 nbytes )
88 { GXCallDisplayList( list, nbytes ); }
89 #endif
90
91 /*---------------------------------------------------------------------------*/
92 #ifdef __cplusplus
93 }
94 #endif
95
96 #endif // __GXDISPLIST_H__
97