diff options
| author | 2014-04-18 17:52:49 -0400 | |
|---|---|---|
| committer | 2014-04-18 17:52:49 -0400 | |
| commit | 958bca606e80110e05d7c142dda3097fddc96503 (patch) | |
| tree | 576917751444b4dfdb476d040b4e075bde431b7b /src/core/mem_map.cpp | |
| parent | Init window size from VideoCore. Start changing the default window behavior... (diff) | |
| parent | renamed hw_lcd module to just lcd (diff) | |
| download | yuzu-958bca606e80110e05d7c142dda3097fddc96503.tar.gz yuzu-958bca606e80110e05d7c142dda3097fddc96503.tar.xz yuzu-958bca606e80110e05d7c142dda3097fddc96503.zip | |
Merge branch 'hle-interface'
Diffstat (limited to 'src/core/mem_map.cpp')
| -rw-r--r-- | src/core/mem_map.cpp | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/src/core/mem_map.cpp b/src/core/mem_map.cpp index 96f8d0440..180829239 100644 --- a/src/core/mem_map.cpp +++ b/src/core/mem_map.cpp | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | // Copyright 2014 Citra Emulator Project | 1 | // Copyright 2014 Citra Emulator Project |
| 2 | // Licensed under GPLv2 | 2 | // Licensed under GPLv2 |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| @@ -12,27 +12,27 @@ | |||
| 12 | 12 | ||
| 13 | namespace Memory { | 13 | namespace Memory { |
| 14 | 14 | ||
| 15 | |||
| 16 | u8* g_base = NULL; ///< The base pointer to the auto-mirrored arena. | 15 | u8* g_base = NULL; ///< The base pointer to the auto-mirrored arena. |
| 17 | 16 | ||
| 18 | MemArena g_arena; ///< The MemArena class | 17 | MemArena g_arena; ///< The MemArena class |
| 19 | 18 | ||
| 20 | u8* g_bootrom = NULL; ///< Bootrom physical memory | 19 | u8* g_heap_gsp = NULL; ///< GSP heap (main memory) |
| 21 | u8* g_fcram = NULL; ///< Main memory (FCRAM) pointer | 20 | u8* g_heap = NULL; ///< Application heap (main memory) |
| 22 | u8* g_vram = NULL; ///< Video memory (VRAM) pointer | 21 | u8* g_vram = NULL; ///< Video memory (VRAM) pointer |
| 23 | u8* g_scratchpad = NULL; ///< Scratchpad memory - Used for main thread stack | ||
| 24 | 22 | ||
| 25 | u8* g_physical_bootrom = NULL; ///< Bootrom physical memory | 23 | u8* g_physical_bootrom = NULL; ///< Bootrom physical memory |
| 26 | u8* g_uncached_bootrom = NULL; | 24 | u8* g_uncached_bootrom = NULL; |
| 27 | 25 | ||
| 28 | u8* g_physical_fcram = NULL; ///< Main physical memory (FCRAM) | 26 | u8* g_physical_fcram = NULL; ///< Main physical memory (FCRAM) |
| 27 | u8* g_physical_heap_gsp = NULL; | ||
| 29 | u8* g_physical_vram = NULL; ///< Video physical memory (VRAM) | 28 | u8* g_physical_vram = NULL; ///< Video physical memory (VRAM) |
| 30 | u8* g_physical_scratchpad = NULL; ///< Scratchpad memory used for main thread stack | 29 | u8* g_physical_scratchpad = NULL; ///< Scratchpad memory used for main thread stack |
| 31 | 30 | ||
| 32 | // We don't declare the IO region in here since its handled by other means. | 31 | // We don't declare the IO region in here since its handled by other means. |
| 33 | static MemoryView g_views[] = { | 32 | static MemoryView g_views[] = { |
| 34 | { &g_vram, &g_physical_vram, MEM_VRAM_VADDR, MEM_VRAM_SIZE, 0 }, | 33 | {&g_vram, &g_physical_vram, VRAM_VADDR, VRAM_SIZE, 0}, |
| 35 | { &g_fcram, &g_physical_fcram, MEM_FCRAM_VADDR, MEM_FCRAM_SIZE, MV_IS_PRIMARY_RAM }, | 34 | {&g_heap_gsp, &g_physical_heap_gsp, HEAP_GSP_VADDR, HEAP_GSP_SIZE, 0}, |
| 35 | {&g_heap, &g_physical_fcram, HEAP_VADDR, HEAP_SIZE, MV_IS_PRIMARY_RAM}, | ||
| 36 | }; | 36 | }; |
| 37 | 37 | ||
| 38 | /*static MemoryView views[] = | 38 | /*static MemoryView views[] = |
| @@ -56,14 +56,12 @@ void Init() { | |||
| 56 | 56 | ||
| 57 | for (size_t i = 0; i < ARRAY_SIZE(g_views); i++) { | 57 | for (size_t i = 0; i < ARRAY_SIZE(g_views); i++) { |
| 58 | if (g_views[i].flags & MV_IS_PRIMARY_RAM) | 58 | if (g_views[i].flags & MV_IS_PRIMARY_RAM) |
| 59 | g_views[i].size = MEM_FCRAM_SIZE; | 59 | g_views[i].size = FCRAM_SIZE; |
| 60 | } | 60 | } |
| 61 | 61 | ||
| 62 | g_base = MemoryMap_Setup(g_views, kNumMemViews, flags, &g_arena); | 62 | g_base = MemoryMap_Setup(g_views, kNumMemViews, flags, &g_arena); |
| 63 | 63 | ||
| 64 | g_scratchpad = new u8[MEM_SCRATCHPAD_SIZE]; | 64 | NOTICE_LOG(MEMMAP, "initialized OK, RAM at %p (mirror at 0 @ %p)", g_heap, |
| 65 | |||
| 66 | NOTICE_LOG(MEMMAP, "Memory system initialized. RAM at %p (mirror at 0 @ %p)", g_fcram, | ||
| 67 | g_physical_fcram); | 65 | g_physical_fcram); |
| 68 | } | 66 | } |
| 69 | 67 | ||
| @@ -72,12 +70,9 @@ void Shutdown() { | |||
| 72 | MemoryMap_Shutdown(g_views, kNumMemViews, flags, &g_arena); | 70 | MemoryMap_Shutdown(g_views, kNumMemViews, flags, &g_arena); |
| 73 | 71 | ||
| 74 | g_arena.ReleaseSpace(); | 72 | g_arena.ReleaseSpace(); |
| 75 | delete[] g_scratchpad; | 73 | g_base = NULL; |
| 76 | |||
| 77 | g_base = NULL; | ||
| 78 | g_scratchpad = NULL; | ||
| 79 | 74 | ||
| 80 | NOTICE_LOG(MEMMAP, "Memory system shut down."); | 75 | NOTICE_LOG(MEMMAP, "shutdown OK"); |
| 81 | } | 76 | } |
| 82 | 77 | ||
| 83 | } // namespace | 78 | } // namespace |