Fragmare Posted October 29, 2017 Share Posted October 29, 2017 (edited) I'm covering some Ninja Warriors music on the Atari POKEY and I'm looking to run some samples through the TIA, so it would be a true Atari 7800 cover. How possible is it play 2-bit or 4-bit samples through the TIA while also playing music through the POKEY? Here is an example using 2-bit, 3500 Hz PCM samples. https://instaud.io/1ovM This song uses quite a lot of samples, so i reduced them to 2-bit in the hopes that bitmasking them into a 4-bit PCM would be possible (lower 2 bits contain one sample, upper 2 bits contain the other). Anyway, if anybody has any feedback on this, it would be greatly appreciated. Edited October 31, 2017 by Fragmare Quote Link to comment Share on other sites More sharing options...
EricBall Posted October 31, 2017 Share Posted October 31, 2017 There's no problem using a POKEY (or any other chip which drives the cartridge audio pin) and the TIA at the same time. The problem is updating the TIA at a high enough frequency to make any sampled audio worth it. Updating the TIA once per frame (60Hz) is trivial, but after that it gets considerably harder. You could use the DLL NMI to update it once per zone, i.e. every 8 lines = 1967Hz or every 16 lines = 983Hz, but you will have to adjust for 23 lines of VBLANK. Similarly, you could bang on WSYNC and update the TIA every line (15,734 Hz), but that will waste a lot of CPU time and you'll still have to handle VBLANK (unless you're only playing music). Note: 2 or 4 bit won't make any difference except for how much ROM space the samples use. You will also need to consider how much CPU the update routine will require. I'd recommend seeing if the native TIA waveforms can provide any of the sound effects and update the TIA once per frame. Quote Link to comment Share on other sites More sharing options...
DracIsBack Posted November 5, 2017 Share Posted November 5, 2017 The 7800 version of Commando actually uses Pokey and TIA simultaneously. The Pokey handles all music, while the TIA handles all sound effects. Quote Link to comment Share on other sites More sharing options...
Fragmare Posted November 5, 2017 Author Share Posted November 5, 2017 There's no problem using a POKEY (or any other chip which drives the cartridge audio pin) and the TIA at the same time. The problem is updating the TIA at a high enough frequency to make any sampled audio worth it. Updating the TIA once per frame (60Hz) is trivial, but after that it gets considerably harder. You could use the DLL NMI to update it once per zone, i.e. every 8 lines = 1967Hz or every 16 lines = 983Hz, but you will have to adjust for 23 lines of VBLANK. Similarly, you could bang on WSYNC and update the TIA every line (15,734 Hz), but that will waste a lot of CPU time and you'll still have to handle VBLANK (unless you're only playing music). Note: 2 or 4 bit won't make any difference except for how much ROM space the samples use. You will also need to consider how much CPU the update routine will require. I'd recommend seeing if the native TIA waveforms can provide any of the sound effects and update the TIA once per frame. The 7800 version of Commando actually uses Pokey and TIA simultaneously. The Pokey handles all music, while the TIA handles all sound effects. Yea, I knew POKEY and TIA could be used at the same time. I just didn't know if the 7800 had enough juice to brute force some PCM samples through the TIA while simultaneously playing POKEY music. I guess it does, and fairly easily too, but it's a bit over my head to try and program an .A78 ROM or whatever demonstrating it. Nevertheless, I made a chiptune using the POKEY+TIA with the TIA using samples. Most of the samples have been run through some Wav2Atari converter i found here and recorded, one-by-one, from an emulator. Then mixed into the tune by hand. Talk about a patience test! 2 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.