properly reset a lot of the emulator state

This commit is contained in:
SimoneN64
2024-06-21 22:25:50 +02:00
parent 3e36dbc4bb
commit f4a4aebbee
22 changed files with 71 additions and 31 deletions

View File

@@ -20,6 +20,29 @@ void Cop0::Reset() {
wired = 0;
index.raw = 63;
badVaddr = 0xFFFFFFFFFFFFFFFF;
kernelMode = {true};
supervisorMode = {false};
userMode = {false};
is64BitAddressing = {false};
llbit = {};
pageMask = {};
entryHi = {};
entryLo0 = {}, entryLo1 = {};
context = {};
wired = {}, r7 = {};
count = {};
compare = {};
LLAddr = {}, WatchLo = {}, WatchHi = {};
xcontext = {};
r21 = {}, r22 = {}, r23 = {}, r24 = {}, r25 = {};
ParityError = {}, CacheError = {}, TagLo = {}, TagHi = {};
ErrorEPC = {};
r31 = {};
memset(tlb, 0, sizeof(TLBEntry)*32);
tlbError = NONE;
openbus = {};
}
u32 Cop0::GetReg32(u8 addr) {