3 ms·
For Spectrum, at least as far as ROM loader is concerned, decoding the signal is basically the matter of deciding whether a pulse is length t0 or t1. Technicall
by avian 8y ago
For Spectrum, at least as far as ROM loader is concerned, decoding the signal is basically the matter of deciding whether a pulse is length t0 or t1. Technically it's FSK, but since each symbol is only one period long, it's more convenient to talk about pulse lengths. I don't think traditional matched filters are any help here.
With a modern computer you could record lengths for all impulses present in the signal and then find a threshold that best divides the two groups. You could then do probabilistic decoding. E.g. if checksum doesn't match, try flipping the bits that are closest to the threshold and are most likely to have been decoded incorrectly.
- ungzd 8y agoBut maybe such "binarization" throws out information which might be useful? ZX Spectrum generates rectangular signal, after writing to tape and reading back, it becomes heavily low-pass filtered. So, I thought, if we take typical tape frequency response, pass ~1KHz and ~2KHz rectangle pulses through it, we get typical "0" and "1" signals as passed through tape, and if we cross-correlate them with tape signal, maybe we can achieve better results than by zero crossing detection? Also, what I felt unattractive in binarization/zero-crossing is that you should do band pass filtering anyways to fix DC offset and ripples that can affect zero crossings: https://imgur.com/ys78f1M https://imgur.com/ys78f1M. So, maybe if single filter is used for both frequencies of "marks" and "spaces", then we are doing it wrong and filters matched to marks and spaces could do it better? As alternative to filtering we can use adaptive binarization threshold and then morphology on binarized signal (AFAIK, this approach is popular in detecting various barcodes on photos).