mirror of https://github.com/mgba-emu/mgba.git
GBA SIO: Fix SI value for unattached MULTI mode
This commit is contained in:
parent
8c3f7eb228
commit
ed23ae3ef7
1
CHANGES
1
CHANGES
|
@ -10,6 +10,7 @@ Emulation fixes:
|
|||
- GB Video: Clear VRAM on reset (fixes mgba.io/i/2152)
|
||||
- GBA SIO: Add missing NORMAL8 implementation bits (fixes mgba.io/i/2172)
|
||||
- GBA SIO: Fix missing interrupt on an unattached NORMAL transfer
|
||||
- GBA SIO: Fix SI value for unattached MULTI mode
|
||||
- GBA Video: Revert scanline latching changes (fixes mgba.io/i/2153, mgba.io/i/2149)
|
||||
Other fixes:
|
||||
- 3DS: Fix disabling "wide" mode on 2DS (fixes mgba.io/i/2167)
|
||||
|
|
|
@ -179,10 +179,14 @@ static uint16_t GBASIOLockstepNodeMultiWriteRegister(struct GBASIODriver* driver
|
|||
mLOG(GBA_SIO, DEBUG, "Lockstep %i: SIOCNT <- %04X", node->id, value);
|
||||
|
||||
enum mLockstepPhase transferActive;
|
||||
int attached;
|
||||
ATOMIC_LOAD(transferActive, node->p->d.transferActive);
|
||||
ATOMIC_LOAD(attached, node->p->d.attached);
|
||||
|
||||
driver->p->siocnt = GBASIOMultiplayerSetSlave(driver->p->siocnt, node->id || attached < 2);
|
||||
|
||||
if (value & 0x0080 && transferActive == TRANSFER_IDLE) {
|
||||
if (!node->id && GBASIOMultiplayerIsReady(node->d.p->siocnt)) {
|
||||
if (!node->id && attached > 1 && GBASIOMultiplayerIsReady(node->d.p->siocnt)) {
|
||||
mLOG(GBA_SIO, DEBUG, "Lockstep %i: Transfer initiated", node->id);
|
||||
ATOMIC_STORE(node->p->d.transferActive, TRANSFER_STARTING);
|
||||
ATOMIC_STORE(node->p->d.transferCycles, GBASIOCyclesPerTransfer[GBASIOMultiplayerGetBaud(node->d.p->siocnt)][node->p->d.attached - 1]);
|
||||
|
|
Loading…
Reference in New Issue