<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://oldwiki.cpcwiki.eu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=2f1cafc</id>
		<title>CPCWiki - THE Amstrad CPC encyclopedia! - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://oldwiki.cpcwiki.eu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=2f1cafc"/>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php/Special:Contributions/2f1cafc"/>
		<updated>2026-08-29T04:03:26Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.25.1</generator>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=Amstrad_Whole_Memory_Guide_-_The_display_system&amp;diff=104843</id>
		<title>Amstrad Whole Memory Guide - The display system</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=Amstrad_Whole_Memory_Guide_-_The_display_system&amp;diff=104843"/>
				<updated>2020-02-12T21:40:07Z</updated>
		
		<summary type="html">&lt;p&gt;2f1cafc: /* Workspace */added screen pack table&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In all, the Display System takes up some 4000 bytes of code and fixed data in ROM, and its workspace spans about 380 bytes of RAM, not to mention the 16K byte screen RAM. There are more than 100 entry points. Fortunately, the system divides into three maln parts:&lt;br /&gt;
&lt;br /&gt;
* The Screen Pack deals directly with screen handling, colour selection and screen read and write.&lt;br /&gt;
&lt;br /&gt;
* The Text VDU handles matters relating to text display, including the implementation of stream selection. It also deals with the control codes and their parameters.&lt;br /&gt;
&lt;br /&gt;
* The Graphics VDU handles the graphic display.&lt;br /&gt;
&lt;br /&gt;
Each of these parts requires a chapter to itself, but it will be useful to offer some general information first.&lt;br /&gt;
&lt;br /&gt;
== The Screen RAM ==&lt;br /&gt;
&lt;br /&gt;
In theory, the Screen RAM could be any 16K byte area of memory starting at a multiple of 4000, but the 8000-BFFF block would overwrite workspace and RAM routines, while 0000-3FFF would overwrite the RST Area, so the choice narrows to 4000-7FFF or C000-FFFF, and it is usually more convenient to adopt the latter area, leaving the central half of RAM free for other purposes.&lt;br /&gt;
&lt;br /&gt;
The Screen RAM is accessed by the Video Gate Array on a basis of addresses supplied by the CRT Controller, but the addresses are not used in a straightforward manner. The CRT Controller embodies two counters. One, output on RA0-RA4, is incremented after each line of the display has been scanned. When this count reaches the value set for the number of scan lines in the character height it is zeroed, and the second counter, output on MA0-MA13, is incremented. This counter is initialised to the Start Address set in the CRT Controller, which is 3000 when the C000-FFFF area is in use. These outputs are used as follows;&lt;br /&gt;
&lt;br /&gt;
* Address bits A14,A15 are driven from MA12,MA13. Since the MA counter works from a Start Address of 3000, both these bits are true.&lt;br /&gt;
&lt;br /&gt;
* Address bits A11-A13 are driven from RA0-RA3&lt;br /&gt;
&lt;br /&gt;
* Address bits A11-A10 are driven from MA0-MA9&lt;br /&gt;
&lt;br /&gt;
* Address bit A0 is driven from the CRT Controller clock.&lt;br /&gt;
&lt;br /&gt;
The scan line takes 40 microseconds to traverse the visible part of the display, and during each microsecond the Video Gate Array requires two bytes of screen data. These are transferred directly from RAM to the Video Gate Array, the processor being meanwhile held in Wait. The process is so timed that the CRTC clock changes state between the two transfers. Once all the bytes have been read, the normal processor action is allowed to continue.  The bytes are used in different ways in the three screen modes.&lt;br /&gt;
&lt;br /&gt;
In Mode 2, each byte defines one row of a character pattern matrix, each bit determining which of two colours should be given to a pixel, and eighty characters are displayed in each screen row.&lt;br /&gt;
&lt;br /&gt;
In Mode 1, two bytes are required to define each matrix row, two bits being used to give each pixel one of four colours.  Successive pixels are defined by bits 3,7; 2,6; 1,5; and 0,4.  This sequence is repeated in the second byte From each pair of bits, the Video Gate Array determines which palette entry should be used, and sets the colour accordingly. Since each matrix row requires two bytes, only forty characters can be displayed per screen row.&lt;br /&gt;
&lt;br /&gt;
In Mode 0, four bits are required to define one of sixteen colours for each pixel. This means that four bytes are required for each matrix row. The first pixel is defined by bits 1,5,3,7 of the first byte, the second by bits 0,4,2,6 and so on. Twenty characters can be displayed in each screen row.&lt;br /&gt;
&lt;br /&gt;
The way the CRT Controller counts are used complicates the calculation of screen addresses. Numbering columns and rows from 0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Address = Base + Offset + N*Column + 86*Row + 2048 per scan line.&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where N is the number of bits per pixel in the current mode.&lt;br /&gt;
&lt;br /&gt;
For a given scan line, the bits are taken in sequence. The next scan line is located by increasing the addresses by 0800.&lt;br /&gt;
&lt;br /&gt;
Fortunately, the system will work out screen addresses on the basis of column, line, base and offset.&lt;br /&gt;
&lt;br /&gt;
Observant readers may notice a slight anomaly. If &amp;lt;code&amp;gt;N*Column = 79&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;Row = 25&amp;lt;/code&amp;gt;, the column and row terms in the above equation fotal 1999, so there are 48 locations in each scan line that are spare. The MA counter in the CRTC does not address them.&lt;br /&gt;
&lt;br /&gt;
However, there is the Offset term to be taken into account.  Making offset = &amp;amp;50 moves the screen up one line. Making the offset $869 would move the display up by one scan line, but offset is limited to 07FF by the routine normally used to set it. When Offset is used, the Start Address in the CRTC is modified, and the missing 48 bytes may then come into play. There is a lot of scope for gentle experiment here.&lt;br /&gt;
&lt;br /&gt;
== Streams ==&lt;br /&gt;
&lt;br /&gt;
The system provides for the definition of eight 'streams' of sereen data, each with its own independent parameters, which are:&lt;br /&gt;
&lt;br /&gt;
* Window&lt;br /&gt;
* Cursor Position&lt;br /&gt;
* Pen and Paper&lt;br /&gt;
* Cursor Enable&lt;br /&gt;
* Screen Enable&lt;br /&gt;
* Opaque or Transparent&lt;br /&gt;
* Text or Graphics Write&lt;br /&gt;
* Roll Type&lt;br /&gt;
&lt;br /&gt;
All eight sets of parameters are held in store, the set in current use being copied into a common area.&lt;br /&gt;
&lt;br /&gt;
Bach stream may reserve for itself a rectangular window. If two windows overlap, the streams may overwrite each other in the overlap area. Any area not so reserved may be accessed by stream 0, which is the default if no stream is specified.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
A certain amount of care is needed in dealing with screen parameters, as their definition can vary. A distinction is made between 'physical' and 'logical' values, the former numbering columns and rows from 0 upwards, while the latter start at 1. There are also distinctions between absolute and relative values.&lt;br /&gt;
&lt;br /&gt;
Similar distinctions arise with Graphics parameters, user coordinates being relative to the origin set by the user, while standard coordinates are relative to the default origin.&lt;br /&gt;
&lt;br /&gt;
== Workspace ==&lt;br /&gt;
&lt;br /&gt;
As many workspace locations are common to more than one section of the display system, the addresses for the whole screen workspace in Version 1.0 are given here&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Screen Pack ====&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| B1C8 || Mode&lt;br /&gt;
|-&lt;br /&gt;
| B1C9 - B1CA || Offset&lt;br /&gt;
|-&lt;br /&gt;
| B1CB || Base (High byte)&lt;br /&gt;
|-&lt;br /&gt;
| B1CC - B1CE || Jump instruction&lt;br /&gt;
|-&lt;br /&gt;
| B1CF - B1D6 || Pixel masks&lt;br /&gt;
|-&lt;br /&gt;
| B1D7 || Flash time 2&lt;br /&gt;
|-&lt;br /&gt;
| B1D8 || Flash time 1&lt;br /&gt;
|-&lt;br /&gt;
| B1D9 - B1E9 || Colour table 2&lt;br /&gt;
|-&lt;br /&gt;
| B1EA - B1FA || Colour table 1&lt;br /&gt;
|-&lt;br /&gt;
| B1FB || Table select flag&lt;br /&gt;
|-&lt;br /&gt;
| B1FC || Flash count&lt;br /&gt;
|-&lt;br /&gt;
| B1FD || Colour time&lt;br /&gt;
|-&lt;br /&gt;
| B1FE - B206 || Event block&lt;br /&gt;
|-&lt;br /&gt;
| B207 || Bits/pixel negated&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Scanned pages ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:AWMG page39.jpg|page 39&lt;br /&gt;
Image:AWMG page40.jpg|page 40&lt;br /&gt;
Image:AWMG page41.jpg|page 41&lt;br /&gt;
Image:AWMG page42.jpg|page 42&lt;br /&gt;
Image:AWMG page43.jpg|page 43&lt;br /&gt;
Image:AWMG page44.jpg|page 44&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:CPC Firmware]]&lt;/div&gt;</summary>
		<author><name>2f1cafc</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=Amstrad_Whole_Memory_Guide_-_The_display_system&amp;diff=104842</id>
		<title>Amstrad Whole Memory Guide - The display system</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=Amstrad_Whole_Memory_Guide_-_The_display_system&amp;diff=104842"/>
				<updated>2020-02-12T21:14:14Z</updated>
		
		<summary type="html">&lt;p&gt;2f1cafc: /* Workspace */typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In all, the Display System takes up some 4000 bytes of code and fixed data in ROM, and its workspace spans about 380 bytes of RAM, not to mention the 16K byte screen RAM. There are more than 100 entry points. Fortunately, the system divides into three maln parts:&lt;br /&gt;
