Technically speaking, Layer 1,1 is the same as Layer 0 with extra colour capabilities however NextBASIC treats them differently to maintain a consistent way of addressing the extra capabilities of the ZX Spectrum Next's EnhancedULA. The legacy coordinate system we discussed above applies only on Layer 0, whereas Layers 1 and 2 use the new system.
There are three major differences between Layer 0 and Layers 1 and 2 as far as character positioning goes. There are more differences but we will examine these in turn in the special graphics Chapters 15 – 17. These are:
With the exception of Layer 0, which has, as we mentioned, a rigid organisation of character positions on screen in a 32 x 24 character matrix, all other layers have the ability to position characters either rigidly as above (ie. in a rows x columns matrix) or freely according to pixel position of each character matrix's top left corner.
Character size can be modified horizontally with the following sequence:
PRINT CHR$ 30; CHR$ n;
where n can be a number from 3 to 8, which sets the width of all characters displayed on screen from a minimum of 3 to a maximum of 8 pixels wide. Character size is modified vertically by issuing:
PRINT CHR$ 29; CHR$ n;
where n can be a number from 0 to 3, which sets the height of all characters displayed on screen to the following predetermined heights in pixels:
| Value of n | Size (pixels) | Description |
|---|---|---|
| 0 | 8 | Normal Size |
| 1 | 16 | Double Size |
| 2 | 6 | Reduced Size |
| 3 | 12 | Double Reduced Size |
These sequences which are more appropriately called control codes, are character size shortcuts for text windows. These can also be used on Layer 0 but you would need to open a window first when in that mode. The rest of the layers have predefined and pre-opened full-screen text windows and therefore these control codes work there by default. We will discuss text windows at length in Chapter 20 – Channels, Streams and Windows so for now keep these two control codes in mind as only working outside Layer 0. They are extremely important to know, as they modify the behaviour of the AT and TAB modifiers we will examine below.
You have already seen PRINT used quite a lot, so you will have a rough idea of how it is used. Expressions whose values are printed are called PRINT items, and they are separated by commas, semicolons and apostrophes, which are called PRINT separators. A PRINT item can also be nothing at all, which is a way of explaining what happens when you
ZX Spectrum Next User Manual, 3rd Edition (ISBN 978-1-5272-5496-1), written and illustrated by Phoebus R. Dokos. Copyright © 2020-2024 Phoebus Dokos / SpecNext Ltd. Licensed under CC BY-NC-SA 4.0. This is a transcription and can contain errors; check any doubt against the printed page.