MCPcopy Create free account
hub / github.com/DaedalusX64/daedalus / DMA_SI_CopyFromDRAM

Function DMA_SI_CopyFromDRAM

Source/Core/DMA.cpp:141–159  ·  view source on GitHub ↗

Copy 64bytes from DRAM to PIF_RAM

Source from the content-addressed store, hash-verified

139// Copy 64bytes from DRAM to PIF_RAM
140//*****************************************************************************
141void DMA_SI_CopyFromDRAM( )
142{
143 u32 mem {Memory_SI_GetRegister(SI_DRAM_ADDR_REG) & 0x1fffffff};
144 u32 * p_dst {(u32 *)g_pMemoryBuffers[MEM_PIF_RAM]};
145 u32 * p_src {(u32 *)(g_pu8RamBase + mem)};
146
147#ifdef DAEDLAUS_PROFILER
148 DPF( DEBUG_MEMORY_PIF, "DRAM (0x%08x) -> PIF Transfer ", mem );
149#endif
150 // Fuse 4 reads and 4 writes to just one which is a lot faster - Corn
151 for(u32 i {}; i < 16; i++)
152 {
153 p_dst[i] = BSWAP32(p_src[i]);
154 }
155
156 Memory_SI_SetRegisterBits(SI_STATUS_REG, SI_STATUS_INTERRUPT);
157 Memory_MI_SetRegisterBits(MI_INTR_REG, MI_INTR_SI);
158 R4300_Interrupt_UpdateCause3();
159}
160
161//*****************************************************************************
162// Copy 64bytes to DRAM from PIF_RAM

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected