Skip to content

mvac7/SDCC_VDP_SPRITES_S_MSXROM_Lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VDP SPRITES Small 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 functions to directly access to sprites of the TMS9918A.

It is a small library that only provides the basic functions to operate sprites: one to erase the sprite data in VRAM and another to display Sprites.

Contains the PUTSPRITE function similar to that of MSX BASIC.

It is complemented with the VDP TMS9918A MSX ROM Library, necessary for the initialization of the screen (screen and sprites mode).

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.

This library is part of the MSX fR3eL Project.

Enjoy it!

About the Sprite libraries

I'm developing several libraries for the management of MSX Sprites, both for the creation of ROMs (using the BIOS), and MSX-DOS executables.

They are designed for the development of applications for the first generation of MSX but some of the variations are directed in how certain functions behave when using the G3 mode of the video processor V9938 and thus be able to take advantage of it, when it is executed in a MSX2 or higher.

The projected libraries are the following:

  • 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).
  • SPRITE 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.
  • SPRITE 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.

To optimize our development, I recommend building your library with only those functions you need.

I have yet to develop a library to work with the multi-colored Sprites of the V9938.

History of versions

  • v1.2 (22/12/2020) Removed sprite mode initialization functions.
  • v1.1 (2/02/2017)
  • v1.0 ?

Requirements

Acknowledgments

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

Functions

  • void ClearSprites() - Initialises all sprite data.
  • void PUTSPRITE(char plane, char x, char y, char color, char pattern) - Displays the sprite pattern.

About

Open Source library with basic functions for initialization and visualization of sprites.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published