Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ucbvax!UNCAEDU.BITNET!svermeulen%Janus.MRC.AdhocNet.CA From: svermeulen%Janus.MRC.AdhocNet.CA@UNCAEDU.BITNET (Steve Vermeulen) Newsgroups: comp.sys.amiga Subject: VBlank interrupt servers Message-ID: <880911141731.00s@Janus.MRC.AdhocNet.CA> Date: 11 Sep 88 20:17:31 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 47 Sorry to post this in c.s.a but I have lost c.s.a.tech read capability for the moment... I am busy writing parts of the next AMUC Demo, last year I put togeather the AMUC Scrolling Demo (Fish 117) and this year the project is a Video Wall - or the first public showing of the Amiga 9000 :-) As part of this I needed an exact, stable, time base that would track across 9 Amigas for an extended period of time without drifting between machines. To do this I am proposing to use the VBLANK signal and essentially keep a count of all the VBLANKS that occur. First question: how much drift between VBLANK counts between machines am I likely to see over 15 minutes, 1 hour, 8 hours? I looked into the timer device first and found that the unique time stamp feature of this device might prevent this exact time keeping. So remembering the DevCON notes I looked at Steve Beats article on using 68K assembler on the Amiga. In which Steve creates a VBLANK server that counts vblank events and Signals another task every 60 vblanks. This was almost exactly what I needed. Comparing his article to the Exec RKM on page 60 where it states: "Servers have different register values passed than handlers do. A server cannot count on the D0, D1, or A6 registers containing any useful information." This has caused me some head scratching, as Steve's interrupt server USES A6 under the assumption it has a valid value of ExecBase in it when it is called. You see, I started with the example on pages 61-62 of RKM Exec and then added in the "jsr _LVOSignal(a6)" call and things went nuts. I finally traced it down to this: when my server (at priority of -60) is called A6 is trashed (as the RKM states) but Steve's server is added at priority +20 and this must put it high enough in the list (probably at the head) that A6 still contains a valid pointer to ExecBase. Second Question: What I want to know is "AM I BRAIN DAMAGED, or is this the correct explaination"??? Stephen Vermeulen Author: Express Paint Chairman: AMUC.