Changes

Gate Array

20 bytes removed, 12:42, 26 October 2009
Tidy up
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, as it is the one found in a standard CPC.
''== What does it do?'' ==
The Gate Array is responsible for the display (colour palette, resolution, horizontal and vertical sync), interrupt generation and memory arrangement.
| 1
| 0
| Select screen mode, rom ROM configuration and interrupt control
|-
| 1
| 1
| Ram RAM Memory Management (note 1)
|}
===== Note =====
This function is not available in the Gate-Array, but is performed by a device at the same I/O port address location. In the CPC464,CPC664 and KC compact, this function is performed in a memory-expansion (e.g. Dk'Tronics 64K Ram RAM Expansion), if this expansion is not present then the function is not available. In the CPC6128, this function is performed by a PAL located on the main PCB, or a memory-expansion. In the 464+ and 6128+ this function is performed by the ASIC or a memory expansion. Please read the document on Ram Management RAM management for more information.
==== Pen selection ====
==== Colour selection ====
Once the pen has been selected the its colour can then be changed. Bits 4 to 0 specify the hardware colour number from the hardware colour palette.
Even though there is provision for 32 colours, only 27 are possible. The remaining colours are duplicates of those already in the colour palette.
===== Notes =====
This is not an official colour .
=== Select screen mode and rom ROM configuration ===
This is a general purpose register responsible for the [[Video modes|screen mode]] and the rom ROM configuration.
==== Screen mode selection ====
Mode changing is synchronised with HSYNC. If the mode is changed, it will take effect from the next HSYNC.
==== Rom ROM configuration selection ====
Bit 2 is used to enable or disable the lower rom ROM area. The lower rom ROM area occupies memory addressess addresses &0000-&3fff and is used to access the operating system romROM. When the lower rom ROM area is is enabled, reading from &0000-&3FFF will return data in the romROM. When a value is written to &0000-&3FFF, it will be written to the ram RAM underneath the romRAM. When it is disabled, data read from &0000-&3FFF will return the data in the ramRAM.
Similarly, bit 3 controls enabling or disabling of the upper rom ROM area. The upper rom ROM area occupies memory addressess &C000-&FFFF and is BASIC or any expansion roms ROMs which may be plugged into a rom ROM board/box. See the document on upper rom selection for more details. When the upper rom ROM area enabled, reading from &c000-&ffff, will return data in the romROM. When data is written to &c000-&FFFF, it will be written to the ram RAM at the same address as the romROM. When the upper rom ROM area is disabled, and data is read from &c000-&ffff the data returned it will be the data in the ramRAM.
Bit 4 controls the interrupt generation. It can be used to delay interrupts. See the document on interrupt generation for more information.
| x
|
*1 Upper rom ROM area disable *0 Upper rom ROM area enable
|-
| x
|
*1 Lower rom ROM area disable *0 Lower rom ROM area enable
|-
RET
Setting the mode and rom ROM configuration, Mode 2, upper and lower rom ROM disabled.
LD BC,7F00 ;Gate array port
LD A,%10000000+%00001110 ;Mode and rom ROM selection (and Gate Array function)
OUT (C),A ;Send it
RET
===== Note =====
The firmware keeps track of the colours it is using. Every VSYNC (assuming interrupts are enabled) the firmware sets the colours. This enables the user to have flashing colours. If the user selects a new colour using the gate array, the new colour will flash temporarily and then return to it's its original colour. This is due to the firmware re- setting resetting the colour. When using the firmware, use it's its routines to select the colour, and the colour will remain.
{| class="FCK__ShowTableBorders"
| ''Hardware Number''
| ''Quick reference colour value''
| ''ColorColour''
|-
| 0
ret
</pre>
==== Pallette Palette R,G,B definitions ====
There are 27 colours which are generated from red, green and blue mixed in different quantities. There are 3 levels of red, 3 levels of green and 3 levels of blue, and these can be thought of as off/no colour, half-on/half-colour, and on/full-colour.
| ''G&nbsp;%''
| ''B&nbsp;%''
| ''ColorColour''
|-
| 0
==== RGB assignments for the software colours ====
This is simply a sidenote side note to illustrate a pattern in the RGB assignments of the software colours and to show how their value is calculated.
{| class="FCK__ShowTableBorders"
| ''G&nbsp;%''
| ''B&nbsp;%''
| ''ColorColour''
|-
| 0
Green Screen Colours
On a green screen (where all colours are shades of green), the colours (in the software/firmware colours), are in order of increasing intensity. So that black 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)
==Links==
*[[ASIC]] : for Plus users
*[[Synchronising with the CRTC and display]] : technic and technical details on the relationship between Garte Gate Array and CRTC.
[[Category:Hardware]][[Category:Programming]][[Category:Datasheet]][[Category:Graphic]]
19
edits