1 /*---------------------------------------------------------------------------* 2 Project: Horizon 3 File: gx_Vram.h 4 5 Copyright (C)2009-2012 Nintendo Co., Ltd. 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 $Rev: 46347 $ 14 *---------------------------------------------------------------------------*/ 15 16 #ifndef NN_GX_CTR_GX_VRAM_H_ 17 #define NN_GX_CTR_GX_VRAM_H_ 18 19 #include <nn/types.h> 20 #include <nn/assert.h> 21 22 /*-------------------------------------------------------------------------- 23 C functions 24 *-------------------------------------------------------------------------*/ 25 /* Please see man pages for details 26 27 28 */ 29 30 #ifdef __cplusplus 31 extern "C" { 32 #endif // __cplusplus 33 34 #ifndef NN_GX_MEM_VRAMA 35 #define NN_GX_MEM_VRAMA 0x00020000 36 #endif // NN_GX_MEM_VRAMA 37 38 #ifndef NN_GX_MEM_VRAMB 39 #define NN_GX_MEM_VRAMB 0x00030000 40 #endif // NN_GX_MEM_VRAMB 41 42 /* 43 44 45 46 47 */ 48 uptr nngxGetVramStartAddr( s32 area ); 49 50 /* 51 52 53 54 55 */ 56 uptr nngxGetVramEndAddr( s32 area ); 57 58 /* 59 60 61 62 63 */ 64 size_t nngxGetVramSize( s32 area ); 65 66 #ifdef __cplusplus 67 } // extern "C" 68 #endif // __cplusplus 69 70 /* 71 72 */ 73 74 /*-------------------------------------------------------------------------- 75 C++ functions 76 *-------------------------------------------------------------------------*/ 77 #ifdef __cplusplus 78 namespace nn { 79 namespace gx { 80 namespace CTR { 81 82 /* 83 84 85 */ 86 enum VramArea 87 { 88 /* Please see man pages for details */ 89 MEM_VRAMA = NN_GX_MEM_VRAMA, 90 /* Please see man pages for details */ 91 MEM_VRAMB = NN_GX_MEM_VRAMB 92 }; 93 94 /* 95 96 97 98 99 100 101 102 */ GetVramStartAddr(VramArea area)103 inline uptr GetVramStartAddr( VramArea area ) 104 { 105 return nngxGetVramStartAddr(area); 106 } 107 108 /* 109 110 111 112 113 114 115 116 */ GetVramEndAddr(VramArea area)117 inline uptr GetVramEndAddr( VramArea area ) 118 { 119 return nngxGetVramEndAddr(area); 120 } 121 122 /* 123 124 125 126 127 128 129 130 */ GetVramSize(VramArea area)131 inline size_t GetVramSize( VramArea area ) 132 { 133 return nngxGetVramSize(area); 134 } 135 136 }}} // namespace nn::gx::CTR 137 #endif // __cplusplus 138 139 140 #endif /* NN_GX_CTR_GX_VRAM_H_ */ 141