all repos — mgba @ daaa2fa5236df5e8976e7e0ba7ac39e0d9233422

mGBA Game Boy Advance Emulator

GB SIO: Support faster transfer speeds
Jeffrey Pfau jeffrey@endrift.com
Mon, 26 Dec 2016 17:20:51 -0800
commit

daaa2fa5236df5e8976e7e0ba7ac39e0d9233422

parent

c662b59e9942bfffd69ed6754cc334de86f89e63

1 files changed, 3 insertions(+), 3 deletions(-)

jump to
M src/gb/sio/lockstep.csrc/gb/sio/lockstep.c

@@ -116,17 +116,17 @@ // Start the transfer, but wait for the other GBs to catch up

node->transferFinished = false; needsToWait = true; ATOMIC_STORE(node->p->d.transferActive, TRANSFER_STARTED); - node->nextEvent += 128; + node->nextEvent += 4; break; case TRANSFER_STARTED: // All the other GBs have caught up and are sleeping, we can all continue now - node->nextEvent += 128; + node->nextEvent += 4; ATOMIC_STORE(node->p->d.transferActive, TRANSFER_FINISHING); break; case TRANSFER_FINISHING: // Finish the transfer // We need to make sure the other GBs catch up so they don't get behind - node->nextEvent += LOCKSTEP_INCREMENT - 256; // Split the cycles to avoid waiting too long + node->nextEvent += node->d.p->period - 8; // Split the cycles to avoid waiting too long #ifndef NDEBUG ATOMIC_ADD(node->p->d.transferId, 1); #endif