Tape speed loading, OTLA revisited

Страница 1/2
| 2

By RvS

Expert (95)

Аватар пользователя RvS

24-09-2022, 21:29

Many years ago, I tried the OTLA software (link) and after plenty of fiddling with audiocard settings: it worked!
I was amazed at the 'tape' loading speed. This is close to 20 kilobits/s: witchcraft.
A few weeks ago I tried to figure out how they did it and if it would be possible to create these files myself.
It would be nice if you could 'auto-OTLA' .cas files to the MSX.

OTLA uses a few tricks to speed-up tape loading:

  • It uses coding for bit patterns '00','01','10' and '11'
  • Does not use start/stop bits
  • Uses a much higher (maximum) frequency of around 20kHz

Normal MSX tape routines use 11 bits to encode a byte (single startbit, 8 data bits and 2(!) stopbits).
Given a maximum frequency f, a '1' is encoded as 2 cycles of frequency f, and a '0' is encoded as one cycle of f/2.
This means that all bits have the same length:

In OTLA, this is not the case. Here the patterns are encoded with different number of samples. An example:

Now let's encode a byte with value 11100100b
On the MSX:

Using OTLA (msb first):

For MSX encoding: 44 samples and for OTLA: 14 samples.
So OTLA is ~70% faster using the same maximum frequency.
With OTLA, the bits do not have the same length. Files with lot's of '11' patterns will
be 'longer' than files with lot's of '00' patterns.
A short (not representative) check on my MSX files showed that the '00' pattern occurs
almost twice as much as the rest. If this is true, OTLA would be even a bit faster.

There are some issues however with the OTLA software:
It seems to incorrectly calculate the length of the file (one byte less).
Due to the way the samples are created, the file can have a DC offset.
The poke -1 value is not optional. You need to provide it.
Also, the MSX loader program is not that well documented. That's the next task.

Для того, чтобы оставить комментарий, необходимо регистрация или !login

By CASDuino

Champion (358)

Аватар пользователя CASDuino

24-09-2022, 21:38

One of the issues I had with trying to mess with OTLA source was one of the libraries it used was Borland I think and I couldn't find a replacement.

One thing I was constantly asked about was getting OTLA files working on CAS/TZXDuino but the simple answer is they are too fast for the firmware.

By Manuel

Ascended (19678)

Аватар пользователя Manuel

24-09-2022, 22:18

Is there a place where I can download a WAV file of an "OTLA'd game"?

By CASDuino

Champion (358)

Аватар пользователя CASDuino

24-09-2022, 22:28

Manuel wrote:

Is there a place where I can download a WAV file of an "OTLA'd game"?

The only WAV files I have of OTLA'd files is for the Spectrum.

I have just tried one for Manic Miner but we can't post the link can we?

By RvS

Expert (95)

Аватар пользователя RvS

24-09-2022, 23:26

Quote:

Is there a place where I can download a WAV file of an "OTLA'd game"?

Well, I could, but I would need to have the correct ’poke -1,’ value for your system. This is currently hard coded in the loader.

By RvS

Expert (95)

Аватар пользователя RvS

25-09-2022, 14:55

I have uploaded a .wav file for the HerbyMon tool. It has the poke-1,170 value hardcoded.
It should work with OpenMSX. The file is available here (HERBY1.wav)

By CASDuino

Champion (358)

Аватар пользователя CASDuino

25-09-2022, 17:58

Ah. Okay. BLOAD"CAS:",R to load them.
Now I know that I've managed to get Manic Miner to work on OpenMSX.
I'll have to see if it will load on a real MSX.

By Manuel

Ascended (19678)

Аватар пользователя Manuel

28-09-2022, 10:40

Cool, it works well in openMSX indeed. But for some reason, the tape isn't stopped (remote control isn't stopping the tape).

By CASDuino

Champion (358)

Аватар пользователя CASDuino

28-09-2022, 17:57

It would be nice if MSXr2b could be updated to run on 64 bit windows but there doesn't appear to be any source code out there.

By kokkiklhs

Supporter (7)

Аватар пользователя kokkiklhs

01-10-2022, 11:49

OTLA is a masterpiece, one of the most clever works I've seen on retrocomputing during the last years! IIRC it was based on the k7ZX utility for the Spectrum, which had a lot of alternative routines, some of of them (experimental) even faster than the fastest OTLA option...

But OTLA works with a reliable not-so-outrageously-fast specific routine, and it works the safe way, very effectively!
Furthermore, OTLA has been adapted to work with more platforms, not only with Spectrum.
I have already tried it (on real machines) with ZX Spectrum, ZX81, Amstrad CPC and the loading speeds are impressive. Haven't tried it on real MSX yet, though...

Pity there hasn't been any further development, I suppose that there could be rather easily implemented turboloading options for more Z80 based computers, e.g. MSX-like systems, like the Memotech MTX and the Spectravideo SV series, and for the CPC-like Enterprise 64/128...
All these systems are quite remarkable and the lucky owners of real hardware desperately lack any good fast loading option for the few games available for their machines...

By PingPong

Enlighted (4155)

Аватар пользователя PingPong

01-10-2022, 12:04

One question: why weren't those routines used in the 1980s? I guess due to the lack of reliability of tape devices.
Or maybe programmers, obsessed with standard FSK encoding?

Страница 1/2
| 2