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