&lt;br /&gt;
* The Screen Pack deals directly with screen handling, colour selection and screen read and write.&lt;br /&gt;
&lt;br /&gt;
* The Text VDU handles matters relating to text display, including the implementation of stream selection. It also deals with the control codes and their parameters.&lt;br /&gt;
&lt;br /&gt;
* The Graphics VDU handles the graphic display.&lt;br /&gt;
&lt;br /&gt;
Each of these parts requires a chapter to itself, but it will be useful to offer some general information first.&lt;br /&gt;
&lt;br /&gt;
== The Screen RAM ==&lt;br /&gt;
&lt;br /&gt;
In theory, the Screen RAM could be any 16K byte area of memory starting at a multiple of 4000, but the 8000-BFFF block would overwrite workspace and RAM routines, while 0000-3FFF would overwrite the RST Area, so the choice narrows to 4000-7FFF or C000-FFFF, and it is usually more convenient to adopt the latter area, leaving the central half of RAM free for other purposes.&lt;br /&gt;
&lt;br /&gt;
The Screen RAM is accessed by the Video Gate Array on a basis of addresses supplied by the CRT Controller, but the addresses are not used in a straightforward manner. The CRT Controller embodies two counters. One, output on RA0-RA4, is incremented after each line of the display has been scanned. When this count reaches the value set for the number of scan lines in the character height it is zeroed, and the second counter, output on MA0-MA13, is incremented. This counter is initialised to the Start Address set in the CRT Controller, which is 3000 when the C000-FFFF area is in use. These outputs are used as follows;&lt;br /&gt;
&lt;br /&gt;
* Address bits A14,A15 are driven from MA12,MA13. Since the MA counter works from a Start Address of 3000, both these bits are true.&lt;br /&gt;
&lt;br /&gt;
* Address bits A11-A13 are driven from RA0-RA3&lt;br /&gt;
&lt;br /&gt;
* Address bits A11-A10 are driven from MA0-MA9&lt;br /&gt;
&lt;br /&gt;
* Address bit A0 is driven from the CRT Controller clock.&lt;br /&gt;
&lt;br /&gt;
The scan line takes 40 microseconds to traverse the visible part of the display, and during each microsecond the Video Gate Array requires two bytes of screen data. These are transferred directly from RAM to the Video Gate Array, the processor being meanwhile held in Wait. The process is so timed that the CRTC clock changes state between the two transfers. Once all the bytes have been read, the normal processor action is allowed to continue.  The bytes are used in different ways in the three screen modes.&lt;br /&gt;
&lt;br /&gt;
In Mode 2, each byte defines one row of a character pattern matrix, each bit determining which of two colours should be given to a pixel, and eighty characters are displayed in each screen row.&lt;br /&gt;
&lt;br /&gt;
In Mode 1, two bytes are required to define each matrix row, two bits being used to give each pixel one of four colours.  Successive pixels are defined by bits 3,7; 2,6; 1,5; and 0,4.  This sequence is repeated in the second byte From each pair of bits, the Video Gate Array determines which palette entry should be used, and sets the colour accordingly. Since each matrix row requires two bytes, only forty characters can be displayed per screen row.&lt;br /&gt;
&lt;br /&gt;
In Mode 0, four bits are required to define one of sixteen colours for each pixel. This means that four bytes are required for each matrix row. The first pixel is defined by bits 1,5,3,7 of the first byte, the second by bits 0,4,2,6 and so on. Twenty characters can be displayed in each screen row.&lt;br /&gt;
&lt;br /&gt;
The way the CRT Controller counts are used complicates the calculation of screen addresses. Numbering columns and rows from 0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Address = Base + Offset + N*Column + 86*Row + 2048 per scan line.&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where N is the number of bits per pixel in the current mode.&lt;br /&gt;
&lt;br /&gt;
For a given scan line, the bits are taken in sequence. The next scan line is located by increasing the addresses by 0800.&lt;br /&gt;
&lt;br /&gt;
Fortunately, the system will work out screen addresses on the basis of column, line, base and offset.&lt;br /&gt;
&lt;br /&gt;
Observant readers may notice a slight anomaly. If &amp;lt;code&amp;gt;N*Column = 79&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;Row = 25&amp;lt;/code&amp;gt;, the column and row terms in the above equation fotal 1999, so there are 48 locations in each scan line that are spare. The MA counter in the CRTC does not address them.&lt;br /&gt;
&lt;br /&gt;
However, there is the Offset term to be taken into account.  Making offset = &amp;amp;50 moves the screen up one line. Making the offset $869 would move the display up by one scan line, but offset is limited to 07FF by the routine normally used to set it. When Offset is used, the Start Address in the CRTC is modified, and the missing 48 bytes may then come into play. There is a lot of scope for gentle experiment here.&lt;br /&gt;
&lt;br /&gt;
== Streams ==&lt;br /&gt;
&lt;br /&gt;
The system provides for the definition of eight 'streams' of sereen data, each with its own independent parameters, which are:&lt;br /&gt;
&lt;br /&gt;
* Window&lt;br /&gt;
* Cursor Position&lt;br /&gt;
* Pen and Paper&lt;br /&gt;
* Cursor Enable&lt;br /&gt;
* Screen Enable&lt;br /&gt;
* Opaque or Transparent&lt;br /&gt;
* Text or Graphics Write&lt;br /&gt;
* Roll Type&lt;br /&gt;
&lt;br /&gt;
All eight sets of parameters are held in store, the set in current use being copied into a common area.&lt;br /&gt;
&lt;br /&gt;
Bach stream may reserve for itself a rectangular window. If two windows overlap, the streams may overwrite each other in the overlap area. Any area not so reserved may be accessed by stream 0, which is the default if no stream is specified.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
A certain amount of care is needed in dealing with screen parameters, as their definition can vary. A distinction is made between 'physical' and 'logical' values, the former numbering columns and rows from 0 upwards, while the latter start at 1. There are also distinctions between absolute and relative values.&lt;br /&gt;
&lt;br /&gt;
Similar distinctions arise with Graphics parameters, user coordinates being relative to the origin set by the user, while standard coordinates are relative to the default origin.&lt;br /&gt;
&lt;br /&gt;
== Workspace ==&lt;br /&gt;
&lt;br /&gt;
As many workspace locations are common to more than one section of the display system, the addresses for the whole screen workspace in Version 1.0 are given here&lt;br /&gt;
&lt;br /&gt;
== Scanned pages ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:AWMG page39.jpg|page 39&lt;br /&gt;
Image:AWMG page40.jpg|page 40&lt;br /&gt;
Image:AWMG page41.jpg|page 41&lt;br /&gt;
Image:AWMG page42.jpg|page 42&lt;br /&gt;
Image:AWMG page43.jpg|page 43&lt;br /&gt;
Image:AWMG page44.jpg|page 44&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:CPC Firmware]]&lt;/div&gt;</summary>
		<author><name>2f1cafc</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=Amstrad_Whole_Memory_Guide_-_The_display_system&amp;diff=103744</id>
		<title>Amstrad Whole Memory Guide - The display system</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=Amstrad_Whole_Memory_Guide_-_The_display_system&amp;diff=103744"/>
				<updated>2019-10-02T11:55:32Z</updated>
		
		<summary type="html">&lt;p&gt;2f1cafc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In all, the Display System takes up some 4000 bytes of code and fixed data in ROM, and its workspace spans about 380 bytes of RAM, not to mention the 16K byte screen RAM. There are more than 100 entry points. Fortunately, the system divides into three maln parts:&lt;br /&gt;
