No problem Chema, I was not expecting everyone to drop everything to test unreliable tape loading
I think Fabrice did the best possible compromise between speed
. TAP2CD is brilliant.
I've been trying to push the limits by using faster sinusoids, but I've been struggling ever since to try to make it run without modification on most
Atmos (I don't even expect all
I've also tried many different bits coding strategies, to finally find that what Fabrice did in TAP2CD is probably the best, so I'm using it. BTW little by little, trying to have more precision, my code gets closer and closer to Fabrice's TAP2CD (BTW Fabrice is giving a hand by replying to many questions I have
Here's roughly how it works:
- At the moment, I'm using sinusoids of 3, 4, 5 and 6 samples, where TAP2CD uses IIRC, 4, 6, 8 and 10. It's faster but some Atmos don't like that, or give different values reading the lenght of each sinusoid.
- I've also added a kind of small RLE compression: every repeated byte will be coded with only a sinusoid of 5, 6, 7 or 8 samples (to repeat 1, 2, 3 or 4 times). So speed will vary with repetitions.
- based on my previous statistics, showing that globally Oric programs hold (IIRC) 60% of zeroes and 40% of 1, I used the shortest sinusoids to code zeroes: 3 is "00", 4 is "01", 5 is "10", and 6 is "11".
With both these "improvements", Zorgon's Revenge loads in 20 seconds (not counting the loader).
And finally I have in stock a dictionnary that codes the 14 bytes that take the longest time in the program to load (based on occurencies of unrepeated bytes and their length). I only made the program to make the signal, and Zorgon lasts then only 15 seconds - but I didn't implement the decoder yet. It will require heavy modifications and I'm not sure it's worth doing if in the end the thing only works on a few Atmos...
I wanted to make it more reliable first, if possible! Some sinusoids combinations lead to different lenght measure by the VIA, and some Atmos then mix for instance a 3 samples length with a 4 sample length. I think I found the best values and I'd like to see on how many machines it works, to see if it's worth carrying on.
I "only" have 3 Atmos at hand; the WAV test I posted works on two Atmos here, and the 3rd seems to have random errors which I don't understand yet (I made test programs and visually checked one by one about 150 bytes which had no mistakes in the Amos interpretation...)