Memory: create MemorySystem class
This commit is contained in:
parent
ab0dba6a8b
commit
6992f76acf
|
@ -172,6 +172,8 @@ void System::Reschedule() {
|
||||||
System::ResultStatus System::Init(EmuWindow& emu_window, u32 system_mode) {
|
System::ResultStatus System::Init(EmuWindow& emu_window, u32 system_mode) {
|
||||||
LOG_DEBUG(HW_Memory, "initialized OK");
|
LOG_DEBUG(HW_Memory, "initialized OK");
|
||||||
|
|
||||||
|
memory = std::make_unique<Memory::MemorySystem>();
|
||||||
|
|
||||||
timing = std::make_unique<Timing>();
|
timing = std::make_unique<Timing>();
|
||||||
|
|
||||||
kernel = std::make_unique<Kernel::KernelSystem>(system_mode);
|
kernel = std::make_unique<Kernel::KernelSystem>(system_mode);
|
||||||
|
@ -250,6 +252,14 @@ const Timing& System::CoreTiming() const {
|
||||||
return *timing;
|
return *timing;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Memory::MemorySystem& System::Memory() {
|
||||||
|
return *memory;
|
||||||
|
}
|
||||||
|
|
||||||
|
const Memory::MemorySystem& System::Memory() const {
|
||||||
|
return *memory;
|
||||||
|
}
|
||||||
|
|
||||||
Cheats::CheatEngine& System::CheatEngine() {
|
Cheats::CheatEngine& System::CheatEngine() {
|
||||||
return *cheat_engine;
|
return *cheat_engine;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,10 @@
|
||||||
class EmuWindow;
|
class EmuWindow;
|
||||||
class ARM_Interface;
|
class ARM_Interface;
|
||||||
|
|
||||||
|
namespace Memory {
|
||||||
|
class MemorySystem;
|
||||||
|
}
|
||||||
|
|
||||||
namespace AudioCore {
|
namespace AudioCore {
|
||||||
class DspInterface;
|
class DspInterface;
|
||||||
}
|
}
|
||||||
|
@ -188,6 +192,12 @@ public:
|
||||||
/// Gets a const reference to the timing system
|
/// Gets a const reference to the timing system
|
||||||
const Timing& CoreTiming() const;
|
const Timing& CoreTiming() const;
|
||||||
|
|
||||||
|
/// Gets a reference to the memory system
|
||||||
|
Memory::MemorySystem& Memory();
|
||||||
|
|
||||||
|
/// Gets a const reference to the memory system
|
||||||
|
const Memory::MemorySystem& Memory() const;
|
||||||
|
|
||||||
/// Gets a reference to the cheat engine
|
/// Gets a reference to the cheat engine
|
||||||
Cheats::CheatEngine& CheatEngine();
|
Cheats::CheatEngine& CheatEngine();
|
||||||
|
|
||||||
|
@ -236,6 +246,9 @@ private:
|
||||||
/// AppLoader used to load the current executing application
|
/// AppLoader used to load the current executing application
|
||||||
std::unique_ptr<Loader::AppLoader> app_loader;
|
std::unique_ptr<Loader::AppLoader> app_loader;
|
||||||
|
|
||||||
|
/// Memory system
|
||||||
|
std::unique_ptr<Memory::MemorySystem> memory;
|
||||||
|
|
||||||
/// ARM11 CPU core
|
/// ARM11 CPU core
|
||||||
std::unique_ptr<ARM_Interface> cpu_core;
|
std::unique_ptr<ARM_Interface> cpu_core;
|
||||||
|
|
||||||
|
|
|
@ -254,4 +254,8 @@ void RasterizerFlushVirtualRegion(VAddr start, u32 size, FlushMode mode);
|
||||||
/// Gets offset in FCRAM from a pointer inside FCRAM range
|
/// Gets offset in FCRAM from a pointer inside FCRAM range
|
||||||
u32 GetFCRAMOffset(u8* pointer);
|
u32 GetFCRAMOffset(u8* pointer);
|
||||||
|
|
||||||
|
class MemorySystem {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
} // namespace Memory
|
} // namespace Memory
|
||||||
|
|
Loading…
Reference in New Issue