CPCWiki forum

General Category => Emulators => Topic started by: yorgos on 22:09, 28 February 14

Title: WINAPE SOUND ISSUE AND MORE ON OLD SONY VAIO PCV-RX700 Series
Post by: yorgos on 22:09, 28 February 14

Hi guys!

It seems that there is a sound issue (the sound seems to be delayed and be heard after the action e.g. playing a game like Gryzor) on Winape version 2.0 Alpha 18.


It seems to be only just better when I change the sound settings (Sample rate to 44 kHz and bits per sample to 16 bit).


The Sony Vaio is dated back to 2002 and it runs XP.


The game (e.g. Gryzor) seems to be only a bit slow and you have the feeling of a delay as much while playing as hearing the sounds.


I point out that the PC is not connected to Internet and runs other apps pretty fast and smooth (for a PC of its age).


Can anybody advice what to do?


Do I need to download an older version of Winape?


Any suggestion/comment is most welcomed.


Cheers,
Yorgos


P.S.


Do I need to modify some of the settings of the sound card of the Sony Vaio and if yes what exactly to change?
Title: Re: WINAPE SOUND ISSUE AND MORE ON OLD SONY VAIO PCV-RX700 Series
Post by: EgoTrip on 11:44, 01 March 14
I have sound issues with winape also but im on a much more recent pc/os.
Title: Re: WINAPE SOUND ISSUE AND MORE ON OLD SONY VAIO PCV-RX700 Series
Post by: yorgos on 14:25, 01 March 14
Well,, on my DELL Latitude E6400 laptop runing Windows 7, emulates perfect all games I tried!
Title: Re: WINAPE SOUND ISSUE AND MORE ON OLD SONY VAIO PCV-RX700 Series
Post by: Executioner on 11:06, 02 March 14
WinAPE actually uses the sound buffer to do it's timing, that way you generally get better quality sound with no gaps in the waveform or clicking. Have you tried changing the sound buffer synch setting?
Title: Re: WINAPE SOUND ISSUE AND MORE ON OLD SONY VAIO PCV-RX700 Series
Post by: EgoTrip on 15:01, 02 March 14
The other issues I have (besides the jittering which is now fixed, thanks) is that the levels are way off. I think it's already been mentioned before there is a disproportionate difference between volume E and F. This makes some things sound way too loud in comparison to the rest of the music.

I also have issues with the sound synchronising when recording AVI's. The only option that actually works is uncompressed, but audio is way out of sync. It doesn't work with xvid at all, although other emulators and recording software does. Again this is a problem I've always had.
Title: Re: WINAPE SOUND ISSUE AND MORE ON OLD SONY VAIO PCV-RX700 Series
Post by: ralferoo on 15:48, 02 March 14
Quote from: EgoTrip on 15:01, 02 March 14
I also have issues with the sound synchronising when recording AVI's. The only option that actually works is uncompressed, but audio is way out of sync. It doesn't work with xvid at all, although other emulators and recording software does. Again this is a problem I've always had.
The sync error IIRC is caused by having the frame rate set to 100% rather than show all frames (I've forgotten the exact names, I rarely use WinAPE as it doesn't work with Wine under Linux).

That said, I've never managed to get a recording from it that doesn't have a really annoying pulsing noise in the right channel.

Quote from: EgoTrip on 15:01, 02 March 14
I think it's already been mentioned before there is a disproportionate difference between volume E and F. This makes some things sound way too loud in comparison to the rest of the music.
I don't know about this, but this might be correct. Volume E is supposed to be sqrt(2) times as loud as D, F is supposed to be sqrt(2) times as loud as E and twice as loud as D.
Title: Re: WINAPE SOUND ISSUE AND MORE ON OLD SONY VAIO PCV-RX700 Series
Post by: Executioner on 00:29, 03 March 14
Quote from: ralferoo on 15:48, 02 March 14
The sync error IIRC is caused by having the frame rate set to 100% rather than show all frames (I've forgotten the exact names, I rarely use WinAPE as it doesn't work with Wine under Linux).

It should work better on 100%. "Show All Frames" (every 1) makes the emulator run as fast as possible and ignore sound buffer synchronisation.

QuoteThat said, I've never managed to get a recording from it that doesn't have a really annoying pulsing noise in the right channel.

Unless you have a very fast machine, you should only record AVIs in WinAPE from an SNR recording and set it to display every frame when recording the AVI and playing the SNR at the same time, otherwise the AVI writing routines (codec from whoever else) upset the emulation timing and cause it to skip frames or lose synchronisation with the sound buffer.

Quote
I don't know about this, but this might be correct. Volume E is supposed to be sqrt(2) times as loud as D, F is supposed to be sqrt(2) times as loud as E and twice as loud as D.

I'm not sure where I got the volumes from last time I modified them because everyone said they were wrong but they are currently:

    74, 130, 226, 333, 514, 712, 1043, 1410, 2012, 2642, 3663, 4698, 6352, 8131, 11130, 21845

who knows why volume 0 isn't 0?

Title: Re: WINAPE SOUND ISSUE AND MORE ON OLD SONY VAIO PCV-RX700 Series
Post by: Executioner on 03:49, 03 March 14
21845 is 1/3 of 65535. I think these values came from MESS/MAME but I'm not sure, and there were about 4 different ones in the MAME/MESS source code, all measured by different experts. Too me it seems too logarithmic, and probably depends a lot on how linear your PC sound card actually is. As this is currently hard-coded, I might have a few different selectable values in the INI file.
Title: Re: WINAPE SOUND ISSUE AND MORE ON OLD SONY VAIO PCV-RX700 Series
Post by: ralferoo on 13:47, 03 March 14
Quote from: Executioner on 00:29, 03 March 14
I'm not sure where I got the volumes from last time I modified them because everyone said they were wrong but they are currently:

    74, 130, 226, 333, 514, 712, 1043, 1410, 2012, 2642, 3663, 4698, 6352, 8131, 11130, 21845

