+Karl G Posted August 13, 2019 Share Posted August 13, 2019 If you play the exact same sounds (C, F, V) in both channels at the same time, is it supposed to sound the same as if you were only playing the sounds in one channel? I never really noticed a different until recently, and I'm not sure if that's because of sound handling improvements in Stella, or a bug in my code that I still haven't figured out. Quote Link to comment Share on other sites More sharing options...
DirtyHairy Posted August 13, 2019 Share Posted August 13, 2019 1 hour ago, Karl G said: If you play the exact same sounds (C, F, V) in both channels at the same time, is it supposed to sound the same as if you were only playing the sounds in one channel? I never really noticed a different until recently, and I'm not sure if that's because of sound handling improvements in Stella, or a bug in my code that I still haven't figured out. It isn't While the patterns generated by the TIA are identical for both channels, the phase in general isn't, and the result will be either constructive or destructive interference. This can be heard in the PAL version of Ms. Pacman, where the interference can cause both channels to combine to silence (doesn't happen on every start). Another nice example are the title tracks by Paul Slocum on "A-VCS-Tec Challenge" and on the Homestar Runner demo; the interference between both channels can be clearly heard on those. For direct comparision, run the ROMs in Stellerator and switch audio between PCM (which is identical to Stella and correctly emulates cycle-exact audio) and waveform (which will not reproduce the phase correctly). 1 Quote Link to comment Share on other sites More sharing options...
+stephena Posted August 13, 2019 Share Posted August 13, 2019 Yep, I've noticed a few ROMs (and also a few complaints/concerns) wrt the new sound code in Stella. Stella/Stellerator are the first emulators to accurately reproduce these effects, based on crispy's research, documented in It really does point out some glaring omissions in the old sound emulation (Ron Fries TIA sound code), which AFAIK is used in all 2600 emulators including Stella prior to 6.0. I'm not much of a sound guy, so I didn't really notice the differences too much. But now that I know what to listen for, I can immediately tell the difference in affected ROMs. I guess the problem is that the older way of emulation has been with us for so long that it makes the new code sound 'worse'. And in some ways it absolutely does sound worse. But it is also accurate (ie, a real console sounds worse too). 1 Quote Link to comment Share on other sites More sharing options...
Linndrum Posted August 14, 2019 Share Posted August 14, 2019 There's something similar with PC Speaker emulation in DOSbox, on a real PC Speaker games like Duke Nukem had a phase effect that you don't hear at all in the emulator. There are some videos on YT that show this! Quote Link to comment Share on other sites More sharing options...
+stephena Posted August 14, 2019 Share Posted August 14, 2019 15 hours ago, Linndrum said: There's something similar with PC Speaker emulation in DOSbox, on a real PC Speaker games like Duke Nukem had a phase effect that you don't hear at all in the emulator. There are some videos on YT that show this! Can you point to these videos? Just interested in hearing the differences. Quote Link to comment Share on other sites More sharing options...
Linndrum Posted August 14, 2019 Share Posted August 14, 2019 (edited) Man I'm gonna have to dig, but I think it was either 8-bit Guy or LGR that showed it in a video. EDIT: Actually I think it was Pixelmusement, I'm searching for it. Edited August 14, 2019 by Linndrum Quote Link to comment Share on other sites More sharing options...
Linndrum Posted August 14, 2019 Share Posted August 14, 2019 Aha! Found a good video that shows it: Skip to around 2:30 to see it displayed with Commander Keen. 1 Quote Link to comment Share on other sites More sharing options...
DirtyHairy Posted August 14, 2019 Share Posted August 14, 2019 20 hours ago, stephena said: Yep, I've noticed a few ROMs (and also a few complaints/concerns) wrt the new sound code in Stella. Stella/Stellerator are the first emulators to accurately reproduce these effects, based on crispy's research, documented in Actually, there are two parts to this. One of them is the effect pointed out by Crispy in the above thread --- the way the volume and mixing circuit is built introduces an audible nonlinearity in the output. The other part is the generation of the signal itself. The TIA generates its sounds with a linear feedback shift register. This produces a periodic pattern of zeroes and ones. However, the relative phase of the signal depends on the state the circuit was in when AUDC was written too: writing to AUDC at different points in time will cause the chip to generate the corresponding pattern starting from different points in the period. Ron Fries' audio code reproduces the patterns correctly, but it does not account for the correct phase. Stella and Stellerator now implement a cycle-exact simulation of the corresponding circuit that was modelled after Crispy's FPGA implementation, and this captures the phase correctly. Quote Link to comment Share on other sites More sharing options...
+stephena Posted August 14, 2019 Share Posted August 14, 2019 Yep, forgot to mention that second part. That's the part that updates the sound stuff twice per scanline, and depending on the timing, gives different results (as you say). The old Stella (and AFAIK all older emulators) either don't update twice per scanline, or don't take any timing into account (or possibly both). 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.