diff options
author | MerryMage <MerryMage@users.noreply.github.com> | 2017-09-24 23:42:42 +0200 |
---|---|---|
committer | MerryMage <MerryMage@users.noreply.github.com> | 2017-09-24 23:42:42 +0200 |
commit | c02bbb7030efd072511bd0051a44d9e503016f74 (patch) | |
tree | cf830eadae6493ee83b7de8b44c10c89d668b5ca /src/core/memory.cpp | |
parent | Merge pull request #2921 from jroweboy/batch-fix-2 (diff) | |
download | yuzu-c02bbb7030efd072511bd0051a44d9e503016f74.tar yuzu-c02bbb7030efd072511bd0051a44d9e503016f74.tar.gz yuzu-c02bbb7030efd072511bd0051a44d9e503016f74.tar.bz2 yuzu-c02bbb7030efd072511bd0051a44d9e503016f74.tar.lz yuzu-c02bbb7030efd072511bd0051a44d9e503016f74.tar.xz yuzu-c02bbb7030efd072511bd0051a44d9e503016f74.tar.zst yuzu-c02bbb7030efd072511bd0051a44d9e503016f74.zip |
Diffstat (limited to 'src/core/memory.cpp')
-rw-r--r-- | src/core/memory.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/core/memory.cpp b/src/core/memory.cpp index 68a6b1ac2..17fa10b49 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp @@ -22,12 +22,20 @@ namespace Memory { static std::array<u8, Memory::VRAM_SIZE> vram; static std::array<u8, Memory::N3DS_EXTRA_RAM_SIZE> n3ds_extra_ram; -PageTable* current_page_table = nullptr; +static PageTable* current_page_table = nullptr; std::array<u8*, PAGE_TABLE_NUM_ENTRIES>* GetCurrentPageTablePointers() { return ¤t_page_table->pointers; } +void SetCurrentPageTable(PageTable* page_table) { + current_page_table = page_table; +} + +PageTable* GetCurrentPageTable() { + return current_page_table; +} + static void MapPages(PageTable& page_table, u32 base, u32 size, u8* memory, PageType type) { LOG_DEBUG(HW_Memory, "Mapping %p onto %08X-%08X", memory, base * PAGE_SIZE, (base + size) * PAGE_SIZE); |