9

The three official video modes described on the CPC wiki are all bitmap modes, and this page mentions that the "screen is bitmapped. You must draw/erase your own sprites and text."

So what was the standard way of generating text on the screen, scrolling it, and so on? Were there ROM routines that most programs used, or was it just left up to the individual programs to do it with their own code? Was there any special hardware support to help with text and, particularly, scrolling? Were there standard text "modes," used by most programs and, if so, what were they?

Also, since the CPC was normally sold with a monitor, were text modes with more than 40 columns per line frequently used? I am guessing that with a monitor (particularly the monochrome one) the usual color vs. resolution issues on TVs could be avoided and so 64, 71 or even 80 column modes might be common, especially for business software.

13

All text is painted as bitmaps.

The highest-resolution built-in mode is 640x200 pixels, so that provides an 80x25 text mode. 80-column modes were used in business software (e.g. DBase II) and even in the CP/M 2.2 and 3.0 OS.

The CPC uses a CRTC6845, which is wired up atypically to create linear scan lines but nevertheless can still hardware scroll in multiples of 8 lines. So a hardware text scroll is available.

Firmware routines are provided to establish text windows, move the cursor, set colours, optionally set a custom font, and to paint text. So they're there if you want to use them.

The disk-based CPCs came with an implementation of CP/M that emulates the control codes of a Zenith Z19.

On clarity, I grabbed the following from a Youtube video demonstrating the 6128 hardware showing 80-column text on a real CPC:

enter image description here

So you can see that the screen is very sharp at that resolution; the colour screen received just as sharp a signal as the green screen shown, being a full RGB connection. But see @rwallace's comment re: dot pitch; the best video evidence I could find is unfortunately a glancing shot:

enter image description here

Though I think that at least establishes the absence of most of the standard computer-with-a-TV artefacts, at least for the era when only France could boast wide adoption of Peritel/SCART.

6
  • 2
    'the colour screen was just as sharp as the green screen shown, being a full RGB connection' - are you sure? I was given to understand that while the RGB connection helped, the color screen was a low-cost color TV tube whose dot pitch was still not fine enough to make 80 column text usable.
    – rwallace
    Aug 2 '19 at 9:58
  • 1
    @rwallace see around 04:50 in youtu.be/ndkQdDWGMdM ; that Youtube video has some saturation issues but it's the best I've so far found. I'll keep looking.
    – Tommy
    Aug 2 '19 at 11:53
  • 4
    @rwallace - the colour screen was okay for 80 column text. Not super crisp, but good enough for word processing. It was my first computer, and saw me through university essays.
    – scruss
    Aug 2 '19 at 23:16
  • 4
    Also my first computer, and green screen monitor was very sharp, you could count every individual pixel in Mode 2 easily. Years later I got a color monitor, and somehow the pixels were not as sharp.
    – neuro_sys
    Jan 26 '20 at 11:20
  • 3
    I had both monitors. The green screen was very clear in 80 column text, I used Mini Office in it as a word processor. The colour monitor was barely readable, so I believe the pixels were less sharp. In the other hand this made games look less pixelated on the colour screen. Feb 24 '20 at 20:57
9

To elaborate on drawing text on Amstrad CPC and its screen addressing:

  1. The first row of every character position on screen is at the memory address range from &c000 to &c7ff, and thus can be calculated as &c000 + y * 80 + x.
FOR I=&C000 to &C7FF: POKE I, &FF: NEXT

enter image description here

  1. The subsequent lines of every character are &800 bytes apart from each other. For instance, each address line for the character at &c000 is calculated with &c000 + y * &800.

With this information, you can render text using a routine like this:

10 MODE 2
20 DATA &18,&3c,&7e,&ff,&ff,&7e,&3c,&18  : ' Load some 8 by 8 bitmap data
30 INPUT "x pos";x :INPUT "y pos";y
34 '
35 ' Text render begin
36 '
40 addr = &C000 + y * 80 + x             : ' Calculate screen start address
60 FOR y0 = 0 TO 7                       : ' For 8 pixels high
70 READ p                                : ' Read pixel data
80 POKE addr, p                          : ' Poke it at screen address
90 addr = addr + &800                    : ' Calculate next line's screen address
100 NEXT
105 '
106 ' Text render end
107 '
110 END

enter image description here

For more information you can have a look at my personal notes about Amstrad CPC display generation (and some more) here:

https://neuro-sys.github.io/2019/10/01/amstrad-cpc-crtc.html

3

The Amstrad CPC range supported 3 basic screen modes:

mode 0 - 160x200, or 20x25 characters, with a palette of 16 colours

mode 1 - 320x200, or 40x25 characters, with a palette of 4 colours

mode 2 - 640x200, or 80x25 characters, with a palette of 2 colours

Any of these colours could be selected from a total palette of 27 colours, which is based on 3 settings (off, half intensity, full intensity) for red, green and blue.

Of course, it provided a complete standard 7-bit, 128 character ASCII character set, as part of its 256 total character set which, by default, provided a range of graphics symbols including some fractions, 16 Greek characters mostly used in maths, other useful symbols as well as a typical range of boxes, bars and blocks for creating graphical elements.

The entire 256 symbol character set is re-definable, even from BASIC, with simple commands, so it has the ability to produce, as text, any symbol that can be created in an 8x8 grid.

The firmware provided ability to place these characters anywhere on screen, and of course the built in BASIC interpreter allowed full, standard control over these - the usual LOCATE x,y, PRINT, etc.

Where this differs from many systems of the era, and what CPC Wiki is referring to, is that there is no seperate "text" mode. All modes can mix text and graphics at will. Nor is the text output limited to a fixed grid - you can actually locate the cursor to any pixel and trigger a standard firmware text output, even from BASIC.

What it does lack is support for hardware sprites - basically larger multicolour characters that can be moved on-screen. Programmers had to implement these in machine code.

The result was that generally, games used mode 0 to access the maximum colour palette, while business programs used mode 2 for the 80x25 text that was standard at the time. The machine would actually run CP/M and emulate a Zenith/Heath terminal which meant a huge range of industry standard software of the era could be run, such as dBASE II, Wordstar, MS BASIC, Turbo Pascal, etc.

(p.s. some comments suggest the colour monitor was not suitable for the 80x25 text mode. I owned one for many years and can vouch that it was perfectly decent and useable for its time. Was it the best? No... but there were also a lot of worse looking displays back in the 80s!)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.