mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-06 11:01:38 +12:00
Start adding memory stuff
This commit is contained in:
parent
2057e0c447
commit
905c7ed770
8 changed files with 77 additions and 10 deletions
18
include/memory.hpp
Normal file
18
include/memory.hpp
Normal file
|
@ -0,0 +1,18 @@
|
|||
#pragma once
|
||||
#include <vector>
|
||||
#include "helpers.hpp"
|
||||
|
||||
class Memory {
|
||||
u8* fcram;
|
||||
|
||||
// Our dynarmic core uses page tables for reads and writes with 4096 byte pages
|
||||
std::vector<uintptr_t> readTable, writeTable;
|
||||
static constexpr u32 pageShift = 12;
|
||||
static constexpr u32 pageSize = 1 << pageShift;
|
||||
static constexpr u32 pageMask = pageSize - 1;
|
||||
|
||||
public:
|
||||
Memory();
|
||||
void* getReadPointer(u32 address);
|
||||
void* getWritePointer(u32 address);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue