Stored a copy of the PTE in the TLB like the real hardware does.

Updated PTE.R bit on Write and Instruction fetch.
Added code to read the PTE from MEM2 if the PTE is stored there.
Refactored the two hash functions to reduce code duplication.
Updated save state version.
This commit is contained in:
skidau
2014-12-06 10:28:34 +11:00
parent 997681b65a
commit d485acdb51
4 changed files with 55 additions and 67 deletions

View File

@ -129,7 +129,7 @@ void Init(int cpu_core)
{
ppcState.tlb[tlb][set][way].flags = TLB_FLAG_INVALID;
ppcState.tlb[tlb][set][way].paddr = 0;
ppcState.tlb[tlb][set][way].pteg = 0;
ppcState.tlb[tlb][set][way].pte = 0;
ppcState.tlb[tlb][set][way].tag = 0;
}
}