diff options
| author | 2018-03-22 16:46:33 +0100 | |
|---|---|---|
| committer | 2018-03-22 21:25:06 +0100 | |
| commit | 8afdbf6a1fb933d44e0e4d04cc014d0fcd0c8b14 (patch) | |
| tree | bd7283504909f451ab1a879dbc1f3b87008b2318 /src | |
| parent | Merge pull request #261 from mailwl/spl (diff) | |
| download | yuzu-8afdbf6a1fb933d44e0e4d04cc014d0fcd0c8b14.tar.gz yuzu-8afdbf6a1fb933d44e0e4d04cc014d0fcd0c8b14.tar.xz yuzu-8afdbf6a1fb933d44e0e4d04cc014d0fcd0c8b14.zip | |
Remove more N3DS References
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/memory.cpp | 9 | ||||
| -rw-r--r-- | src/core/memory.h | 11 |
2 files changed, 0 insertions, 20 deletions
diff --git a/src/core/memory.cpp b/src/core/memory.cpp index 4e34d8334..a9beccb95 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp | |||
| @@ -23,7 +23,6 @@ | |||
| 23 | namespace Memory { | 23 | namespace Memory { |
| 24 | 24 | ||
| 25 | static std::array<u8, Memory::VRAM_SIZE> vram; | 25 | static std::array<u8, Memory::VRAM_SIZE> vram; |
| 26 | static std::array<u8, Memory::N3DS_EXTRA_RAM_SIZE> n3ds_extra_ram; | ||
| 27 | 26 | ||
| 28 | static PageTable* current_page_table = nullptr; | 27 | static PageTable* current_page_table = nullptr; |
| 29 | 28 | ||
| @@ -244,7 +243,6 @@ u8* GetPhysicalPointer(PAddr address) { | |||
| 244 | {IO_AREA_PADDR, IO_AREA_SIZE}, | 243 | {IO_AREA_PADDR, IO_AREA_SIZE}, |
| 245 | {DSP_RAM_PADDR, DSP_RAM_SIZE}, | 244 | {DSP_RAM_PADDR, DSP_RAM_SIZE}, |
| 246 | {FCRAM_PADDR, FCRAM_N3DS_SIZE}, | 245 | {FCRAM_PADDR, FCRAM_N3DS_SIZE}, |
| 247 | {N3DS_EXTRA_RAM_PADDR, N3DS_EXTRA_RAM_SIZE}, | ||
| 248 | }; | 246 | }; |
| 249 | 247 | ||
| 250 | const auto area = | 248 | const auto area = |
| @@ -283,9 +281,6 @@ u8* GetPhysicalPointer(PAddr address) { | |||
| 283 | } | 281 | } |
| 284 | ASSERT_MSG(target_pointer != nullptr, "Invalid FCRAM address"); | 282 | ASSERT_MSG(target_pointer != nullptr, "Invalid FCRAM address"); |
| 285 | break; | 283 | break; |
| 286 | case N3DS_EXTRA_RAM_PADDR: | ||
| 287 | target_pointer = n3ds_extra_ram.data() + offset_into_region; | ||
| 288 | break; | ||
| 289 | default: | 284 | default: |
| 290 | UNREACHABLE(); | 285 | UNREACHABLE(); |
| 291 | } | 286 | } |
| @@ -609,8 +604,6 @@ boost::optional<PAddr> TryVirtualToPhysicalAddress(const VAddr addr) { | |||
| 609 | return addr - DSP_RAM_VADDR + DSP_RAM_PADDR; | 604 | return addr - DSP_RAM_VADDR + DSP_RAM_PADDR; |
| 610 | } else if (addr >= IO_AREA_VADDR && addr < IO_AREA_VADDR_END) { | 605 | } else if (addr >= IO_AREA_VADDR && addr < IO_AREA_VADDR_END) { |
| 611 | return addr - IO_AREA_VADDR + IO_AREA_PADDR; | 606 | return addr - IO_AREA_VADDR + IO_AREA_PADDR; |
| 612 | } else if (addr >= N3DS_EXTRA_RAM_VADDR && addr < N3DS_EXTRA_RAM_VADDR_END) { | ||
| 613 | return addr - N3DS_EXTRA_RAM_VADDR + N3DS_EXTRA_RAM_PADDR; | ||
| 614 | } | 607 | } |
| 615 | 608 | ||
| 616 | return boost::none; | 609 | return boost::none; |
| @@ -637,8 +630,6 @@ boost::optional<VAddr> PhysicalToVirtualAddress(const PAddr addr) { | |||
| 637 | return addr - DSP_RAM_PADDR + DSP_RAM_VADDR; | 630 | return addr - DSP_RAM_PADDR + DSP_RAM_VADDR; |
| 638 | } else if (addr >= IO_AREA_PADDR && addr < IO_AREA_PADDR_END) { | 631 | } else if (addr >= IO_AREA_PADDR && addr < IO_AREA_PADDR_END) { |
| 639 | return addr - IO_AREA_PADDR + IO_AREA_VADDR; | 632 | return addr - IO_AREA_PADDR + IO_AREA_VADDR; |
| 640 | } else if (addr >= N3DS_EXTRA_RAM_PADDR && addr < N3DS_EXTRA_RAM_PADDR_END) { | ||
| 641 | return addr - N3DS_EXTRA_RAM_PADDR + N3DS_EXTRA_RAM_VADDR; | ||
| 642 | } | 633 | } |
| 643 | 634 | ||
| 644 | return boost::none; | 635 | return boost::none; |
diff --git a/src/core/memory.h b/src/core/memory.h index f406cc848..f5bf0141f 100644 --- a/src/core/memory.h +++ b/src/core/memory.h | |||
| @@ -98,12 +98,6 @@ enum : PAddr { | |||
| 98 | VRAM_SIZE = 0x00600000, ///< VRAM size (6MB) | 98 | VRAM_SIZE = 0x00600000, ///< VRAM size (6MB) |
| 99 | VRAM_PADDR_END = VRAM_PADDR + VRAM_SIZE, | 99 | VRAM_PADDR_END = VRAM_PADDR + VRAM_SIZE, |
| 100 | 100 | ||
| 101 | /// New 3DS additional memory. Supposedly faster than regular FCRAM. Part of it can be used by | ||
| 102 | /// applications and system modules if mapped via the ExHeader. | ||
| 103 | N3DS_EXTRA_RAM_PADDR = 0x1F000000, | ||
| 104 | N3DS_EXTRA_RAM_SIZE = 0x00400000, ///< New 3DS additional memory size (4MB) | ||
| 105 | N3DS_EXTRA_RAM_PADDR_END = N3DS_EXTRA_RAM_PADDR + N3DS_EXTRA_RAM_SIZE, | ||
| 106 | |||
| 107 | /// DSP memory | 101 | /// DSP memory |
| 108 | DSP_RAM_PADDR = 0x1FF00000, | 102 | DSP_RAM_PADDR = 0x1FF00000, |
| 109 | DSP_RAM_SIZE = 0x00080000, ///< DSP memory size (512KB) | 103 | DSP_RAM_SIZE = 0x00080000, ///< DSP memory size (512KB) |
| @@ -119,7 +113,6 @@ enum : PAddr { | |||
| 119 | FCRAM_SIZE = 0x08000000, ///< FCRAM size on the Old 3DS (128MB) | 113 | FCRAM_SIZE = 0x08000000, ///< FCRAM size on the Old 3DS (128MB) |
| 120 | FCRAM_N3DS_SIZE = 0x10000000, ///< FCRAM size on the New 3DS (256MB) | 114 | FCRAM_N3DS_SIZE = 0x10000000, ///< FCRAM size on the New 3DS (256MB) |
| 121 | FCRAM_PADDR_END = FCRAM_PADDR + FCRAM_SIZE, | 115 | FCRAM_PADDR_END = FCRAM_PADDR + FCRAM_SIZE, |
| 122 | FCRAM_N3DS_PADDR_END = FCRAM_PADDR + FCRAM_N3DS_SIZE, | ||
| 123 | }; | 116 | }; |
| 124 | 117 | ||
| 125 | /// Virtual user-space memory regions | 118 | /// Virtual user-space memory regions |
| @@ -135,10 +128,6 @@ enum : VAddr { | |||
| 135 | LINEAR_HEAP_SIZE = 0x08000000, | 128 | LINEAR_HEAP_SIZE = 0x08000000, |
| 136 | LINEAR_HEAP_VADDR_END = LINEAR_HEAP_VADDR + LINEAR_HEAP_SIZE, | 129 | LINEAR_HEAP_VADDR_END = LINEAR_HEAP_VADDR + LINEAR_HEAP_SIZE, |
| 137 | 130 | ||
| 138 | /// Maps 1:1 to New 3DS additional memory | ||
| 139 | N3DS_EXTRA_RAM_VADDR = 0x1E800000, | ||
| 140 | N3DS_EXTRA_RAM_VADDR_END = N3DS_EXTRA_RAM_VADDR + N3DS_EXTRA_RAM_SIZE, | ||
| 141 | |||
| 142 | /// Maps 1:1 to the IO register area. | 131 | /// Maps 1:1 to the IO register area. |
| 143 | IO_AREA_VADDR = 0x1EC00000, | 132 | IO_AREA_VADDR = 0x1EC00000, |
| 144 | IO_AREA_VADDR_END = IO_AREA_VADDR + IO_AREA_SIZE, | 133 | IO_AREA_VADDR_END = IO_AREA_VADDR + IO_AREA_SIZE, |