&lt;br /&gt;
* The Screen Pack deals directly with screen handling, colour selection and screen read and write.&lt;br /&gt;
&lt;br /&gt;
* The Text VDU handles matters relating to text display, including the implementation of stream selection. It also deals with the control codes and their parameters.&lt;br /&gt;
&lt;br /&gt;
* The Graphics VDU handles the graphic display.&lt;br /&gt;
&lt;br /&gt;
Each of these parts requires a chapter to itself, but it will be useful to offer some general information first.&lt;br /&gt;
&lt;br /&gt;
== The Screen RAM ==&lt;br /&gt;
&lt;br /&gt;
In theory, the Screen RAM could be any 16K byte area of memory starting at a multiple of 4000, but the 8000-BFFF block would overwrite workspace and RAM routines, while 0000-3FFF would overwrite the RST Area, so the choice narrows to 4000-7FFF or C000-FFFF, and it is usually more convenient to adopt the latter area, leaving the central half of RAM free for other purposes.&lt;br /&gt;
&lt;br /&gt;
The Screen RAM is accessed by the Video Gate Array on a basis of addresses supplied by the CRT Controller, but the addresses are not used in a straightforward manner. The CRT Controller embodies two counters. One, output on RA0-RA4, is incremented after each line of the display has been scanned. When this count reaches the value set for the number of scan lines in the character height it is zeroed, and the second counter, output on MA0-MA13, is incremented. This counter is initialised to the Start Address set in the CRT Controller, which is 3000 when the C000-FFFF area is in use. These outputs are used as follows;&lt;br /&gt;
&lt;br /&gt;
* Address bits A14,A15 are driven from MA12,MA13. Since the MA counter works from a Start Address of 3000, both these bits are true.&lt;br /&gt;
&lt;br /&gt;
* Address bits A11-A13 are driven from RA0-RA3&lt;br /&gt;
&lt;br /&gt;
* Address bits A11-A10 are driven from MA0-MA9&lt;br /&gt;
&lt;br /&gt;
* Address bit A0 is driven from the CRT Controller clock.&lt;br /&gt;
&lt;br /&gt;
The scan line takes 40 microseconds to traverse the visible part of the display, and during each microsecond the Video Gate Array requires two bytes of screen data. These are transferred directly from RAM to the Video Gate Array, the processor being meanwhile held in Wait. The process is so timed that the CRTC clock changes state between the two transfers. Once all the bytes have been read, the normal processor action is allowed to continue.  The bytes are used in different ways in the three screen modes.&lt;br /&gt;
&lt;br /&gt;
In Mode 2, each byte defines one row of a character pattern matrix, each bit determining which of two colours should be given to a pixel, and eighty characters are displayed in each screen row.&lt;br /&gt;
&lt;br /&gt;
In Mode 1, two bytes are required to define each matrix row, two bits being used to give each pixel one of four colours.  Successive pixels are defined by bits 3,7; 2,6; 1,5; and 0,4.  This sequence is repeated in the second byte From each pair of bits, the Video Gate Array determines which palette entry should be used, and sets the colour accordingly. Since each matrix row requires two bytes, only forty characters can be displayed per screen row.&lt;br /&gt;
&lt;br /&gt;
In Mode 0, four bits are required to define one of sixteen colours for each pixel. This means that four bytes are required for each matrix row. The first pixel is defined by bits 1,5,3,7 of the first byte, the second by bits 0,4,2,6 and so on. Twenty characters can be displayed in each screen row.&lt;br /&gt;
&lt;br /&gt;
The way the CRT Controller counts are used complicates the calculation of screen addresses. Numbering columns and rows from 0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Address = Base + Offset + N*Column + 86*Row + 2048 per scan line.&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where N is the number of bits per pixel in the current mode.&lt;br /&gt;
&lt;br /&gt;
For a given scan line, the bits are taken in sequence. The next scan line is located by increasing the addresses by 0800.&lt;br /&gt;
&lt;br /&gt;
Fortunately, the system will work out screen addresses on the basis of column, line, base and offset.&lt;br /&gt;
&lt;br /&gt;
Observant readers may notice a slight anomaly. If &amp;lt;code&amp;gt;N*Column = 79&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;Row = 25&amp;lt;/code&amp;gt;, the column and row terms in the above equation fotal 1999, so there are 48 locations in each scan line that are spare. The MA counter in the CRTC does not address them.&lt;br /&gt;
&lt;br /&gt;
However, there is the Offset term to be taken into account.  Making offset = &amp;amp;50 moves the screen up one line. Making the offset $869 would move the display up by one scan line, but offset is limited to 07FF by the routine normally used to set it. When Offset is used, the Start Address in the CRTC is modified, and the missing 48 bytes may then come into play. There is a lot of scope for gentle experiment here.&lt;br /&gt;
&lt;br /&gt;
== Streams ==&lt;br /&gt;
&lt;br /&gt;
The system provides for the definition of eight 'streams' of sereen data, each with its own independent parameters, which are:&lt;br /&gt;
&lt;br /&gt;
* Window&lt;br /&gt;
* Cursor Position&lt;br /&gt;
* Pen and Paper&lt;br /&gt;
* Cursor Enable&lt;br /&gt;
* Screen Enable&lt;br /&gt;
* Opaque or Transparent&lt;br /&gt;
* Text or Graphics Write&lt;br /&gt;
* Roll Type&lt;br /&gt;
&lt;br /&gt;
All eight sets of parameters are held in store, the set in current use being copied into a common area.&lt;br /&gt;
&lt;br /&gt;
Bach stream may reserve for itself a rectangular window. If two windows overlap, the streams may overwrite each other in the overlap area. Any area not so reserved may be accessed by stream 0, which is the default if no stream is specified.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
A certain amount of care is needed in dealing with screen parameters, as their definition can vary. A distinction is made between 'physical' and 'logical' values, the former numbering columns and rows from 0 upwards, while the latter start at 1. There are also distinctions between absolute and relative values.&lt;br /&gt;
&lt;br /&gt;
Similar distinctions arise with Graphics parameters, user coordinates being relative to the origin set by the user, while standard coordinates are relative to the default origin.&lt;br /&gt;
&lt;br /&gt;
== Workspace ==&lt;br /&gt;
&lt;br /&gt;
As many workspace locations are common to more than one section of the display system, the addresses for the whole screen workspace in Version 1.6 are given here&lt;br /&gt;
&lt;br /&gt;
== Scanned pages ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:AWMG page39.jpg|page 39&lt;br /&gt;
Image:AWMG page40.jpg|page 40&lt;br /&gt;
Image:AWMG page41.jpg|page 41&lt;br /&gt;
Image:AWMG page42.jpg|page 42&lt;br /&gt;
Image:AWMG page43.jpg|page 43&lt;br /&gt;
Image:AWMG page44.jpg|page 44&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:CPC Firmware]]&lt;/div&gt;</summary>
		<author><name>2f1cafc</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=Amstrad_Whole_Memory_Guide_-_The_display_system&amp;diff=103711</id>
		<title>Amstrad Whole Memory Guide - The display system</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=Amstrad_Whole_Memory_Guide_-_The_display_system&amp;diff=103711"/>
				<updated>2019-09-30T13:21:54Z</updated>
		
		<summary type="html">&lt;p&gt;2f1cafc: OCR'd page 42&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In all, the Display System takes up some 4000 bytes of code and fixed data in ROM, and its workspace spans about 380 bytes of RAM, not to mention the 16K byte screen RAM. There are more than 100 entry points. Fortunately, the system divides into three maln parts:&lt;br /&gt;
&lt;br /&gt;
* The Screen Pack deals directly with screen handling, colour selection and screen read and write.&lt;br /&gt;
&lt;br /&gt;
* The Text VDU handles matters relating to text display, including the implementation of stream selection. It also deals with the control codes and their parameters.&lt;br /&gt;
&lt;br /&gt;
* The Graphics VDU handles the graphic display.&lt;br /&gt;
&lt;br /&gt;
Each of these parts requires a chapter to itself, but it will be useful to offer some general information first.&lt;br /&gt;
&lt;br /&gt;
== The Screen RAM ==&lt;br /&gt;
&lt;br /&gt;
In theory, the Screen RAM could be any 16K byte area of memory starting at a multiple of 4000, but the 8000-BFFF block would overwrite workspace and RAM routines, while 0000-3FFF would overwrite the RST Area, so the choice narrows to 4000-7FFF or C000-FFFF, and it is usually more convenient to adopt the latter area, leaving the central half of RAM free for other purposes.&lt;br /&gt;
&lt;br /&gt;
The Screen RAM is accessed by the Video Gate Array on a basis of addresses supplied by the CRT Controller, but the addresses are not used in a straightforward manner. The CRT Controller embodies two counters. One, output on RA0-RA4, is incremented after each line of the display has been scanned. When this count reaches the value set for the number of scan lines in the character height it is zeroed, and the second counter, output on MA0-MA13, is incremented. This counter is 1initialised to the Start Address set in the CRT Controller, which is 3000 when the C000-FFFF area is in use. These outputs are used as follows;&lt;br /&gt;
&lt;br /&gt;
* Address bits A14,A15 are driven from MA12,MA13. Since the MA counter works from a Start Address of 3000, both these bits are true.&lt;br /&gt;
&lt;br /&gt;
* Address bits A11-A13 are driven from RA0-RA3&lt;br /&gt;
&lt;br /&gt;
* Address bits A11-A10 are driven from MA0-MA9&lt;br /&gt;
&lt;br /&gt;
* Address bit A0 is driven from the CRT Controller clock.&lt;br /&gt;
&lt;br /&gt;
The scan line takes 40 microseconds to traverse the visible part of the display, and during each microsecond the Video Gate Array requires two bytes of screen data. These are transferred directly from RAM to the Video Gate Array, the processor being meanwhile held in Wait. The process is so timed that the GCRTC clock changes state between the two transfers. Once all the bytes have been read, the normal processor action is allowed to continue.  The bytes are used in different ways in the three screen modes.&lt;br /&gt;
&lt;br /&gt;
In Mode 2, each byte defines one row of a character pattern matrix, each bit determining which of two colours should be given to a pixel, and eighty characters are displayed in each screen row.&lt;br /&gt;
&lt;br /&gt;
In Mode 1, two bytes are required to define each matrix row, two bits being used to give each pixel one of four colours.  Successive pixels are defined by bits 3,7; 2,6; 1,5; and 0,4.  This sequence is repeated in the second byte From each pair of bits, the Video Gate Array determines which palette entry should be used, and sets the colour accordingly. Since each matrix row requires two bytes, only forty characters can be displayed per screen row.&lt;br /&gt;
&lt;br /&gt;
In Mode 0, four bits are required to define one of sixteen colours for each pixel. This means that four bytes are required for each matrix row. The first pixel is defined by bits 1,5,3,7 of the first byte, the second by bits 0,4,2,6 and so on. Twenty characters can be displayed in each screen row.&lt;br /&gt;
&lt;br /&gt;
The way the CRT Controller counts are used complicates the calculation of screen addresses. Numbering columns and rows from 0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Address = Base + Offset + N*Column + 86*Row + 2048 per scan line.&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where N is the number of bits per pixel in the current mode.&lt;br /&gt;
&lt;br /&gt;
For a given scan line, the bits are taken in sequence. The next scan line is located by increasing the addresses by 0800.&lt;br /&gt;
&lt;br /&gt;
Fortunately, the system will work out screen addresses on the basis of column, line, base and offset.&lt;br /&gt;
&lt;br /&gt;
Observant readers may notice a slight anomaly. If &amp;lt;code&amp;gt;N*Column = 79&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;Row = 25&amp;lt;/code&amp;gt;, the column and row terms in the above equation fotal 1999, so there are 48 locations in each scan line that are spare. The MA counter in the CRTC does not address them.&lt;br /&gt;
&lt;br /&gt;
However, there is the Offset term to be taken into account.  Making offset = &amp;amp;50 moves the screen up one line. Making the offset $869 would move the display up by one scan line, but offset is limited to 07FF by the routine normally used to set it. When Offset is used, the Start Address in the CRTC is modified, and the missing 48 bytes may then come into play. There is a lot of scope for gentle experiment here.&lt;br /&gt;
&lt;br /&gt;
== Streams ==&lt;br /&gt;
&lt;br /&gt;
The system provides for the definition of eight 'streams' of sereen data, each with its own independent parameters, which are:&lt;br /&gt;
&lt;br /&gt;
* Window&lt;br /&gt;
* Cursor Position&lt;br /&gt;
* Pen and Paper&lt;br /&gt;
* Cursor Enable&lt;br /&gt;
* Screen Enable&lt;br /&gt;
* Opaque or Transparent&lt;br /&gt;
* Text or Graphics Write&lt;br /&gt;
* Roll Type&lt;br /&gt;
&lt;br /&gt;
All eight sets of parameters are held in store, the set in current use being copied into a common area.&lt;br /&gt;
&lt;br /&gt;
Bach stream may reserve for itself a rectangular window. If two windows overlap, the streams may overwrite each other in the overlap area. Any area not so reserved may be accessed by stream 0, which is the default if no stream is specified.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
A certain amount of care is needed in dealing with screen parameters, as their definition can vary. A distinction is made between 'physical' and 'logical' values, the former numbering columns and rows from 0 upwards, while the latter start at 1. There are also distinctions between absolute and relative values.&lt;br /&gt;
&lt;br /&gt;
Similar distinctions arise with Graphics parameters, user coordinates being relative to the origin set by the user, while standard coordinates are relative to the default origin.&lt;br /&gt;
&lt;br /&gt;
== Workspace ==&lt;br /&gt;
&lt;br /&gt;
As many workspace locations are common to more than one section of the display system, the addresses for the whole screen workspace in Version 1.6 are given here&lt;br /&gt;
&lt;br /&gt;
== Scanned pages ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:AWMG page39.jpg|page 39&lt;br /&gt;
Image:AWMG page40.jpg|page 40&lt;br /&gt;
Image:AWMG page41.jpg|page 41&lt;br /&gt;
Image:AWMG page42.jpg|page 42&lt;br /&gt;
Image:AWMG page43.jpg|page 43&lt;br /&gt;
Image:AWMG page44.jpg|page 44&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:CPC Firmware]]&lt;/div&gt;</summary>
		<author><name>2f1cafc</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=Amstrad_Whole_Memory_Guide_-_The_display_system&amp;diff=103710</id>
		<title>Amstrad Whole Memory Guide - The display system</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=Amstrad_Whole_Memory_Guide_-_The_display_system&amp;diff=103710"/>
				<updated>2019-09-30T13:16:10Z</updated>
		
		<summary type="html">&lt;p&gt;2f1cafc: OCR'd page 41&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In all, the Display System takes up some 4000 bytes of code and fixed data in ROM, and its workspace spans about 380 bytes of RAM, not to mention the 16K byte screen RAM. There are more than 100 entry points. Fortunately, the system divides into three maln parts:&lt;br /&gt;
&lt;br /&gt;
* The Screen Pack deals directly with screen handling, colour selection and screen read and write.&lt;br /&gt;
&lt;br /&gt;
* The Text VDU handles matters relating to text display, including the implementation of stream selection. It also deals with the control codes and their parameters.&lt;br /&gt;
&lt;br /&gt;
* The Graphics VDU handles the graphic display.&lt;br /&gt;
&lt;br /&gt;
Each of these parts requires a chapter to itself, but it will be useful to offer some general information first.&lt;br /&gt;
&lt;br /&gt;
== The Screen RAM ==&lt;br /&gt;
&lt;br /&gt;
In theory, the Screen RAM could be any 16K byte area of memory starting at a multiple of 4000, but the 8000-BFFF block would overwrite workspace and RAM routines, while 0000-3FFF would overwrite the RST Area, so the choice narrows to 4000-7FFF or C000-FFFF, and it is usually more convenient to adopt the latter area, leaving the central half of RAM free for other purposes.&lt;br /&gt;
&lt;br /&gt;
The Screen RAM is accessed by the Video Gate Array on a basis of addresses supplied by the CRT Controller, but the addresses are not used in a straightforward manner. The CRT Controller embodies two counters. One, output on RA0-RA4, is incremented after each line of the display has been scanned. When this count reaches the value set for the number of scan lines in the character height it is zeroed, and the second counter, output on MA0-MA13, is incremented. This counter is 1initialised to the Start Address set in the CRT Controller, which is 3000 when the C000-FFFF area is in use. These outputs are used as follows;&lt;br /&gt;
&lt;br /&gt;
* Address bits A14,A15 are driven from MA12,MA13. Since the MA counter works from a Start Address of 3000, both these bits are true.&lt;br /&gt;
&lt;br /&gt;
* Address bits A11-A13 are driven from RA0-RA3&lt;br /&gt;
&lt;br /&gt;
* Address bits A11-A10 are driven from MA0-MA9&lt;br /&gt;
&lt;br /&gt;
* Address bit A0 is driven from the CRT Controller clock.&lt;br /&gt;
&lt;br /&gt;
The scan line takes 40 microseconds to traverse the visible part of the display, and during each microsecond the Video Gate Array requires two bytes of screen data. These are transferred directly from RAM to the Video Gate Array, the processor being meanwhile held in Wait. The process is so timed that the GCRTC clock changes state between the two transfers. Once all the bytes have been read, the normal processor action is allowed to continue.  The bytes are used in different ways in the three screen modes.&lt;br /&gt;
&lt;br /&gt;
In Mode 2, each byte defines one row of a character pattern matrix, each bit determining which of two colours should be given to a pixel, and eighty characters are displayed in each screen row.&lt;br /&gt;
&lt;br /&gt;
In Mode 1, two bytes are required to define each matrix row, two bits being used to give each pixel one of four colours.  Successive pixels are defined by bits 3,7; 2,6; 1,5; and 0,4.  This sequence is repeated in the second byte From each pair of bits, the Video Gate Array determines which palette entry should be used, and sets the colour accordingly. Since each matrix row requires two bytes, only forty characters can be displayed per screen row.&lt;br /&gt;
&lt;br /&gt;
In Mode 0, four bits are required to define one of sixteen colours for each pixel. This means that four bytes are required for each matrix row. The first pixel is defined by bits 1,5,3,7 of the first byte, the second by bits 0,4,2,6 and so on. Twenty characters can be displayed in each screen row.&lt;br /&gt;
&lt;br /&gt;
The way the CRT Controller counts are used complicates the calculation of screen addresses. Numbering columns and rows from 0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Address = Base + Offset + N*Column + 86*Row + 2048 per scan line.&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where N is the number of bits per pixel in the current mode.&lt;br /&gt;
&lt;br /&gt;
For a given scan line, the bits are taken in sequence. The next scan line is located by increasing the addresses by 0800.&lt;br /&gt;
&lt;br /&gt;
Fortunately, the system will work out screen addresses on the basis of column, line, base and offset.&lt;br /&gt;
&lt;br /&gt;
Observant readers may notice a slight anomaly. If &amp;lt;code&amp;gt;N*Column = 79&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;Row = 25&amp;lt;/code&amp;gt;, the column and row terms in the above equation fotal 1999, so there are 48 locations in each scan line that are spare. The MA counter in the CRTC does not address them.&lt;br /&gt;
&lt;br /&gt;
However, there is the Offset term to be taken into account.  Making offset = &amp;amp;50 moves the screen up one line. Making the offset $869 would move the display up by one scan line, but offset is limited to 07FF by the routine normally used to set it. When Offset is used, the Start Address in the CRTC is modified, and the missing 48 bytes may then come into play. There is a lot of scope for gentle experiment here.&lt;br /&gt;
&lt;br /&gt;
== Streams ==&lt;br /&gt;
&lt;br /&gt;
The system provides for the definition of eight 'streams' of sereen data, each with its own independent parameters, which are:&lt;br /&gt;
&lt;br /&gt;
* Window&lt;br /&gt;
* Cursor Position&lt;br /&gt;
* Pen and Paper&lt;br /&gt;
* Cursor Enable&lt;br /&gt;
* Screen Enable&lt;br /&gt;
* Opaque or Transparent&lt;br /&gt;
* Text or Graphics Write&lt;br /&gt;
* Roll Type&lt;br /&gt;
&lt;br /&gt;
All eight sets of parameters are held in store, the set in current use being copied into a common area.&lt;br /&gt;
&lt;br /&gt;
Bach stream may reserve for itself a rectangular window. If two windows overlap, the streams may overwrite each other in the overlap area. Any area not so reserved may be accessed by stream 0, which is the default if no stream is specified.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Scanned pages ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:AWMG page39.jpg|page 39&lt;br /&gt;
Image:AWMG page40.jpg|page 40&lt;br /&gt;
Image:AWMG page41.jpg|page 41&lt;br /&gt;
Image:AWMG page42.jpg|page 42&lt;br /&gt;
Image:AWMG page43.jpg|page 43&lt;br /&gt;
Image:AWMG page44.jpg|page 44&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:CPC Firmware]]&lt;/div&gt;</summary>
		<author><name>2f1cafc</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=Amstrad_Whole_Memory_Guide_-_The_display_system&amp;diff=103707</id>
		<title>Amstrad Whole Memory Guide - The display system</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=Amstrad_Whole_Memory_Guide_-_The_display_system&amp;diff=103707"/>
				<updated>2019-09-26T19:21:56Z</updated>
		
		<summary type="html">&lt;p&gt;2f1cafc: /* The Screen RAM */OCR page 40&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In all, the Display System takes up some 4000 bytes of code and fixed data in ROM, and its workspace spans about 380 bytes of RAM, not to mention the 16K byte screen RAM. There are more than 100 entry points. Fortunately, the system divides into three maln parts:&lt;br /&gt;
