Contents |
Available VDP screen modes
VRAM Map varies depending on the screen mode used. Below are all screen mode available on MSX VDPs.
Screen Mode | Type | Colors | Sprites | VDP |
---|---|---|---|---|
Text 1 | 24 x 40 characters of 6 x 8 | 2 | None | All VDPs |
Text 2 | 24 x 80 characters of 6 x 8 | 2 (4 possible) | None | V9938 & V9958 |
Graphic 1 | 24 x 32 characters of 8 x 8 | 16 (2 per character) | Mode 1 | All VDPs |
Graphic 2 | 256 x 192 | 16 (2 each line of a tile) | Mode 1 | All VDPs |
Multicolor | 64 x 48 | 16 | Mode 1 | All VDPs |
Graphic 3 | 256 x 192 | 16 (2 each line of a tile) | Mode 2 | V9938 & V9958 |
Graphic 4 | 256 x 212 | 16 | Mode 2 | V9938 & V9958 |
Graphic 5 | 512 x 212 | 4 | Mode 2 | V9938 & V9958 |
Graphic 6 | 512 x 212 | 16 | Mode 2 | V9938 & V9958 |
Graphic 7 | 256 x 212 | 256, 12599 or 19268 | Mode 2 | V9938 & V9958 |
Notes:
- Graphic 1 mode is actually a text mode, but the charset always can be filled with game graphics, and sprites can also be used.
- Multicolor mode is a graphic mode, using 4×4 pixel blocks.
- V9938 & V9958 have a RGB color palette of 512 colors for each color except in graphic 7 mode.
Values in control registers
These modes are selectable with M1-M5 bits of the VDP control registers 0 and 1 as shown in the following table.
Mode | M5 | M4 | M3 | M2 | M1 |
---|---|---|---|---|---|
Text 1 | 0 | 0 | 0 | 0 | 1 |
Text 2 | 0 | 1 | 0 | 0 | 1 |
Graphic 1 | 0 | 0 | 0 | 0 | 0 |
Graphic 2 | 0 | 0 | 1 | 0 | 0 |
Multicolor | 0 | 0 | 0 | 1 | 0 |
Graphic 3 | 0 | 1 | 0 | 0 | 0 |
Graphic 4 | 0 | 1 | 1 | 0 | 0 |
Graphic 5 | 1 | 0 | 0 | 0 | 0 |
Graphic 6 | 1 | 0 | 1 | 0 | 0 |
Graphic 7 | 1 | 1 | 1 | 0 | 0 |
To check these values, a simple BASIC program is enough - example for SCREEN 3 - Multicolor mode (that will also confirm that M1 bit precedes M2 bit in register 1, contrary to the logic in register 0 with M5, M4 and M3 bits):
10 OPEN"GRP:" A5 1 20 SCREEN 3 30 PRINT #1,BIN$(VDP(0)) 40 PRINT #1,BIN$(VDP(1)) 50 GOTO 50
VRAM size
All MSX1 computers have 16kB of VRAM.
MSX2 computers can have 64kB or 128kB.
MSX2+ and Turbo R computers have 128kB.
V9938 and V9958 can support up to 192kB but this extra 64kB is not standardized. Users that added it will only be able to access it with VDP commands.
VRAM representation
In most documentations, VRAM is represented like below.
General VRAM map | |||
---|---|---|---|
1FFFFh | |||
64kB upper | |||
0FFFFh | |||
64kB lower | Extra 64kB | ||
00000h | |||
This representation is correct but it omits the case of Graphic 6 and 7 modes that can be important in the event of switching from one mode to another without necessarily having to initialize the VRAM.
Indeed MSXs with 128kB VRAM use 4 RAM chips. Two chips are used for 64kB lower and the two other for 64kB upper in all modes up to the graphic 5 mode. In graphic 6 and 7 modes, the chips are used by interleaving the even and odd vertical lines compared to lower screen modes. This configuration slightly speeds up access to VRAM.
Correspondance with BASIC screen modes
Now let's see how the MSXs system uses these VDP's screen modes.
The system can have up to 12 screen modes. These modes use VDP's screen modes as follows.
MSX SCREEN Mode | VDP Screen Mode | MSX Generation | Notes |
---|---|---|---|
SCREEN 0 | Text 1 | MSX1 | |
SCREEN 0 | Text 2 | MSX2 | In 80 columns mode only (WIDTH >40) |
SCREEN 1 | Graphic 1 | MSX1 | |
SCREEN 2 | Graphic 2 | MSX1 | |
SCREEN 3 | Multicolor | MSX1 | |
SCREEN 4 | Graphic 3 | MSX2 | |
SCREEN 5 | Graphic 4 | MSX2 | |
SCREEN 6 | Graphic 5 | MSX2 | |
SCREEN 7 | Graphic 6 | MSX2 | 128kB VRAM required |
SCREEN 8 | Graphic 7 | MSX2 | 128kB VRAM required |
SCREEN 9 | Graphic 5 | Korean MSX2 | Zemmix consoles use the graphic 4 mode when WIDTH <41 |
SCREEN 10 | Graphic 7 | MSX2+ | Colors coded in RGB & YJK (Tracing done in RGB) |
SCREEN 11 | Graphic 7 | MSX2+ | Colors coded in RGB & YJK (Tracing done in YJK) |
SCREEN 12 | Graphic 7 | MSX2+ | Graphic 7 mode with colors coded in YJK |
- The colors coding is set in full YJK or hybrid RGB & YJK with the register 25.
- KANJI modes use graphic 4 or 6 mode (see CALL KANJI for details)