Assembler Setup

Everything about programming, including VDP and Sound programming.
Post Reply
User avatar
Posts: 127
Joined: 12 Aug 2012 16:08

Assembler Setup

Post by thewiz » 14 Nov 2015 19:55


I've been working on a setup to be able to write games in assembler. I've sent it to Dave who is happy to host it on his site. Thanks Dave.

It takes over the machine, setting up its own VDP interrupt, scans for the joystick and incorporates PSGLib, a library for playing VGM music and SFX files.

Written by sverex, it can be found at

Z80 ASM library (and C conversion/compression tools) to allow replay of VGMs as background music/SFX in SEGA Master System / SEGA Game Gear homebrew programs.

There are two projects as the moment, one which generates the code to be loaded by a BASIC loader, and another which generates the code as part of the Basic.

There is a makefile to generate a MAIN.mtx file. The makefile can be edited to generate MAIN.mtx for a MTX500 or MTX512. Note the MTX500 loader will still work on a MTX512.

Currently there is code to test the features, such as the vdp interrupt and joystick reading. The Code project plays the music from Sonic the Hedgehog level 1, with the Basic project plays Rainbow Island.

Currently there is no support for sprites and I am going to be adding an Event system.

The idea is an Event will trigger after N VDP interrupts and call a function at the end of the interrupt. The idea is to set a number of Events, e.g. next time to read the Joystick, decrement a timer, animate a sprite etc.

If anyone has any ideas or code that would be useful when writing games please let me know.

Note as interrupts can happen at any time, including between two OUT (2) instructions, all VDP communication should be done via the interrupt or when interrupts are disabled.

All feedback is welcome.
THIS is what Memotech is doing now.

User avatar
Posts: 766
Joined: 11 Aug 2012 18:16

Re: Assembler Setup

Post by Dave » 15 Nov 2015 17:11

The webpage is here . . . . ... ass_pd.htm

Please download the file, try it and submit your comments to this thread


Post Reply