&lt;br /&gt;
* The Screen Pack deals directly with screen handling, colour selection and screen read and write.&lt;br /&gt;
&lt;br /&gt;
* The Text VDU handles matters relating to text display, including the implementation of stream selection. It also deals with the control codes and their parameters.&lt;br /&gt;
&lt;br /&gt;
* The Graphics VDU handles the graphic display.&lt;br /&gt;
&lt;br /&gt;
Each of these parts requires a chapter to itself, but it will be useful to offer some general information first.&lt;br /&gt;
&lt;br /&gt;
== The Screen RAM ==&lt;br /&gt;
&lt;br /&gt;
In theory, the Screen RAM could be any 16K byte area of memory starting at a multiple of 4000, but the 8000-BFFF block would overwrite workspace and RAM routines, while 0000-3FFF would overwrite the RST Area, so the choice narrows to 4000-7FFF or C000-FFFF, and it is usually more convenient to adopt the latter area, leaving the central half of RAM free for other purposes.&lt;br /&gt;
&lt;br /&gt;
The Screen RAM is accessed by the Video Gate Array on a basis of addresses supplied by the CRT Controller, but the addresses are not used in a straightforward manner. The CRT Controller embodies two counters. One, output on RA0-RA4, is incremented after each line of the display has been scanned. When this count reaches the value set for the number of scan lines in the character height it is zeroed, and the second counter, output on MA0-MA13, is incremented. This counter is 1initialised to the Start Address set in the CRT Controller, which is 3000 when the C000-FFFF area is in use. These outputs are used as follows;&lt;br /&gt;
&lt;br /&gt;
* Address bits A14,A15 are driven from MA12,MA13. Since the MA counter works from a Start Address of 3000, both these bits are true.&lt;br /&gt;
&lt;br /&gt;
* Address bits A11-A13 are driven from RA0-RA3&lt;br /&gt;
&lt;br /&gt;
* Address bits A11-A10 are driven from MA0-MA9&lt;br /&gt;
&lt;br /&gt;
* Address bit A0 is driven from the CRT Controller clock.&lt;br /&gt;
&lt;br /&gt;
The scan line takes 40 microseconds to traverse the visible part of the display, and during each microsecond the Video Gate Array requires two bytes of screen data. These are transferred directly from RAM to the Video Gate Array, the processor being meanwhile held in Wait. The process is so timed that the GCRTC clock changes state between the two transfers. Once all the bytes have been read, the normal processor action is allowed to continue.  The bytes are used in different ways in the three screen modes.&lt;br /&gt;
&lt;br /&gt;
In Mode 2, each byte defines one row of a character pattern matrix, each bit determining which of two colours should be given to a pixel, and eighty characters are displayed in each screen row.&lt;br /&gt;
&lt;br /&gt;
In Mode 1, two bytes are required to define each matrix row, two bits being used to give each pixel one of four colours.  Successive pixels are defined by bits 3,7; 2,6; 1,5; and 0,4.  This sequence is repeated in the second byte From each pair of bits, the Video Gate Array determines which palette entry should be used, and sets the colour accordingly. Since each matrix row requires two bytes, only forty characters can be displayed per screen row.&lt;br /&gt;
&lt;br /&gt;
In Mode 0, four bits are required to define one of sixteen colours for each pixel. This means that four bytes are required for each matrix row. The first pixel is defined by bits 1,5,3,7 of the first byte, the second by bits 0,4,2,6 and so on. Twenty characters can be displayed in each screen row.&lt;br /&gt;
&lt;br /&gt;
The way the CRT Controller counts are used complicates the&lt;br /&gt;
&lt;br /&gt;
== Scanned pages ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:AWMG page39.jpg|page 39&lt;br /&gt;
Image:AWMG page40.jpg|page 40&lt;br /&gt;
Image:AWMG page41.jpg|page 41&lt;br /&gt;
Image:AWMG page42.jpg|page 42&lt;br /&gt;
Image:AWMG page43.jpg|page 43&lt;br /&gt;
Image:AWMG page44.jpg|page 44&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:CPC Firmware]]&lt;/div&gt;</summary>
		<author><name>2f1cafc</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=Amstrad_Whole_Memory_Guide_-_The_machine_pack&amp;diff=103706</id>
		<title>Amstrad Whole Memory Guide - The machine pack</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=Amstrad_Whole_Memory_Guide_-_The_machine_pack&amp;diff=103706"/>
				<updated>2019-09-26T13:21:38Z</updated>
		
		<summary type="html">&lt;p&gt;2f1cafc: OCR of page 22&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Broadly speaking, the Machine Pack is reponsible for the control of hardware peripherals, but it will be convenient to include the main initialisation processes under this heading, since they are largely concerned with peripheral setting-up.&lt;br /&gt;
&lt;br /&gt;
Several of the Machine Pack routines depend on the action of other routines to set up data. To understand this data in full, you need to read 'The Ins and Outs of the AMSTRAD CPC464', which gives full details of the peripheral codes. Only the more essential codes will be defined here.&lt;br /&gt;
&lt;br /&gt;
== MAIN RESET ==&lt;br /&gt;
&lt;br /&gt;
At switch—on, or in response to instruction code &amp;amp;C7, location 0000 is entered. At switch-on, lower ROM is enabled, but the ROM routines are later copied to the corresponding RAM locations in this area, so the enable state of the lower ROM is then unimportant. However, the first action of the reset routine is to output &amp;amp;89 to the Video Gate array on I/0 address 7FXX, and this enables lower ROM, disables upper ROM, and also sets up Mode 1. There being no further room in the RST Area the routine jumps to 0580 to continue reset action.&lt;br /&gt;
&lt;br /&gt;
Interrupt is disabled, and &amp;amp;82 is output to F7XX. This sets the PPI (Parallel Peripheral Interface) to output on ports A and C, input on port B. Zero outputs to F4XX and F6XX clear ports A and C, while an output of &amp;amp;7F to EFXX initialises the printer port.  Bit 7 is low, the other bits are high.&lt;br /&gt;
&lt;br /&gt;
The CRT Controller is then set up. There are two alternative sets of values for this, one for 50 Hz frame scan and the other for 60 Hz. The set to be used is determined by reading port B, bit 4. If this bit is true, 50 Hz values are used, while the 60 Hz values are used if the bit is false, this being determined by the presence of Link 4 on the main printed circuit board.&lt;br /&gt;
&lt;br /&gt;
The tables are read backwards, which can be a little confusing at first, and the outputs alternate between BCXX, which selects the register to be set, and BDXX, which performs the actual setting.&lt;br /&gt;
&lt;br /&gt;
Then MC START PROGRAM is entered at 060E with DE=065C and HL=0000. The contents of DE point to the display routine for the main title, which is called at an appropriate point. The zero value in HL means that ROM 0 will be entered at C006. This will normally invoke the BASIC interpreter, unless an external ROM responds to 0. C006 is the standard upper ROM entry point.&lt;br /&gt;
&lt;br /&gt;
Before discussing MC START PROGRAM, it will be convenient to look at a program which calls it, having first loaded the necessary data:&lt;br /&gt;
&lt;br /&gt;
== MC BOOT PROGRAM: BD13,05DC ==&lt;br /&gt;
&lt;br /&gt;
On entry to this function, HL must hold the address of a loading routine, which must be designed to return with carry set and the program start address in HL if the load is successful, or with carry clear if the load fails.&lt;br /&gt;
&lt;br /&gt;
The stack is reset by SP=C000, this being the normal stack position, and sound RESET is called to silence the Sound Generator. Interrupt is disabled, and &amp;amp;FF is output to port F8FF, requiring that all external peripherals devices should be reset.&lt;br /&gt;
&lt;br /&gt;
KL CHOKE OFF is called to clear the B100-B1BF area to zeroes, though the previous contents of (B1A9/B) are first saved.  (B1A9/A) holds the last-used foreground ROM entry address, which is copied to DE, while (B1AB) holds the last-used foreground ROM number, which is copied to B. (Note that the number of the ROM in current use is held in (B1A8), which is not preserved here.)  If (B1AB) holds &amp;amp;FF the routine returns with C, D and E all zeroed.&lt;br /&gt;
&lt;br /&gt;
Back in the main BOOT routine, HL is restored to its value on entry and DE, BC and HL are pushed. KM RESET is called to initialise the Key Manager, TXT RESET is called to initialise the text screen, assisted by a call to SCR RESET, and U ROM ENABLE is called to bring the upper ROM into action.&lt;br /&gt;
&lt;br /&gt;
HL is popped, and the loading program it defines is entered, using an odd little subroutine that consists solely of the JP (HL) instruction. BC and DE are popped.&lt;br /&gt;
&lt;br /&gt;
If the loader returned with carry set, MC START PROGRAM is entered at 060B. Otherwise, DE and HL are exchanged, putting the address obtained by KL CHOKE OFF into HL, C=B, and MC START PROGRAM is entered at 060E with DE=06E8, the entry address of a routine that reports 'LOAD FAILED'. The previously-selected ROM is entered.&lt;br /&gt;
&lt;br /&gt;
== MC START PROGRAM: BD16,060B ==&lt;br /&gt;
&lt;br /&gt;
If the normal entry to this function, at 060B, is used, DE is set to 0726 (pointing to a Return instruction), but it is also possible to enter at 060E, with DE pointing to a subroutine to be run during the latter part of the START PROGRAM routine. In either case, HL must hold the entry address to be used, and C must hold the number of the ROM to be employed, though the contents of C may be irrelevant if HL points to a RAM area.&lt;br /&gt;
&lt;br /&gt;
Interrupt is disabled, and interrupt mode 1 is selected. The alternative BC, DE and HL registers are brought into action.&lt;br /&gt;
&lt;br /&gt;
An output of 0 to DFXX selects upper ROM 0, and an output of &amp;amp;FF on I/0 address F8FF should reset external peripherals. Workspace in the B100-B8FF range is zeroed, and the Video Gate Array receives an output of &amp;amp;89 on address 7FXX. (Mode 1, enable lower, disable upper.) The normal BC, DE and HL registers are re-selected. XOR A zeroes A and clears carry, and EX AF ,AF' exchanges AF registers. This sets up the initial conditions required by the interrupt system.&lt;br /&gt;
&lt;br /&gt;
The stack pointer is again set to C000, its normal base, and HL, BC and DE are pushed. A series of calls then performs the main initialisation;&lt;br /&gt;
&lt;br /&gt;
* To 0044, copying the RAM routines from RAM, with KL CHOKE OFF following.&lt;br /&gt;
&lt;br /&gt;
* JUMP RESTORE resets the jumpblock entries.&lt;br /&gt;
&lt;br /&gt;
* KM INITIALISE resets the Key Manager.&lt;br /&gt;
&lt;br /&gt;
* SOUND RESET initialises the Sound system.&lt;br /&gt;
&lt;br /&gt;
* TXT INITIALISE initialises the Text VDU.&lt;br /&gt;
&lt;br /&gt;
* GRA INITIALISE initialises the Graphics VDU.&lt;br /&gt;
&lt;br /&gt;
* CAS INITIALISE initialises the Cassette Manager.&lt;br /&gt;
&lt;br /&gt;
* MC RESET PRINTER standardises the printer system.&lt;br /&gt;
&lt;br /&gt;
* SCR INITIALISE initialises the Screen Pack.&lt;br /&gt;
&lt;br /&gt;
The details of these routines will be examined in the appropriate place, but it can be said that everything - or nearly everything - is brought to a standard state. This can be annoying to someone who likes to set up non-standard conditions, but it has the great advantage that every program starts on the same basis.&lt;br /&gt;
&lt;br /&gt;
Interrupt is now enabled, and the routine defined in DE on entry is called. This may be the initial title display, or a 'load failed' report, as defined below. The main program then pops BG and HL and jumps to 0077, which is the actual entry routine.  This key routine is not accessible via the Jumpblock, which might be useful, because the system concept requires a fulll reset before a program is entered.&lt;br /&gt;
&lt;br /&gt;
If HL holds 0000, the default entry to C006 in ROM 0 is executed, but otherwise the ROM is defined in A and the entry address in HL.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|0077 || If HL=0000, HL=C006, A=0 || Default Values.&lt;br /&gt;
|-&lt;br /&gt;
|     || (B1A8)=A                 || ROM number.&lt;br /&gt;
|-&lt;br /&gt;
|     || (B1AB)=A                 || Part of qualifier.&lt;br /&gt;
|-&lt;br /&gt;
|     || (B1A9/A)=HL              || Qualifier address.&lt;br /&gt;
|-&lt;br /&gt;
|     || HL=ABFF                  || Initial HIMEM.&lt;br /&gt;
|-&lt;br /&gt;
|     || DE=0040                  || Initial LOMEM.&lt;br /&gt;
|-&lt;br /&gt;
|     || BC=B0FF                  || Top of usable memory.&lt;br /&gt;
|+ A FAR CALL DF A9 Bl enters the specified routine.  On return, a full reset from 0000 is executed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This completes the MG START PROGRAM routine, apart from the routines called near the end:&lt;br /&gt;
&lt;br /&gt;
065C This calls 0712, which reads port B, picking up bits 1-3, which are determined by links. According to the links set, the display announces that the name of the machine is one of the following:&lt;br /&gt;
&lt;br /&gt;
* Arnold&lt;br /&gt;
* Amstrad&lt;br /&gt;
* Orion&lt;br /&gt;
* Schneider&lt;br /&gt;
* Awa&lt;br /&gt;
* Solovox&lt;br /&gt;
* Saisho&lt;br /&gt;
* Triumph&lt;br /&gt;
* Isp&lt;br /&gt;
&lt;br /&gt;
The actual output to the display is handled by 06EB, which is also called with HL=066D to output the rest of the title, and finally with HL=0693 to complete the display.&lt;br /&gt;
&lt;br /&gt;
06E8 HL=@6F4, pointing to '&amp;lt;code&amp;gt;***PROGRAM LOAD FAILED***&amp;lt;/code&amp;gt;'&lt;br /&gt;
&lt;br /&gt;
== Scanned pages ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:AWMG page19.jpg|page 19&lt;br /&gt;
Image:AWMG page20.jpg|page 20&lt;br /&gt;
Image:AWMG page21.jpg|page 21&lt;br /&gt;
Image:AWMG page22.jpg|page 22&lt;br /&gt;
Image:AWMG page23.jpg|page 23&lt;br /&gt;
Image:AWMG page24.jpg|page 24&lt;br /&gt;
Image:AWMG page25.jpg|page 25&lt;br /&gt;
Image:AWMG page26.jpg|page 26&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:CPC Firmware]]&lt;/div&gt;</summary>
		<author><name>2f1cafc</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=Amstrad_Whole_Memory_Guide_-_The_machine_pack&amp;diff=103700</id>
		<title>Amstrad Whole Memory Guide - The machine pack</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=Amstrad_Whole_Memory_Guide_-_The_machine_pack&amp;diff=103700"/>
				<updated>2019-09-25T21:33:43Z</updated>
		
		<summary type="html">&lt;p&gt;2f1cafc: OCR'd page 21&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Broadly speaking, the Machine Pack is reponsible for the control of hardware peripherals, but it will be convenient to include the main initialisation processes under this heading, since they are largely concerned with peripheral setting-up.&lt;br /&gt;
