Changes

Jump to: navigation, search

Format:TAP tape image file format

7 bytes added, 14:39, 28 April 2011
The .TAP files contain blocks of tape-saved data. All blocks start with two bytes specifying how many bytes will follow (not counting the two length bytes). Then raw tape data follows, starting with the flag byte. Unlike speccy format, the checksum bytes are not included, so you don't need calculate the crc-ccitt every 256 bytes, or padding the last page with zeroes, or ending with four 0xff bytes trailer.
1D 00 2C 50 68 61 6E 74 6F 6D 61 73 32 20 20 20 20 20 20 01 FF 02 58 00 00 AD FF
^^^^^...... first block is 29 bytes (28 bytes+flag) ^^... flag byte (A reg, 2C for headers, 16 for data blocks)
file name .^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
block number ..............................................^^
^^^^^............... logical length, in consecutive blocks (88 bytes)
^^^^^......... execution address for machine code programs (0xAD10) ^^^^^... second block is 89 bytes (88 bytes+flag)
flag byte ........^^
second block data ...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0 16 Filename Padded to 16 bytes with nulls
16 1 Block number Filename (padded with blanks) 17 1 Last block A non-zero value means that this is the last block of a file 18 1 File type A value recording the type of the file (see below) 19 2 Data length The number of data bytes in the data record 21 2 Data location Where the data was written from originally 23 1 First block A non-zero value means that this is the first block of a file 24 2 Logical length This is the total length of the file in bytes 26 2 Entry address The execution address for machine code programs
The file type (byte 18) is split into a number of fields: