Skip to content

mvac7/SDCC_VDP_TMS9918A_MSXROM_Lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VDP TMS9918A MSX ROM SDCC Library (fR3eL Project)

Author: mvac7 [mvac7303b@gmail.com]
Architecture: MSX
Format: C Object (SDCC .rel)
Programming language: C and Z80 assembler

Description

Open Source library with basic functions to work with the TMS9918A video processor.

It uses the functions from the MSX BIOS, so it is designed to create applications in ROM format.

Use them for developing MSX applications using Small Device C Compiler (SDCC) cross compiler.

In the source code (\examples), you can find applications for testing and learning purposes.

If you need specific functions to manage Sprites, you can use any of the following libraries:

  • SPRITES Small - Basic functions for managing Sprites. It is more compact so it takes up less space in our application.
  • SPRITES - It includes the same functions as the Small version and adds to access specific parameters (positioning, color, pattern, visibility and EarlyClock).
  • SPRITES 1/2 - Same as SPRITES but in the G3 screen mode (V9938), it treats the color parameters in a simplified way. Assign the color parameters and EarlyClock to all the lines of the Sprites.
  • SPRITES DUMP (In development) - Uses a buffer in RAM that has to be dumped in each interruption. Includes a Sprite Flicker, to allow viewing up to 8 sprites per line.

You also have the VDP PRINT MSX SDCC Library, with functions for display text strings in the graphic modes of the TMS9918A (G1 and G2).

This library is part of the MSX fR3eL Project.

Enjoy it!

History of versions

  • v1.2 (22/12/2020) Conversion to source in C and added Sprite initialization functions.
  • v1.1 (14/02/2014)
  • v1.0 (11/02/2014)

Requirements

Acknowledgments

I want to give a special thanks to all those who freely share their knowledge with the MSX developer community.

Functions

  • void SCREEN(char) - Sets the display mode of the screen.
  • void SetSpritesSize(char size) - Set size type for the sprites.
  • void SetSpritesZoom(boolean zoom) - Set zoom type for the sprites.
  • void COLOR(char, char, char) - Specifies the ink, foreground and background colors.
  • void VPOKE(unsigned int, char) - Writes a byte to the video RAM.
  • char VPEEK(unsigned int) - Reads data from the video RAM.
  • void FillVRAM(unsigned int, unsigned int, char) - Fill a large area of the VRAM of the same byte.
  • void CopyToVRAM(unsigned int, unsigned int, unsigned int) - Block transfer from memory to VRAM.
  • void CopyFromVRAM(unsigned int, unsigned int, unsigned int) - Block transfer from VRAM to memory.
  • void SetVDP(char, char) - Writes a value in VDP registers.

Documentation

  • Texas Instruments TMS9918A application manual (PDF)
  • Texas Instruments VDP Programmer’s Guide (PDF)
  • Texas Instruments TMS9918A VDP by Sean Young (TXT)
  • 9938 Technical Data Book (PDF) (TXT)
  • 9958 Technical Data Book (PDF)
  • Portar Doc Video Display Processor WEB

About

Basic functions to work with the TMS9918A video processor using the MSX BIOS.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published