1 /*---------------------------------------------------------------------------* 2 Project: TwlSDK - HW - include 3 File: mmap_global.h 4 5 Copyright 2003-2008 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 $Date:: 2008-09-18#$ 14 $Rev: 8573 $ 15 $Author: okubata_ryoma $ 16 *---------------------------------------------------------------------------*/ 17 #ifndef NITRO_HW_MMAP_GLOBAL_H_ 18 #define NITRO_HW_MMAP_GLOBAL_H_ 19 20 #ifndef SDK_TWL 21 22 #ifdef __cplusplus 23 extern "C" { 24 #endif 25 26 //--------------------------------------------------------------------------- 27 // GLOBAL MEMORY MAP 28 //--------------------------------------------------------------------------- 29 30 //----------------------------- ITCM 31 #define HW_ITCM_IMAGE 0x01000000 32 #define HW_ITCM 0x01ff8000 33 #define HW_ITCM_SIZE 0x8000 34 #define HW_ITCM_END (HW_ITCM + HW_ITCM_SIZE) 35 36 //----------------------------- DTCM 37 #ifndef SDK_ASM 38 #include <nitro/types.h> 39 extern u32 SDK_AUTOLOAD_DTCM_START[]; 40 #define HW_DTCM ((u32)SDK_AUTOLOAD_DTCM_START) 41 #else 42 .extern SDK_AUTOLOAD_DTCM_START 43 #define HW_DTCM SDK_AUTOLOAD_DTCM_START 44 #endif 45 #define HW_DTCM_SIZE 0x4000 46 #define HW_DTCM_END (HW_DTCM + HW_DTCM_SIZE) 47 //----------------------------- MAIN 48 #define HW_MAIN_MEM 0x02000000 49 #define HW_MAIN_MEM_SIZE 0x00400000 50 #define HW_MAIN_MEM_EX_SIZE 0x01000000 51 #define HW_MAIN_MEM_END (HW_MAIN_MEM + HW_MAIN_MEM_SIZE) 52 #define HW_MAIN_MEM_EX_END (HW_MAIN_MEM + HW_MAIN_MEM_EX_SIZE) 53 //----------------------------- MAIN_HI 54 #define HW_MAIN_MEM_HI 0x0c000000 55 #define HW_MAIN_MEM_HI_SIZE 0x01000000 56 #define HW_MAIN_MEM_HI_EX_SIZE 0x02000000 57 #define HW_MAIN_MEM_HI_END (HW_MAIN_MEM_HI + HW_MAIN_MEM_HI_SIZE) 58 #define HW_MAIN_MEM_HI_EX_END (HW_MAIN_MEM_HI + HW_MAIN_MEM_HI_EX_SIZE) 59 //----------------------------- WRAM_AREA 60 #define HW_WRAM_AREA 0x03000000 61 #define HW_WRAM_AREA_HALF (HW_WRAM_AREA+(HW_WRAM_AREA_SIZE/2)) 62 #define HW_WRAM_AREA_END 0x04000000 63 #define HW_WRAM_AREA_SIZE (HW_WRAM_AREA_END-HW_WRAM_AREA) 64 //----------------------------- WRAMs 65 #define HW_WRAM 0x037f8000 66 #define HW_WRAM_END 0x03800000 67 #define HW_WRAM_SIZE (HW_WRAM_END-HW_WRAM) 68 #define HW_WRAM_0 0x037f8000 69 #define HW_WRAM_0_END 0x037fc000 70 #define HW_WRAM_0_SIZE (HW_WRAM_0_END-HW_WRAM_0) 71 #define HW_WRAM_1 0x037fc000 72 #define HW_WRAM_1_END 0x03800000 73 #define HW_WRAM_1_SIZE (HW_WRAM_1_END-HW_WRAM_1) 74 75 #define HW_WRAM_EX HW_WRAM_END 76 #ifdef TWL_PLATFORM_BB 77 #define HW_WRAM_A_SIZE_MAX 0x00020000 78 #else // TWL_PLATFORM_BB 79 #define HW_WRAM_A_SIZE_MAX 0x00040000 80 #endif // TWL_PLATFORM_BB 81 #define HW_WRAM_B_SIZE_MAX HW_WRAM_A_SIZE_MAX 82 #define HW_WRAM_C_SIZE_MAX HW_WRAM_B_SIZE_MAX 83 //----------------------------- IOs 84 #define HW_IOREG 0x04000000 85 #define HW_IOREG_END 0x05000000 86 #define HW_REG_BASE HW_IOREG // alias 87 //----------------------------- VRAMs 88 #define HW_BG_PLTT 0x05000000 89 #define HW_BG_PLTT_END 0x05000200 90 #define HW_BG_PLTT_SIZE (HW_BG_PLTT_END-HW_BG_PLTT) 91 #define HW_OBJ_PLTT 0x05000200 92 #define HW_OBJ_PLTT_END 0x05000400 93 #define HW_OBJ_PLTT_SIZE (HW_OBJ_PLTT_END-HW_OBJ_PLTT) 94 #define HW_PLTT HW_BG_PLTT 95 #define HW_PLTT_END HW_OBJ_PLTT_END 96 #define HW_PLTT_SIZE (HW_PLTT_END-HW_PLTT) 97 #define HW_DB_BG_PLTT 0x05000400 98 #define HW_DB_BG_PLTT_END 0x05000600 99 #define HW_DB_BG_PLTT_SIZE (HW_DB_BG_PLTT_END-HW_DB_BG_PLTT) 100 #define HW_DB_OBJ_PLTT 0x05000600 101 #define HW_DB_OBJ_PLTT_END 0x05000800 102 #define HW_DB_OBJ_PLTT_SIZE (HW_DB_OBJ_PLTT_END-HW_DB_OBJ_PLTT) 103 #define HW_DB_PLTT HW_DB_BG_PLTT 104 #define HW_DB_PLTT_END HW_DB_OBJ_PLTT_END 105 #define HW_DB_PLTT_SIZE (HW_DB_PLTT_END-HW_DB_PLTT) 106 #define HW_BG_VRAM 0x06000000 107 #define HW_BG_VRAM_END 0x06080000 108 #define HW_BG_VRAM_SIZE (HW_BG_VRAM_END-HW_BG_VRAM) 109 #define HW_DB_BG_VRAM 0x06200000 110 #define HW_DB_BG_VRAM_END 0x06220000 111 #define HW_DB_BG_VRAM_SIZE (HW_DB_BG_VRAM_END-HW_DB_BG_VRAM) 112 #define HW_OBJ_VRAM 0x06400000 113 #define HW_OBJ_VRAM_END 0x06440000 114 #define HW_OBJ_VRAM_SIZE (HW_OBJ_VRAM_END-HW_OBJ_VRAM) 115 #define HW_DB_OBJ_VRAM 0x06600000 116 #define HW_DB_OBJ_VRAM_END 0x06620000 117 #define HW_DB_OBJ_VRAM_SIZE (HW_DB_OBJ_VRAM_END-HW_DB_OBJ_VRAM) 118 #define HW_LCDC_VRAM 0x06800000 119 #ifdef SDK_TS 120 #define HW_LCDC_VRAM_END 0x068A4000 121 #else 122 #define HW_LCDC_VRAM_END 0x06898000 123 #endif 124 #define HW_LCDC_VRAM_SIZE (HW_LCDC_VRAM_END-HW_LCDC_VRAM) 125 #define HW_OAM 0x07000000 126 #define HW_OAM_END 0x07000400 127 #define HW_OAM_SIZE (HW_OAM_END-HW_OAM) 128 #define HW_DB_OAM 0x07000400 129 #define HW_DB_OAM_END 0x07000800 130 #define HW_DB_OAM_SIZE (HW_DB_OAM_END-HW_DB_OAM) 131 //----------------------------- Cartridge Bus 132 #define HW_CTRDG_ROM 0x08000000 133 #define HW_CTRDG_ROM_END 0x0a000000 134 #define HW_CTRDG_RAM 0x0a000000 135 #define HW_CTRDG_RAM_END 0x0a010000 136 //----------------------------- System ROM 137 #define HW_BIOS 0xffff0000 138 #define HW_BIOS_END 0xffff8000 139 #define HW_RESET_VECTOR 0xffff0000 140 //----------------------------- for request to ARM7 141 #define HW_EXT_WRAM_ARM7 0x06000000 142 #define HW_EXT_WRAM_ARM7_END 0x06040000 143 #define HW_EXT_WRAM_ARM7_SIZE (HW_EXT_WRAM_ARM7_END-HW_EXT_WRAM_ARM7) 144 #ifdef __cplusplus 145 } /* extern "C" */ 146 #endif 147 148 #endif // SDK_TWL 149 150 /* NITRO_HW_MMAP_GLOBAL_H_ */ 151 #endif 152