Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Turbo Tape, how does it work?
2008-12-06 10:31
johncl

Registered: Aug 2007
Posts: 37
Turbo Tape, how does it work?

I have always been curious about how turbo tape really worked. I know that the tape drive originally could only read 50 bytes per second which would take a whopping 21 minutes to fill up the whole memory. I was always under the impression that games used compression to speed up tape loading (Just did a test with Giana Sisters which took 4 minutes to load).

Did Turbo Tape fiddle with the speed that data was written and read to the tape? I didnt think that was possible (only thought that was how they sped up disk reading/writing). If anyone got a good resource at how e.g. the well known Turbo Tape works, please post a linky here.
2008-12-06 11:18
ice00

Registered: Apr 2002
Posts: 54
C64 format:
2 copies of program are stored in sequence
20 bits are used for one byte of data to store
~ 1000 microsecond for a bit

Turbo format:
1 copy of program stored
8 or 9 bit for one byte of data to store
~ 550 microsecond for a bit

2008-12-06 11:44
Krill

Registered: Apr 2002
Posts: 2980
Generally, apart from storing only 1 copy, the lengths of short and long pulses for either bit are shorter, and some loaders also introduce a middle pulse, so two lengths would be ones and zeros, and the third would swap the meaning of the other two so the total length is minimized.
2008-12-07 06:35
Martin Piper

Registered: Nov 2007
Posts: 722
A good explanation of how a turbo works is here in "rant 8": http://codebase64.org/doku.php?id=base:irq-tape_loader

Then to get your turbo loader to autoboot: http://codebase64.org/doku.php?id=base:autoboot_tape_turbo_load..

The autoboot sources also include an improvement from the method used in "rant 8" to use a CIA timer while saving instead of having to carefully count cycles in the save code.
2008-12-07 11:44
enthusi

Registered: May 2004
Posts: 677
check http://enthusi.de
:)

edit:
also what other mentioned.
Main speedup: data not written twice.
CBM load uses 3 pulse-lengths (1 "pulse" = 2 signals, one "positive", one "negative" - the c64 detects downflanks).
CBM load uses 2 pulses for one bit!

TT uses 1 pulse = 1 bit.
Pulselengths are much shorter for TurboTape.
I illustrated some details in the link above some time ago.

TT is kind of the limit. Closer pulselength would get unreliable on different datasettes. Their speed varies slightly. Also the signal gets less clean when the head gets slightly twisted in respect to the tape itself...
I tried that alot :) cant really improve speed further without making it a lottery for the user.

CBM load aligns itself to tapespeed though! very efficient actually. TurboTape simply fails on significantly faster/slower datasettes.
2008-12-07 14:02
doynax
Account closed

Registered: Oct 2004
Posts: 212
Interesting. I never did have a datassette to play with and only vaguely remember a friend and I clocking a load at 15+ minutes for one of his C64 games. Still, if the speeds discussed here are accurate then you could squeeze an astonishing two megabytes onto a 90 minute tape.

Anyone care to explain how the physical encoding works and what the low-level limitations are, as opposed to, say, the magnetic coding on a floppy drive?
I mean why is a pulse scheme with flexible lengths preferred/required as opposed to something like GCR or MFM coding? And if differing tape speeds is the main obstacle then why isn't it possible to dynamically calibrate the loader?
2008-12-07 14:21
Mace

Registered: May 2002
Posts: 1799
To add to Doynax's questions: what's the differences between those proprietary loaders like Cyberload?
2008-12-07 14:36
tlr

Registered: Sep 2003
Posts: 1790
Quote: Interesting. I never did have a datassette to play with and only vaguely remember a friend and I clocking a load at 15+ minutes for one of his C64 games. Still, if the speeds discussed here are accurate then you could squeeze an astonishing two megabytes onto a 90 minute tape.

Anyone care to explain how the physical encoding works and what the low-level limitations are, as opposed to, say, the magnetic coding on a floppy drive?
I mean why is a pulse scheme with flexible lengths preferred/required as opposed to something like GCR or MFM coding? And if differing tape speeds is the main obstacle then why isn't it possible to dynamically calibrate the loader?


I guess pulse widths are prefered because every bit is a transition then, i.e safer/simpler.

Calibration should be possible, enthusi mentions it is done by the kernal cbm loader.
Also using GCR should be possible. That could be used to make a byte the length of 10 '0'-bits.
I'm not sure how safe it would be. Depends on how much/fast the tape speed varies _during_ loading.
Perhaps calibration could be made on the fly?
2008-12-07 15:13
doynax
Account closed

Registered: Oct 2004
Posts: 212
Come to think of it, if the cycle counts for a turbo-tape one-bit is half again as long as a zero then a GCR (5-to-4 bits) wouldn't really win anything unless you had more than fifty percent ones (which you shouldn't, since you can always invert all the data to get less than 50%.)
You'd be better off interleaving a Huffman-coder weighted towards zeroes with the loader instead.
2008-12-07 15:42
tlr

Registered: Sep 2003
Posts: 1790
In my GCR suggestion I assumed '0' was the shorter bit. For GCR only short bits are required.
In GCR a missing bit means 0, and a bit (=transition) means '1'.
2008-12-07 15:50
doynax
Account closed

Registered: Oct 2004
Posts: 212
Quote: In my GCR suggestion I assumed '0' was the shorter bit. For GCR only short bits are required.
In GCR a missing bit means 0, and a bit (=transition) means '1'.


As did I. It's just that a GCR encoded byte needs two extra bits, so a worst-case turbo-tape with 50% ones should just about break even with it.
At least, I think that's how it works out..
 
... 34 posts hidden. Click here to view all posts....
 
Previous - 1 | 2 | 3 | 4 | 5 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
marley
Fungus/Nostalgia
Technotron/I-I F
Peacemaker/CENSOR/Hi..
rexbeng
Krill/Plush
REBEL 1/HF
Guests online: 128
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Musicians
1 Rob Hubbard  (9.7)
2 Mutetus  (9.7)
3 Jeroen Tel  (9.7)
4 Linus  (9.6)
5 Stinsen  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.062 sec.