home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / amiga / programm / 12549 < prev    next >
Encoding:
Internet Message Format  |  1992-08-21  |  2.2 KB

  1. Path: sparky!uunet!gatech!rutgers!cbmvax!jesup
  2. From: jesup@cbmvax.commodore.com (Randell Jesup)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Disk drive timing.... (without AmigaDOS)
  5. Message-ID: <34562@cbmvax.commodore.com>
  6. Date: 21 Aug 92 21:44:28 GMT
  7. References: <9207240938.AA08170@ucbvax.Berkeley.EDU>
  8. Reply-To: jesup@cbmvax.commodore.com (Randell Jesup)
  9. Organization: Commodore, West Chester, PA
  10. Lines: 42
  11.  
  12. 9LORKIN@WINVMJ.VNET.IBM.COM ("Julian Lorkin") writes:
  13. >How can you idle your Amiga for a fixed amount of time?
  14. >
  15. >Busy waiting the CPU in a closed loop is out of the question because a
  16. >68030 will execute this loop faster than a 68000.  Is counting raster
  17. >lines reliable? Like this .  .  .
  18. >
  19. >nextrast  move.b   dff006,d1
  20. >waitrast  cmp.b    dff006,d1
  21. >          beq.s    waitrast
  22. >          dbf      d0,nextrast
  23. >
  24. >Would this work on all screen modes? and on all types of Amiga?
  25. >
  26. >Another method might be to use the CIAs but the driving input is
  27. >different on PAL and NTSC machines.  How big is this difference? Is it
  28. >big enough to cause problems?
  29.  
  30.     There was a very good article written by Bryce Nesbitt back in (I
  31. think) summer 1988 for AmigaMail about this.  Basically, if you must busy-wait-
  32. delay, or if the delay is less than a few milliseconds, you should read a
  33. CIA register N times, where N is delay_required/1us.  Basically, assume
  34. 1us/read.  It will not be totally accurate, but we do guarantee that it will
  35. take no less than 1us per read.  If you need to wait for longer periods, you
  36. should either allocate and use a CIA (if you need short timings or need to
  37. keep things from running), or if you're able to work with the system use
  38. timer.device.
  39.  
  40.     Rasters are not very good for a timing base, since the beam rates
  41. vary quite a bit (and on top of that are programmable to almost any value).
  42. Look at productivity versus ntsc/pal, for example.
  43.  
  44.     You can probably get the back-issue of AmigaMail from Department C
  45. here at Commodore, or get a whole set.
  46.  
  47. -- 
  48. "Rev on the redline, you're on your own; seems like a lifetime, but soon it's
  49.  gone..."  Foreigner
  50. -
  51. Randell Jesup, Jack-of-quite-a-few-trades, Commodore Engineering.
  52. {uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.cbm.commodore.com  BIX: rjesup  
  53. Disclaimer: Nothing I say is anything other than my personal opinion.
  54.