home *** CD-ROM | disk | FTP | other *** search
/ ABBUC Magazin 46B / ABBUC_Magazin_46_1996_ABBUC_Side_B.atr / btape.arc / BTAPE4.DOC < prev    next >
Text File  |  1996-01-03  |  7KB  |  1 lines

  1. ¢        Physical format¢¢  The following part of this text describes the physical format of data on tape. It's only for the case, that someone is interested - the described format is supported by SIO-routines of BTAPE, that are also accessible for other programs (see above).¢  The signal recorded on tape describes single bits with different lengths of impulses. This system came from TT-DOS, and it was used because of compatibility with older czech software. The origin of this system is in the line ZX-Spectrum - TURBO 2000 - TT-DOS - B-TAPE. The used format is not supported by the Atari hardware, so all decoding is software-based. That's why the screen must be off during the I/O operations. Recording to tape uses POKEY-timers, so the timing of created signal is perfect (that's different from older "Turbo" systems like TT-DOS).¢  Reading of this format is possible only with a tape recorder modified for "Turbo". This upgrade is activated by storing $34 at $D302 and $D303. Then, the input data-line reads directly the signal from tape.¢  Each bit is recorded as one impulse followed by a pause of the same length. While reading, the length of impulse and pause together is significant. The exact length of these impulses depends on the used transmission speed. The impulses for a bit with value "1" are exactly two times longer, than the impulses for a "0" bit.¢  A block begins with a lot of "1" bits. This signal is used for synchronization of the reading routine, and also to recognize the used transmission-speed. The length of this signal (0.5-1.5 sec - depending on the used mode) also helps with the compensation of different times used for interpretation of data between blocks. A single "0" bit is following. This bit indicates the begin of actual data. Then the data-bytes are stored, highest bit first. At the end, one internal check-byte is stored - this byte never appears in the data buffer. The value of this byte is a combination of all data-bytes using the function Exclusive-OR (EOR in assembler). The signal of a block is finished with a single bit more - the value of this bit isn't defined. This bit is necessary for a safe interpretation of the last recorded byte - this bit closes the pause after last significant impulse. The polarity is not defined - the bits may be stored as "high-low" or "low-high" (so copying the tape using different audio-devices makes no problem at this point).¢  When the recording of a block begins immediately after turning the recorder on, a short pause is added before begin of the signal. This avoids affecting of the synchronization-signal by "waking up" the recorder, or by an old signal (because of the delay between the clearing and recording heads). Affected signal leads to errors in recognized trasmission-speed, and so decreases safety of the transfer.¢  The melody-signal "start of file" is just a sound-effect for better orientation, it have no sense for the reading routine.¢¢¢        Logical format¢¢  Each block under B-TAPE is 1025 ($401) bytes long, and it contains 1008 ($3F0) bytes of data, and 17 ($11) header bytes. The info about structure of a block is necessary while working on SIO-level. The bytes in a block are following:¢¢0 - Serial number of the block in file. This number may be between 1 and 255, the block 0 is not used.¢¢1 - Recording mode. This is a copy of "aux2" value used while recording the file - including the ORed settings defined while installing BTAPE. This byte is used by the "DIR" function to recognize and show files with double-blocks.¢¢2,3 - Position of the last significant byte in the block (only the lower 11 bits). Every blocks excepting the last one have $400 here (incomplete blocks in the middle of a file are not allowed - because of the NOTE and POINT functions). When the length of file is not equal to zero, empty blocks (value 16) are never present. The last block of a file have the highest bit (bit 7 in the byte 3) set to "1". The unused bits should be allways zero.¢¢4 - Unused byte (reserved). Under B-TAPE it's allways zero, and it should be also with any other programs (working at SIO-level for example). When using the old TT-DOS, you may encounter almost any value here. The value is allways the same for every blocks in a file.¢¢5 - The random number. This number is created (randomly) during the OPEN operation, and is allways the same for every blocks in the file. It is used to recognize and reject blocks from other files even if the filenames are identical. The old TT-DOS doesn't create the random numbers.¢¢6-16 - The filename (8 characters of name and 3 characters of extension).¢¢17-1024 - Data bytes. The unused bytes in the last block of a file are allways zero under B-TAPE, but while working with the old TT-DOS, these bytes are not defined.¢¢¢        COMPATIBILITY¢¢  In this chapter you'll find some info about compatibility between B-TAPE and selected programs. The most common problem with compatibility will be probably a collision in memory - see also the chapter "Installation" for more info.¢¢¢        SpartaDOS¢¢  B-TAPE is compatible with SpartaDOS versions 3.2d, 3.2e, and 3.2f (other versions wasn't tested). While installing BTAPE under OS-ROM with SpartaDOS, you must use the parameter "/OX" (the function AINIT will not be available then, and the errors in CP will be shown as numbers only).¢  The internal command "COPY" in SpartaDOS is not fully compatible with B-TAPE. It can't carry original filenames while copying from tape (you must allways type both source and destination filenames), and it also can't copy directly from tape to tape. When necessary, you can use the external "COPY" from BW-DOS by typing "COPY.COM" instead of "COPY". But please don't use the "COPY" from BW-DOS for disk-to-disk copying under Sparta - this leads to incorrect date/time information on copied files.¢¢¢        Turbo Basic¢¢  To get the popular Turbo Basic working with B-TAPE, you must install the "BTAPE" command into a Ramdisk bank (use the parameter "/B"). This works only with min. 128kB RAM of course.¢  On a 64kB system, the Turbo Basic may not work with B-TAPE installed at the same time. The only solution in this case is so called "Turbo Basic 3.2q" (a version for SpartaDOS), with SpartaDOS 3.2 and "BTAPE /OX".¢¢¢        TT-DOS¢¢  TT-DOS is an older czech program, that contains a DOS 2.5 clone FMS, and a very first version of the "B:" handler. The format of tape-files is compatible with B-TAPE.¢  Since TT-DOS is a DOS 2.5 alike system, no filenames - including these ones on tape - may contain the character "_", and also a number is not allowed at the first position. TT-DOS don't support the random numbers, so every tape-files under TT-DOS should have different names.¢  The functions of "B:" handler found in TT-DOS are also supported by B-TAPE. B-TAPE also supports some new functions (NOTE, POINT, Binary load, and the access at SIO-level), that are not available under TT-DOS. A small difference is also in the format of directory-listing. TT-DOS uses the character "#" for files with double-blocks (B-TAPE uses "*"), and the "FREE SECTORS" counter is DOS 2.5 alike, so it shows "999+FREE SECTORS".¢¢¢