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

Function memMapPhy

pcsx2/Memory.cpp:406–450  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

404}
405
406void memMapPhy()
407{
408 // Main memory
409 vtlb_MapBlock(eeMem->Main, 0x00000000,Ps2MemSize::ExposedRam);//mirrored on first 256 mb ?
410
411 // High memory, uninstalled on the configuration we emulate
412 vtlb_MapHandler(null_handler, Ps2MemSize::ExposedRam, 0x10000000 - Ps2MemSize::ExposedRam);
413
414 // Various ROMs (all read-only)
415 vtlb_MapBlock(eeMem->ROM, 0x1fc00000, Ps2MemSize::Rom);
416 vtlb_MapBlock(eeMem->ROM1, 0x1e000000, Ps2MemSize::Rom1);
417 vtlb_MapBlock(eeMem->ROM2, 0x1e400000, Ps2MemSize::Rom2);
418
419 // IOP memory
420 // (used by the EE Bios Kernel during initial hardware initialization, Apps/Games
421 // are "supposed" to use the thread-safe SIF instead.)
422 vtlb_MapHandler(iop_memory,0x1c000000,0x00800000);
423
424 // Generic Handlers; These fallback to mem* stuff...
425 vtlb_MapHandler(tlb_fallback_7,0x14000000, _64kb);
426 vtlb_MapHandler(tlb_fallback_4,0x18000000, _64kb);
427 vtlb_MapHandler(tlb_fallback_5,0x1a000000, _64kb);
428 vtlb_MapHandler(tlb_fallback_6,0x12000000, _64kb);
429 vtlb_MapHandler(tlb_fallback_8,0x1f000000, _64kb);
430 vtlb_MapHandler(tlb_fallback_3,0x1f400000, _64kb);
431 vtlb_MapHandler(tlb_fallback_2,0x1f800000, _64kb);
432 vtlb_MapHandler(tlb_fallback_8,0x1f900000, _64kb);
433
434 // Hardware Register Handlers : specialized/optimized per-page handling of HW register accesses
435 // (note that hw_by_page handles are assigned in memReset prior to calling this function)
436
437 for( uint i=0; i<16; ++i)
438 vtlb_MapHandler(hw_by_page[i], 0x10000000 + (0x01000 * i), 0x01000);
439
440 vtlb_MapHandler(gs_page_0, 0x12000000, 0x01000);
441 vtlb_MapHandler(gs_page_1, 0x12001000, 0x01000);
442
443 // "Secret" IOP HW mappings - Used by EE Bios Kernel during boot and generally
444 // left untouched after that, as per EE/IOP thread safety rules.
445
446 vtlb_MapHandler(iopHw_by_page_01, 0x1f801000, 0x01000);
447 vtlb_MapHandler(iopHw_by_page_03, 0x1f803000, 0x01000);
448 vtlb_MapHandler(iopHw_by_page_08, 0x1f808000, 0x01000);
449
450}
451
452//Why is this required ?
453void memMapKernelMem()

Callers 1

memResetFunction · 0.85

Calls 2

vtlb_MapBlockFunction · 0.85
vtlb_MapHandlerFunction · 0.85

Tested by

no test coverage detected