AY emulation testing

Struggling with Fuse or trying to find an emulator with a specific feature. Ask your questions here.
User avatar
djnzx48
Manic Miner
Posts: 479
Joined: Wed Dec 06, 2017 2:13 am
Location: New Zealand

Re: AY emulation testing

Post by djnzx48 » Fri Sep 13, 2019 9:03 am

Is anyone willing to try running the test?

Meanwhile, I found yet another bug: envelope type 13 is broken in Spectaculator. It's supposed to ramp up to the maximum level and stay there, but instead it drops back to 0, resulting in silence. You can see the cause of the problem here:

Image

The envelope level is incremented, but does not get set back to 15 when the cycle ends, causing it to overflow and become silence.
0 x

User avatar
Guesser
Microbot
Posts: 109
Joined: Wed Nov 15, 2017 2:35 pm
Contact:

Re: AY emulation testing

Post by Guesser » Fri Sep 13, 2019 11:18 am

I've said it before, but I believe the only way to get really accurate AY sound is to first determine how the DACs actually work and then calculate the resulting levels and apply suitable filtering per machine. No fiddling with look-up-table values is going to correctly emulate a +3 for instance.
0 x

User avatar
djnzx48
Manic Miner
Posts: 479
Joined: Wed Dec 06, 2017 2:13 am
Location: New Zealand

Re: AY emulation testing

Post by djnzx48 » Sat Sep 14, 2019 4:15 am

Guesser wrote:
Fri Sep 13, 2019 11:18 am
I've said it before, but I believe the only way to get really accurate AY sound is to first determine how the DACs actually work and then calculate the resulting levels and apply suitable filtering per machine. No fiddling with look-up-table values is going to correctly emulate a +3 for instance.
Could you elaborate on that? What does a current emulator (using accurate measurements) get wrong that would require proper DAC emulation to rectify? I'm not sure that I see much value in trying to emulate the faulty sound of the +3.

I found some recordings taken from AY and YM chips, and I couldn't detect any volume differences in the tone+noise parts. Or if they are there, the difference is more subtle than claimed. But it's hard to tell without an isolated recording.

I also fixed the envelope 13 bug, here's the patch if anyone wants to apply it.
SpoilerShow
000021D5:C7->E9
000021D6:00->B7
000021D7:03->07
000021DA:00->90
00002991:00->C7
00002993:00->03
00002997:00->89
00002998:00->1A
00002999:00->E9
0000299A:00->3D
0000299B:00->F8
0000299C:00->FF
0000299D:00->FF
0 x

User avatar
1024MAK
Manic Miner
Posts: 471
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: AY emulation testing

Post by 1024MAK » Sat Sep 14, 2019 9:49 am

Amstrad messed up the audio circuitry on the +2A/+3 PCB hence the AY audio is distorted. Note that most +2A machines use a later PCB where they corrected the circuit design.

Also, what type of digital to analogue converter does the AY actually use? And is there good repeatability between chips of different batches...

Mark
0 x

User avatar
Ast A. Moore
Dynamite Dan
Posts: 1134
Joined: Mon Nov 13, 2017 3:16 pm

Re: AY emulation testing

Post by Ast A. Moore » Sat Sep 14, 2019 11:29 am

djnzx48 wrote:
Fri Sep 13, 2019 9:03 am
Is anyone willing to try running the test?
Sure. Here’s the audio from my +2A(B). Recorded from the TV speaker.
Matches the output of Fuse, by the way.
1 x
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.

User avatar
djnzx48
Manic Miner
Posts: 479
Joined: Wed Dec 06, 2017 2:13 am
Location: New Zealand

Re: AY emulation testing

Post by djnzx48 » Sat Sep 14, 2019 11:50 am

Thanks. So the 'noise doubling' doesn't seem to occur on a real chip.

I wonder how EvgenRU managed to observe the effect.
0 x

User avatar
Guesser
Microbot
Posts: 109
Joined: Wed Nov 15, 2017 2:35 pm
Contact:

Re: AY emulation testing

Post by Guesser » Sat Sep 14, 2019 3:35 pm

djnzx48 wrote:
Sat Sep 14, 2019 4:15 am
Could you elaborate on that?
The different models of Spectrum all have different circuits for the AY, though the +3 is where this has the most significant effect on the resulting audio signal as the amplification is all wrong. The +3 and Black +2 circuits both have some low pass filtering too.
Last edited by Guesser on Sat Sep 14, 2019 3:47 pm, edited 1 time in total.
0 x

User avatar
Guesser
Microbot
Posts: 109
Joined: Wed Nov 15, 2017 2:35 pm
Contact:

Re: AY emulation testing

Post by Guesser » Sat Sep 14, 2019 3:37 pm

1024MAK wrote:
Sat Sep 14, 2019 9:49 am
Also, what type of digital to analogue converter does the AY actually use? And is there good repeatability between chips of different batches...
And what effect does shorting the channels together vs mixing them with a resistor network have on the resulting signal.
0 x

Post Reply