&lt;br /&gt;
Several of the Machine Pack routines depend on the action of other routines to set up data. To understand this data in full, you need to read 'The Ins and Outs of the AMSTRAD CPC464', which gives full details of the peripheral codes. Only the more essential codes will be defined here.&lt;br /&gt;
&lt;br /&gt;
== MAIN RESET ==&lt;br /&gt;
&lt;br /&gt;
At switch—on, or in response to instruction code &amp;amp;C7, location 0000 is entered. At switch-on, lower ROM is enabled, but the ROM routines are later copied to the corresponding RAM locations in this area, so the enable state of the lower ROM is then unimportant. However, the first action of the reset routine is to output &amp;amp;89 to the Video Gate array on I/0 address 7FXX, and this enables lower ROM, disables upper ROM, and also sets up Mode 1. There being no further room in the RST Area the routine jumps to 0580 to continue reset action.&lt;br /&gt;
&lt;br /&gt;
Interrupt is disabled, and &amp;amp;82 is output to F7XX. This sets the PPI (Parallel Peripheral Interface) to output on ports A and C, input on port B. Zero outputs to F4XX and F6XX clear ports A and C, while an output of &amp;amp;7F to EFXX initialises the printer port.  Bit 7 is low, the other bits are high.&lt;br /&gt;
&lt;br /&gt;
The CRT Controller is then set up. There are two alternative sets of values for this, one for 50 Hz frame scan and the other for 60 Hz. The set to be used is determined by reading port B, bit 4. If this bit is true, 50 Hz values are used, while the 60 Hz values are used if the bit is false, this being determined by the presence of Link 4 on the main printed circuit board.&lt;br /&gt;
&lt;br /&gt;
The tables are read backwards, which can be a little confusing at first, and the outputs alternate between BCXX, which selects the register to be set, and BDXX, which performs the actual setting.&lt;br /&gt;
&lt;br /&gt;
Then MC START PROGRAM is entered at 060E with DE=065C and HL=0000. The contents of DE point to the display routine for the main title, which is called at an appropriate point. The zero value in HL means that ROM 0 will be entered at C006. This will normally invoke the BASIC interpreter, unless an external ROM responds to 0. C006 is the standard upper ROM entry point.&lt;br /&gt;
&lt;br /&gt;
Before discussing MC START PROGRAM, it will be convenient to look at a program which calls it, having first loaded the necessary data:&lt;br /&gt;
&lt;br /&gt;
== MC BOOT PROGRAM: BD13,05DC ==&lt;br /&gt;
&lt;br /&gt;
On entry to this function, HL must hold the address of a loading routine, which must be designed to return with carry set and the program start address in HL if the load is successful, or with carry clear if the load fails.&lt;br /&gt;
&lt;br /&gt;
The stack is reset by SP=C000, this being the normal stack position, and sound RESET is called to silence the Sound Generator. Interrupt is disabled, and &amp;amp;FF is output to port F8FF, requiring that all external peripherals devices should be reset.&lt;br /&gt;
&lt;br /&gt;
KL CHOKE OFF is called to clear the B100-B1BF area to zeroes, though the previous contents of (B1A9/B) are first saved.  (B1A9/A) holds the last-used foreground ROM entry address, which is copied to DE, while (B1AB) holds the last-used foreground ROM number, which is copied to B. (Note that the number of the ROM in current use is held in (B1A8), which is not preserved here.)  If (B1AB) holds &amp;amp;FF the routine returns with C, D and E all zeroed.&lt;br /&gt;
&lt;br /&gt;
Back in the main BOOT routine, HL is restored to its value on entry and DE, BC and HL are pushed. KM RESET is called to initialise the Key Manager, TXT RESET is called to initialise the text screen, assisted by a call to SCR RESET, and U ROM ENABLE is called to bring the upper ROM into action.&lt;br /&gt;
&lt;br /&gt;
HL is popped, and the loading program it defines is entered, using an odd little subroutine that consists solely of the JP (HL) instruction. BC and DE are popped.&lt;br /&gt;
&lt;br /&gt;
If the loader returned with carry set, MC START PROGRAM is entered at 060B. Otherwise, DE and HL are exchanged, putting the address obtained by KL CHOKE OFF into HL, C=B, and MC START PROGRAM is entered at 060E with DE=06E8, the entry address of a routine that reports 'LOAD FAILED'. The previously-selected ROM is entered.&lt;br /&gt;
&lt;br /&gt;
== MC START PROGRAM: BD16,060B ==&lt;br /&gt;
&lt;br /&gt;
If the normal entry to this function, at 060B, is used, DE is set to 0726 (pointing to a Return instruction), but it is also possible to enter at 060E, with DE pointing to a subroutine to be run during the latter part of the START PROGRAM routine. In either case, HL must hold the entry address to be used, and C must hold the number of the ROM to be employed, though the contents of C may be irrelevant if HL points to a RAM area.&lt;br /&gt;
&lt;br /&gt;
Interrupt is disabled, and interrupt mode 1 is selected. The alternative BC, DE and HL registers are brought into action.&lt;br /&gt;
&lt;br /&gt;
An output of 0 to DFXX selects upper ROM 0, and an output of &amp;amp;FF on I/0 address F8FF should reset external peripherals. Workspace in the B100-B8FF range is zeroed, and the Video Gate Array receives an output of &amp;amp;89 on address 7FXX. (Mode 1, enable lower, disable upper.) The normal BC, DE and HL registers are re-selected. XOR A zeroes A and clears carry, and EX AF ,AF' exchanges AF registers. This sets up the initial conditions required by the interrupt system.&lt;br /&gt;
&lt;br /&gt;
The stack pointer is again set to C000, its normal base, and HL, BC and DE are pushed. A series of calls then performs the main initialisation;&lt;br /&gt;
&lt;br /&gt;
* To 0044, copying the RAM routines from RAM, with KL CHOKE OFF following.&lt;br /&gt;
&lt;br /&gt;
* JUMP RESTORE resets the jumpblock entries.&lt;br /&gt;
&lt;br /&gt;
* KM INITIALISE resets the Key Manager.&lt;br /&gt;
&lt;br /&gt;
* SOUND RESET initialises the Sound system.&lt;br /&gt;
&lt;br /&gt;
* TXT INITIALISE initialises the Text VDU.&lt;br /&gt;
&lt;br /&gt;
* GRA INITIALISE initialises the Graphics VDU.&lt;br /&gt;
&lt;br /&gt;
* CAS INITIALISE initialises the Cassette Manager.&lt;br /&gt;
&lt;br /&gt;
== Scanned pages ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:AWMG page19.jpg|page 19&lt;br /&gt;
Image:AWMG page20.jpg|page 20&lt;br /&gt;
Image:AWMG page21.jpg|page 21&lt;br /&gt;
Image:AWMG page22.jpg|page 22&lt;br /&gt;
Image:AWMG page23.jpg|page 23&lt;br /&gt;
Image:AWMG page24.jpg|page 24&lt;br /&gt;
Image:AWMG page25.jpg|page 25&lt;br /&gt;
Image:AWMG page26.jpg|page 26&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:CPC Firmware]]&lt;/div&gt;</summary>
		<author><name>2f1cafc</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=Amstrad_Whole_Memory_Guide_-_The_machine_pack&amp;diff=103699</id>
		<title>Amstrad Whole Memory Guide - The machine pack</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=Amstrad_Whole_Memory_Guide_-_The_machine_pack&amp;diff=103699"/>
				<updated>2019-09-25T19:44:05Z</updated>
		
		<summary type="html">&lt;p&gt;2f1cafc: /* MC Boot Program: BD13,05DC */OCR page 20&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Broadly speaking, the Machine Pack is reponsible for the control of hardware peripherals, but it will be convenient to include the main initialisation processes under this heading, since they are largely concerned with peripheral setting-up.&lt;br /&gt;
