CPU: Refactor execution mode switching

Fixes single step breaking in branch delay slots with recompiler.
Simplifies initialization.
Removes multiple sources of truth for fastmem.
This commit is contained in:
Stenzek
2024-09-06 20:00:30 +10:00
parent 4c59513c79
commit ab1c85790c
8 changed files with 222 additions and 224 deletions

View File

@@ -127,7 +127,7 @@ bool ReallocateMemoryMap(bool export_shared_memory, Error* error);
/// Should be called when the process crashes, to avoid leaking.
void CleanupMemoryMap();
bool Initialize();
void Initialize();
void Shutdown();
void Reset();
bool DoState(StateWrapper& sw);
@@ -144,9 +144,8 @@ ALWAYS_INLINE_RELEASE static FP* OffsetHandlerArray(void** handlers, MemoryAcces
(((static_cast<size_t>(size) * 2) + static_cast<size_t>(type)) * MEMORY_LUT_SIZE));
}
CPUFastmemMode GetFastmemMode();
void* GetFastmemBase(bool isc);
void UpdateFastmemViews(CPUFastmemMode mode);
void RemapFastmemViews();
bool CanUseFastmemForAddress(VirtualMemoryAddress address);
void SetExpansionROM(std::vector<u8> data);