Changes
/* Interrupt management */
In the [[KC Compact]] system, the functions of the Gate Array are "emulated" in TTL chips, [[CIO Overview|CIO]], and its color translation EPROM.
In the "cost-down" version of the CPC6128, the functions of the Gate Array are integrated into a ASIC. The Gate Array is described here is the one found in a standard CPC.
<br>
*If interrupts are not authorized, then the R52 counter continues to increment and 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''' (so not immediately after EI), bit5 of R52 is cleared and the interrupt takes place
Note: On Amstrad Plus, the Gate Array is not the sole generator of interrupts. Each of the The 3 DMA sound channels are also each able to trigger an interrupt. Also, the The ASIC also provides an interrupt vector register (IVR) for vectorized interrupts. And it offers a programmable raster interrupt register (PRI) to trigger an interrupt at the end that can be used instead of any chosen scanlinethe normal raster interrupt mechanism.
<br>
== Registers ==
Note: The Plus palette capabilities are only accessible through the [[Default I/O Port Summary|ASIC I/O page]]. Registers PENR and INKR are not needed in that case.
=== Register PENR (Select a color register) ===
=== Register RMR (Control Interrupt counter, ROM mapping and Graphics mode) ===
This is a general purpose register responsible for the [[Video modes|screen graphics mode]] and the ROM configuration.
==== Graphics mode selection ====
| 3 || x
|-
| 2 || x || rowspan="3" | Physical lower ROM number (0..7)
|-
| 1 || x
|}
The lower ROM address and [[Default I/O Port Summary|ASIC I/O page ]] modes are:
-Mode- ROM address ASIC I/O Page
11 &0000-&3FFF &4000-&7fff
The physical lower ROMs are also accessible as upper ROMs by using the [[Upper ROM Bank Number]] port and the RMR register.
<br>
To display a CPC image you will need to use a analogue monitor with a composite sync.
<br>
=== Palette sorted by Hardware Colour Numbers ===
|-
| ''Hardware Number||Firmware Number|| ''Colour Name''
| ''R %'' || ''G %'' || ''B %'' || ''ASIC'' || ''Colour''
|-
| 0 (40h) || 13 || White || 50|| 50|| 50|| #666|| bgcolor="#808080" |
|-
| 1 (41h) || (13) || White || 50|| 50|| 50|| #666|| bgcolor="#808080" |
|-
| 2 (42h) || 19 || Sea Green || 0||100|| 50|| #0F6|| bgcolor="#00ff80" |
|-
| 3 (43h) || 25 || Pastel Yellow ||100||100|| 50|| #FF6|| bgcolor="#ffff80" |
|-
| 4 (44h) || 1 || Blue || 0|| 0|| 50|| #006|| bgcolor="#000080" |
|-
| 5 (45h) || 7 || Purple ||100|| 0|| 50|| #F06|| bgcolor="#ff0080" |
|-
| 6 (46h) || 10 || Cyan || 0|| 50|| 50|| #066|| bgcolor="#008080" |
|-
| 7 (47h) || 16 || Pink ||100|| 50|| 50|| #F66|| bgcolor="#ff8080" |
|-
| 8 (48h) || (7) || Purple ||100|| 0|| 50|| #F06|| bgcolor="#ff0080" |
|-
| 9 (49h) || (25) || Pastel Yellow ||100||100|| 50|| #FF6|| bgcolor="#ffff80" |
|-
| 10 (4Ah) || 24 || Bright Yellow ||100||100|| 0|| #FF0|| bgcolor="#ffff00" |
|-
| 11 (4Bh) || 26 || Bright White ||100||100||100|| #FFF|| bgcolor="#ffffff" |
|-
| 12 (4Ch) || 6 || Bright Red ||100|| 0|| 0|| #F00|| bgcolor="#ff0000" |
|-
| 13 (4Dh) || 8 || Bright Magenta||100|| 0||100|| #F0F|| bgcolor="#ff00ff" |
|-
| 14 (4Eh) || 15 || Orange ||100|| 50|| 0|| #F60|| bgcolor="#ff8000" |
|-
| 15 (4Fh) || 17 || Pastel Magenta||100|| 50||100|| #F6F|| bgcolor="#ff80ff" |
|-
| 16 (50h) || (1) || Blue || 0|| 0|| 50|| #006|| bgcolor="#000080" |
|-
| 17 (51h) || (19) || Sea Green || 0||100|| 50|| #0F6|| bgcolor="#00ff80" |
|-
| 18 (52h) || 18 || Bright Green || 0||100|| 0|| #0F0|| bgcolor="#00ff00" |
|-
| 19 (53h) || 20 || Bright Cyan || 0||100||100|| #0FF|| bgcolor="#00ffff" |
|-
| 20 (54h) || 0 || Black || 0|| 0|| 0|| #0|| bgcolor="#000000" |
|-
| 21 (55h) || 2 || Bright Blue || 0|| 0||100|| #00F|| bgcolor="#0000ff" |
|-
| 22 (56h) || 9 || Green || 0|| 50|| 0|| #060|| bgcolor="#008000" |
|-
| 23 (57h) || 11 || Sky Blue || 0|| 50||100|| #06F|| bgcolor="#0080ff" |
|-
| 24 (58h) || 4 || Magenta || 50|| 0|| 50|| #606|| bgcolor="#800080" |
|-
| 25 (59h) || 22 || Pastel Green || 50||100|| 50|| #6F6|| bgcolor="#80ff80" |
|-
| 26 (5Ah) || 21 || Lime || 50||100|| 0|| #6F0|| bgcolor="#80ff00" |
|-
| 27 (5Bh) || 23 || Pastel Cyan || 50||100||100|| #6FF|| bgcolor="#80ffff" |
|-
| 28 (5Ch) || 3 || Red || 50|| 0|| 0|| #600|| bgcolor="#800000" |
|-
| 29 (5Dh) || 5 || Mauve || 50|| 0||100|| #60F|| bgcolor="#8000ff" |
|-
| 30 (5Eh) || 12 || Yellow || 50|| 50|| 0|| #660|| bgcolor="#808000" |
|-
| 31 (5Fh) || 14 || Pastel Blue || 50|| 50||100|| #66F|| bgcolor="#8080ff" |
|}
<br>
=== Palette sorted by Firmware Colour Numbers ===
|-
| ''Firmware Number'' || ''Hardware Number'' || ''Colour Name''
| ''R %'' || ''G %'' || ''B %'' || ''ASIC'' || ''Colour''
|-
| 0|| 54h ||Black || 0|| 0|| 0|| #0||bgcolor="#000000"|
|-
| 1|| 44h (or 50h) ||Blue || 0|| 0|| 50|| #006||bgcolor="#000080"|
|-
| 2|| 55h ||Bright Blue || 0|| 0||100|| #00F||bgcolor="#0000ff"|
|-
| 3|| 5Ch ||Red || 50|| 0|| 0|| #600||bgcolor="#800000"|
|-
| 4|| 58h ||Magenta || 50|| 0|| 50|| #606||bgcolor="#800080"|
|-
| 5|| 5Dh ||Mauve || 50|| 0||100|| #60F||bgcolor="#8000ff"|
|-
| 6|| 4Ch ||Bright Red ||100|| 0|| 0|| #F00||bgcolor="#ff0000"|
|-
| 7|| 45h (or 48h) ||Purple ||100|| 0|| 50|| #F06||bgcolor="#ff0080"|
|-
| 8|| 4Dh ||Bright Magenta ||100|| 0||100|| #F0F||bgcolor="#ff00ff"|
|-
| 9|| 56h ||Green || 0|| 50|| 0|| #060||bgcolor="#008000"|
|-
|10|| 46h ||Cyan || 0|| 50|| 50|| #066||bgcolor="#008080"|
|-
|11|| 57h ||Sky Blue || 0|| 50||100|| #06F||bgcolor="#0080ff"|
|-
|12|| 5Eh ||Yellow || 50|| 50|| 0|| #660||bgcolor="#808000"|
|-
|13|| 40h (or 41h) ||White || 50|| 50|| 50||#666||bgcolor="#808080"|
|-
|14|| 5Fh ||Pastel Blue || 50|| 50||100|| #66F||bgcolor="#8080ff"|
|-
|15|| 4Eh ||Orange ||100|| 50|| 0|| #F60||bgcolor="#ff8000"|
|-
|16|| 47h ||Pink ||100|| 50|| 50|| #F66||bgcolor="#ff8080"|
|-
|17|| 4Fh ||Pastel Magenta ||100|| 50||100|| #F6F||bgcolor="#ff80ff"|
|-
|18|| 52h ||Bright Green || 0||100|| 0|| #0F0||bgcolor="#00ff00"|
|-
|19|| 42h (or 51h) ||Sea Green || 0||100|| 50|| #0F6||bgcolor="#00ff80"|
|-
|20|| 53h ||Bright Cyan || 0||100||100|| #0FF||bgcolor="#00ffff"|
|-
|21|| 5Ah ||Lime || 50||100|| 0|| #6F0||bgcolor="#80ff00"|
|-
|22|| 59h ||Pastel Green || 50||100|| 50|| #6F6||bgcolor="#80ff80"|
|-
|23|| 5Bh ||Pastel Cyan || 50||100||100|| #6FF||bgcolor="#80ffff"|
|-
|24|| 4Ah ||Bright Yellow ||100||100|| 0|| #FF0||bgcolor="#ffff00"|
|-
|25|| 43h (or 49h) ||Pastel Yellow ||100||100|| 50||#FF6||bgcolor="#ffff80"|
|-
|26|| 4Bh ||Bright White ||100||100||100|| #FFF||bgcolor="#ffffff"|
|}
<br>
=== Intensities ===
* [[CPC Palette]] - some more details
On the Plus, the Amstrad engineers converted the values of the R, G, and B subcomponents to the new 12-bit palette using this 4-bit scale: * 0% became #0* 50% became #6* 100% became #F <br> === Green Screen Colours === On a green screen (where all colours are shades of unsaturated green), the colours (in BASIC colours), are in order of increasing intensity. Black is very dark, and white is bright green, and colour 13 is a medium green. (Thanks to [[Mark Rison|Mark Rison]] for this information) The luminance (Y) is not exactly correlated to the actual luminance of colour images broadcast in RGB. We have other values. Amstrad preferred to propose a completely different image system, not comparable to a conversion to monochrome, which would have limited the number of brightness levels to 21 (for example, colours 9 and 6 would have had the same luminance). They opted for a table of 27 linear brightness steps. They assigned values of 1 (1kΩ) for blue, 3 (3.3kΩ) for red, and 9 (10kΩ) for green. <br> === To calculate the colour luminance value ===
'''Red'''
100% => add 2
<br>