Page 1 of 2

ZX80/ZX81 tape load "optimizations"

Posted: Thu Jan 21, 2021 9:39 pm
by marste
As written on the page https://www.myprius.co.za/tape_storage.htm :
The tapes for the ZX81 seems to be a different kettle of fish. A "0" bit consists of four high pulses, a "1" bit of nine high pulses. Both are followed by a silence period. Each pulse is split into a 150us high period, and a 150us low period. The duration of the silence between each bit is 1300us. The baud rate is thus 400 bps (for a "0" filled area) down to 250 bps (for a "1" filled area). Average medium transfer rate is approximately 307 bps (38 bytes/sec) for files that contain 50% of "0" and "1" bits each. Image
I was wondering if someone already tried to optimize the file lenght decreasing some of those values (4 and 9 pulses, 150us periods, 1300us space) still trying to be compatible with the standard load routine.

Surely there should be some tolerance, but to which level it can be resonably ported?

In case someone want to do some tests I've "enhanced" the zx81 tape converter. Attached the new source and linux and window executable files. I've tested just Linux one, and with some extreme(?) parameters like "./p2wav.elf -wo7 -wz3 -wh100 -wi800 " it resulted almost half time!

Re: ZX80/ZX81 tape load "optimizations"

Posted: Fri Jan 22, 2021 10:16 pm
by stefano
I did on z88dk, one of the appmake options squeezes the wav file by reducing the pulse count where possible and tries to set a more aggressive interval too.

I found a similar trick in an historical program on an Italian magazine (supersinc), but the result didn't work for me, perhaps I got too few pulses, perhaps the author could use it due to a different tape player.. I never understood.

There are better ways to speed up the tape transfer, though.. some are really impressive.
I could adapt the historical Musamy tool, which sounds a bit like a zx spectrum.
It is very cool, its loader is able to self adjust the transfer speed as it was set when saving.. but still there are more impressive progrsms.. :|

Re: ZX80/ZX81 tape load "optimizations"

Posted: Sat Jan 23, 2021 2:54 am
by marste
stefano wrote: Fri Jan 22, 2021 10:16 pm I did on z88dk, one of the appmake options squeezes the wav file by reducing the pulse count where possible and tries to set a more aggressive interval too.
Is z88dk using the same audio loading routines? How far were you able to go?
stefano wrote: Fri Jan 22, 2021 10:16 pm There are better ways to speed up the tape transfer, though.. some are really impressive.
I could adapt the historical Musamy tool, which sounds a bit like a zx spectrum.
It is very cool, its loader is able to self adjust the transfer speed as it was set when saving.. but still there are more impressive progrsms.. :|
They were used pretty extensively on ZX SPectrum back in the days, since many programs were using almost all 48K, and so the various pauses and the initial turbo program loading were a must. These experiments are instead oriented to small (1k to max 16k) programs and so try to be compatible with the standard ZX8* loading mechanism and see where you could go with it!

Re: ZX80/ZX81 tape load "optimizations"

Posted: Sun Jan 24, 2021 4:07 pm
by mrtinb
The ZX-Wespi has a small loader, in normal speed, and the automatically shifts to a fast loader. All programs will load in a few seconds.

Re: ZX80/ZX81 tape load "optimizations"

Posted: Sat Jan 30, 2021 4:32 pm
by stefano
lovely!

Re: ZX80/ZX81 tape load "optimizations"

Posted: Sat Jan 30, 2021 7:37 pm
by marste
Wespi seems very nice indeed!
Anyway, how much will it take to load a 1K program end to end?

Re: ZX80/ZX81 tape load "optimizations"

Posted: Mon Feb 01, 2021 7:22 pm
by stefano
I personally love the turbo mode in the IDE assembler tool we all are probably using

Re: ZX80/ZX81 tape load "optimizations"

Posted: Mon Feb 01, 2021 11:36 pm
by marste
I personally I didn't use it, but for what I've red seems really really good!

But the point is again, end to end, for 1k programs, would be faster the standard routine optimized where possible, or to load a turbo routine and then the 1k program with turbo mode?

Anyway for the record until now I was not still able to find any working optimization of the standard routine unfortunately, but who knows...

Re: ZX80/ZX81 tape load "optimizations"

Posted: Fri Feb 05, 2021 12:53 am
by stefano
I can't understand why, but it is the second case.
Experimental results ;)

for optimizations, try z88dk-appmake ;)

Re: ZX80/ZX81 tape load "optimizations"

Posted: Fri Mar 12, 2021 12:56 am
by samscudder
The Brazilian machine code monitor, MicroBug allowed you to save memory blocks in 300bps (standard), and 1200 bps, by altering the wait loops.

The TK85 clone had a high speed save and load feature that operated at 4200 bps, based on QSave. One of the differences is that QSave saved 16K blocks, and the TK85 hi-save and hi-load worked like the normal ROM routines, saving only up to ELINE.