Synthpopalooza Posted November 29, 2020 Share Posted November 29, 2020 OK, so here's the deal: I am trying to do a demo tune in double POKEY. It's the famous Krayt music from metroid. The idea is, POKEY1 has AUDCTL=$7A and double-16 bit with a hi-pass filter to make a finely tuned SID type filter. POKEY2 is a more standard 16-bit$Ax bass plus two $Ax channels. The question is ... does anybody have any ideas on how to modify my code, so that both POKEY's can be addressed, and all 8 channels played at once? I'm stumped ... Attaching my sources, plus a mixed recording from Altirra which is meant to demonstrate what the mixed output should sound like. On the binary, press START key to switch between the two POKEY tunes. TUNE00-TUNE03 is first POKEY tune TUNE04-TUNE07 is the second POKEY What I want to do is to play both these at the same time, addressing both POKEYs. metroid - krayt's lair - double pokey mix.wav metroid-krayt.asm metroid-krayt.bat metroid-krayt.s metroid-krayt.xex Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted November 29, 2020 Author Share Posted November 29, 2020 I also did the Brinstar theme. As before, I need to play both tunes at the same time, on both POKEYs ... START cycles between both tunes. metroid - atari.wav metroid-brinstar.asm metroid-brinstar.bat metroid-brinstar.s metroid-brinstar.xex Quote Link to comment Share on other sites More sharing options...
Rybags Posted November 29, 2020 Share Posted November 29, 2020 I don't quite get it - you just want to play each tune on a single Pokey? So you'd just call your player routine for each one, ensuring tune 2 is addressing the second Pokey. I had a quick look at the first one- looks like you just JSR to a play routine in defferred VBlank. I suppose the other modification to the playback routine would be to ensure each one is using it's own work variables. Quote Link to comment Share on other sites More sharing options...
rensoup Posted November 29, 2020 Share Posted November 29, 2020 10 hours ago, Rybags said: I don't quite get it - you just want to play each tune on a single Pokey? So you'd just call your player routine for each one, ensuring tune 2 is addressing the second Pokey. I had a quick look at the first one- looks like you just JSR to a play routine in defferred VBlank. I suppose the other modification to the playback routine would be to ensure each one is using it's own work variables. Took a look, it's actually easier because each tune is linked to a channel. So I did the modification and it seems to work Beware though it seems the lastest Altirra 3.90 beta is required (test 21) I tried with earlier 3.90 releases and it didn't work... @Synthpopalooza the 2nd tune should just be a matter of replacing the sounddata (tune0-7). I also did some code cleanup (removed those nasty ORGs and scoped those tune variables) krayt.zip 1 Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted November 30, 2020 Author Share Posted November 30, 2020 Incidentally ... The reset timer code is only used when using $Cx mod 3 distortion (smooth bass/sawtooth). Normally this will output three random timbres, but the reset timer is used to reset the polycounters and stabilize the timbre. In this piece of music it's not needed, as nothing here uses $Cx mod 3 This works excellently, thanks! Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted November 30, 2020 Author Share Posted November 30, 2020 (edited) Also: Plays on Altirra 3.20, but with some slight stuttering. I'll get the latest ... Also Altirra feature request for Avery: Ability to put stereo POKEY into mono double POKEY, for tunes like this. Edited November 30, 2020 by Synthpopalooza Quote Link to comment Share on other sites More sharing options...
R0ger Posted November 30, 2020 Share Posted November 30, 2020 I don't understand, how is this different from RMT 8 channel ? Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted December 1, 2020 Author Share Posted December 1, 2020 Specifically: On the krayt music, POKEY1 has double 16-bit plus hi pass. AUDCTL=$7A. The 16 bit value in the last two channels filters the 16-bit value in the first, hence the swirling sound. Also: On the brinstar theme, I'm using $Cx distortions in 16-bit to make those pulse lead sounds. Not currently doable in RMT. Quote Link to comment Share on other sites More sharing options...
rensoup Posted December 1, 2020 Share Posted December 1, 2020 20 hours ago, Synthpopalooza said: The reset timer code is only used when using $Cx mod 3 distortion (smooth bass/sawtooth). Normally this will output three random timbres, but the reset timer is used to reset the polycounters and stabilize the timbre. In this piece of music it's not needed, as nothing here uses $Cx mod 3 Yeah I didn't even know if that would work if I converted it to stereo pokey, so I skipped it but hopefully you'll figure it out 19 hours ago, Synthpopalooza said: Also: Plays on Altirra 3.20, but with some slight stuttering. I'll get the latest ... I'm not sure which Altirra version is required anymore, seems like my TV was set to mono for the past year ? Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted December 1, 2020 Author Share Posted December 1, 2020 I think the reset timer is ok to use on a case by case basis ... i.e. depending on which POKEY is playing the $Cx mod 3 notes, you then reset the polycounters of that particular POKEY. I suppose I should do up a double POKEY demo that uses $Cx mod 3 on both POKEYs to test it out. 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.