Please find attached a patch against the 1.0.0.1 release that adds preliminary support for the Cheetah SpecDrum peripheral interface - a simple 8bit DAC that produced an audio drumkit from the Spectrum. This patch is preliminary as the sound output is not perfect - there is a noticeable clicking. I'm not sure what is causing this and wondered if anyone more familiar with the sound output might have suggestions as to how to fix it.
This looks good to me from a code point of view. The only significant change I'd like to see is addition of snapshot support (there's already a ZXSTSPECDRUM block defined in the SZX format).
Also, the peripheral setup has been significantly reworked since 1.0.0, but I'm happy to handle that side of things.
Thanks for the patch!
I think the clicking is the SYNCRO feature of the Specdrum software that outputs timing pulses on the MIC port that you are supposed to record to tape, when you play back the tape with the SYNCRO feature turned on, the software syncs the new playback with the received pulses (and therefore the rest of the recording on your multitrack tape deck).
As Fuse emulates the fact that you get a soft audible output from the beeper when you output to MIC, it is also audible when you playback in the Specdrum software. Maybe we are overdoing this effect so it is more audible than on a real machine? On the other hand the Specdrum is supposed to be connected to a HiFi while the MIC would only be soft and on the beeper so there would be a large difference in relative volume in that configuration.
I'd also suggest that the Specdrum gets it's own sound volume setting rather than share the AY one.
So in case it isn't obvious, remove the clicking by turning down the beeper volume :)
Thanks for the feedback. Muting the beeper volume does indeed fix the clicking. There is an option in the SpecDrum program to turn Syncro off and on. I'll have a look if I can mute it based on this setting perhaps. I'll rework the patch at the weekend to include this if I can, and also add the snapshot support and the separate volume control.
I think when the MIC bit only is on it shouldn't affect the beeper output (the ULA book says the threshold is 1.4V while on its own the MIC bit produces ~0.7V). I've made a patch that does the above and that removes the audible clicking from Specdrum while still allowing the speech in Cobra's Arc to work (which relies on twiddling the MIC bit) so I'll commit that sometime this weekend.
patch against the 1.0.0 version of libspectrum to include ZXSTSPECDRUM block SpecdDrum support
patch against the 1.0.0.1 release to include Cheetah SpecDrum support with a seperate volume for the SpecDrum and snapshot support
Replacing the original patches are two patches. One against libspectrum-1.0.0 to include support for reading and writing SpecDrum blocks in the szx snapshot. The second patch, against fuse-1.0.0.1 adds SpecDrum support and includes a seperate volume for the SpecDrum and support save and loading .szx snapshots. I haven't made any changes to supporting muting MIC, as it sounds like fredm has already done so.
Looks (and sounds in the brief tests I did) fine to me. Applied in r4282 (libspectrum) and r4283 (Fuse).
Many thanks. Just one last thing - I thought this device was for the 48k only, but last night happened to read this: http://www.worldofspectrum.org/showmag.cgi?mag=Crash/Issue33/Pages/Crash3300086.jpg that says it was available for the 128 as well. The final patch enables it on these machines too.
patch to include 128 and +2 support for specdrum
Thanks - applied in revised form for the new peripheral handling.
If this worked for the 48 and 128 machines, I would also expect it to work on the TC2048/TC2068 as there doesn't seem to be a port clash?