09 March 2006, 01:53 | #1 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,604
|
'Chaining' Vblank interrups under the system
Hm. I'm doing a bootblock where I
1. Start my own copper 2. Start a Vblank interrupt which fades a logo in, WHILE 3. I load sectors with Exec/DoIo() Problem is, DoIo seems to need the system's Vblank int on to load, because if I just set my own int, the logo fades in nicely, but nothing is loaded. If I don't set my fade int, tracks load nicely. I tried putting a JMP at the end of my int that jumps to the old system interrupt address (JUST AS AN EXPERIMENT, OK? ), and then the tracks load nicely, but my fade interrupt routine is never heard from again. I guess the system sets the Vblank interrupt address back. Anyway I have a big hunch that using jumps is hardly the correct way of "adding" a small routine to the system Vblank. So my question is: how do I add my little fade routine to the system vblank interrupt structure? Just inserting a little JSR into the 'chain' (preferably last)would do. Last edited by Photon; 09 March 2006 at 02:09. |
09 March 2006, 16:51 | #2 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,604
|
DOH!
Problem solved, just a stupid bug. (So stupid I won't tell you what it was. Never code when you're tired ) Found the bug AFTER I managed to find out how to chain ints on my own, of course. Anyway here's the code to add an extra subroutine on the system Vblank chain: Code:
AddInt: move.l 4.w,a6 lea IntStruct(PC),a1 moveq #5,d0 ;Interrupt number 0-15. 5=INTB_VERTB jsr -$a8(a6) ;AddIntServer ;--------------------------------- IntStruct: .Node: .succ: dc.l 0 .pred: dc.l 0 .type: dc.b 2 ;node type. 2=NT_INTERRUPT .pri: dc.b -60 ;priority, -60=Low .name: dc.l MyName .Data: dc.l 0 ;int. data ptr .Code: dc.l MyInt ;int. routine address. set d0=0 and rts at end of it MyName: dc.b "PhotonsInt",0 EVEN ;--------------------------------- MyInt: movem.l d1-a6,-(SP) ;a1 points to interrupt data ;-----int code------ movem.l (SP)+,d1-a6 moveq #0,d0 RTS Last edited by Photon; 09 March 2006 at 18:00. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
System is not validated! FFS (and I dont mean fast file system!) | Macca | support.Hardware | 11 | 11 June 2007 13:04 |
Linking PC, Amiga and Mac. | HardStep | support.Hardware | 3 | 01 February 2006 21:03 |
Devpac Linking Problems | Steve | Coders. General | 8 | 10 December 2002 11:37 |
|
|