who knows why volume 0 isn't 0?
That almost doubling on the last one seems excessive. The others don't look too bad in the mid range (approximately doubling every 2 values).

The actual voltages at the pins of the AY chip are documented in figure 9 of the datasheet (page 28) for the louder volumes although it's hard to determine the actual voltages for the the lower volumes as they're vanishingly small on the graph.

Page 22 explicitly documents that fixed volume level 0 is used to turn a channel off (as opposed to half the volume of volume level 2). I don't believe from experiments that volume 0 from an envelope is off though (but it's now been too long for me to remember)

The documented voltages are:
0xF: 1V, 0xE: 0.707V, 0xD: 0.5V, 0xC: 0.303V, 0xB: 0.25V, 0xA: 0.15151V, 0x9: 0.125V
As you can see this is exactly log2 on (n/2). There's no reason to suppose that this pattern isn't supposed to continue to lower volume levels too

Obviously, the external circuitry will affect these voltages slightly, but only a simple voltage divider happens to it after that:
(http://voxel.angrysprite.com/public/cpc_snd.gif)
One interesting point is that the channels are mixed equally to the internal speaker but B only contributes 5/16 of the volume to each of left and right  whereas A and C contribute 11/16 to left and right respectively.
Title: Re: WINAPE SOUND ISSUE AND MORE ON OLD SONY VAIO PCV-RX700 Series
Post by: Bryce on 14:12, 03 March 14
Quote from: ralferoo on 13:47, 03 March 14
One interesting point is that the channels are mixed equally to the internal speaker but B only contributes 5/16 of the volume to each of left and right  whereas A and C contribute 11/16 to left and right respectively.

That doesn't sound right Ralf, have you included the resistance of the speakers to come up with those values?

Bryce.
Title: Re: WINAPE SOUND ISSUE AND MORE ON OLD SONY VAIO PCV-RX700 Series
Post by: EgoTrip on 17:57, 03 March 14
QuoteUnless you have a very fast machine, you should only record AVIs in WinAPE from an SNR recording and set it to display every frame when recording the AVI and playing the SNR at the same time, otherwise the AVI writing routines (codec from whoever else) upset the emulation timing and cause it to skip frames or lose synchronisation with the sound buffer.

I tried that, but it doesn't fix it at all. Its not even slightly unynsynchronised, its way off, by a significant amount of seconds. It also has that pulsing sound.
Title: Re: WINAPE SOUND ISSUE AND MORE ON OLD SONY VAIO PCV-RX700 Series
Post by: TFM on 20:55, 03 March 14
I can't confirm that in the US. Maybe you hear the Russian pecker?  :laugh:


Obviously that problems seem to be hardware dependent, and as we did read before CPU speed seems not to be the issue. How to catch such a bug?
Title: Re: WINAPE SOUND ISSUE AND MORE ON OLD SONY VAIO PCV-RX700 Series
Post by: Executioner on 01:00, 04 March 14
The WinAPE volume levels have been modified to the following, based on the formula on the AY Wiki page:

121, 171, 241, 341, 483, 683, 965, 1365, 1931, 2731, 3862, 5461, 7723, 10922, 15447, 21845


Title: Re: WINAPE SOUND ISSUE AND MORE ON OLD SONY VAIO PCV-RX700 Series
Post by: ralferoo on 08:36, 14 April 14
Quote from: Executioner on 01:00, 04 March 14
The WinAPE volume levels have been modified to the following, based on the formula on the AY Wiki page:

121, 171, 241, 341, 483, 683, 965, 1365, 1931, 2731, 3862, 5461, 7723, 10922, 15447, 21845
I might be being dumb... is this new version available for download anywhere? The latest version I can find is 2.0A18 from http://winape.net/downloads.jsp but it's dated July 2011 and definitely seems to have the wrong volume levels!
Title: Re: WINAPE SOUND ISSUE AND MORE ON OLD SONY VAIO PCV-RX700 Series
Post by: Executioner on 01:53, 17 April 14
Quote from: ralferoo on 08:36, 14 April 14
I might be being dumb... is this new version available for download anywhere? The latest version I can find is 2.0A18 from http://winape.net/downloads.jsp but it's dated July 2011 and definitely seems to have the wrong volume levels!

No, not yet. PM me and I'll send you the latest executable.
Title: Re: WINAPE SOUND ISSUE AND MORE ON OLD SONY VAIO PCV-RX700 Series
Post by: TotO on 08:13, 17 April 14
Quote from: ralferoo on 13:47, 03 March 14
Obviously, the external circuitry will affect these voltages slightly, but only a simple voltage divider happens to it after that:
(http://voxel.angrysprite.com/public/cpc_snd.gif)
One interesting point is that the channels are mixed equally to the internal speaker but B only contributes 5/16 of the volume to each of left and right whereas A and C contribute 11/16 to left and right respectively.
Yes, if you don't take care about the ±5% resistors accuracy. :D
Reproducing in software the real hardware comportment is only possible by using one real CPC as references and measuring all points to know the reality.
But, today, it's too late... 30 years old, resistors, capacitors and power supply are tired..

About the AY, the theoretical idea was to split the middle channel to sound half to the left and half to the right when output through the stereo jack out.
But, because standard resistors values was 10K and 22K (not 10K and 20K), you got this little difference.

Imagine that resistors are 10K "+5%"  and 22K "-5%", then... some CPC out 10.5K and 21K, so a perfect 50% splitting.
It's why, reading schematics may make you crazy by trying to do things that are useless. (or not) :)
Powered by SMFPacks Menu Editor Mod