SNES Interrupt Handling. More...
#include <snes/types.h>Go to the source code of this file.
Typedefs | |
| typedef void(* | VBlankCallback) (void) |
| VBlank callback function pointer type. | |
Functions | |
| void | nmiClear (void) |
| Clear the VBlank callback. | |
| void | nmiSet (VBlankCallback callback) |
| Register a VBlank callback function. | |
| void | nmiSetBank (VBlankCallback callback, u8 bank) |
| Register a VBlank callback with explicit bank. | |
SNES Interrupt Handling.
Manages NMI (VBlank), IRQ, and other interrupts.
| typedef void(* VBlankCallback) (void) |
VBlank callback function pointer type.
Functions of this type can be registered with nmiSet() to be called automatically during every VBlank interrupt.
| void nmiClear | ( | void | ) |
Clear the VBlank callback.
Equivalent to nmiSet(NULL).
| void nmiSet | ( | VBlankCallback | callback | ) |
Register a VBlank callback function.
The registered callback will be called during every VBlank interrupt, BEFORE the vblank_flag is set. This allows time-critical operations (like DMA transfers) to be performed reliably during VBlank.
| callback | Function to call during VBlank, or NULL to disable |
| void nmiSetBank | ( | VBlankCallback | callback, |
| u8 | bank | ||
| ) |
Register a VBlank callback with explicit bank.
Use this when the callback function might not be in bank 0.
| callback | Function to call during VBlank |
| bank | ROM bank where the callback is located (0-255) |