Thread: Copper HALT
View Single Post
Old 13 February 2018, 23:37   #18
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,480
Quote:
Originally Posted by Asman View Post
You can try following approach.
Thanks Asman, maybe this can be useful on KS1.x because a bug leave in the first frame BPLxPT uninitialized and garbage on screen.

But at the end i've understood why a guru on my routine and why on WaitTOF().
There is another bug, only on KS1.2, in AddIntServer()..

Code:
When the system calls the specified interrupt code, the registers are
    setup as follows:

        D0 - scratch
        D1 - scratch (on entry: active
                      interrupts -> equals INTENA & INTREQ)

        A0 - scratch (on entry: pointer to base of custom chips
                      for fast indexing)
        A1 - scratch (on entry: Interrupt's IS_DATA pointer)

        A5 - jump vector register (scratch on call)
        A6 - Exec library base pointer (scratch on call)

        all other registers must be preserved
A warning: if you set high priority you've to propagate A0 in chain because is expected to low priority services.
And this is clearly specified.
At some point i've changed from high to low priority.

But i'm "transparent" to A0 so i'm not expecting problems (I use it but I do not change it).
My priority is so low that i'm last in chain and ... last system service in
KS1.2
do not propagate A0! (all ok in successive release)

So at the WaitTOF() I have already performed my routine and corrupted some system data and GURU!

Phew.. at the end i've solved everything but so many bugs!

Patches was for:
http://eab.abime.net/showpost.php?p=...7&postcount=45
ross is offline  
 
Page generated in 0.05366 seconds with 11 queries