My MSX experiments for Mini-LD 45

Posted by
September 21st, 2013 8:22 am

I started learning to program on the MSX. Back in the day I mixed BASIC and some assembly code with the aid of the trusty MSX Red Book. So for this Mini-LD I decided to go back to it and try to make something in pure assembly language. I am using z80asm to build the “cartridge” binary and OpenMSX to run it. After so much time, I really needed help to remember things like memory organization, BIOS calls etc. I found very helpful information at the MSX Assembly Pages and the MSX Info Pages.

I have set up a GitHub repository with the source code of my experiments and hopefully, the full game if I get to it:

My first “experiment” was the good old “Hello, World!” program (hello.asm). In this case it also loops receiving text input and displaying it on-screen. Nothing fancy, but good enough to test the tools setup and information about the cartridge header.


The second experiment involved switching to graphics mode, setting up a sprite, and moving it with the cursor keys (interact.asm). Main loop timing is achieved in a crude way: since the video display processor generates an interrupt at 50Hz or 60Hz (depending on the system), I simply use an HALT instruction at the end of the loop step. It is funny to think that I can get away with it since the machine is dedicated to running a single program. It is also a joy not to have to worry about word alignment, large memory spaces etc.


In the third experiment I tried to use a technique that, if I remember well, was common in MSX games: using part of the character table as a tile set to build the game levels, in 32×24 text mode. Each group of 8 characters can have a different combination of two colors. Storing a room map this way is probably not a good idea as it takes 768 bytes. I am thinking of either doing some simple compression or using less tiles per room…


So far, that is all I have… It has been a lot of fun to make, due to the fond memories brought back by this. I will not have much of my weekend available for the jam, but I will try to submit a small, complete game…



Leave a Reply

You must be logged in to post a comment.

[cache: storing page]