mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-18 03:44:32 +01:00
MMIO: Register hardware register blocks as devices
The interpreter's MMIO dispatch was a hardcoded chain for GPIO and the syscon serial port. Devices now register an address range in Core/HW/MMIO and get each access with its width and the MIPSState making it, for registers that answer each CPU differently. An access no device handles is logged and reads as poison, as before. GPIO and syscon serial become the first two devices. They're reset at boot, which they never were, and saved in savestates (SaveStart section version 4). ll/sc, lwl/lwr and lwc1/swc1 reach MMIO in the interpreter too, and kernel blocks leave lwc1/swc1 to it like the other loads and stores. swl/swr and lv/sv still treat it as a bad address. TestMMIO runs a kernel-mode access on each core and the registers through a savestate. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
99335adb40
commit
b7b4a265b7
18 files changed
+457
-187
No files matched your search
@@ -60,6 +60,7 @@
|
||||
#include "Core/HLE/sceKernel.h"
|
||||
#include "Core/HLE/sceUtility.h"
|
||||
#include "Core/HW/Display.h"
|
||||
#include "Core/HW/MMIO.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/Util/PathUtil.h"
|
||||
@@ -552,6 +553,7 @@ static bool CPU_Init(FileLoader *fileLoader, IdentifiedFileType type, std::strin
|
||||
mipsr4k.Reset();
|
||||
|
||||
CoreTiming::Init(&mipsr4k);
|
||||
MMIO::Init();
|
||||
|
||||
DisplayHWInit();
|
||||
|
||||
@@ -676,6 +678,7 @@ void CPU_Shutdown(bool success) {
|
||||
Replacement_Shutdown();
|
||||
|
||||
CoreTiming::Shutdown();
|
||||
MMIO::Shutdown();
|
||||
__KernelShutdown();
|
||||
HLEShutdown();
|
||||
|
||||
|
||||
Reference in new issue
Block a user