1 /*---------------------------------------------------------------------------* 2 Project: Dolphin GX library 3 File: GXManage.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: GXManage.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 11 2002/07/24 9:07 Hirose 25 Resolved version conflicts. 26 27 10 2001/03/16 7:22p Carl 28 Changes for XF stall bug. 29 30 9 2001/02/19 6:37p Tian 31 Added GXResetWriteGatherPipe to clear all extraneous data currently in 32 the write gather buffers. 33 34 8 2000/10/26 2:59p Hirose 35 deleted GXDisableBypassBug. Now the setting is automatically done by 36 GXInit. 37 38 7 2000/10/26 10:37a Tian 39 Detabbed. Added GXDisableBypassBug to disable the buggy bypass logic 40 on rev B chips. For testing code that may be hitting the nefarious 41 Bypass Bug. 42 43 6 2000/07/18 12:16p Tian 44 Added GXSetResetWritePipe - set to TRUE only for code that requires 45 critical fifo alignment 46 47 5 2000/04/26 4:53p Carl 48 CallBacks are now Callbacks. Set callback routines now return old 49 callbacks. Added gets for fifo objects. 50 51 4 2000/03/17 4:41p Tian 52 Added DrawSync and DrawDone callbacks 53 54 3 2000/02/01 7:22p Alligator 55 Second GX update from ArtX 56 57 2 1999/12/10 4:53p Carl 58 Added prototypes for new sync functions. 59 60 6 1999/10/26 8:05p Alligator 61 added Get/Color10S/DrawDone functions 62 63 5 1999/10/20 11:51a Hirose 64 fixed return type of GXReadDrawSync 65 66 4 1999/09/23 3:27p Tian 67 Updated GXInit 68 69 3 1999/09/03 2:43p Ryan 70 routine update to match man pages 71 72 2 1999/08/30 11:06a Ryan 73 74 1 1999/07/14 4:20p Alligator 75 Split gx.h into individual header files for each major section of API 76 $NoKeywords: $ 77 *---------------------------------------------------------------------------*/ 78 79 #ifndef __GXMANAGE_H__ 80 #define __GXMANAGE_H__ 81 82 #ifdef __cplusplus 83 extern "C" { 84 #endif 85 86 /*---------------------------------------------------------------------------*/ 87 #include <revolution/types.h> 88 #include <revolution/gx/GXEnum.h> 89 #include <revolution/gx/GXStruct.h> 90 #include <revolution/gx/GXFifo.h> 91 92 typedef void (*GXDrawSyncCallback)(u16 token); 93 typedef void (*GXDrawDoneCallback)(void); 94 95 /*---------------------------------------------------------------------------*/ 96 GXFifoObj* GXInit ( void* base, u32 size ); 97 void GXAbortFrame ( void ); 98 99 void GXSetDrawSync ( u16 token ); 100 u16 GXReadDrawSync ( void ); 101 GXDrawSyncCallback GXSetDrawSyncCallback( GXDrawSyncCallback cb ); 102 103 void GXDrawDone ( void ); 104 void GXSetDrawDone ( void ); 105 void GXWaitDrawDone ( void ); 106 GXDrawDoneCallback GXSetDrawDoneCallback( GXDrawDoneCallback cb ); 107 108 #ifdef BUG_INDX_ALIGN 109 void GXSetResetWritePipe ( GXBool tf ); 110 #endif 111 void GXFlush ( void ); 112 void GXResetWriteGatherPipe ( void ); 113 void GXPixModeSync ( void ); 114 void GXTexModeSync ( void ); 115 116 BOOL IsWriteGatherBufferEmpty ( void ); 117 118 void GXSetMisc ( GXMiscToken token, u32 val ); 119 120 /*---------------------------------------------------------------------------*/ 121 #ifdef __cplusplus 122 } 123 #endif 124 125 #endif // __GXMANAGE_H__ 126