Difference between revisions of "Rasters"

From CPCWiki - THE Amstrad CPC encyclopedia!
Jump to: navigation, search
(Created page with 'In programation, the raster is often referred as the act to modify the setting of inks between 2 scanlines. This is a way to display more than the usual Video modes number o…')
 
m (typo)
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
In programation, the raster is often referred as the act to modify the setting of inks between 2 scanlines.
+
"Raster" is a demo term which refers to the act of modifying the colours while the picture is being drawn by the display (TV or monitor). This is done to display more than the usual [[Video modes]] number of colours.
  
This is a way to display more than the usual [[Video modes]] number of colours.
+
The display draws one line every 64microseconds, with the whole image drawn at a frequency of 50Hz.
 +
The [[CPU]] ([[Z80]]) runs at about 4 MHz. Most instructions are multiples of a microsecond and this makes timing for making rasters easy.
  
The time between the display of 2 Scanlines by the CRTC allow the CPU to order the Gate array to modify the setting of inks.
+
The traditional raster is made by changing the colour for one pen once each line creating a horizontal bar of colour.
  
The screen display at 50Hz...The [[CPU]] ([[Z80]]) runs at about 4 MgHz.
+
But changing the colours can be used to have different areas of the screen in different colours, e.g. for a status panel and a game area.
  
So It has enough cycles between 2 scanlines to order this.
+
It is also a good technic to display very coloured layers.
  
You can also use Split rasterto "actually" display 2  different screens, sometoimes with different Video Modes.
+
==Raster==
  
 +
Here I will refer to the traditional raster, where the colour for one pen is changed once each line. The final result is usually a horizontal bar of colour that covers the whole width of the screen.
  
 +
==Split Rasters==
  
 +
Split rasters are made by changing the colour for one pen more than once on each line. The final result is usually more than one horizontal bar of colour side by side covering the whole width of the screen.
  
==Links==
+
==Raster scroll==
  
 +
This is a form of split raster, but where the position of the first raster is offset each frame. The effect is that the entire split raster moves in the horizontal. If you then move the bars accross the screen then you can make the bars scroll. Ultimately, this can be used to form letters and a horizontal scrolling message.
 +
 +
==Diagonal rasters==
 +
 +
This is a form of traditional raster, but instead of timing to ensure that colours are always changed at the same time on each successive line, the timing is altered so that the colours occur at successively earlier positions on succeeding lines. The effect can be done by ensuring each line does not take 64 cycles, but instead 63 or less cycles depending on the effect wanted.
 +
 +
 +
==Examples of Raster effect in Games==
 +
*Some GX4000 games are CPC games which include Rasters effect to add colours.
 +
**Crazy Car 2 : extra colours layer in the sky.
 +
**Fire and Forget 2 : Idem.
 +
**Switchblade : also a good Red layer.
 +
 +
*[[Striker in the Crypts of Trogan]] : one of the rare games in Mode 1 with "massive" use of in-game rasters (not only in the [[HUD]] actually).
 +
This games looks a lot like Switchblade indeed...It is  a mod of the Switchblade engine.
 +
Yet there is a pseudo Colour attribute clash : when monster pass from one raster to another, they change colour.
 +
 +
==Examples of Raster Effect in Demos==
 +
 +
==Links==
  
 
*[http://en.wikipedia.org/wiki/Raster Wikipedia link to Raster concepts]
 
*[http://en.wikipedia.org/wiki/Raster Wikipedia link to Raster concepts]
 +
*[http://en.wikipedia.org/wiki/Raster_interrupt Wikipedia on Raster-interrupt]
  
 
==CPCWiki Links==
 
==CPCWiki Links==
Line 27: Line 52:
  
 
*[[Synchronising with the CRTC and display]]
 
*[[Synchronising with the CRTC and display]]
 
  
 
*[[Programming:Simple Raster Example 1]]
 
*[[Programming:Simple Raster Example 1]]

Latest revision as of 09:13, 3 January 2012

"Raster" is a demo term which refers to the act of modifying the colours while the picture is being drawn by the display (TV or monitor). This is done to display more than the usual Video modes number of colours.

The display draws one line every 64microseconds, with the whole image drawn at a frequency of 50Hz. The CPU (Z80) runs at about 4 MHz. Most instructions are multiples of a microsecond and this makes timing for making rasters easy.

The traditional raster is made by changing the colour for one pen once each line creating a horizontal bar of colour.

But changing the colours can be used to have different areas of the screen in different colours, e.g. for a status panel and a game area.

It is also a good technic to display very coloured layers.

Raster

Here I will refer to the traditional raster, where the colour for one pen is changed once each line. The final result is usually a horizontal bar of colour that covers the whole width of the screen.

Split Rasters

Split rasters are made by changing the colour for one pen more than once on each line. The final result is usually more than one horizontal bar of colour side by side covering the whole width of the screen.

Raster scroll

This is a form of split raster, but where the position of the first raster is offset each frame. The effect is that the entire split raster moves in the horizontal. If you then move the bars accross the screen then you can make the bars scroll. Ultimately, this can be used to form letters and a horizontal scrolling message.

Diagonal rasters

This is a form of traditional raster, but instead of timing to ensure that colours are always changed at the same time on each successive line, the timing is altered so that the colours occur at successively earlier positions on succeeding lines. The effect can be done by ensuring each line does not take 64 cycles, but instead 63 or less cycles depending on the effect wanted.


Examples of Raster effect in Games

  • Some GX4000 games are CPC games which include Rasters effect to add colours.
    • Crazy Car 2 : extra colours layer in the sky.
    • Fire and Forget 2 : Idem.
    • Switchblade : also a good Red layer.

This games looks a lot like Switchblade indeed...It is a mod of the Switchblade engine. Yet there is a pseudo Colour attribute clash : when monster pass from one raster to another, they change colour.

Examples of Raster Effect in Demos

Links

CPCWiki Links