diff options
| author | 2015-05-01 19:05:18 -0400 | |
|---|---|---|
| committer | 2015-05-01 19:05:18 -0400 | |
| commit | 6a2d8c46f21e8813e0472dba28932ed461ce1a66 (patch) | |
| tree | d7057cf9926c822c12cc7d82814a252db79ca600 /src/core/mem_map_funcs.cpp | |
| parent | Merge pull request #717 from linkmauve/useless-auto (diff) | |
| parent | Qt: Shutdown game on emulator close event. (diff) | |
| download | yuzu-6a2d8c46f21e8813e0472dba28932ed461ce1a66.tar.gz yuzu-6a2d8c46f21e8813e0472dba28932ed461ce1a66.tar.xz yuzu-6a2d8c46f21e8813e0472dba28932ed461ce1a66.zip | |
Merge pull request #713 from bunnei/qt-emuthread-fixes
Fix emulation state resetting to support multiple emulation sessions
Diffstat (limited to 'src/core/mem_map_funcs.cpp')
| -rw-r--r-- | src/core/mem_map_funcs.cpp | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/core/mem_map_funcs.cpp b/src/core/mem_map_funcs.cpp index 5878b99dc..8759ebdfb 100644 --- a/src/core/mem_map_funcs.cpp +++ b/src/core/mem_map_funcs.cpp | |||
| @@ -15,7 +15,6 @@ namespace Memory { | |||
| 15 | 15 | ||
| 16 | static std::map<u32, MemoryBlock> heap_map; | 16 | static std::map<u32, MemoryBlock> heap_map; |
| 17 | static std::map<u32, MemoryBlock> heap_linear_map; | 17 | static std::map<u32, MemoryBlock> heap_linear_map; |
| 18 | static std::map<u32, MemoryBlock> shared_map; | ||
| 19 | 18 | ||
| 20 | /// Convert a physical address to virtual address | 19 | /// Convert a physical address to virtual address |
| 21 | VAddr PhysicalToVirtualAddress(const PAddr addr) { | 20 | VAddr PhysicalToVirtualAddress(const PAddr addr) { |
| @@ -185,12 +184,6 @@ u8 *GetPointer(const VAddr vaddr) { | |||
| 185 | } | 184 | } |
| 186 | } | 185 | } |
| 187 | 186 | ||
| 188 | /** | ||
| 189 | * Maps a block of memory on the heap | ||
| 190 | * @param size Size of block in bytes | ||
| 191 | * @param operation Memory map operation type | ||
| 192 | * @param flags Memory allocation flags | ||
| 193 | */ | ||
| 194 | u32 MapBlock_Heap(u32 size, u32 operation, u32 permissions) { | 187 | u32 MapBlock_Heap(u32 size, u32 operation, u32 permissions) { |
| 195 | MemoryBlock block; | 188 | MemoryBlock block; |
| 196 | 189 | ||
| @@ -208,12 +201,6 @@ u32 MapBlock_Heap(u32 size, u32 operation, u32 permissions) { | |||
| 208 | return block.GetVirtualAddress(); | 201 | return block.GetVirtualAddress(); |
| 209 | } | 202 | } |
| 210 | 203 | ||
| 211 | /** | ||
| 212 | * Maps a block of memory on the linear heap | ||
| 213 | * @param size Size of block in bytes | ||
| 214 | * @param operation Memory map operation type | ||
| 215 | * @param flags Memory allocation flags | ||
| 216 | */ | ||
| 217 | u32 MapBlock_HeapLinear(u32 size, u32 operation, u32 permissions) { | 204 | u32 MapBlock_HeapLinear(u32 size, u32 operation, u32 permissions) { |
| 218 | MemoryBlock block; | 205 | MemoryBlock block; |
| 219 | 206 | ||
| @@ -231,6 +218,14 @@ u32 MapBlock_HeapLinear(u32 size, u32 operation, u32 permissions) { | |||
| 231 | return block.GetVirtualAddress(); | 218 | return block.GetVirtualAddress(); |
| 232 | } | 219 | } |
| 233 | 220 | ||
| 221 | void MemBlock_Init() { | ||
| 222 | } | ||
| 223 | |||
| 224 | void MemBlock_Shutdown() { | ||
| 225 | heap_map.clear(); | ||
| 226 | heap_linear_map.clear(); | ||
| 227 | } | ||
| 228 | |||
| 234 | u8 Read8(const VAddr addr) { | 229 | u8 Read8(const VAddr addr) { |
| 235 | u8 data = 0; | 230 | u8 data = 0; |
| 236 | Read<u8>(data, addr); | 231 | Read<u8>(data, addr); |