can't get AYFX to work

Pagina 3/3
1 | 2 |

Van norakomi

Paladin (993)

afbeelding van norakomi

17-10-2019, 21:47

Artrag: Do you know if this code rotates the psg channels every interrupt ?
And to stop the sfx, can I just call this code:
AFXSTOP:
ld hl,DATA_AREA
ld b,END_DATA_AREA-DATA_AREA
.loop:
ld (hl),0
inc hl
djnz .loop
??

Van ARTRAG

Enlighted (6251)

afbeelding van ARTRAG

17-10-2019, 22:34

This code doesn't rotate channels, as it is using a the whole psg for sfxs
If you want to stop all sfxs currently playing and reset the aysfx bank, you can call afxstop in my code (not sure about the above routine, there was some reason to have in afxBnkAdr a valid bank and in afxChData+2+n*11 the value of FFFFh).
In any case, afxstop will not mute the PSG till you call ROUT in my code.
If you need to stop a single sfx on a given channel you can reset afxChData+ 1 +11*n where n=0,1 or 2 for the 3 channels
To mute the PSG sound from last sfx frame you need to call AFXFRAME first and later ROUT

Van norakomi

Paladin (993)

afbeelding van norakomi

18-10-2019, 07:59

oh, this is so helpful !
thanks for the info !

Pagina 3/3
1 | 2 |