Swapping register values.
This commit is contained in:
parent
7044b74dc2
commit
10c9537836
|
@ -1219,8 +1219,6 @@ table->AddSequence(OPCODE_STORE, [](X64Emitter& e, Instr*& i) {
|
|||
}
|
||||
e.EndOp(src2);
|
||||
}
|
||||
// eh?
|
||||
e.bswap(e.r8);
|
||||
CallNative(e, cbs->write);
|
||||
i = e.Advance(i);
|
||||
return true;
|
||||
|
|
|
@ -187,10 +187,11 @@ uint64_t AudioSystem::ReadRegister(uint64_t addr) {
|
|||
XELOGAPU("ReadRegister(%.4X)", r);
|
||||
// 1800h is read on startup and stored -- context? buffers?
|
||||
// 1818h is read during a lock?
|
||||
return 0;
|
||||
return XESWAP32BE(0);
|
||||
}
|
||||
|
||||
void AudioSystem::WriteRegister(uint64_t addr, uint64_t value) {
|
||||
value = XESWAP32BE((uint32_t)value);
|
||||
uint32_t r = addr & 0xFFFF;
|
||||
XELOGAPU("WriteRegister(%.4X, %.8X)", r, value);
|
||||
// 1804h is written to with 0x02000000 and 0x03000000 around a lock operation
|
||||
|
|
|
@ -152,10 +152,11 @@ uint64_t GraphicsSystem::ReadRegister(uint64_t addr) {
|
|||
}
|
||||
|
||||
XEASSERT(r >= 0 && r < kXEGpuRegisterCount);
|
||||
return regs->values[r].u32;
|
||||
return XESWAP32BE(regs->values[r].u32);
|
||||
}
|
||||
|
||||
void GraphicsSystem::WriteRegister(uint64_t addr, uint64_t value) {
|
||||
value = XESWAP32BE((uint32_t)value);
|
||||
uint32_t r = addr & 0xFFFF;
|
||||
XELOGGPU("WriteRegister(%.4X, %.8X)", r, value);
|
||||
|
||||
|
|
Loading…
Reference in New Issue