Port-amiga archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Amiga delay implementation


as we discovered in the last weeks there were some serious issues
concerning timecounter and delay(). The timecounter had been fixed, but
AFAIU we didn't agree on the prefered solution for delay() yet.

After reviewing the old delay() from 4.0 I have to agree with Ignatios
that there is not much reason to change the old calibration loop method,
except Michael has some arguments for it.

BTW, what happens when the old delay-loop is interrupted? It will become
longer? That would be an argument for Michael's new delay() implementation.

Nevertheless I started to implement the 4.0-delay() in the timecounter
environment yesterday, and the first problem I saw is the clkread()
function, which was used for calibration.

It returns ((interval * tick) / CLK_INTERVAL) while the new clk_gettick()
just returns 'interval', and clk_getcounter() returns
hardclock_ticks * CLK_INTERVAL + interval.

What does the old clkread() actually return? Is it really the number of
micros since the last clock interrupt? What was the meaning of 'tick'
in 4.0? It's not hardclock_ticks?

Frank Wille

Home | Main Index | Thread Index | Old Index