PSG Clipping

For anything related to sound (YM2612, PSG, Z80, PCM...)

Moderator: BigEvilCorporation

Post Reply
twosixonetwo
Very interested
Posts: 58
Joined: Tue Feb 25, 2014 3:38 pm

PSG Clipping

Post by twosixonetwo » Tue Nov 04, 2014 2:31 pm

Does someone know if the PSG is clipping if all 3 oszillators are at max volume? This site says "My tests with an SMS and a TV card found the highest three volume levels to be clipped, for example."
If there are differences between different Mega Drive models, I am mostly interested in the behaviour on model 1.

User avatar
TmEE co.(TM)
Very interested
Posts: 2317
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Wed Nov 05, 2014 7:47 am

PSG doesn't clip.

What the document says is also not clipping but flattening of the PSG output from insufficient resistor value in SMS2. The output can only sink current and requires external resistor for sourcing (or was it opposite, I don't remember), and that resistor is little too high value in SMS2. No such problem on SMS1 or MDs. When that resistor is too low value the volume step goes higher, beyond 2db per step.

Bad resistor :
Image
Correct resistor :
Image
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

twosixonetwo
Very interested
Posts: 58
Joined: Tue Feb 25, 2014 3:38 pm

Post by twosixonetwo » Wed Nov 05, 2014 6:25 pm

Okay, thanks for the information. I am currently writting my first audio driver and was surprised when I read that part of the document ;)

twosixonetwo
Very interested
Posts: 58
Joined: Tue Feb 25, 2014 3:38 pm

Post by twosixonetwo » Thu Dec 04, 2014 11:39 am

Well, I noticed some distortion and tested it and there seems to be clipping (at least on my model 1 mega drive).
I tested the following:
All channels are always on frequency 0.
First test series:
- Channels 0 and 1 envelope set to 4 (this is about 50% of the outputrange for frequency=0).
- while i<15
{Channel 2 envelope = i; wait; Channel 2 envelope = 4;}
Second test series:
- The same as the first except channel 0 and 1 had their envelope set to 15
Third test series:
- The same as the first except channel 0 and 1 had their envelope set to 0.

In theory, if there is no clipping, the only thing different between the three test series should be the dc offset. The first series is pretty much the safest signal.
I measured it, and there are two things observable:
1. the third series shows different output from series 1 for all envelopes > 5.
2. the second series shows different output from series 1 for all envelopes < 3 (the difference is much smaller than in the third series though)

Here's an image of the recordings:

Image

(dc offset removed; only the range of the clicks is important, not the positive or negative peak)
Edit: I removed something that I originally wrote that turned out to most likely nonsense.

twosixonetwo
Very interested
Posts: 58
Joined: Tue Feb 25, 2014 3:38 pm

Post by twosixonetwo » Thu Dec 04, 2014 3:43 pm

Oh well, I am stupid.

The graphic shows the values from F to 0 (left to right), so the strange effect in the left of the third test series is not clipping, as these are in fact the less loud clicks, while the right ones are the loud ones (and they are just the same amplitude as in the first test series). So there's no clipping, still I am curious as to how the effect in the third series came about...

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest