Jump to content
IGNORED

Identical sound channels


Karl G

Recommended Posts

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.

Link to comment
Share on other sites

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).

  • Like 1
Link to comment
Share on other sites

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).

 

  • Like 1
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...