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

Function vtlb_MapBlock

pcsx2/vtlb.cpp:750–777  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

748}
749
750void vtlb_MapBlock(void* base, u32 start, u32 size, u32 blocksize)
751{
752 verify(0 == (start & VTLB_PAGE_MASK));
753 verify(0 == (size & VTLB_PAGE_MASK) && size > 0);
754 if (!blocksize)
755 blocksize = size;
756 verify(0 == (blocksize & VTLB_PAGE_MASK) && blocksize > 0);
757 verify(0 == (size % blocksize));
758
759 sptr baseint = (sptr)base;
760 u32 end = start + (size - VTLB_PAGE_SIZE);
761 verify((end >> VTLB_PAGE_BITS) < std::size(vtlbdata.pmap));
762
763 while (start <= end)
764 {
765 u32 loopsz = blocksize;
766 sptr ptr = baseint;
767
768 while (loopsz > 0)
769 {
770 vtlbdata.pmap[start >> VTLB_PAGE_BITS] = VTLBPhysical::fromPointer(ptr);
771
772 start += VTLB_PAGE_SIZE;
773 ptr += VTLB_PAGE_SIZE;
774 loopsz -= VTLB_PAGE_SIZE;
775 }
776 }
777}
778
779void vtlb_Mirror(u32 new_region, u32 start, u32 size)
780{

Callers 2

memMapVUmicroFunction · 0.85
memMapPhyFunction · 0.85

Calls 1

sizeFunction · 0.50

Tested by

no test coverage detected