Changes

Gate Array

20 bytes added, 14 May
/* Interrupt management */
Interrupts on the CPC are created by the Gate Array based on settings from the CRTC. The Gate Array has an internal counter (R52) that counts from 0 to 51, incrementing after each HSYNC signal.
The Gate Array sends an interrupt request when R52 reaches 51 and loops will return to 0:*If the interrupts were authorized at the time of the request, then bit5 of R52 is cleared and the interrupt takes place*If interrupts are not authorized, the R52 counter continues to increment, but the interrupt remains armed (the Gate Array then maintains its INT signal). When interrupts are enabled (using the EI instruction) and '''after the instruction that follows EI''', bit5 of R52 is cleared and the will send an interrupt takes place R52 will return to 0 request on any of these conditions:
* When it exceeds 51
* By setting bit4 of the RMR register of the Gate Array to 1
* At the end of the 2nd HSYNC after the start of the VSYNC
 
When the Gate Array sends an interrupt request:
*If the interrupts were authorized at the time of the request, then bit5 of R52 is cleared and the interrupt takes place
*If interrupts are not authorized, the R52 counter continues to increment, but the interrupt remains armed (the Gate Array then maintains its INT signal). When interrupts are enabled (using the EI instruction) and '''after the instruction that follows EI''', bit5 of R52 is cleared and the interrupt takes place
== Controlling the Gate Array ==
8,997
edits