The file format is a little haphazard due to modifications made and for backward compatibility's sake. Future formats will be better organized. Most of TAPEDATA's is manipulated by a derived class, which resides in the file wttape32.dll. Hopefully soon I will release the necessary .LIB and .H files so any programmers using Borland C++ (or any language capable of calling a DLL compiled by BC++) will be able to tap into the prewritten routines for tape file manipulation built into wttape32.dll. This information is taken from wttape.h. The syntax highlighting mimics that found in Borland C++ for ease of reading.
Dont forget all strings (char x[i]) are 0-terminated, thus the maximum string length for x is i-1 (then add the 0 terminator). The first record (record 0) in a .wtf file contains personal data, tape data starts with the second record (record 1). The personal data record can be left blank (set to 0's)
This preprocessor define maintains 16/32 bit compatibility by using short instead of int when compiling for Win32, since structures are read and written directly to disk and the width (bytes) of the data fields must be the same for both systems. By defining integers as shorts under Win32 we can read 16bit integers from Win3.x correctly
#ifdef __WIN32__
#define INTEGER SHORT
#else
#define INTEGER int
#endif
Basic Data Type Widths
| Data type | bits | bytes |
| BYTE | 8 | 1 |
| char | 8 | 1 |
| int | 32 | 4 |
| long | 32 | 4 |
| unsigned long | 32 | 4 |
| integer | 16 | 2 |
wtLOGFONT structure
This typedef provides a wrapper around Windows' LOGFONT structure, again for 32bit compatibility. Essentially, it types LOGFONT to the 16bit flavor by using shorts instead of ints when under Win32. The class is then used in the TAPEDATA structure.
typedef struct wtLOGFONT {
INTEGER lfHeight; /* height in points */ INTEGER lfWidth; /* always set to 0 (default) */ INTEGER lfEscapement; /* always set to 0 (default) */ INTEGER lfOrientation; /* always set to 0 (default) */ INTEGER lfWeight /* always set to 0 (default) */ BYTE lfItalic; /* always set to 0 (default) */ BYTE lfUnderline; /* always set to 0 (default) */ BYTE lfStrikeOut /* always set to 0 (default) */ BYTE lfCharSet; /* always set to 0 (default) */ BYTE lfOutPrecision /* always set to 0 (default) */ BYTE lfClipPrecision; /* always set to 0 (default) */ BYTE lfQuality; /* always set to 0 (default) */ BYTE lfPitchAndName; /* always set to 0 (default) */ char lfFaceName[32]; /* typeface name */
};
class onesong
This class defines a single song as a character string plus an integer representing the jam code. This allows us to use an array of onesongs later (in the TAPEDATA structure) to represent the songlist. guzinta is an integer enumeration with the values listed.
class onesong {
public: char songtitle[32]; /* zero-terminated character array holding the songname */ INTEGER guzinta; /* 0-xx= none, jams, fades, cuts, text, encore, encore2, cont'd, ending, n1, n2, n3, r1, r2, r3, ...user codes */
};
class TAPEDATA
The TAPEDATA class is where it all comes together. A WinTaper file is simply an array of these structures written to disk. Notice that class TAPEDATA contains arrays of some of the support structures listed above. Also note that some values are for future expansion and are not used. Where variables are enumerated, I have provided the corresponding values.
class TAPEDATA {
public: char band[21]; char date[9]; /* stored as text: yyyymmdd ie: 19951031 = 10/31/95 */ char location[42]; char srcinitial; /* internal use only (set to 0) - see "source" below */ INTEGER source; /* 0-13 = none, SBD, Aud, SBD+Aud, FMB, FMS, MTSB, MTS-Siml, CD, Alb, BootCD, BootAlb, studio, outtakes */ INTEGER tape1type; /* 0-21 = none, 1, 2, 3, 1st, 2nd, 3rd, Tape1, Tape2, Tape3, Part1, Part2, Part3, Early, Late, Matinee, Electric, Acoustic, Opener, Aritst, Encores, Conclusion */ INTEGER gen; /* 0-25 = none, DigMas, DigCopy, HiFiMas, HiFiCopy, AnlgMas, AnlgUnkwn, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, unknown */ INTEGER locationfontsize; /* size in points of location on SPINE of label */ INTEGER sets; /* 0 = 2tapes, 1 = tape1, 2 = tape2, 3 = OneLongTape, 4 = 1Dat2Cass */ INTEGER tape2type; /* 0-21 = none, 1, 2, 3, 1st, 2nd, 3rd, Tape1, Tape2, Tape3, Part1, Part2, Part3, Early, Late, Matinee, Electric, Acoustic, Opener, Aritst, Encores, Conclusion */ INTEGER tape1time; /* time in minutes 0-32768 */ INTEGER tape2time; /* time in minutes 0-32768 */ INTEGER qualityID; /* 0-14= 0=none, 1-14 as follows: 1=worst 14=best */ char tapeformat[2]; /* 'C'=Cass,'D'=Dat,'V'=VHS,'8'=8mm,'B'=Beta,'R'=Reel */ onesong songlist[34]; /* array of 34 onesongs (see above) */ char comment1[79]; char setinfo[2]; /* internal dynamic use only - set to 0's */ char comment2[79]; INTEGER dolbyinfo; /* 0-13 = none, B, C, dbx, SP, EP, SLP, 30.5, 44.1, 48.0, 3.75, 7.5, 15, 30 */ INTEGER flip_1; /* 1-17 = 1st song on side B tape 1 */ INTEGER flip_2; /* 1-17 = 1st song on side B tape 2 */ char extra[2]; /* internal dynamic use only - set to 0's */ wtLOGFONT DateFont; /* note: lfHeight is used for size in points on label's SPINE */ wtLOGFONT LocationFont; /* note: lfHeight is used for size in points on label's SPINE */ wtLOGFONT SongsFont; wtLOGFONT CommentsFont; wtLOGFONT SourceFont; wtLOGFONT BandFont; wtLOGFONT ExtraFont; /* not used yet - Set to 0's */ char alphasort[20]; /* if blank, sorts on "band" */ INTEGER isdeleted; /* 0=NO, 1=YES */ INTEGER programnumber; /* not used yet - Set to 0 */ unsigned long hashvalue; /* this and the next 3 fields are used by the tape trader add-on utility coming soon. Best to leave these values alone since their operations have not been set yet */ char isloaned; unsigned long trader_id; unsigned long add_date; char unusedbytes[13]; /* not used yet - Set to 0's */ INTEGER datefontsize; /* size in points of date on FRONT of label */
};
WTF 1.60 - FIELD OFFSETS IN BYTES
| HEX start |
HEX end |
DEC start |
DEC end |
bytes |
Type | Field Name |
| 0000 | 0014 | 0 | 20 | 21 | char | band |
| 0015 | 001C | 21 | 29 | 9 | char | date |
| 001D | 0047 | 30 | 71 | 42 | char | location |
| 0048 | 0048 | 72 | 72 | 1 | char | srcinitial |
| 0049 | 004A | 73 | 74 | 2 | INTEGER | source |
| 004B | 004C | 75 | 76 | 2 | INTEGER | tape1type |
| 004D | 004E | 77 | 78 | 2 | INTEGER | gen |
| 004F | 0050 | 79 | 80 | 2 | INTEGER | locationfontsize |
| 0051 | 0052 | 81 | 82 | 2 | INTEGER | sets |
| 0053 | 0054 | 83 | 84 | 2 | INTEGER | tape2type |
| 0055 | 0056 | 85 | 86 | 2 | INTEGER | tape1time |
| 0057 | 0058 | 87 | 88 | 2 | INTEGER | tape2time |
| 0059 | 005A | 89 | 90 | 2 | INTEGER | qualityID |
| 005B | 005C | 91 | 92 | 2 | char | tapeformat |
| 005D | 04E0 | 93 | 1248 | 1156 | onesong | songlist |
| 04E1 | 052F | 1249 | 1327 | 79 | char | comment1 |
| 0530 | 0531 | 1328 | 1329 | 2 | char | setinfo |
| 0532 | 0580 | 1330 | 1408 | 79 | char | comment2 |
| 0581 | 0582 | 1409 | 1410 | 2 | INTEGER | dolbyinfo |
| 0583 | 0584 | 1411 | 1412 | 2 | INTEGER | flip_1 |
| 0585 | 0586 | 1413 | 1414 | 2 | INTEGER | flip_2 |
| 0587 | 0588 | 1415 | 1416 | 2 | char | extra |
| 0589 | 05BA | 1417 | 1466 | 50 | wtLOGFONT | DateFont |
| 05BB | 05EC | 1467 | 1516 | 50 | wtLOGFONT | LocationFont |
| 05ED | 061E | 1517 | 1566 | 50 | wtLOGFONT | SongsFont |
| 061F | 0650 | 1567 | 1616 | 50 | wtLOGFONT | CommentsFont |
| 0651 | 0682 | 1617 | 1666 | 50 | wtLOGFONT | SourceFont |
| 0683 | 06B4 | 1667 | 1716 | 50 | wtLOGFONT | BandFont |
| 06B5 | 06E6 | 1717 | 1766 | 50 | wtLOGFONT | Extra1 |
| 06E7 | 06FA | 1767 | 1786 | 20 | char | alphasort |
| 06FB | 06FC | 1787 | 1788 | 2 | INTEGER | isdeleted |
| 06FD | 06FE | 1789 | 1790 | 2 | INTEGER | programnumber |
| 06FF | 0702 | 1791 | 1794 | 4 | unsigned long | hashvalue |
| 0703 | 0703 | 1795 | 1795 | 1 | char | isloaned |
| 0704 | 0707 | 1796 | 1799 | 4 | unsigned long | trader_id |
| 0708 | 070B | 1800 | 1803 | 4 | unsigned long | add_date |
| 070C | 0718 | 1804 | 1816 | 13 | char | unusedbytes |
| 0719 | 071A | 1817 | 1818 | 2 | INTEGER | datefontsize |
WTF 1.60 - SUPPORT CLASS FIELD OFFSETS IN BYTES
class wtLOGFONT
| HEX start |
HEX end |
DEC start |
DEC end |
bytes |
Type | Field Name |
| 0000 | 0001 | 0 | 1 | 2 | INTEGER | lfHeight |
| 0002 | 0003 | 2 | 3 | 2 | INTEGER | lfWidth |
| 0004 | 0005 | 4 | 5 | 2 | INTEGER | lfEscapement |
| 0006 | 0007 | 6 | 7 | 2 | INTEGER | lfOrientation |
| 0008 | 0009 | 8 | 9 | 2 | INTEGER | lfWeight |
| 000A | 000A | 10 | 10 | 1 | BYTE | lfItalic |
| 000B | 000B | 11 | 11 | 1 | BYTE | lfUnderline |
| 000C | 000C | 12 | 12 | 1 | BYTE | lfStrikeOut |
| 000D | 000D | 13 | 13 | 1 | BYTE | lfCharSet |
| 000E | 000E | 14 | 14 | 1 | BYTE | lfOutPrecision |
| 000F | 000F | 15 | 15 | 1 | BYTE | lfClipPrecision |
| 0010 | 0010 | 16 | 16 | 1 | BYTE | lfQuality |
| 0011 | 0011 | 17 | 17 | 1 | BYTE | lfPitchAndFamily |
| 0012 | 0031 | 18 | 49 | 32 | char | lfFaceName |
class onesong
| HEX start |
HEX end |
DEC start |
DEC end |
bytes |
Type | Field Name |
| 0000 | 001F | 0 | 31 | 32 | char | songtitle |
| 0020 | 0021 | 32 | 33 | 2 | INTEGER | guzinta |