diff options
Diffstat (limited to '')
-rw-r--r-- | src/core/mem_map.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/core/mem_map.h b/src/core/mem_map.h index 1a49cc98d..c744e377e 100644 --- a/src/core/mem_map.h +++ b/src/core/mem_map.h @@ -53,7 +53,9 @@ enum { HARDWARE_IO_PADDR_END = (HARDWARE_IO_PADDR + HARDWARE_IO_SIZE), HARDWARE_IO_VADDR_END = (HARDWARE_IO_VADDR + HARDWARE_IO_SIZE), + VRAM_PADDR = 0x18000000, VRAM_VADDR = 0x1F000000, + VRAM_PADDR_END = (VRAM_PADDR + VRAM_SIZE), VRAM_VADDR_END = (VRAM_VADDR + VRAM_SIZE), SCRATCHPAD_VADDR_END = 0x10000000, @@ -141,4 +143,16 @@ inline const char* GetCharPointer(const u32 address) { return (const char *)GetPointer(address); } +inline const u32 VirtualAddressFromPhysical_FCRAM(const u32 address) { + return ((address & FCRAM_MASK) | FCRAM_VADDR); +} + +inline const u32 VirtualAddressFromPhysical_IO(const u32 address) { + return (address + 0x0EB00000); +} + +inline const u32 VirtualAddressFromPhysical_VRAM(const u32 address) { + return (address + 0x07000000); +} + } // namespace |