We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ccdffb4 commit 8974060Copy full SHA for 8974060
unbricked/serial-link/sio.asm
@@ -152,11 +152,14 @@ SioMemFill:
152
; Per-frame update
153
; @mut: AF
154
SioTick::
155
+ ; jump to state-specific tick routine
156
ld a, [wSioState]
157
+ cp a, SIO_ACTIVE
158
+ jr z, .active_tick
159
cp a, SIO_RESET
160
jr z, .reset_tick
- cp a, SIO_ACTIVE
- ret nz
161
+ ret
162
+.active_tick
163
; update timeout on external clock
164
ldh a, [rSC]
165
and a, SCF_SOURCE
@@ -169,6 +172,7 @@ SioTick::
169
172
jr z, SioAbort
170
173
ret
171
174
.reset_tick
175
+ ; delayed reset to IDLE state
176
ld a, SIO_IDLE
177
ld [wSioState], a
178
0 commit comments