Changes

Jump to: navigation, search

Gate Array

126 bytes added, 00:34, 12 February 2010
|}
==== Register 1 - Palette Data (Colour selection ==) ==
Once the pen has been selected 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.
===== Summary =====
{|{{Prettytable|width: 700px; font-size: 2em;}}
|}
=== Register 2 - Select screen mode and ROM configuration ===
This is a general purpose register responsible for the [[Video modes|screen mode]] and the ROM configuration.
==== Screen mode selection ====
The function of bits 1 and 0 is to define the screen mode. The settings for bits 1 and 0 and the corresponding screen mode are given in the table below.
Mode changing is synchronised with HSYNC. If the mode is changed, it will take effect from the next HSYNC.
==== ROM configuration selection ====
Bit 2 is used to enable or disable the lower ROM area. The lower ROM area occupies memory addresses &0000-&3fff and is used to access the operating system ROM. When the lower ROM area is is enabled, reading from &0000-&3FFF will return data in the ROM. When a value is written to &0000-&3FFF, it will be written to the RAM underneath the RAM. When it is disabled, data read from &0000-&3FFF will return the data in the RAM.
Bit 4 controls the interrupt generation. It can be used to delay interrupts. See the document on interrupt generation for more information.
===== Summary =====
{|{{Prettytable|width: 700px; font-size: 2em;}}
| 0 || x
|}
 
== Register 3 - RAM Banking ==
 
This register exists only in CPCs with 128K RAM (like the CPC 6128, or CPCs with [[Standard Memory Expansions]]). Note: In the CPC 6128, the register is a separate PAL that assists the Gate Array chip.
 
Details .... [?]
 
== Programming the Gate Array - Examples ==
RET
</pre>
 ==== Conversion chart =Misc ===
The hardware colour number is different to the colour range used by the firmware, so a conversion chart is provided for the corresponding firmware/hardware colour values and the corresponding colour name.
===== 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 its original colour. This is due to the firmware resetting the colour. When using the firmware, use its routines to select the colour, and the colour will remain.
Example: [For whatever reason, this example does NOT refer to the above firmware stuff]
<pre>ld bc,7f00+1&nbsp;;Gate array function (set pen)
;and pen number
</pre>
==== 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.
To display a CPC image you will need to use a analogue monitor with a composite sync.
This table shows the relationship between hardware colour number, colour name and RGB mixing.  <br>=== Palette sorted by Hardware Color Numbers ===
{| class="FCK__ShowTableBorders"
|}
===Palette sorted by Firmware Color Numbers = RGB assignments for the software colours ==== This is simply a 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"
|}
===== To calculate the colour value =====
'''Red'''
6,388
edits