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:

ZX80/ZX81 tape load "optimizations"

Post 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!
Attachments
zx81_tape_converter_v05.zip
(183.26 KiB) Downloaded 232 times
User avatar
stefano
Posts: 542
Joined: Tue Dec 11, 2012 9:24 am
Contact:

Re: ZX80/ZX81 tape load "optimizations"

Post 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.. :|
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 »

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!
User avatar
mrtinb
Posts: 1906
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: ZX80/ZX81 tape load "optimizations"

Post 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.
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
User avatar
stefano
Posts: 542
Joined: Tue Dec 11, 2012 9:24 am
Contact:

Re: ZX80/ZX81 tape load "optimizations"

Post by stefano »

lovely!
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 »

Wespi seems very nice indeed!
Anyway, how much will it take to load a 1K program end to end?
User avatar
stefano
Posts: 542
Joined: Tue Dec 11, 2012 9:24 am
Contact:

Re: ZX80/ZX81 tape load "optimizations"

Post by stefano »

I personally love the turbo mode in the IDE assembler tool we all are probably using
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 »

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...
User avatar
stefano
Posts: 542
Joined: Tue Dec 11, 2012 9:24 am
Contact:

Re: ZX80/ZX81 tape load "optimizations"

Post by stefano »

I can't understand why, but it is the second case.
Experimental results ;)

for optimizations, try z88dk-appmake ;)
samscudder
Posts: 5
Joined: Thu Oct 24, 2019 9:39 pm

Re: ZX80/ZX81 tape load "optimizations"

Post 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.
Post Reply