First post, by tigrou
I'm trying to understand what is the main logic behind cycles = auto mode (eg : which heuristics it use to balance CPU cycles).
I took a look at code and as far as I can tell most of the logic is in increaseticks() function.
It seems fairly complicated so my goal is not to understand every bit of it but rather have a general idea about how it works.
AFAIK (I might be totally wrong on this) what is done is to measure how much time has elapsed between two increaseticks() calls and adjust cycles accordingly.
That method is called from time to time from Normal_Loop() (eg: CPU_Cycles variable has reach 0, an interrupt need be handled by PIC, HLT instruction has been executed, ...)