Changes

Gate Array

899 bytes added, 14 May
The Gate Array is responsible for the display (colour palette, resolution, horizontal and vertical sync), interrupt generation and memory arrangement.
 
== 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 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 interrupt takes place
 
R52 will return to 0:
* 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
== Controlling the Gate Array ==
8,998
edits