| Architecture | MSX |
| Environment | ROM, MSX-DOS or MSX BASIC |
| Format | SDCC Relocatable object file (.rel) |
| Compiler | SDCC v4.4 |
| 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
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.
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
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.
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.
- Avelino Herrera >
WEB - Nerlaska >
Blog - Marq/Lieves!Tuore >
MarqLieves!Tuore - MSXKun/Paxanga soft >
WEB - Fubukimaru
gitHub - AndreaR >
Blog - Sapphire/Z80ST >
WEB - Fernando García >
Video Tutorial - Ramones >
MSXblog-MSXbanzai - Eric Boez >
gitHub - WYZ
WEB - S.V.Bulba >
WEB - Dioniso >>
? - PipaGerardo
gitHub - Ramón de las Heras
@pentacour - Néstor Sancho (theNestruo)
gitHub - Baze >
WEB - Guillaume "Aoineko" Blanchard >
gitHub - Konamiman
gitHubWEB
- MSX Assembly Page >
WEB - MSX Resource Center >
WEB - Portar MSX Tech Doc >
WEB - Karoshi MSX Community >
WEB
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
| 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 |
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 |
- 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.
ROMorMSX BASIC - keyboard_MSXDOS Uses the MSX BIOS functions via inter-slot call (CALSLT).
MSX-DOS
- keyboard_MSXBIOS Uses the MSX BIOS. It takes up very little memory.
- 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.
ROMorMSX BASIC
- String Basics - Basic functions for the managing C Strings.
Project-DOC
- 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.
ROMorMSX BASICProject-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.
ROMorMSX BASIC - textmode_MSXDOS Uses the MSX BIOS functions via inter-slot call (CALSLT).
MSX-DOS
- textmode_MSXBIOS Uses the MSX BIOS. It takes up very little memory.
- 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
- PSG AY-3-8910 playFX Library - Functions for playing sound effects with the AY-3-8910.
Project
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.
WYZtoSDCCobj Converter Tool- WYZ to C Object Converter Tool for WYZ Player MSX SDCC LibraryPT3toCdata Converter Tool- Vortex PT3 to C data Converter Tool
WYZ Trackerby Augusto RuizVortex Trackerby Sergey Bulba
AY Sound FX Editorby ShiruAY Sound FX Editor (Improved)by Shiru and Robin Verhagen-Guest
- The Alan Randoms Project (TARP) Random music maker for MSX computers.
- Libraries for SDCC
SDCCby Avelino HerreraWEB - Libraries for SDCC
SDCCby KonamimanWEB - Fusion-C
SDCCby Eric BoezgitHub - MSXgl
SDCCby AoinekogitHubThe MSX Game Library in C language - RetroDeluxe Game Engine
SDCCby Retro DeLuxegitHub - libmsx
SDCCby Daishi Mori (mori0091)gitHub - MSXLib
SDCCby MarqWEB--> Get it with svn co svn://www.kameli.net/marq/msxlib - sdcc-msx
SDCCby Manuel Martinez TorresgitHub - ubox MSX lib
SDCCby Juan J. MartinezgitLab·WEB - GFX lib
Hitech-Cby JanonnegitHub
nMSXtiles- Tiles and Sprites Editor for MSX in SC2 and SC4 graphic mode - by Pentacour and PipaGerardo99x8Edit- Graphic editor for systems based on TI TMS9918 and Yamaha V9938 - by Yusuke Miyauchipng2msx- Tools for graphics and data in MSX. - by PipaGerardoPCXTOOLS- MSX cross-development command line tools PNG2MSX, PNG2SPR[+] and TMX2BIN - by theNestruoIMG2SPRSprite generator utility - by AndreaRMSX 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" BlanchardCMSXimg- Command line tool to create images table to add to MSX programs (C/ASM/Bin) - by Guillaume "Aoineko" BlanchardCMSXmath- Command line tool to create pre-calculated mathematics tables - by Guillaume "Aoineko" BlanchardMSX Tile Forge- A Pallete, Tile, Supertile, Palette, and Map Editor for MSX, built with Python and Tkinter - by DamnedAngel
OpenMSXEmulatorBlueMSXEmulatorMeiseiemulator - by Hap and PipaGerardoWebMSXEmulator >>gitHub- by Paulo A. PeccinMSXPenMSX Developer Playground & Code Editor in the Browser - by Rafael JannonefMSX- by Marat Fayzullin
- MSX2 Technical Handbook
- The MSX Red Book
- MSX Assembly Page
- Portar MSX Tech Doc
- MSX Resource Center · Development Wiki
- 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
- 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
- V9938 Technical Data Book
PDFTXT - V9938 Programmers Guide
PDF - Portar Doc Video Display Processor
- V9958 Technical Data Book
PDF
- GI AY-3-8910 Datasheet
PDF - The MSX Red Book 3. Programmable Sound Generator
- Z80 Assembler - z80 Heaven
- Wikibooks C Programming

