Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/link.c
Original file line number Diff line number Diff line change
Expand Up @@ -2183,6 +2183,9 @@ static bool8 DoHandshake(void)
u8 i;
u8 playerCount;
u16 minRecv;
#ifdef UBFIX
u64 recvSiomlt;
#endif

playerCount = 0;
minRecv = 0xFFFF;
Expand All @@ -2194,7 +2197,12 @@ static bool8 DoHandshake(void)
{
REG_SIOMLT_SEND = SLAVE_HANDSHAKE;
}
#ifdef UBFIX
recvSiomlt = REG_SIOMLT_RECV;
memcpy(gLink.handshakeBuffer, &recvSiomlt, sizeof(gLink.handshakeBuffer));
#else
*(u64 *)gLink.handshakeBuffer = REG_SIOMLT_RECV;
#endif
REG_SIOMLT_RECV = 0;
gLink.handshakeAsMaster = FALSE;
for (i = 0; i < MAX_LINK_PLAYERS; i++)
Expand Down Expand Up @@ -2234,8 +2242,13 @@ static void DoRecv(void)
u16 recv[4];
u8 i;
u8 index;
#ifdef UBFIX
u64 recvSiomlt = REG_SIOMLT_RECV;

memcpy(recv, &recvSiomlt, sizeof(recv));
#else
*(u64 *)recv = REG_SIOMLT_RECV;
#endif
if (gLink.sendCmdIndex == 0)
{
for (i = 0; i < gLink.playerCount; i++)
Expand Down