NOTE: This repository is no longer actively maintained; it is here for people who prefer to work with wla-dx. I have created a new template that uses ASxxxx instead. I think ASxxxx is the superior assembler/linker to wla-dx, so YMMV.
This is a simple project template for creating a program on a MSX cartridge.
Find more informations about MSX cartridges on the MSX Wiki.
Here is the list of tools you need to use this repository:
Simple use git
to clone this repository:
git clone https://github.com/georgjz/msx-cart-project-template.git msxcart
cd msxcart
cmake -S . -Bbuild
cmake --build build
This will create a ROM file called msx-cartridge-template
in the build/
directory. You can load this ROM into a MSX emulator. You can change the ROM file name by modifying line 6 of the Makefile.
The resulting ROM file will be a simple 16KB ROM. To change this, modify src/include/MemoryMap.inc
to fit your needs.
Refer to CMakeLists.txt
and src/CMakeLists.txt
to see how to add additional sources and include directories.
After all source files are assembled by wla-z80, a simple Haskell script found in tools/generatelinkfile.hs
will generate the necessary link file to link the final ROM.
The example code is very simple at the moment. I plan to add something a bit more complex in the future. The code in src/Main.s
will simply call the BEEP
($00c0
) function from the MSX BIOS.
You can test it with OpenMSX:
openmsx -cart build/msx-cartridge-template
After the loading screen, you should hear a short beep sound. After that, the machine will continue with it's normal start up routine.
I'm a total newbie when it comes to MSX development, so any kind of feedback, bug reports, pull requests, etc. is highly appreciated and encouraged!
Here's a list of useful links to resources about MSX programming:
- The MSX Wiki has tons of informations, down to the memory maps of individual MSX machines.
- Néstor Soriano aka Konamiman has several repositories relating to MSX and Z80 programming, including this excellent MSX2 Technical Handbook how the MSX works.
- A complete list of all the functions in the MSX BIOS.