Skip to content

mvac7/SDCC_MSX_fR3eL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MSX fR3eL SDCC Libraries Project

title logo


Project info

ArchitectureMSX
EnvironmentROM, MSX-DOS or MSX BASIC
FormatSDCC Relocatable object file (.rel)
CompilerSDCC v4.4


Attention, please!

Z80 calling conventions
Some libraries aren't adapted to the improvements added in the new SDCC releases (Z80 calling conventions), so they won't work.
I'm working on adapting them and adding improvements.
Thank you for your patience.

This project is WORK IN PROCESS.

This project is not finished and I cannot guarantee its completion.

There are no libraries for disk access (MSX-DOS).

There are no libraries for hardware like the superior VDPs (V9938 or V9958), or PSGs like the SCC, FM, ...

The project is alive, so it may undergo changes.

I'm currently adapting the library code to the Z80 calling conventions included in SDCC version 4.1.12. #5 I'm taking this opportunity to add improvements and reorganize the different parts of the project, which is why it's taking longer than expected. Among these changes, I'm renaming the projects so they're more easily identifiable. #6

You can use it freely, but keep in mind that there are better and more complete libraries, such as Fusion-C by Eric Boez, MSXgl by Aoineko or libmsx by Daishi Mori. (See section C Libraries or Engines for MSX).

The choice is yours.

Thanks for waiting.

mvac7 aka a0rante



About MSX fR3eL Project

This repository compiles all the fR3eL libraries for the development in C language of MSX applications with the SDCC cross compiler.

It also provides startups (CRTs) and Makefiles for different types of application formats (ROM or MSX-DOS), in a C project structure prepared to start a new project.

Most of the libraries use the BIOS of the MSX System, with what is achieved lightness and compatibility but not speed.

It will not be a problem, for most of the cases where the use is controlled, but if you need to perform tasks that work with large volumes of data (such as dynamic graphics), you may need to program more optimal functions and adapted to the requirements of your project.

Unlike other libraries that are more homogeneous, here you can find in some cases several libraries addressing the same task in different ways (as in the case of SPRITES). That is so you can choose the solution that best suits your needs.

You can improve them, cut what you need or transform them to other compilers, for your personal projects or you can share them with the community.



Authors:

This project has been developed mainly by mvac7, but includes code and ideas contributed by numerous developers who share their knowledge with the MSX community. I add here a list of people who have participated directly or indirectly, in recognition of their work.

  • mvac7 (Coder and project manager)
  • Avelino Herrera (Knowledge)
  • Konamiman (CRTs and Knowledge)
  • Fubukimaru (Linux Makefiles and documentation fixes)
  • Ramones (Mouse Library)
  • AndreaR (Mouse Library SDCC adaptation and Knowledge)
  • S.V.Bulba (PT3 Player)
  • Dioniso (PT3 Player MSX adaptation),
  • MSXKun (PT3 Player improvements and Knowledge)
  • SapphiRe (ayFX Player and PT3 Player improvements)
  • WYZ (WYZ Player)
  • baze - Includes a 16-bit integer to ASCII conversion routine, based on num2Dec16


License

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.



Requirements



Acknowledgments

I want to give a special thanks everyone who selflessly shares information and code, as they contribute to continued development and extend the life of retro platforms.


  • MSX Assembly Page > WEB
  • MSX Resource Center > WEB
  • Portar MSX Tech Doc > WEB
  • Karoshi MSX Community > WEB


Project Structure

Uses a standard structure for C projects:

/bin			<--- final file (ROM, COM or BIN)
/build			<--- compiler output files
/crt0			<--- SDCC startup files (CRT)
/include		<--- general and library includes from fR3eL
/libs			<--- fR3eL libraries
/src			<--- source code
MAKEFILE.BAT	<--- Windows script
makefile		<--- Linux script

In the c_project_structure folder you will find the basis for starting a project for different MSX environments.

  • MSX 32K ROM
  • MSX 8 or 16K ROM (at 4000h address)
  • MSX 8 or 16K ROM (at 8000h address)
  • MSX-DOS (without parameters)
  • MSX-DOS with parameters


Startup files (CRT)

Library Description
crt0_MSX816kROM4000 MSX 8/16K 4000h ROM startup file (CRT)
crt0_MSX816kROM8000 MSX 8/16K 8000h ROM startup file (CRT)
crt0_MSX32kROM4000 MSX 32K 4000h ROM startup file (CRT)
crt0_MSXDOS Simple CRT for MSX-DOS applications without parameters
crt0_MSXDOS_advanced Advanced CRT for MSX-DOS applications with parameter input


List of Libraries

They are divided into three groups, since in some cases they have been developed to work in specific execution environments:

  • with BIOS (ROM or MSX BASIC)
  • without BIOs (MSX-DOS)
  • for any of the environments

Note:
Libraries that do not specify an environment can be used in ROM, MSX-DOS or MSX BASIC

