QSound and QPrint Interface

Nagging hardware related question? Post here!
User avatar
tofro
Font of All Knowledge
Posts: 2700
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: QSound and QPrint Interface

Post 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.


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
mk79
QL Wafer Drive
Posts: 1349
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany
Contact:

Re: QSound and QPrint Interface

Post 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?


User avatar
mk79
QL Wafer Drive
Posts: 1349
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany
Contact:

Re: QSound and QPrint Interface

Post 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?).


User avatar
mk79
QL Wafer Drive
Posts: 1349
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany
Contact:

Re: QSound and QPrint Interface

Post 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.


Derek_Stewart
Font of All Knowledge
Posts: 3957
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: QSound and QPrint Interface

Post 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?


Regards,

Derek
User avatar
Peter
QL Wafer Drive
Posts: 1987
Joined: Sat Jan 22, 2011 8:47 am

Re: QSound and QPrint Interface

Post 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.


User avatar
Dave
SandySuperQDave
Posts: 2776
Joined: Sat Jan 22, 2011 6:52 am
Location: Austin, TX
Contact:

Re: QSound and QPrint Interface

Post 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.


User avatar
Peter
QL Wafer Drive
Posts: 1987
Joined: Sat Jan 22, 2011 8:47 am

Re: QSound and QPrint Interface

Post 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.
Last edited by Peter on Sun Nov 01, 2020 7:54 pm, edited 1 time in total.


User avatar
Dave
SandySuperQDave
Posts: 2776
Joined: Sat Jan 22, 2011 6:52 am
Location: Austin, TX
Contact:

Re: QSound and QPrint Interface

Post 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?


User avatar
Peter
QL Wafer Drive
Posts: 1987
Joined: Sat Jan 22, 2011 8:47 am

Re: QSound and QPrint Interface

Post 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.
Last edited by Peter on Sun Nov 01, 2020 8:18 pm, edited 1 time in total.


Post Reply