PCSX2 Documentation/PCSX2 EE Recompiler: Difference between revisions

Jump to navigation Jump to search
Line 73: Line 73:


A naive implementation would be to instrument all write to detect corresponding block. However it will cost a big penalty for each memory write. Another one will be to check the content of the instruction block at each execution. Again slow. A more complex implementation will use the page fault signal handler mechanism to detect invalid write. Guess what, we choose the later.
A naive implementation would be to instrument all write to detect corresponding block. However it will cost a big penalty for each memory write. Another one will be to check the content of the instruction block at each execution. Again slow. A more complex implementation will use the page fault signal handler mechanism to detect invalid write. Guess what, we choose the later.
* <code>C++ function: void mmap_MarkCountedRamPage( u32 paddr )</code>
* <code>C++ function: int mmap_GetRamPageInfo( u32 paddr )</code>
* <code>C++ function: void mmap_ClearCpuBlock( uint offset )</code>
* <code>C++ function: void dyna_page_reset(u32 start, u32 sz)</code>
* <code>C++ function: void dyna_block_discard(u32 start, u32 sz)</code>
* <code>C++ function: void recClear(u32 addr, u32 size)</code>
* <code>C++ function: void mmap_PageFaultHandler::OnPageFaultEvent( const PageFaultInfo& info, bool& handled )</code>
* <code>C++ array: u16 manual_page[Ps2MemSize::MainRam >> 12]</code>
* <code>C++ array: u8 manual_counter[Ps2MemSize::MainRam >> 12]</code>
* <code>C++ array: vtlb_PageProtectionInfo m_PageProtectInfo[Ps2MemSize::MainRam >> 12]</code>


==== The Automatic Protection ====
==== The Automatic Protection ====
ninja
56

edits

Navigation menu