&lt;br /&gt;
Several of the Machine Pack routines depend on the action of other routines to set up data. To understand this data in full, you need to read 'The Ins and Outs of the AMSTRAD CPC464', which gives full details of the peripheral codes. Only the more essential codes will be defined here.&lt;br /&gt;
&lt;br /&gt;
== Main Reset ==&lt;br /&gt;
&lt;br /&gt;
At switch—on, or in response to instruction code &amp;amp;C7, location 0000 is entered. At switch-on, lower ROM is enabled, but the ROM routines are later copied to the corresponding RAM locations in this area, so the enable state of the lower ROM is then unimportant. However, the first action of the reset routine is to output &amp;amp;89 to the Video Gate array on I/0 address 7FXX, and this enables lower ROM, disables upper ROM, and also sets up Mode 1. There being no further room in the RST Area the routine jumps to 0580 to continue reset action.&lt;br /&gt;
&lt;br /&gt;
Interrupt is disabled, and &amp;amp;82 is output to F7XX. This sets the PPI (Parallel Peripheral Interface) to output on ports A and C, input on port B. Zero outputs to F4XX and F6XX clear ports A and C, while an output of &amp;amp;7F to EFXX initialises the printer port.  Bit 7 is low, the other bits are high.&lt;br /&gt;
&lt;br /&gt;
The CRT Controller is then set up. There are two alternative sets of values for this, one for 50 Hz frame scan and the other for 60 Hz. The set to be used is determined by reading port B, bit 4. If this bit is true, 50 Hz values are used, while the 60 Hz values are used if the bit is false, this being determined by the presence of Link 4 on the main printed circuit board.&lt;br /&gt;
&lt;br /&gt;
The tables are read backwards, which can be a little confusing at first, and the outputs alternate between BCXX, which selects the register to be set, and BDXX, which performs the actual setting.&lt;br /&gt;
&lt;br /&gt;
Then MC START PROGRAM is entered at 060E with DE=065C and HL=0000. The contents of DE point to the display routine for the main title, which is called at an appropriate point. The zero value in HL means that ROM 0 will be entered at C006. This will normally invoke the BASIC interpreter, unless an external ROM responds to 0. C006 is the standard upper ROM entry point.&lt;br /&gt;
&lt;br /&gt;
Before discussing MC START PROGRAM, it will be convenient to look at a program which calls it, having first loaded the necessary data:&lt;br /&gt;
&lt;br /&gt;
== MC Boot Program: BD13,05DC ==&lt;br /&gt;
&lt;br /&gt;
On entry to this function, HL must hold the address of a loading routine, which must be designed to return with carry set and the program start address in HL if the load is successful, or with carry clear if the load fails.&lt;br /&gt;
&lt;br /&gt;
The stack is reset by SP=C000, this being the normal stack position, and sound RESET is called to silence the Sound Generator. Interrupt is disabled, and &amp;amp;FF is output to port F8FF, requiring that all external peripherals devices should be reset.&lt;br /&gt;
&lt;br /&gt;
KL CHOKE OFF is called to clear the B100-B1BF area to zeroes, though the previous contents of (B1A9/B) are first saved.  (B1A9/A) holds the last-used foreground ROM entry address, which is copied to DE, while (B1AB) holds the last-used foreground ROM number, which is copied to B. (Note that the number of the ROM in current use is held in (B1A8), which is not preserved here.)  If (B1AB) holds &amp;amp;FF the routine returns with C, D and E all zeroed.&lt;br /&gt;
&lt;br /&gt;
Back in the main BOOT routine, HL is restored to its value on entry and DE, BC and HL are pushed. KM RESET is called to initialise the Key Manager, TXT RESET is called to initialise the text screen, assisted by a call to SCR RESET, and U ROM ENABLE is called to bring the upper ROM into action.&lt;br /&gt;
&lt;br /&gt;
HL is popped, and the loading program it defines is entered, using an odd little subroutine that consists solely of the JP (HL) instruction. BC and DE are popped.&lt;br /&gt;
&lt;br /&gt;
== Scanned pages ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:AWMG page19.jpg|page 19&lt;br /&gt;
Image:AWMG page20.jpg|page 20&lt;br /&gt;
Image:AWMG page21.jpg|page 21&lt;br /&gt;
Image:AWMG page22.jpg|page 22&lt;br /&gt;
Image:AWMG page23.jpg|page 23&lt;br /&gt;
Image:AWMG page24.jpg|page 24&lt;br /&gt;
Image:AWMG page25.jpg|page 25&lt;br /&gt;
Image:AWMG page26.jpg|page 26&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:CPC Firmware]]&lt;/div&gt;</summary>
		<author><name>2f1cafc</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=Amstrad_Whole_Memory_Guide_-_The_display_system&amp;diff=103698</id>
		<title>Amstrad Whole Memory Guide - The display system</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=Amstrad_Whole_Memory_Guide_-_The_display_system&amp;diff=103698"/>
				<updated>2019-09-25T19:29:27Z</updated>
		
		<summary type="html">&lt;p&gt;2f1cafc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In all, the Display System takes up some 4000 bytes of code and fixed data in ROM, and its workspace spans about 380 bytes of RAM, not to mention the 16K byte screen RAM. There are more than 100 entry points. Fortunately, the system divides into three maln parts:&lt;br /&gt;
&lt;br /&gt;
* The Screen Pack deals directly with screen handling, colour selection and screen read and write.&lt;br /&gt;
&lt;br /&gt;
* The Text VDU handles matters relating to text display, including the implementation of stream selection. It also deals with the control codes and their parameters.&lt;br /&gt;
&lt;br /&gt;
* The Graphics VDU handles the graphic display.&lt;br /&gt;
&lt;br /&gt;
Each of these parts requires a chapter to itself, but it will be useful to offer some general information first.&lt;br /&gt;
&lt;br /&gt;
== The Screen RAM ==&lt;br /&gt;
&lt;br /&gt;
In theory, the Screen RAM could be any 16K byte area of memory starting at a multiple of 4000, but the 8000-BFFF block would overwrite workspace and RAM routines, while 0000-3FFF would overwrite the RST Area, so the choice narrows to 4000-7FFF or C000-FFFF, and it is usually more convenient to adopt the latter area, leaving the central half of RAM free for other purposes.&lt;br /&gt;
&lt;br /&gt;
The Screen RAM is accessed by the Video Gate Array on a basis of addresses supplied by the CRT Controller, but the addresses are not used in a straightforward manner. The CRT Controller embodies two counters. One, output on RA0-RA4, is incremented&lt;br /&gt;
&lt;br /&gt;
== Scanned pages ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:AWMG page39.jpg|page 39&lt;br /&gt;
Image:AWMG page40.jpg|page 40&lt;br /&gt;
Image:AWMG page41.jpg|page 41&lt;br /&gt;
Image:AWMG page42.jpg|page 42&lt;br /&gt;
Image:AWMG page43.jpg|page 43&lt;br /&gt;
Image:AWMG page44.jpg|page 44&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:CPC Firmware]]&lt;/div&gt;</summary>
		<author><name>2f1cafc</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=Amstrad_Whole_Memory_Guide_-_The_machine_pack&amp;diff=103697</id>
		<title>Amstrad Whole Memory Guide - The machine pack</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=Amstrad_Whole_Memory_Guide_-_The_machine_pack&amp;diff=103697"/>
				<updated>2019-09-25T19:08:01Z</updated>
		
		<summary type="html">&lt;p&gt;2f1cafc: /* Main Reset */subsection&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Broadly speaking, the Machine Pack is reponsible for the control of hardware peripherals, but it will be convenient to include the main initialisation processes under this heading, since they are largely concerned with peripheral setting-up.&lt;br /&gt;
