I've got to the point in my SID player that I want to use the Catweasel's IRQ.
Calling this:
Code: Select all
gInterruptNumber = tPCIDevice->MapInterrupt();
gInterrupt = (struct Interrupt *)IExec->AllocSysObjectTags( ASOT_INTERRUPT,
ASOINTR_Size, sizeof( struct Interrupt ),
ASOINTR_Code, (APTR)handler,
TAG_END
);
IExec->DebugPrintF("Setting handler to %p.\n", handler );
gInterrupt->is_Code = (void (*)() )handler;
gInterrupt->is_Node.ln_Succ = 0;
gInterrupt->is_Node.ln_Pred = 0;
gInterrupt->is_Node.ln_Name = (char *)"Catweasel SID FIFO Interrupt Handler";
gInterrupt->is_Node.ln_Pri = -1;
gInterrupt->is_Node.ln_Type = NT_EXTINTERRUPT;
tIntSuccess = AddIntServer( gInterruptNumber, gInterrupt );
If I unmask the interrupts, it runs perfectly. As soon as I allow interrupts to trigger - BOOM.
Can someone please tell me what I'm doing wrong? Surely setting an interrupt handler for the hardware to a function that does nothing should just do.. nothing?
Many thanks for any help - Interrupts have been the scourge of my OS4 experience so far, everything seems nice until I try and use interrupts and then it all goes pear-shaped.
System is a Sam 440ep 600MHz, AOS 4.1u6, Catweasel Mk4.