PSG (AY-3-8910/YM2149) controller using AVR (prototype).

How it works
Introduction
There are many other similar projects, but I tried to control AY-3-8910 with AVR. There is nothing new here.
Software
This project consists of the following programs.
-
psg-test.asm -
A simple control program for testing. This can be used by itself.
-
psgplay.asm -
Main program.
-
psgplay-commands.asm -
Definitions of constants
-
tonedata.asm -
Frequency data generated by
bin/tone.pl. -
musicdata.asm -
Music data generated by
bin/mmlc.pl.
-
-
bin/tone.pl -
generates tone data corresponding to the specified PSG operating frequency
-
bin/mmlc.pl -
generates binary data (as
.db) from MML. This program is written in an uncommon way, because it is assumed to be rewritten in assembly language later.
The data is converted to binary and written in AVR in advance, and the AVR only sends the data to the PSG.
How to build
Fuse Setting
If you want to supply clock from AVR to PSG as shown in the circuit above, you need to set the fuse of AVR. In ATmega48 series, the 6th bit of Low Byte must be changed to 0 to enable CKOUT. Note that some devices (e.g. ATmega8) do not have CKOUT.
If a separate clock is supplied to the PSG, the fuse setting is not necessary.
If you are using avrdude, the specific steps are as follows.
$(...) should be changed according to your own environment.
avrdude -c $(AVRWRITER) -p $(DEVICE) -b $(AVRDUDEBAUDRATE) -U lfuse:w:0x22:mBuild
-
edit
Makefile(in particular the device name and the writer settings) -
make(make psg-testfor the test program) -
make flash
Repository
Future work
-
Send MML to AVR via serial communication, convert to PSG data, and send it to PSG?
-
VGM format support?
License
-
MIT License
