In this episode we start talking about everything related to the graphics of our beloved MSX. Given the amount of commands and functions, it will be divided into several episodes. But before we get started I want to talk about a simple command that allows us to change the number of columns for text screens.
WIDTH(Number of columns). As mentioned above, it is valid only for alphanumeric screens (SCREEN 0 and SCREEN 1, you will understand later in the explanation, when I talk about the SCREEN command). When starting the MSX1 Basic it is set to 37 columns with SCREEN 0, we can change the settings by typing: WIDHT 40, by doing so we have brought the columns to the maximum allowed. On SCREEN1 however, by default it is 29 columns, and can be increased up to 32. Be careful, if we try to insert a greater number than that allowed by the SCREENS, the MSX will signal an error message.
SCREEN
The SCREEN command changes the settings of the screen we have to work on.
Its syntax is: SCREEN [Mode],[DimSprite],[Click],[SpeedLoad],[Print]
Let's go in order. The Basic MSX can have 4 work screens. They are:
SCREEN 0; text only does not accept any graphic or sprite commands. It is the default when starting Basic MSX. . We use it for the most part, to insert our listings or for some text programs. Its Matrix is 40 X 24.
SCREEN 1; I call it a hybrid screen, meaning essentially it's a text screen, the use of sprites is allowed and we can create in a series of eight letters with a foreground and background color. The use of graphical commands is not permitted. Its matrix is 32 X 24
SCREEN 2; so-called high resolution graphics screen. It is composed of a grid of 256 X 192 dots (pixels), we can use all the graphic commands and sprites and we can color series of 8 You cannot use text commands, such as PRINT, LOCATE, etc.
SCREEN 3: Low resolution graphics mode. Its grid is 64 x 48. Sprites can be used and we can color one pixel at a time. Text commands are not allowed here either.
Sprite Size: initializes the size of the sprites. If it is set to zero, their grid is 8 X 8. If it is set to 1 it is still an 8 X 8 sprite but with double the size. If it is set at 2 the grid is 16 X 16 and finally at 3, 16 x 16 doubled (you will understand better when I talk about the sprites).
Click: activates and deactivates key clicking. If it is 0 you will not hear anything, if it is 1 you will. By default it is 1
Loading speed: used when we load game cassettes or programs from the recorder. By inserting 1 charge at 1200 baund, 2 at 2400 baund.
Printer. There are only 2 options, if it is set to zero we can use the graphic printer if it is different from zero, non-graphic printer.
COLOR
The COLOR command is used to set the colors of the screen. It has 3 options:
COLOR Foreground, Background, Border. The foreground is everything we write, the fonts for text screens, the drawings for graphics. The background is the rest of the screen while the border is the side parts where writing or drawing is not allowed. On SCREEN 0 the border is not displayed. We have the possibility to choose 16 colors for all 3 options. Below I insert the table with the relevant codes.
0 Transparent
1 Black
2 Green
3 Light green
4 Blue
5 Light blue
6 Brick Red
7 Turquoise
8 Red Orange
9 Orange
10 Dark yellow
11 Yellow
12 Dark green
13 Margenta
14 Grey
15 White
In most graphics commands there is a color code as an option, if this is omitted it will automatically take the foreground color. This also applies to the text. It is not mandatory to use all 3 options, but only the one we want to vary. For example, we want to vary the Background, just add an empty field on the first option: COLOR ,15. Or foreground and border: COLOR 1,,8. An important thing for graphic SCREENS!! If we want to apply the color change to the entire screen we must initialize it with the CLS command.
And that's it. See you in the next episode. There is still so much to talk about. Stay tuned to this channel 😉
Thank you all
Orazio Cacciola


Hi Orazio, I wanted to ask about the click function (to activate, deactivate the key sound) I tried the command on an msx and msx2 emulator (bluemsx;fmsx) but it gives me a synthax error....why?
Good morning Alberto,
To activate or deactivate the click of the keys, as you have surely read, it is the third item of the SCREEN command. You can use it at the beginning when you define the screen to use (text or graphics). If you use screen 0 i.e. text, you will have to skip the second item, since the size of the Sprites in text mode is not active. The command to give is: SCREEN 0,,0. As you can see I left the second option empty because as I said before it is that of the Sprite sizing. I put 0 to deactivate it if then, in the continuation of the program I want to activate it I can insert the following command: SCREEN ,,1. Here too I left 2 free spaces.
For any other information I am always available, do not hesitate to write to me. Thank you and have a nice day.