Reply 240 of 264, by Fagear
- Rank
- Member
Sorry for a long delay from the last update.
https://youtu.be/ix2NEqVtKmk
I've worked a bit with that "first version" replica and moved forward a bit.
First iteration had very noisy and quiet output. That's logical, because all analog parts (opamps, AY, switch) were getting power directly from noisy ISA bus. I've rewired power to opamps through a 9V regulator and through 5V regulator to AY and a switch. That significantly brought the noise down.
Also I've assembled small PCB with R2R DAC (SG0309 replacement), connected it to the CSM and checked: it was producing sound.
Next, I've started to re-think the mixer. There are three audio channels from AY a one channel from R2R DAC. Covox used emitter follower for the DAC and output of that was very low as a result. But instead of amplifying the signal from the DAC Covox had chosen to lower signal from AY by the factor of 100 and drown it the noise.
I'm going to make a more balanced mixer, but for that I need to boost signal from the DAC. And I'm not very good in designing analog transistor circuits... I've tried different amps on one, on two transistors and even on opamp... But didn't manage to get the same sound as on the original, original board just has more bass somehow. I need to experiment more.
Overall, I've got the same output levels from AY and DAC as on originals board but without excessive noise.
But next I've found that not all of the games were detecting my CSM replica. I was still using AY8910 (and YM2149 earlier), but original board used AY8930. Luckely this time I've got my own AY8930 and installed it into the replica board. All problems with board detection in games went away.
Next, I've decided to explorer differences between ICs and wrote a couple of DOS programs. Using some hacks and undocumented tricks I've managed to learn how to distinguish AY8910, AY8930, YM2149 and KC89C72 between each other on software level. Definitely some games use extended mode of AY8930, so AY8930 is critical for fully functioning CSM.
If we'll ignore detection through extended registers, other ICs will work in the CSM but but another caveat. AY8930 also has additional frequency divider and it is used in CSM. Other ICs do not have that divider and will sound out of tune. That can be fixed with another 74HC74 but there is no place for one more DIP-14 and it will disturb "original-like" look.
There are some more problems with YM2149 in particular regarding the way DAC DMA requests are done in the CSM. Source of those requests is AY synth itself: for DRQ generation channel C is disconnected from the audio output and feeded into logic through one transistor. In idle AY8910 and AY8930 have 0 volts on the output and with enabled generation levels are going towards +5 V, but YM2149 in idle state has ~2.5 V on the output. That means that from the point of transistor that feeds DRQ logic YM2149 always has its output in the "1" state regardless of presence of any generation on its output. No DRQ will be generated with YM2149 in place.
Maybe there is a simple way to modify that circuit to enable DRQs with YM2149, I didn't dig into that yet.
Some games don't use DMA at all, writing PCM data directly into the port, CSM allows both ways of accessing the DAC.
Next, I've replaced joystick connectors (I had "female" connector instead of "male" ones from the first test), but I couldn't find any game that supports joysticks on CSM. All games that I've tried either do not support any joystick at all or support only standard 15-pin PC joystick.
Maybe there are some games that do support Atari-like joysticks on CSM but I had no time to test several dozens of games to find one. So I can not for sure claim that joysticks are working as intended because address in GAL was somewhat guessed and can be different on the board with original GAL.
To somehow test joystick functions I've wrote another DOS program. It displays which buttons are activated on both joystick ports. I've assembled gamepad imitator and found some Atari-compatible joystick and those work both on my replica and on the original board (but with mine GAL).
Replica board works and is been updated. Someone can already think about writing/porting players for ZX Spectrum music to support CSM.
dionb wrote on 2021-06-10, 23:59:Little bump: I was browsing around a bit and came across this:
.../product/pechatnaya-plata-covox-sound-master/
Looks like the original - noisy - replica.
Yeah... There is that copycat that picks up everything he can find online, finished or not, working or not, does not ask for any permission and disregards everyone who did the real work and just sells all that for his own profit.
I highly discourage everyone to buy anything on that site. First, there are plenty (guaranteed) non-working PCBs. Second, almost all of those PCBs with card edge connectors have tinned contacts that will destroy slots on your motherboards with time. Those should be gold-plated but that means that PCBs will be more expensive, he can not afford that! Third, I will refuse to buy anything, even working and tested, from a man with those kind of principles.
In the meantime, I've tried that AVR-AY PCB with ATmega48V in my replica and it just refuses to produce any sound... Need to investigate that.
Also I've assembled "SMD no-GAL" board but didn't test it yet.