void Memset(const u32 _Address, const u8 _iValue, const u32 _iLength) { u8 *ptr = GetPointer(_Address); if (ptr != nullptr) { memset(ptr,_iValue,_iLength); } else { for (u32 i = 0; i < _iLength; i++) Write_U8(_iValue, _Address + i); } }
void Memset(const u32 _Address, const u8 _iValue, const u32 _iLength) { u8 *ptr = GetPointer(_Address); if (ptr != NULL) { memset(ptr,_iValue,_iLength); } else { for (size_t i = 0; i < _iLength; i++) Write_U8(_iValue, (u32)(_Address + i)); } }
void Memset(const u32 _Address, const u8 _iValue, const u32 _iLength) { u8 *ptr = GetPointer(_Address); if (ptr != NULL) { memset(ptr, _iValue, _iLength); } else { for (size_t i = 0; i < _iLength; i++) Write_U8(_iValue, (u32)(_Address + i)); } #ifndef MOBILE_DEVICE CBreakPoints::ExecMemCheck(_Address, true, _iLength, currentMIPS->pc); #endif }
void DMA_MemoryToLC(const u32 _CacheAddr, const u32 _MemAddr, const u32 _iNumBlocks) { const u8 *src = GetPointer(_MemAddr); u8 *dst = m_pL1Cache + (_CacheAddr & 0x3FFFF); if ((dst != nullptr) && (src != nullptr) && (_MemAddr & 3) == 0 && (_CacheAddr & 3) == 0) { memcpy(dst, src, 32 * _iNumBlocks); } else { for (u32 i = 0; i < 32 * _iNumBlocks; i++) { u8 Temp = Read_U8(_MemAddr + i); Write_U8(Temp, _CacheAddr + i); } } }
void DMA_LCToMemory(const u32 _MemAddr, const u32 _CacheAddr, const u32 _iNumBlocks) { const u8 *src = GetCachePtr() + (_CacheAddr & 0x3FFFF); u8 *dst = GetPointer(_MemAddr); if ((dst != NULL) && (src != NULL) && (_MemAddr & 3) == 0 && (_CacheAddr & 3) == 0) { memcpy(dst, src, 32 * _iNumBlocks); } else { for (u32 i = 0; i < 32 * _iNumBlocks; i++) { u8 Temp = Read_U8(_CacheAddr + i); Write_U8(Temp, _MemAddr + i); } } }