mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
Merge pull request #1411 from ProjectRevoTPP/sio32intr
Resolve sio32intr_clock_slave fakematching. One left!
This commit is contained in:
commit
f8e5bac883
@ -148,11 +148,7 @@ static void sio32intr_clock_slave(void)
|
||||
{
|
||||
u32 regSIODATA32;
|
||||
u32 r0;
|
||||
#ifndef NONMATCHING
|
||||
register u32 reqLen asm("r2");
|
||||
#else
|
||||
u32 reqLen;
|
||||
#endif
|
||||
|
||||
gSTWIStatus->timerActive = 0;
|
||||
STWI_set_timer_in_RAM(100);
|
||||
@ -165,10 +161,14 @@ static void sio32intr_clock_slave(void)
|
||||
((u32*)gSTWIStatus->rxPacket)[0] = regSIODATA32;
|
||||
gSTWIStatus->reqNext = 1;
|
||||
r0 = 0x99660000;
|
||||
if ((regSIODATA32 >> 16) == (r0 >> 16))
|
||||
// variable reuse required
|
||||
reqLen = (regSIODATA32 >> 16);
|
||||
if (reqLen == (r0 >> 16))
|
||||
{
|
||||
gSTWIStatus->reqLength = reqLen = regSIODATA32 >> 8;
|
||||
gSTWIStatus->reqActiveCommand = regSIODATA32;
|
||||
// only reqLen = regSIODATA32 >> 8 is needed to match, but it looks a bit
|
||||
// more consistent when both lines update the variables. Might have been a macro?
|
||||
gSTWIStatus->reqLength = reqLen = (regSIODATA32 >> 8);
|
||||
gSTWIStatus->reqActiveCommand = reqLen = (regSIODATA32 >> 0);
|
||||
if (gSTWIStatus->reqLength == 0)
|
||||
{
|
||||
if (
|
||||
|
Loading…
Reference in New Issue
Block a user