You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cascading timers need to be enabled to count #2812
boolsioWait()
{
// 50 ms timeoutREG_TM0CNT=TIMER_FREQ_16KHZ;
REG_TM0VAL=65536-819;
REG_TM1CNT=TIMER_FREQ_CASCADE;
REG_TM1VAL=0;
REG_TM0CNT |= TIMER_ENABLE;
while (!REG_TM1VAL);
returnhadTrans;
}
Had this code hang on hardware, despite working fine in mGBA. Turns out hardware demands the TIMER_ENABLE flag be set on both TM0 and TM1 for TM1 to count up.
Activity
endrift commentedon Feb 3, 2023
This sounds like a simple oversight on my part.
endrift commentedon Feb 3, 2023
I really should look for more of these TODOs in my code.
LunarLambda commentedon Feb 3, 2023
😅
GBA Timers: Cascading timers don't tick when disabled (fixes #2812)
GBA Timers: Cascading timers don't tick when disabled (fixes mgba-emu…