Yes, Fabrice sent me the sources of this chronometer a few weeks ago (that being said, if you have a TAP file, I'd be happy as I never used an assembler
So far I only used my own small test programs
You found the right problem: threshold value.
Here's what I did to get the threshold:
- I made a test program that decodes a signal made of all the combinations of a sinusoid, surrounded by 2 other sinusoids. So I test all the combinations of groups of 6 bits, measuring only the two in the middle. This way I hope to get the length read for every sinusoid, possibly affected by sinusoids before or after.
- I designed various waveforms to see the ones that gave the more distinct threholds. For instance, "01" could be coded -___ or _-__ or _--- or _--_ or __--, and so on...
- tested all this on several Atmos (up to eight or nine when results seemed rather good)
It ended up that signal like _--___ was the better read by the Via, but it's sometimes a matter of two microseconds
The problem I have is double:
- threshold varies from one machine to another
- some machines (15-20% of the ones I tested) can't make the difference between 3 or 4 samples (or was it 4 or 5 ? Can't recall right now) every time.
The test I sent *seems* to be the optimal one for all the machines. The other problem is now it requires a perfect audio quality, as you pointed.
With my 3rd Atmos, it seems to have some random reading mistakes. I just don't understand why, having made further tests and checks, all seem correct but when loading a program, I get mistakes. Still searching, maybe one of the longer thresholds wich I didn't test much (7 or 8 samples). Might try with another sinusoid form too, but if the source of the problem is somewhere else (timing or whatever in those hardware things I don't know much), then it's game over
And BTW yes, the goal is to put the code in page 1
I plan to silmplify the header / name loading to get a few more bytes if required.
Thanks for your comment on the code, but you will notice that it has many common things with TAP2CD - meaning that it's for a great part Fabrice's code