Page 4 of 19

Re: QSound and QPrint Interface

Posted: Sat Oct 31, 2020 11:51 am
by tofro
mk79 wrote:Does anybody know how the clock for the AY chip is derived? I don't understand this from the posted PCB photos.

I seem to be seeing it's simply using /VMA or E (presumably the latter) - which should roughly be 2MHz signals.

Re: QSound and QPrint Interface

Posted: Sat Oct 31, 2020 9:13 pm
by mk79
tofro wrote:
mk79 wrote:Does anybody know how the clock for the AY chip is derived? I don't understand this from the posted PCB photos.
I seem to be seeing it's simply using /VMA or E (presumably the latter) - which should roughly be 2MHz signals.
Interesting. The QSound code suggests it expects the input frequency to be 1.5MHz. The E signal however only carries a 750kHz signal (just measured and according to the 68008 manual it's CLKCPU/10, so that checks out). That's exactly halve, surely not a coincidence, but I still don't quite understand it.

But the important thing is that the QSound has apparently a chip frequency of 1.5MHz. The Spectrum has a frequency of 1.7734MHz and the Atari ST uses 2MHz. So the question is, which frequency makes the most sense? There are not many QSound boards or software for it around (is there any software besides the demos supplied with it?), so compatibility isn't that much of a concern really. My personal feeling, if one was to resurrect AY sound for the QL, would be to go with the Spectrum frequency. There are tons of existing sound files for this frequency. Any other thoughts?

Re: QSound and QPrint Interface

Posted: Sat Oct 31, 2020 9:21 pm
by mk79
Derek_Stewart wrote:Looks like another disassembly job...
Don't bother, I have the source code. However, it was barely more readable than a disassembly before I started working on it :geek:

Also, there are soooo many commands in it that have nothing to do with sound whatsoever. I realize that it occupies 8kb of ROM space anyway, so they just filled it with stuff, but some commands are downright bizarre (e.g. "CONTROL" opens a window that constantly shows which job-ID currently has the keyboard focus. WTF?).

Re: QSound and QPrint Interface

Posted: Sat Oct 31, 2020 9:33 pm
by mk79
Ah, and also, many music files I have were generated for Turbo Sound systems, i.e. for two AY chips (6 channels total). That does sound a lot better.

Re: QSound and QPrint Interface

Posted: Sat Oct 31, 2020 11:59 pm
by Derek_Stewart
Hi Marcel,

I fed the QSOUND rom code through DISA, it only took about 10 minutes to produce a source file without any errors or illegal instructions.

I always disassemble all software that I can.

Understanding the resulting source is another matter.

What are your ideas for the future of QL Sound?

Re: QSound and QPrint Interface

Posted: Sun Nov 01, 2020 7:26 pm
by Peter
mk79 wrote:But the important thing is that the QSound has apparently a chip frequency of 1.5MHz. The Spectrum has a frequency of 1.7734MHz and the Atari ST uses 2MHz. So the question is, which frequency makes the most sense? There are not many QSound boards or software for it around (is there any software besides the demos supplied with it?), so compatibility isn't that much of a concern really. My personal feeling, if one was to resurrect AY sound for the QL, would be to go with the Spectrum frequency. There are tons of existing sound files for this frequency. Any other thoughts?
For the yet unreleased Q68 AY implementation, I decided for the Atari ST frequency of 2 MHz. Reasons:

1. Atari ST is a 68K machine like the QL
2. Atari ST was the more professional platform, ZX Spectrum just a games machine, unlike the QL
3. The 2 MHz frequency is easy to generate by PLL from normal input clocks of FPGAs, 1.7734MHz could in the best case be rounded to 1.75 MHz
4. ZX Spectrum sound files contain blocks of compiled Z80 code, less suitable for 68K
5. I ported & wrote a working QL software that can directly play Atari sound files on AY.

Re: QSound and QPrint Interface

Posted: Sun Nov 01, 2020 7:34 pm
by Dave
I have a pile of counterfeit AY-3-8910 chips I'd like to use up. They're actually brand new working YM2149 that were remarked, and are likely from the exact same batch as the ones Ben Versteeg at ByteDelight is using.

If you tell me what register base address you selected I can throw out a bunch of these very quickly and cheaply with the confidence they'd be compatible with what you're doing.

Re: QSound and QPrint Interface

Posted: Sun Nov 01, 2020 7:38 pm
by Peter
Hi Dave, the Q68 uses $1C440 as base address, the following registers are longword-aligned just in case I ever do something for the 68060 again.
But no need to stick to that, I can simply adjust the adresses to whatever you like. The software is tested and should work fine, as long as you use 2 MHz.

Re: QSound and QPrint Interface

Posted: Sun Nov 01, 2020 7:51 pm
by Dave
Eeeexcellent...... :D

I'll email you when I have hardware. Should I implement space for a ROM, or will a driver be loaded?

Re: QSound and QPrint Interface

Posted: Sun Nov 01, 2020 8:06 pm
by Peter
The AY register interface is so primitive, that it would in my opinion be exaggerated to define a driver, as long as no hardware is available. The register interface *is* the driver in this case, at least for now ;) And even if some piece someday gets a different base address/spacing it's not really worth a driver. Can be configured easily. Driver can still be done if there is enough software to make it worthwhile.