General Pourpose

  • MSX Memory C function library for accessing Z80 memory and slots/subslots on MSX computers. Project - DOC
    • memory_Z80.rel Provides you with functions to read or write to the memory.
    • memory_Slots_MSX.rel Allows you to configure the pages of the slots and subslots.
  • Interrupt M1 Libraries to work with Z80 Mode 1 interrupts. Project - DOC
    • interruptM1_ISR.rel Functions to control the Interrupt Service Routine (ISR).
    • interruptM1_Hooks.rel Functions to control the MSX system interrupt hooks.
  • Keyboard - Library with Basic functions for reading the keyboard of MSX computers. Project - DOC
    • keyboard_MSXBIOS Uses the MSX BIOS. It takes up very little memory. ROM or MSX BASIC
    • keyboard_MSXDOS Uses the MSX BIOS functions via inter-slot call (CALSLT). MSX-DOS
  • Joystick - Library with basic functions for reading Joystick controllers or Cursor Keys. Project - DOC
    • joystick_MSX Does not use the MSX BIOS. For all environments.
    • joystick_MSXBIOS Uses the MSX BIOS. It takes up very little memory. ROM or MSX BASIC
  • String Basics - Basic functions for the managing C Strings. Project - DOC

Video

  • VDP_TMS9918A - Library with basic functions to work with the TMS9918A video processor. Project - DOC
  • VDP_TMS9918A_MSXBIOS - Library with basic functions to work with the TMS9918A video processor. ROM or MSX BASIC Project - DOC
  • VDP_SPRITES - Library for directly accessing sprite attributes from the TMS9918A/28A/29A video processor._ Project - DOC
  • VDP_PRINT Library for displaying text strings in TMS9918A graphics modes (Graphic1 and Graphic2). Project - DOC
  • Textmode - with functions for developing text-mode applications. Includes functions for screen initialization and printing of texts and numbers. Project - DOC
    • textmode_MSXBIOS Uses the MSX BIOS. It takes up very little memory. ROM or MSX BASIC
    • textmode_MSXDOS Uses the MSX BIOS functions via inter-slot call (CALSLT). MSX-DOS

Pending conversion to SDCC v4.4

  • Mouse - Basic functions for reading mouse controller of MSX computers. Project
  • WRLE decompress (aka RLEWB) - C Library for decompress WRLE data encoding. Project
  • PSG AY-3-8910 RT Library - Basic functions to work with PSG AY-3-8910 or compatible. Project - DOC
  • PSG AY-3-8910 BF Library - Library to access the internal or external PSG AY-3-8910 through a Buffer. Project - DOC
  • PSG ayFX Player Library - Play ayFX effects for the PSG AY-3-8910 (requires AY38910BF library) Project - DOC
  • PT3 Player Library for MSX - SDCC PT3 Player (Vortex Tracker) Library for MSX (requires AY38910BF library) Project - DOC
  • WYZ Player Library for MSX - SDCC WYZ Tracker Player Library for MSX. Project

Deprecated

  • PSG AY-3-8910 playFX Library - Functions for playing sound effects with the AY-3-8910. Project


fR3eL AY Sound System

The AY38910BF, PT3player and ayFXplayer libraries are designed to work together, so you will have a system to provide music and effects in game development.

AY Sound System



fR3eL's Development Tools





Projects that use fR3eL



Development resources

Libraries or Engines for MSX Cross-Platform Development in C

  • Libraries for SDCC SDCC by Avelino Herrera WEB
  • Libraries for SDCC SDCC by Konamiman WEB
  • Fusion-C SDCC by Eric Boez gitHub
  • MSXgl SDCC by Aoineko gitHub The MSX Game Library in C language
  • RetroDeluxe Game Engine SDCC by Retro DeLuxe gitHub
  • libmsx SDCC by Daishi Mori (mori0091) gitHub
  • MSXLib SDCC by Marq WEB --> Get it with svn co svn://www.kameli.net/marq/msxlib
  • sdcc-msx SDCC by Manuel Martinez Torres gitHub
  • ubox MSX lib SDCC by Juan J. Martinez gitLab · WEB
  • GFX lib Hitech-C by Janonne gitHub

Development Tools

  • nMSXtiles - Tiles and Sprites Editor for MSX in SC2 and SC4 graphic mode - by Pentacour and PipaGerardo
  • 99x8Edit - Graphic editor for systems based on TI TMS9918 and Yamaha V9938 - by Yusuke Miyauchi
  • png2msx - Tools for graphics and data in MSX. - by PipaGerardo
  • PCXTOOLS - MSX cross-development command line tools PNG2MSX, PNG2SPR[+] and TMX2BIN - by theNestruo
  • IMG2SPR Sprite generator utility - by AndreaR
  • MSX Pixel Tools - Convert PNG images into sprites and tilesets to be used by the MSX in screen 2 mode - by Juan J. Martínez (reidrac)
  • CMSXbin - Convert binary to text file - By Guillaume "Aoineko" Blanchard
  • CMSXimg - Command line tool to create images table to add to MSX programs (C/ASM/Bin) - by Guillaume "Aoineko" Blanchard
  • CMSXmath - Command line tool to create pre-calculated mathematics tables - by Guillaume "Aoineko" Blanchard
  • MSX Tile Forge - A Pallete, Tile, Supertile, Palette, and Map Editor for MSX, built with Python and Tkinter - by DamnedAngel

MSX Emulators


Documentation

MSX


Tutorials

  • MoltSXalats - Blog about programming with FUSION-C - English - Català - Español
  • Tutorial práctico de desarrollo de videojuegos para ordenadores MSX (por Frederic García Nieto) > PDF

MSX Hardware

VDP TMS9918A

  • Texas Instruments TMS9918A application manual PDF
  • Texas Instruments VDP Programmer's Guide PDF
  • Texas Instruments TMS9918A VDP by Sean Young TXT
  • The MSX Red Book · 2 Video Display Processor

VDP V9938


VDP V9958

  • V9958 Technical Data Book PDF

PSG AY-3-8910


Programming languages

About

La Fril, mola mil! (WORK IN PROCESS)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published