MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / vtlb_MapHandler

Function vtlb_MapHandler

pcsx2/vtlb.cpp:735–748  ·  view source on GitHub ↗

Maps the given hander (created with vtlb_RegisterHandler) to the specified memory region. New mappings always assume priority over previous mappings, so place "generic" mappings for large areas of memory first, and then specialize specific small regions of memory afterward. A single handler can be mapped to many different regions by using multiple calls to this function. The memory region start a

Source from the content-addressed store, hash-verified

733//
734// The memory region start and size parameters must be pagesize aligned.
735void vtlb_MapHandler(vtlbHandler handler, u32 start, u32 size)
736{
737 verify(0 == (start & VTLB_PAGE_MASK));
738 verify(0 == (size & VTLB_PAGE_MASK) && size > 0);
739
740 u32 end = start + (size - VTLB_PAGE_SIZE);
741 pxAssume((end >> VTLB_PAGE_BITS) < (sizeof(vtlbdata.pmap) / sizeof(vtlbdata.pmap[0])));
742
743 while (start <= end)
744 {
745 vtlbdata.pmap[start >> VTLB_PAGE_BITS] = VTLBPhysical::fromHandler(handler);
746 start += VTLB_PAGE_SIZE;
747 }
748}
749
750void vtlb_MapBlock(void* base, u32 start, u32 size, u32 blocksize)
751{

Callers 3

memMapVUmicroFunction · 0.85
memMapPhyFunction · 0.85
vtlb_InitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected