mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-02 13:01:18 +12:00
dmae: Implement 16bit endian swap for DMAECopyMem (#1564)
This commit is contained in:
parent
caef34f2ff
commit
05617a332b
1 changed files with 10 additions and 0 deletions
|
@ -36,6 +36,16 @@ void dmaeExport_DMAECopyMem(PPCInterpreter_t* hCPU)
|
||||||
dstBuffer[i] = _swapEndianU32(srcBuffer[i]);
|
dstBuffer[i] = _swapEndianU32(srcBuffer[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if( hCPU->gpr[6] == DMAE_ENDIAN_16 )
|
||||||
|
{
|
||||||
|
// swap per uint16
|
||||||
|
uint16* srcBuffer = (uint16*)memory_getPointerFromVirtualOffset(hCPU->gpr[4]);
|
||||||
|
uint16* dstBuffer = (uint16*)memory_getPointerFromVirtualOffset(hCPU->gpr[3]);
|
||||||
|
for(uint32 i=0; i<hCPU->gpr[5]*2; i++)
|
||||||
|
{
|
||||||
|
dstBuffer[i] = _swapEndianU16(srcBuffer[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cemuLog_logDebug(LogType::Force, "DMAECopyMem(): Unsupported endian swap\n");
|
cemuLog_logDebug(LogType::Force, "DMAECopyMem(): Unsupported endian swap\n");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue