libmsx
C library for MSX
|
Pluggable interrupts handler interface. More...
Functions | |
void | set_interrupt_handler (void(*handler)(void)) |
MSX Register user defined interrupt handler. | |
void | set_vsync_handler (void(*handler)(void)) |
MSX Register user defined VSYNC interrupt handler. | |
Pluggable interrupts handler interface.
void set_interrupt_handler | ( | void(*)(void) | handler | ) |
MSX
Register user defined interrupt handler.
After this function is called, the given user-defined handler will be called from the H.KEYI hook each time an interrupt occurs. When the user-defined handler returns, the original interrupt handler will be called. In other words, this function inserts a function at the beginning of H.KEYI and chains it to the original handler.
If this function is called twice, the previous user-defined handler will be replaced by the specified handler.
If NULL is passed to this function, the registered user-defined handler will be unregistered.
handler | the user defined interrupt handler. |
void set_vsync_handler | ( | void(*)(void) | handler | ) |
MSX
Register user defined VSYNC interrupt handler.
After this function is called, the given user-defined handler will be called from the H.TIMI hook each time a VSYNC interrupt occurs. When the user-defined handler returns, the original VSYNC interrupt handler will be called. In other words, this function inserts a function at the beginning of H.TIMI and chains it to the original handler.
If this function is called twice, the previous user-defined handler will be replaced by the specified handler.
If NULL is passed to this function, the registered user-defined handler will be unregistered.
handler | the user defined VSYNC interrupt handler. |