ayfx-replayer - how does it work? no OUT-command whatsoever?

Par Bengalack

Paladin (722)

Portrait de Bengalack

11-11-2020, 21:16

In my search for a light-weight sound effect replayer, and effects-library, I found ayFX (the editor), and then I found:

http://www.z80st.es/blog/2013/06/29-ayfx-replayer-v1-31
http://www.z80st.es/downloads/code/

I was pretty happy with this, as the code is documented in English and line by line. I was about to start converting the syntax to my assembler-variant, and do all the work, loading files etc., when I realise... there is NO OUT command in this code. Even if there is a full explanation of how to init and then call ayFX_PLAY once every frame, etc.

I do see that there is this at the end:

		; --- UNCOMMENT THIS IF YOU DON'T USE THIS REPLAYER WITH PT3 REPLAYER ---
AYREGS:		.ds	#14			; Ram copy of PSG registers
		; --- UNCOMMENT THIS IF YOU DON'T USE THIS REPLAYER WITH PT3 REPLAYER ---

I see that the PSG has 14 registers + 2 registers called "I/O ports A & B".

I'm I supposed to just OUT/OUTI/OTIR these 14 registers every frame? If someone could confirm, that would be great. Just strange that a replayer does not include "OUT".

Pardon my ignorance when it comes to sound-coding oO. Any hint appreciated :)

!login ou Inscrivez-vous pour poster

Par Grauw

Ascended (10721)

Portrait de Grauw

11-11-2020, 22:20

It is very easy for the programmer to add the outs himself, and it makes it cross-platform, since there are many more Z80 machines with an AY-3-8910. Additionally it gives the programmer more control over sound and channel priorities when combined with a music replayer.

Par Bengalack

Paladin (722)

Portrait de Bengalack

11-11-2020, 22:57

Agree. Always easy when you know what or how. I'll try and see how it goes.