11 April 2022, 10:11 | #21 | |
ex. demoscener "Bigmama"
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,636
|
Quote:
Code:
move.b ICR(ciab),d0 btst #0,d0 beq .x ... btst #1,d0 beq .x ... .x move.w #$2000,INTREQ rte |
|
11 April 2022, 10:40 | #22 | |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,488
|
That's right, that's exactly the purpose in the case of testing a single CIA source and ignoring all the others.
It's the only case where the direct register test makes sense and that's why I put it Quote:
|
|
11 April 2022, 15:01 | #23 |
Registered User
Join Date: Jun 2020
Location: Druidia
Posts: 389
|
Most code I've seen will acknowledge the intreq as soon as possible. It's clear thought that it needs to be after the cia acknowledgement.
However, in your example if the code in the handler takes some significant amount of time what is the consequence of waiting until the end to clear intreq? In more general cases I would have thought there is some chance you will miss an interrupt or handle it incorrectly? I'm fuzzy on what happens when an interrupt happens during handling of an existing interrupt of the same level. |
11 April 2022, 15:13 | #24 | |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,488
|
Quote:
Also in the case of the CIA you need double acknoledment (ICR re-set itself) so the problem never arises. But take for example a VBI IRQ3 running code for more than 20ms and you write INTREQ at the end of the routine. What's up? You simply missed an IRQ, but maybe it was just what you wanted |
|
11 April 2022, 16:00 | #25 |
Registered User
Join Date: Jun 2020
Location: Druidia
Posts: 389
|
Thanks Ross
That makes sense and I think my understanding is accurate. It's really great to have you and others on here to answer questions about these details! |
11 April 2022, 22:37 | #26 |
Moderator
Join Date: Nov 2001
Location: Germany
Posts: 873
|
|
11 April 2022, 22:56 | #27 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,488
|
Of course, I just put simplified code to give the idea of the procedure
|
12 April 2022, 04:04 | #28 |
Registered User
Join Date: Jan 2012
Location: USA
Posts: 372
|
|
12 April 2022, 09:45 | #29 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,488
|
|
12 April 2022, 22:47 | #30 |
Registered User
Join Date: Apr 2013
Location: paris
Posts: 133
|
just read this interesting thread. I'm a bit surprised. does it mean LSP (the cia versionĂ is entering the CIA interrupt code two times instead of 1? Or is it potentially happening on specific amiga configuration? ( CPU, memory etc). I never noticed entering CIA handler two times instead of one when using winuae debugger. ( but maybe I miss something )
|
12 April 2022, 23:03 | #31 | |
Registered User
Join Date: Feb 2017
Location: Denmark
Posts: 1,182
|
Quote:
Code:
InterruptHandler: move.w #$2000,$dff09c ; runs twice btst.b #0,$bfdd00 ; so does this beq.s .skipa ; and this ; but not this part .skipa: rte ; runs twice |
|
12 April 2022, 23:38 | #32 |
Registered User
Join Date: Apr 2013
Location: paris
Posts: 133
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Blitter interrupt during VERTB interrupt | phx | Coders. Asm / Hardware | 38 | 01 October 2021 19:54 |
timer interrupt to emulate 60Hz | jotd | Coders. Asm / Hardware | 3 | 14 August 2021 21:25 |
Timer instantly causes interrupt | TCH | Coders. Asm / Hardware | 8 | 20 July 2021 15:48 |
example of a CIA timer interrupt in assembler using cia.resource | Apollo | Coders. Asm / Hardware | 3 | 05 July 2013 08:40 |
CIA timer interrupt handler called twice during mod playback | absence | Coders. General | 5 | 16 March 2009 18:55 |
|
|