bugbiter Posted September 16, 2014 Share Posted September 16, 2014 Hi everyone, I'm doing 4 channel sound in Assembler for the first time. It's quite easy actually, you've got AUDF1-4 for the pitch, AUDV1-4 for sound type (bits 4-7) and volume (bits 0-3) Then, you've got AUDCTL where you can pair chan 1+2 or 3+4 to 16bit resolution, and other freaky stuff. I have that set to zero. Now, in Altirra everything works fine. But on my real 130XE channels 3+4 seem to be muted - all you can hear are the buzz of the volume steps going up and down. At first I thought there was something wrong with my code for chan3+4 but when I simply reversed the equate numberings for AUDF and AUDV (4 to 1, 3 to 2, 2 to 3, 1 to 4) so chan 3+4 play the sound code for chan 1+2, it is still channels 3+4 that are silent. As I said, AUDCTL is zero, so there is no fancy stuff involved and all channels should work the same. I tried another program of mine which uses only sound channel 1. If I set it to channel 4 there's no sound! WTF? I don't get it - is there some other register that does something strange to chan 3+4 on default? Quote Link to comment Share on other sites More sharing options...
Rybags Posted September 16, 2014 Share Posted September 16, 2014 It's probably thanks to a bug in the XL OS. After SIO it doesn't set things quite right which can affect audio. In your program, set SKCTL to 3 - also set SSKTCL (the shadow) - addresses are $D20F and $232. Also set AUDCTL to 0 ($D208) - probably just easist to clear all the sound related registers first, just put zeroes in $D200-$D208 at the start of your program. Quote Link to comment Share on other sites More sharing options...
bugbiter Posted September 17, 2014 Author Share Posted September 17, 2014 Thanks! I'll try that. Quote Link to comment Share on other sites More sharing options...
bugbiter Posted September 22, 2014 Author Share Posted September 22, 2014 Thanks guys. That does it. I read elsewhere now that you generally have to re- init pokey after io. Lesson learned. Quote Link to comment Share on other sites More sharing options...
Creature XL Posted September 23, 2014 Share Posted September 23, 2014 Thanks guys. That does it. I read elsewhere now that you generally have to re- init pokey after io. Lesson learned. This is also stated in the ABBUC contest rules. There are other nice tips as well Oh and yes, I learned the hard way. MJO had the same problem Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.