&lt;br /&gt;
Several of the Machine Pack routines depend on the action of other routines to set up data. To understand this data in full, you need to read 'The Ins and Outs of the AMSTRAD CPC464', which gives full details of the peripheral codes. Only the more essential codes will be defined here.&lt;br /&gt;
&lt;br /&gt;
== Main Reset ==&lt;br /&gt;
&lt;br /&gt;
At switch—on, or in response to instruction code &amp;amp;C7, location 0000 is entered. At switch-on, lower ROM is enabled, but the ROM routines are later copied to the corresponding RAM locations in this area, so the enable state of the lower ROM is then unimportant. However, the first action of the reset routine is to output &amp;amp;89 to the Video Gate array on I/0 address 7FXX, and this enables lower ROM, disables upper ROM, and also sets up Mode 1. There being no further room in the RST Area the routine jumps to 0580 to continue reset action.&lt;br /&gt;
&lt;br /&gt;
Interrupt is disabled, and &amp;amp;82 is output to F7XX. This sets the PPI (Parallel Peripheral Interface) to output on ports A and C, input on port B. Zero outputs to F4XX and F6XX clear ports A and C, while an output of &amp;amp;7F to EFXX initialises the printer port.  Bit 7 is low, the other bits are high.&lt;br /&gt;
&lt;br /&gt;
The CRT Controller is then set up. There are two alternative sets of values for this, one for 50 Hz frame scan and the other for 60 Hz. The set to be used is determined by reading port B, bit 4. If this bit is true, 50 Hz values are used, while the 60 Hz values are used if the bit is false, this being determined by the presence of Link 4 on the main printed circuit board.&lt;br /&gt;
&lt;br /&gt;
== Scanned pages ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:AWMG page19.jpg|page 19&lt;br /&gt;
Image:AWMG page20.jpg|page 20&lt;br /&gt;
Image:AWMG page21.jpg|page 21&lt;br /&gt;
Image:AWMG page22.jpg|page 22&lt;br /&gt;
Image:AWMG page23.jpg|page 23&lt;br /&gt;
Image:AWMG page24.jpg|page 24&lt;br /&gt;
Image:AWMG page25.jpg|page 25&lt;br /&gt;
Image:AWMG page26.jpg|page 26&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:CPC Firmware]]&lt;/div&gt;</summary>
		<author><name>2f1cafc</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=Amstrad_Whole_Memory_Guide_-_The_machine_pack&amp;diff=103696</id>
		<title>Amstrad Whole Memory Guide - The machine pack</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=Amstrad_Whole_Memory_Guide_-_The_machine_pack&amp;diff=103696"/>
				<updated>2019-09-25T19:07:08Z</updated>
		
		<summary type="html">&lt;p&gt;2f1cafc: section headers, rewrap&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Chapter 3: The Machine Pack ==&lt;br /&gt;
&lt;br /&gt;
Broadly speaking, the Machine Pack is reponsible for the control of hardware peripherals, but it will be convenient to include the main initialisation processes under this heading, since they are largely concerned with peripheral setting-up.&lt;br /&gt;
&lt;br /&gt;
Several of the Machine Pack routines depend on the action of other routines to set up data. To understand this data in full, you need to read 'The Ins and Outs of the AMSTRAD CPC464', which gives full details of the peripheral codes. Only the more essential codes will be defined here.&lt;br /&gt;
&lt;br /&gt;
=== Main Reset ===&lt;br /&gt;
&lt;br /&gt;
At switch—on, or in response to instruction code &amp;amp;C7, location 0000 is entered. At switch-on, lower ROM is enabled, but the ROM routines are later copied to the corresponding RAM locations in this area, so the enable state of the lower ROM is then unimportant. However, the first action of the reset routine is to output &amp;amp;89 to the Video Gate array on I/0 address 7FXX, and this enables lower ROM, disables upper ROM, and also sets up Mode 1. There being no further room in the RST Area the routine jumps to 0580 to continue reset action.&lt;br /&gt;
&lt;br /&gt;
Interrupt is disabled, and &amp;amp;82 is output to F7XX. This sets the PPI (Parallel Peripheral Interface) to output on ports A and C, input on port B. Zero outputs to F4XX and F6XX clear ports A and C, while an output of &amp;amp;7F to EFXX initialises the printer port.  Bit 7 is low, the other bits are high.&lt;br /&gt;
&lt;br /&gt;
The CRT Controller is then set up. There are two alternative sets of values for this, one for 50 Hz frame scan and the other for 60 Hz. The set to be used is determined by reading port B, bit 4. If this bit is true, 50 Hz values are used, while the 60 Hz values are used if the bit is false, this being determined by the presence of Link 4 on the main printed circuit board.&lt;br /&gt;
&lt;br /&gt;
== Scanned pages ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:AWMG page19.jpg|page 19&lt;br /&gt;
Image:AWMG page20.jpg|page 20&lt;br /&gt;
Image:AWMG page21.jpg|page 21&lt;br /&gt;
Image:AWMG page22.jpg|page 22&lt;br /&gt;
Image:AWMG page23.jpg|page 23&lt;br /&gt;
Image:AWMG page24.jpg|page 24&lt;br /&gt;
Image:AWMG page25.jpg|page 25&lt;br /&gt;
Image:AWMG page26.jpg|page 26&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:CPC Firmware]]&lt;/div&gt;</summary>
		<author><name>2f1cafc</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=Amstrad_Whole_Memory_Guide_-_The_machine_pack&amp;diff=103695</id>
		<title>Amstrad Whole Memory Guide - The machine pack</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=Amstrad_Whole_Memory_Guide_-_The_machine_pack&amp;diff=103695"/>
				<updated>2019-09-25T19:00:25Z</updated>
		
		<summary type="html">&lt;p&gt;2f1cafc: ocr'd page 19&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Chapter 3 in the book [[Amstrad Whole Memory Guide]].&lt;br /&gt;
&lt;br /&gt;
Chapter 3&lt;br /&gt;
THE MACHINE PACK&lt;br /&gt;
&lt;br /&gt;
Broadly speaking, the Machine Pack is reponsible for the control of&lt;br /&gt;
hardware peripherals, but it will be convenient to include the main&lt;br /&gt;
initialisation processes under this heading, since they are largely&lt;br /&gt;
concerned with peripheral setting-up.&lt;br /&gt;
&lt;br /&gt;
Several of the Machine Pack routines depend on the action of&lt;br /&gt;
other routines to set up data. To understand this data in full,&lt;br /&gt;
you need to read 'The Ins and Outs of the AMSTRAD CPC464', which&lt;br /&gt;
gives full details of the peripheral codes. Only the more&lt;br /&gt;
essential codes will be defined here.&lt;br /&gt;
&lt;br /&gt;
Main Reset&lt;br /&gt;
&lt;br /&gt;
At switch—on, or in response to instruction code &amp;amp;C7, location 0000 is&lt;br /&gt;
entered. At switch-on, lower ROM is enabled, but the ROM routines are&lt;br /&gt;
later copied to the corresponding RAM locations in this area, so the&lt;br /&gt;
enable state of the lower ROM is then unimportant. However, the first&lt;br /&gt;
action of the reset routine is to output &amp;amp;89 to the Video Gate array&lt;br /&gt;
on I/0 address 7FXX, and this enables lower ROM, disables upper ROM,&lt;br /&gt;
and also sets up Mode 1. There being no further room in the RST Area&lt;br /&gt;
the routine jumps to 0580 to continue reset action.&lt;br /&gt;
&lt;br /&gt;
Interrupt is disabled, and &amp;amp;82 is output to F7XX. This sets the&lt;br /&gt;
PPI (Parallel Peripheral Interface) to output on ports A and C,&lt;br /&gt;
input on port B. Zero outputs to F4XX and F6XX clear ports A and&lt;br /&gt;
C, while an output of &amp;amp;7F to EFXX initialises the printer port.&lt;br /&gt;
Bit 7 is low, the other bits are high.&lt;br /&gt;
&lt;br /&gt;
The CRT Controller is then set up. There are two alternative sets of&lt;br /&gt;
values for this, one for 50 Hz frame scan and the other for 60 Hz. The&lt;br /&gt;
set to be used is determined by reading port B, bit 4. If this bit is&lt;br /&gt;
true, 50 Hz values are used, while the 60 Hz values are used if the&lt;br /&gt;
bit is false, this being determined by the presence of Link 4 on the&lt;br /&gt;
main printed circuit board.&lt;br /&gt;
&lt;br /&gt;
== Scanned pages ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:AWMG page19.jpg|page 19&lt;br /&gt;
Image:AWMG page20.jpg|page 20&lt;br /&gt;
Image:AWMG page21.jpg|page 21&lt;br /&gt;
Image:AWMG page22.jpg|page 22&lt;br /&gt;
Image:AWMG page23.jpg|page 23&lt;br /&gt;
Image:AWMG page24.jpg|page 24&lt;br /&gt;
Image:AWMG page25.jpg|page 25&lt;br /&gt;
Image:AWMG page26.jpg|page 26&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:CPC Firmware]]&lt;/div&gt;</summary>
		<author><name>2f1cafc</name></author>	</entry>

	</feed>