Changes

Jump to: navigation, search

Gate Array

29 bytes removed, 18:41, 30 March 2008
1 1 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 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 for more information. <br>Pen selection<br>When bit 7 and bit 6 are set to "0", the remaining bits determine which pen is to have its colour changed. When bit 4 is set to "0", bits 3 to 0 define which pen is to be selected. When bit 4 is set to "1", the value contained in bits 3-0 is ignored and the border is selected.
Colour Number Colour Name <br>0 White <br>1 White (note 1) <br>2 Sea Green <br>3 Pastel Yellow <br>4 Blue <br>5 Purple <br>6 Cyan <br>7 Pink <br>8 Purple (note 1) <br>9 Pastel Yellow (note 1) <br>10 Bright Yellow <br>11 Bright White <br>12 Bright Red <br>13 Bright Magenta <br>14 Orange <br>15 Pastel Magenta <br>16 Blue (note 1) <br>17 Sea Green (note 1) <br>18 Bright Green <br>19 Bright Cyan <br>20 Black <br>21 Bright Blue <br>22 Green <br>23 Sky Blue <br>24 Magenta <br>25 Pastel Green <br>26 Lime <br>27 Pastel Cyan <br>28 Red <br>29 Mauve <br>30 Yellow <br>31 Pastel Blue
<br>== Notes:==
This is not an official colour <br>Select screen mode and rom configuration<br>This is a general purpose register responsible for the screen mode and the rom configuration.
<br>Screen mode selection<br>The function of bits 1 and 0 is to define the Select screen mode. The settings for bits 1 and 0 and the corresponding screen mode are given in the table below.rom configuration
This is a general purpose register responsible for the 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. Bit 1 Bit 0 Screen mode <br>0 0 Mode 0, 160x200 resolution, 16 colours <br>0 1 Mode 1, 320x200 resolution, 4 colours <br>1 0 Mode 2, 640x200 resolution, 2 colours <br>1 1 Mode 3, 160x200 resolution, 4 colours (note 1)
<br>This mode is not official. From the combinations possible, we can see that 4 modes can be defined, although the Amstrad only has 3. Mode 3 is similar to mode 0, because it has the same resolution, but it is limited to only 4 colours. <br>Mode changing is synchronised with HSYNC. If the mode is changed, it will take effect from the next HSYNC. <br>Rom configuration selection<br>Bit 2 is used to enable or disable the lower rom area. The lower rom area occupies memory addressess &amp;0000-&amp;3fff and is used to access the operating system rom. When the lower rom area is is enabled, reading from &amp;0000-&amp;3FFF will return data in the rom. When a value is written to &amp;0000-&amp;3FFF, it will be written to the ram underneath the rom. When it is disabled, data read from &amp;0000-&amp;3FFF will return the data in the ram.
Defining the colours, <br>Setting pen 0 to Bright White.
<pre>LD BC,&amp;7F00 ;Gate Array port<br>LD A,%00000000+0 ;Pen number (and Gate Array function)<br>OUT (C),A ;Send pen number<br>LD A,%01000000+11 ;Pen colour (and Gate Array function)<br>OUT (C),A ;Send it<br>RET
Setting the mode and rom configuration, <br>Mode 2, upper and lower rom disabled.
LD BC,&amp;7F00 ;Gate array port<br>LD A,%10000000+%00001110 ;Mode and rom selection (and Gate<br>;Array function)<br>OUT (C),A ;Send itRET<br/pre>RET
<br>conversion chart<br>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 it's original colour. This is due to the firmware re- setting the colour. When using the firmware, use it's routines to select the colour, and the colour will remain. <br>Firmware Colour Number Colour Name Hardware Colour Number Quick reference hardware colour select value <br>0 Black 20 &amp;54 <br>1 Blue 4 &amp;44 <br>2 Bright Blue 21 &amp;55 <br>3 Red 28 &amp;5C <br>4 Magenta 24 &amp;58 <br>5 Mauve 29 &amp;5D <br>6 Bright Red 12 &amp;4C <br>7 Purple 5 &amp;45 <br>8 Bright Magenta 13 &amp;4D <br>9 Green 22 &amp;56 <br>10 Cyan 6 &amp;46 <br>11 Sky Blue 23 &amp;57 <br>12 Yellow 30 &amp;5E <br>13 White 0 &amp;40 <br>14 Pastel Blue 31 &amp;5F <br>15 Orange 14 &amp;4E <br>16 Pink 7 &amp;47 <br>17 Pastel Magenta 15 &amp;4F <br>18 Bright Green 18 &amp;52 <br>19 Sea Green 2 &amp;42 <br>20 Bright Cyan 19 &amp;53 <br>21 Lime 26 &amp;5A <br>22 Pastel Green 25 &amp;59 <br>23 Pastel Cyan 27 &amp;5B <br>24 Bright Yellow 10 &amp;4A <br>25 Pastel Yellow 3 &amp;43 <br>26 Bright White 11 &amp;4B
12,273
edits