[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Synchronizing code with the scan line
philip@labtam.labtam.oz.au (Philip Stephens) writes:
> I don't have the Apple //GS hardware reference, but I do have _Inside
>the Apple //GS_. It listed $C02E as something akin to the scan line
>counter, but was coy about it's real function and said only the firmware
>uses it. Is this what I'm looking for, and if so, what does it do
>exactly and what are the cavets in using it?
Yep, that's it! The only caveat is that since more than 256 lines are
scanned, the count won't fit in one byte. So, $C02E is only incremented
every two lines. To get that last bit to tell you exactly what line
you're on, you need ot read bit 7 of $C02F. Bits 0-6 of C02F are the
horizontal count, by the way.