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

Synchronising code with the scan line



  I have a question for you hardware gurus out there.
  For my upcoming game, I wish to synchronise my drawing code with the scan
line.  I don't just want to know when the vertical blanking period is
taking place, so peeking at the VBL status bit isn't what I'm after.  What
I want is the ability to know which line is currently been scanned on the
super hires screen.
  I've thought of one way, which is to set scan line interrupts at
approapiate intervals and have an interrupt routine updating a counter that
my drawing code will look at.  But is there a simpler way? i.e. is there 
already a scan line counter in I/O space somewhere?
  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?

  Thanks in advance,
  Philip
-- 
| Philip Stephens, Systems Programmer. | %%%%  %     Labtam Australia Pty Ltd |
| Address:  43 Malcolm Road, Braeside, |   % % % %     "Applied Ingenuity"    |
|           Victoria, 3195, AUSTRALIA. |  %  % %  %  We make the fastest RISC |
| Internet: philip@labtam.labtam.oz.au | %%%%% %%%%% X terminals in the world |