|
|
Define an interruption event and a function to jump to on the event.
- Parameters:
-
| intno |
the interrupt number we want to initialize, see description |
| fp |
a pointer to the function that should be invoked when the interrupt is due. If you are unsure, this is usually the adress of the function, written like this: &functionname. In C++, you might need to cast your function pointer like this for the assignment to work: (void*) &functionname |
This function enables an interrupt. You tell HAMlib which interrupt you would like to start, and what function should be executed when this interrupt is reached. The following interrupts are available:
- INT_TYPE_VBL (invoked when scanline passes line 160)
- INT_TYPE_HBL (invoked every scanline, when x passes 240)
- INT_TYPE_VCNT (when the current scanline matches the VCNT setting, see mygba.h )
- INT_TYPE_TIM0 (when Timer0 is due, see mygba.h)
- INT_TYPE_TIM1 (when Timer1 is due, see mygba.h)
- INT_TYPE_TIM2 (when Timer2 is due, see mygba.h)
- INT_TYPE_TIM3 (when Timer3 is due, see mygba.h)
- INT_TYPE_SIO (when Serial IO is encountered, see mygba.h)
- INT_TYPE_DMA0 (when DMA0 is finished, see mygba.h)
- INT_TYPE_DMA1 (when DMA1 is finished, see mygba.h)
- INT_TYPE_DMA2 (when DMA2 is finished, see mygba.h)
- INT_TYPE_DMA3 (when DMA3 is finished, see mygba.h)
- INT_TYPE_KEY (when a key is pressed (?) )
- INT_TYPE_CART (when the cartridge is inserted or removed, see mygba.h)
|