home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / apple2 / 19503 < prev    next >
Encoding:
Text File  |  1992-08-26  |  2.2 KB  |  41 lines

  1. Newsgroups: comp.sys.apple2
  2. Path: sparky!uunet!usc!elroy.jpl.nasa.gov!nntp-server.caltech.edu!toddpw
  3. From: toddpw@cco.caltech.edu (Todd P. Whitesel)
  4. Subject: Re: When is the tick counter incremented?
  5. Message-ID: <1992Aug27.033705.14955@cco.caltech.edu>
  6. Sender: news@cco.caltech.edu
  7. Nntp-Posting-Host: punisher
  8. Organization: California Institute of Technology, Pasadena
  9. References: <1992Aug26.185150.22795@julian.uwo.ca>
  10. Date: Thu, 27 Aug 1992 03:37:05 GMT
  11. Lines: 28
  12.  
  13. hackett@gaul.csd.uwo.ca (Mike Hackett) writes:
  14.  
  15. >reading TN #39 several times, I'm not entirely sure exactly when the tick
  16. >counter is incremented.  The note seems to suggest that the vertical
  17. >blanking interrupt occurs at line 192.  (Actually, it often refers to the
  18. >vertical blanking actually occurring at 192, but this is not true.)
  19. >The vertical counter should then be $1C0, I believe.
  20.  
  21. heh ... //e history time folks. The //e has a vertical blanking signal you can
  22. read at $C019 if I remember right. The Mega II in the IIgs, seeing as how it
  23. was originally designed for a low-cost //e model and not the IIgs, also
  24. generates this signal. This signal is output on a pin of the Mega II and the
  25. VGC uses it to generate an interrupt on the edge that counts. This edge occurs
  26. at line 192 all the time -- you've got to understand that the Mega II does all
  27. the actual timing generation, and the VGC simply genlocks to it when SHR mode
  28. is active. The timing of the VBL signal does not change because it is hardwired
  29. into the Mega II timing generator. Once this interrupt is generated, it usually
  30. gets handled by the heartbeat queue manager, one of whose tasks is to increment
  31. the system tick count. This increment is atomic since it happens from the IRQ
  32. handler, BUT it occurs at a variable delay after the VBL interrupt hits. This
  33. is due to indeterminacy in the response time -- if another interrupt is already
  34. being handled, the heartbeat manager must wait until it's done before it can
  35. run. There also may be variable delays within the heartbeat queue handler
  36. itself, depending on what order it increments the counter and calls the tasks
  37. in the queue (it's been a while since I traced through the sucker with GSbug).
  38.  
  39. Todd Whitesel
  40. toddpw @ cco.caltech.edu
  41.