🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #13714

Re: timer PA_SOFTINT max rate

#13714
From: Karl Lehenbauer
Date: Thu, 15 Feb 1990 00:46
31 lines
2132 bytes
In article <667@xdos.UUCP> doug@xdos.UUCP (Doug Merritt) writes:
>What's the maximum possible rate of PA_SOFTINT's you can do with
>the timer device? I was just trying 14Khz (71 us) with a really
>minimal overhead interrupt routine, and it seemed to actually get
>called far less often per second.

The timer device is unreliable at intervals anywhere near that speed.
If two tasks are making requests down in the small-number-of-milliseconds
range, for example your task and trackdisk.device, you will get your
interrupts late, like many milliseconds late -- I don't have exact
figures, but it was easy to hear my SMUS and MIDI file players screwing
up when they worked this way and trackdisk.device was doing things, like
seeking or even checking to see if a disk had been inserted into an 
empty drive.

The solution, I'm afraid, is to take over one of the available timer
devices.  That's what I do (using the prescribed mechanism to be
well-behaved, of course), and it works OK -- when I switched over to
that, my timing inconsistencies went away.

Oh yeah, you'll have a timing interval resolution of about 1.36 microseconds.
Drift is minimal -- it runs off some division of the master crystal.  You
can get an interrupt every time an interval passes, or set the timer up as
a one-shot.

If you need some code, let me know.  I'm thinking about posting my MIDI
and SMPTE time servers.  They're a lot like Apple's, except that they work.
-- 
-- uunet!sugar!karl	"As long as there is a legion of superheros, all else
--			 can surely be made right." -- Sensor Girl
-- Usenet access: (713) 438-5018
Technical Details
Message-ID: <5149@sugar.hackercorp.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!lavaca.uh.edu!uhnix1!sugar!karl
References: <667@xdos.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!lavaca.uh.edu!uhnix1!sugar!karl
From: karl@sugar.hackercorp.com (Karl Lehenbauer)
Newsgroups: comp.sys.amiga.tech
Subject: Re: timer PA_SOFTINT max rate
Keywords: interrupts timer PA_SOFTINT rate
Message-ID: <5149@sugar.hackercorp.com>
Date: 15 Feb 90 00:46:45 GMT
References: <667@xdos.UUCP>
Reply-To: karl@sugar.hackercorp.com (Karl Lehenbauer)
Organization: Sugar Land Unix - Houston
Lines: 31