Interrupts management. | |
irqport | IRQ ports |
irq_disable | Interrupts disable port. |
irq_status | Interrupts status. |
IRQ indentifiers. | |
INT_IRQ2 | This interrupt is available on the HuCard and expension connectors. |
INT_IRQ1 | IRQ1 is triggered by the VDC. |
INT_TIMER | This TIMER interrupt is generated by the HuC6280’s internal timer. |
INT_NMI | The NMI interrupt does not seem to be used. |
INT_ALL | Bitfield grouping all interrupts. |
irq_on | Enable one or multiples IRQ interrupts. |
irq_off | Disable one or multiples IRQ interrupts. |
IRQ vectors. | |
IRQ2 | Index of the user defined IRQ2 vector. |
IRQ1 | |
TIMER | |
NMI | |
VSYNC | |
HSYNC | |
SOFT_RESET | |
irq_enable_vec | Enable IRQ vector. |
irq_disable_vec | Disable IRQ vector. |
irq_set_vec | Set user interrupt functions. |
irq_cnt | Interrupt counter. |
irq_m | Interrupt control mask. |
IRQ1 is triggered by the VDC. This means that the irq1 vector will be called whenever a VDC interrupt occurs. Namely
A way to differentiate between those interrupts is to check the value of the VDC status register.
Enable IRQ vector.
irq_enable_vec vec
vec | Vector to enable |
irq_m = $20f5
Interrupt control mask.
from Hu7cd doc BIT0 - irq2 user interrupt mask BIT1 - irq1 user interrupt mask BIT2 - timer user interrupt mask BIT3 - nmi user interrupt mask BIT4 - (if !BIT1), vsync user interrut mask BIT5 - “irq1 occured but not on vsync” user interrupt mask BIT6 - (if !BIT1), raster/hsync user interrupt mask BIT7 - “irq1 occured but not on hsync” user interrupt mask
IRQ ports
irqport = $1400
Interrupts disable port.
irq_disable = irqport+2
Interrupts status.
irq_status = irqport+3
Bitfield grouping all interrupts.
INT_ALL = INT_IRQ2 | INT_IRQ1 | INT_TIMER | INT_NMI
Index of the user defined IRQ2 vector.
IRQ2 = 0
IRQ1 = 1
TIMER = 2
NMI = 3
VSYNC = 4
HSYNC = 5
SOFT_RESET = 6
Interrupt counter.
irq_cnt = $20f2
Interrupt control mask.
irq_m = $20f5