22 September 2020, 09:49 | #1 |
Registered User
Join Date: May 2017
Location: AmigaLand
Posts: 459
|
IRQ ASM pb
Hi,
I must admit that irq programming is something I'm not sure to master, but to be honest I've never understand its mechanics. I use P61 music routine in lvl6 IRQ. I also use another one, but at a lower priority : lvl3 for instance. The lvl6 irq is never turned off during main loop, but the lvl3 one is turned on/off 2 times. The lvl3 irq is somehow turned off after a while, even though it shouldn't. The result is my program freezes, because main program waits indefinitely for an unlock semaphor coming from lvl3 irq, which will be never set. I suspect it's because I'm not using the irqs turn on and off right. I'm unsure because Seka doesn't give contain of $09A and $09c after a breakpoint. I always use $dff09a AND dff09c to turn on and off irqs amongst other flows (I guess but unsure). Finally, so my question is : What advices could you give and what is the proper way to turn on and off irqs in a main programm ? |
22 September 2020, 11:10 | #2 |
Registered User
Join Date: Oct 2015
Location: Landsberg / Germany
Posts: 526
|
For Proxima 3 I use OS-controlled interrupts, since this feels more stable to me than having to care about interrupts all myself. Especially as I am using a rather interesting setup of copper interrupt to init software interrupt for timing reasons / avoid possible conflicts with vertical blank interrupt
Initcode looks something like this: Code:
lea CopIntServer(pc),a1 moveq #4,d0 CALLEXEC AddIntServer ;Add copper interrupt to system list lea VBLIntServer(pc),a1 moveq #5,d0 CALLEXEC AddIntServer ;Add vb interrupt to system list CopIntServer dc.l 0,0 ;ln_Succ,ln_Pred dc.b 0,9 ;ln_Type,ln_Pri dc.l CopIntName ;ln_Name dc.l 0,copperInt ;is_Data,is_Code VBLintServer dc.l 0,0 dc.b 0, dc.l VBLIntName dc.l 0,vertBlancInt SoftIntServer ; no active server, init'ed by copper interrupt dc.l 0,0 dc.b 0,9 dc.l softIntName dc.l 0,softInt CopIntName dc.b "RP3_CopServ",0 VBLIntName dc.b "RP3_VBLServ",0 softIntName dc.b "RP3_SoftServ",0 Code:
copperInt SAVEREGISTERS .... lea SoftIntServer(pc),a1 CALLEXEC Cause ; init software interrupt, delegate further 50 hz code handling without blocking vbi and coper interrupt chain .skipIntCall RESTOREREGISTERS rts Code:
lea CopIntServer(pc),a1 moveq #4,d0 CALLEXEC RemIntServer ; remove copper interrupt lea VBLIntServer(pc),a1 moveq #5,d0 CALLEXEC RemIntServer ; remove vertical blank interrupt |
22 September 2020, 11:22 | #3 |
Registered User
Join Date: May 2017
Location: AmigaLand
Posts: 459
|
I use a similar scheme but in main program for add/remove/processing objets (real or virtual bobs).
The pb is I turn off system, so knowing what contains 'addintserver' and remintserver' could be interesting. Anyway thanks for your help. |
23 September 2020, 15:59 | #4 |
ex. demoscener "Bigmama"
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,624
|
|
23 September 2020, 18:03 | #5 | |
Registered User
Join Date: May 2017
Location: AmigaLand
Posts: 459
|
Quote:
Could it be possible the P61 replay alters other irq bits in $dff09a other than lvl6 one ? |
|
24 September 2020, 10:06 | #6 |
ex. demoscener "Bigmama"
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,624
|
|
24 September 2020, 17:19 | #7 | |
Registered User
Join Date: May 2017
Location: AmigaLand
Posts: 459
|
Quote:
Is there some cases where a lower irq could interrupt an aldready running higher one ? Last edited by LeCaravage; 24 September 2020 at 17:45. |
|
25 September 2020, 18:21 | #8 | |
Registered User
Join Date: May 2017
Location: AmigaLand
Posts: 459
|
Quote:
I just discovered that $09A and $09C can be read via $01C and $01E. I added backgound color changes into the main loop of P61 replay and I noticed that it seems to freezes always at the same raster line. Very strange. |
|
26 September 2020, 13:32 | #9 |
Registered User
Join Date: Aug 2014
Location: Zagreb / Croatia
Posts: 302
|
Here is information of Amiga hardware access:
http://amiga-dev.wikidot.com/information:hardware |
26 September 2020, 15:46 | #10 | |
Registered User
Join Date: May 2017
Location: AmigaLand
Posts: 459
|
Quote:
Can someone confirm what I think I understand about $9A, $9C. The first is a request, the second one is a sort of acknowledgment of the current finishing irq ? (just before the rte). |
|
26 September 2020, 17:48 | #11 |
Registered User
Join Date: Feb 2019
Location: Munich, Germany
Posts: 63
|
It seems P61 also uses INTF_EXTER
|
26 September 2020, 18:29 | #12 |
Registered User
Join Date: May 2017
Location: AmigaLand
Posts: 459
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ASM: Asm-ONE or AsmPro - how to set a Hello amiga coders, I hope it is ok to hijack ? | Fireball | Coders. Asm / Hardware | 2 | 24 April 2020 21:16 |
Cannot use AUDX-INT (Level 4 IRQ) to stop sample. | Herpes | Coders. Asm / Hardware | 18 | 16 January 2020 22:37 |
Spurious PORTS irq | ross | Coders. Asm / Hardware | 37 | 27 February 2019 20:20 |
Irq Blitter | LeCaravage | Coders. Asm / Hardware | 9 | 16 June 2017 10:21 |
IRQ Virus | redblade | request.Apps | 8 | 01 September 2012 08:22 |
|
|