| Name | VDP_PRINT |
| Architecture | MSX |
| Environment | ROM, MSX BASIC or MSX-DOS |
| Format | C Object (SDCC .rel) |
| Programming language | C and Z80 assembler |
| Compiler | SDCC v4.4 or newer |
C function library for displaying text strings in TMS9918A graphics modes (Graphic1 and Graphic2).
You can use this library to develop applications for ROM, MSXBASIC or MSX-DOS environments, using the Small Device C Compiler (SDCC) cross compiler.
Requires the VDP_TMS9918A Library to write to the VRAM and so that you can start the graphics modes.
- for all environments VDP_TMS9918A Library. (Fast but takes up more space).
- for only ROM and MSX BASIC (Use BIOS) VDP_TMS9918A_MSXBIOS Library. (Small but slow).
You can access the documentation here with How to use the library.
These libraries are part of the MSX fR3eL Project.
This project is open source under the MIT license. You can add part or all of this code in your application development or include it in other libraries/engines.
Enjoy it!
| Note: |
|---|
| The function to convert a 16-bit value to ASCII (num2Dec16) is an adaptation of a routine included in Baze's Z80 routine collection. |
(dd/mm/yyyy)
- v1.4 (20/06/2025) update to SDCC (4.1.12) Z80 calling conventions; Remove GetStringLength
- v1.3 (27/09/2021) Add VLOCATE; Remove VPrintString and VPrintNum
- v1.2 (16/04/2021) VPRINTN string size control
- v1.1 (09/09/2020)
- v1.0 (04/02/2016) First version
| Name | Declaration | Description |
|---|---|---|
| VLOCATE | VLOCATE(column, line) |
Moves the cursor to the specified location |
| VPRINT | VPRINT(text) |
Prints a string of characters on the screen |
| VPRINTN | VPRINTN(text, length) |
Prints a character string with a limited length on the screen |
| VPrintNumber | VPrintNumber(value) |
Prints a number (char or unsigned int) |
| VPrintFNumber | VPrintFNumber(value, emptyChar, length) |
Prints a number on the screen with formatting parameters |
| num2Dec16 | num2Dec16(value, textParameters) |
Converts a number to a String |
The project includes several examples that I have used to test the library and that can help you learn how to use this library.
You can find them in the examples/ folder.
Example included in the HOWTO document.
Example where all the functions of the VDP_PRINT library are tested in the ROM environment.
Example where all the functions of the VDP_PRINT library are tested in the MSX-DOS environment.