Page 1 of 1

Assembler Setup

Posted: 14 Nov 2015 19:55
by thewiz
Hi,

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 https://github.com/sverx/PSGlib.

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.

Re: Assembler Setup

Posted: 15 Nov 2015 17:11
by Dave
The webpage is here . . . .

http://www.primrosebank.net/computers/m ... ass_pd.htm

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

regards
Dave