home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / apple2 / 26787 < prev    next >
Encoding:
Text File  |  1993-01-12  |  2.1 KB  |  50 lines

  1. Newsgroups: comp.sys.apple2
  2. Path: sparky!uunet!munnari.oz.au!comp.vuw.ac.nz!actrix!David.Empson
  3. From: David.Empson@bbs.actrix.gen.nz
  4. Subject: Re: Program idea?
  5. Organization: Actrix Information Exchange
  6. Date: Tue, 12 Jan 1993 09:11:52 GMT
  7. Message-ID: <1993Jan12.091152.23166@actrix.gen.nz>
  8. References: <uerics.726359386@mcl> <1993Jan7.062317.11268@nuscc.nus.sg>
  9. Sender: David.Empson@actrix.gen.nz (David Empson)
  10. Lines: 38
  11.  
  12. In article <1993Jan7.062317.11268@nuscc.nus.sg> isc10327@nusunix1.nus.sg (ONG TAT-WEE) writes:
  13. > Eric D. Shepherd (uerics@mcl.ucsb.edu) wrote:
  14. > : system tick counter increments once each 1/60th of a second.  You can read
  15. > : the current value of the tick counter by using the Miscellaneous Tools
  16. > : call GetTick.
  17. > : 
  18. >     Eric, is there any other way of reading the HeartBeat tick
  19. > counter like accessing a special location instead of calling GetTick?
  20.  
  21. Yes.  Use the GetAddr call to get the address of the tick counter, and
  22. refer to it directly.  Note: the tick counter won't start counting
  23. until the first HeartBeat task is installed.  The easiest way to force
  24. this is to install a task and immediately remove it again.
  25.  
  26. You must leave interrupts enabled if you want the tick count to be
  27. incremented.  This uses up some CPU time every VBL, but if you've
  28. booted GS/OS, various INITs will probably have heartbeat tasks
  29. installed anyway.
  30.  
  31. > I know it's good to use tools and stick to the standard way of accessing
  32. > things on the IIGS, but my program currently only uses the Tool Locator
  33. > and Memory Manager; nothing else.  I don't wish to startup the MiscTools
  34. > 'coz it'll add overhead to the program.
  35.  
  36. Overhead?  Fourteen bytes for the Startup and Shutdown calls???  The
  37. Miscellaneous toolset is in ROM, so you don't need to load it from disk.
  38.  
  39. If you are only interested in synchronizing with the vertical
  40. blanking, just wait for the I/O location ($C019) to indicate the VBL
  41. period.
  42.  
  43. You can also use the video counters ($C02E and $C02F) to aid in timing
  44. your animation.
  45. -- 
  46. David Empson
  47.  
  48. Internet: David.Empson@bbs.actrix.gen.nz    EMPSON_D@kosmos.wcc.govt.nz
  49. Snail mail: P.O. Box 27-103, Wellington, New Zealand
  50.