ZX80/ZX81 tape load "optimizations"

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
User avatar
marste
Posts: 250
Joined: Sun Aug 10, 2014 9:58 pm
Location: Italy
Contact:

Re: ZX80/ZX81 tape load "optimizations"

Post by marste »

Seems there is an utility called OTLA able to speed up a lot the "standard" loading!
Here is a video showing it working on a ZX81 https://www.youtube.com/watch?v=zDtySKE9nKU&t=1420s

PS: I see that it was already mentioned and used here in this forum, but I was trying the mentioned websites but seems it was deleted in the meantime

Someone know what the utility is doing?
- varying the number of pulses for 0s and 1s?
- simulating a speed up of the tape ?
- other things?
User avatar
Paul
Posts: 1511
Joined: Thu May 27, 2010 8:15 am
Location: Germanys west end

Re: ZX80/ZX81 tape load "optimizations"

Post by Paul »

In theory, there is no difference between theory and practice. But, in practice, there is.
User avatar
marste
Posts: 250
Joined: Sun Aug 10, 2014 9:58 pm
Location: Italy
Contact:

Re: ZX80/ZX81 tape load "optimizations"

Post by marste »

Paul wrote: Sun Jan 29, 2023 8:50 am https://code.google.com/archive/p/otla/ ... oOtla.wiki
still works with chrome.
Thanks Paul! My browser was blocking some scripts and now is just slightly broken but fully readable and very interesting!

Looking at the source I anyway found out that despite the speed it reaches, it is not using half of the wave and so the speed can probably be doubled! PS: by chance yesterday I stumbled on a thread and seems that also zsolt arrived in the past to the same conclusion, but I was not able to find the improvement finalized.

Moreover, the length of the waves for discerning 0 and 1 (and also the end of transmission) are "hard coded", and while this might be acceptable when the signal comes from a digital source (that maintains time pretty reliably), surely are a bit unsafe for real tape recorders in which might vary the speed of reproduction. Beginning the transmissions with few zeros and the same number of ones and then averaging the time of them can deliver a more proper differentiation parameter. In case of very long files the parameters can be even slightly adjusted during load!

It is a nice challenge and I drafted a load routine, keeping it for now around 30 bytes. To test it I should still adapt the file wave generator program and write the preparation part of the loader. Note that the initial preparation stage of the load routine can be long at will, just the final loading of the program should be short in order to fit an unused portion of memory. When I'll be able to finalize and test everything I'll post it here.

More possibilities to improve then can be to differentiate more frequencies for each half wave and assign them to more bits (e.g. 3KHz=00, 4KHz=01, 5KHz=10, 6KHz=11), and even error correcting codes might be used, so improving both speed and reliability, but both at the expenses of a longer loading routine.

Let's see how things will go. As usual for now happy hacking!
User avatar
Flatulentia
Posts: 93
Joined: Sun May 14, 2023 3:58 pm
Location: Cambridgeshire, UK

Re: ZX80/ZX81 tape load "optimizations"

Post by Flatulentia »

Slightly on a tangent and apologies if this is old news to some, but if others are also struggling with getting enough volume from their OTLA output files to load successfully, here's what I've been doing with a why and how...

Those who've dived inside their ZX81 will have probably noticed that the 3.5mm jack sockets are quite short in length. This is fine for a mono jack as both poles still connect, but with a stereo jack it only contacts the tip and first ring. Those are left and right channels on a stereo lead, so we can leverage this to our advantage by providing a differential signal to effectively double the output voltage swing from an MP3 player, smartphone or laptop.

Here's how: Load the output WAV from OTLA in to Audacity then go to Select/All. Now use Edit/Duplicate to make an exact time-synced copy in a second track. Highlight just the bottom track then use Effect/Invert. Now click on the down-arrow in the top track's info box and click on Make Stereo Track. Save the file out as you normally would.

Et, voila! You now have left and right channels in perfect anti-phase giving you the equivalent of a bridge-mode output with twice the voltage swing from your stereo playback device.

Note: This only works if the ground connections for the ZX81 and playback device are kept separate, but they always are if you're using a stereo connecting lead anyway.

I hope this post has sufficient value for it to be an acceptable mini-hijack.
ZX81 with ZiLOG Z84 CMOS Z80, 32KB battery-backed Toshiba 55257 SRAM with charge status LED, Wilf's "Why Wait?" mod and switch-mode 5V regulator. 50/60Hz mode switch, composite video output with Zigg's back porch mod and 1080p60 HDMI output.
Post Reply