Page 1 of 1

Simple Monophonic Just Intonation Engine

Posted: Sat Sep 22, 2012 6:29 pm
by zzo38
Simple Monophonic Just Intonation Engine is a music engine I have written for some of the Famicom games I am working on. It is very simple and does not even support looping (with one exception), but is sufficient for my use, mostly for sound effects. You could combine it with other music on the other square and on triangle channel. It is called "just intonation" because I used just intonation in this game, although it is not actually limited to just intonation.

Here is the code (for Unofficial MagicKit; convert to other assemblers if wanted):

Code: Select all

	lda $4015
	and #$01
	bne nomusic
	ldx <musaddr
	lda musichi,x
	beq nomusic
	ldy #$01
	sty $4015
	sta $4003
	lda musiclo,x
	sta $4002
	inx
	stx <musaddr
nomusic	;continues here