Re: A86: batt checker


[Prev][Next][Index][Thread]

Re: A86: batt checker






>
>trouble is, if we're talking more than 256 t-states (or times r is normally
>incremented), than we totally lose the scale.
>
>it's convenient to use r, because it's a built in counter, but it's really
not
>going to work unless the mask runs out really quickly.

It does run out quickly; the ROM routine checked the time it took for $64
djnz over itself , which is 13*$64 = 1300 t-states
Since our loop is 22 t-states and r is incremented twice each loop, we would
expect r to be somewhere around 120 afterwards, far from the max of 256.
I'm not sure why the numbers he got were so off, but I doubt it was because
r overlapped itself.

>
>shouldn't be too hard to just make one of the other registers a counter and
>apply the same algorithm, though.

loss of accuracy