home *** CD-ROM | disk | FTP | other *** search
/ gdead.berkeley.edu / gdead.berkeley.edu.tar / gdead.berkeley.edu / pub / gdead / ibm / WTFSPEC.TXT < prev   
Text File  |  1995-10-16  |  9KB  |  209 lines

  1. WinTaper 1.01 .WTF File Specifications
  2.  
  3. ///////////////////////////////////////////////////////
  4. // W I N T A P E R   1 . 0 1   F I L E   F O R M A T //
  5. ///////////////////////////////////////////////////////
  6.  
  7. The file format is a _little_ haphazard due to modifications made and for
  8. backward compatibility's sake. Future formats will be better organized.
  9. Please don't make fun of my data structures. Most of them were written
  10. over two years ago and much has changed since then. Most of TAPEDATA's
  11. is manipulated by a derived class, which resides in the file wttape.dll.
  12. Hopefully soon I will release the necessary .LIB and .H files so any
  13. programmers using Borland C++ (or any language capable of calling a DLL
  14. compiled by BC++) will be able to tap into the prewritten routines for 
  15. tape file manipulation built into WTTAPE.DLL.
  16. ===========================================================================
  17. -Dan Tepper 10/16/95
  18. ===========================================================================
  19.  
  20.  
  21. Dont forget all strings (char xxx[i]) are 0-terminated, thus the maximum
  22. string length for xxx is i-1 (then add the 0 terminator).
  23.  
  24. The first record (record 0) in a wtf file contains personal data, tape 
  25. data starts with the second record (record 1). Personal data can be left
  26. blank (set to 0's)
  27.  
  28.  
  29.  
  30. ///////////////////////////////////////////////////////////////////////
  31. //this define maintains 16/32 bit compatibility by using
  32. //short instead of int when compiling for Win32, since
  33. //structures are read and written directly to disk and
  34. //the width (bytes) of the data fields must be the same
  35. //for both systems. By defining integers as shorts under
  36. //Win32 we can read 16bit integers from Win3.x correctly
  37.  
  38. #if defined(__WIN32__)
  39.   #define INTEGER SHORT
  40. #else
  41.   #define INTEGER int
  42. #endif
  43.  
  44.  
  45.  
  46. ///////////////////////////////////////////////////////////////////////
  47. //this typedef provides a wrapper around Windows' LOGFONT structure,
  48. //again for 32bit compatibility. Essentially, it types LOGFONT to
  49. //the 16bit flavor by using shorts instead of ints when under Win32
  50.  
  51. typedef struct wtLOGFONT
  52. {
  53.   INTEGER lfHeight;                 // height in points
  54.   INTEGER lfWidth;                  // NA - set to 0
  55.   INTEGER lfEscapement;             // NA - set to 0
  56.   INTEGER lfOrientation;            // NA - set to 0
  57.   INTEGER lfWeight;                 // NA - set to 0
  58.   BYTE    lfItalic;                 // NA - set to 0
  59.   BYTE    lfUnderline;              // NA - set to 0
  60.   BYTE    lfStrikeOut;              // NA - set to 0
  61.   BYTE    lfCharSet;                // NA - set to 0
  62.   BYTE    lfOutPrecision;           // NA - set to 0
  63.   BYTE    lfClipPrecision;          // NA - set to 0
  64.   BYTE    lfQuality;                // NA - set to 0
  65.   BYTE    lfPitchAndFamily;         // NA - set to 0
  66.   char    lfFaceName[LF_FACESIZE];  // typeface name (LF_FACESIZE=32)
  67. };
  68.  
  69.  
  70.  
  71. ///////////////////////////////////////////////////////////////////////
  72. //class defines a single song as a character string plus an integer
  73. //representing the jam code. This allows us to use an array of 
  74. //onesongs later to represent the songlist
  75.  
  76. class onesong
  77. {
  78.   public:
  79.     char songtitle[32] ;
  80.     INTEGER guzinta ;  // 0-xx= none,jams,fades,cuts,text,encore,encore2,cont'd,ending,n1,n2,n3,r1,r2,r3,...user codes
  81. };
  82.  
  83.  
  84.  
  85. class TAPEDATA
  86. {
  87.   public:
  88.  
  89.   char        band[21];
  90.   char        date[9];              // stored as text: yyyymmdd ie: 19951031 = 10/31/95
  91.   char        location[42];
  92.   char        srcinitial;           // internal use only (set to 0) - see "source" below
  93.   INTEGER     source;               // 0-13= none,SBD,Aud,SBD+Aud,FMB,FMS,MTSB,MTS-Siml,CD,Alb,BootCD,BootAlb,studio,outtakes
  94.   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
  95.   INTEGER     gen;                  // 0-25= none,DigMas,DigCopy,HiFiMas,HiFiCopy,AnlgMas,AnlgUnkwn,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,unknown
  96.   INTEGER     locationfontsize;     // size in points of location on SPINE of label
  97.   INTEGER     sets;                 // 0=2tapes,1=tape1,2=tape2,3=OneLongTape,4=1Dat2Cass
  98.   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
  99.   INTEGER     tape1time;            // time in minutes 0-255
  100.   INTEGER     tape2time;            // time in minutes 0-255
  101.   INTEGER     qualityID;            // 0-14= 0=none, 1-14 as follows: 1=worst 14=best 
  102.   char        tapeformat[2];        // 'C'=Cass,'D'=Dat,'V'=VHS,'8'=8mm,'B'=Beta,'R'=Reel
  103.  
  104.   struct      onesong songlist[34]; // array of 34 onesongs
  105.  
  106.   char        comment1[79];
  107.   char        setinfo[2];           // internal use only - set to 0's
  108.   char        comment2[79];
  109.   INTEGER     dolbyinfo;            // 0-13 = none,B,C,dbx,SP,EP,SLP,30.5,44.1,48.0,3.75,7.5,15,30
  110.   INTEGER     flip_1;               // 1-17 = 1st song on side B tape 1
  111.   INTEGER     flip_2;               // 1-17 = 1st song on side B tape 2
  112.   char        extra[2];             // internal use only - set to 0's
  113.  
  114.   wtLOGFONT   DateFont;             // note: lfHeight is used for size in points on label's SPINE
  115.   wtLOGFONT   LocationFont;         // note: lfHeight is used for size in points on label's FRONT
  116.   wtLOGFONT   SongsFont;
  117.   wtLOGFONT   CommentsFont;
  118.   wtLOGFONT   SourceFont;
  119.   wtLOGFONT   BandFont;
  120.   wtLOGFONT   Extra1;               // not used yet - Set to 0's
  121.  
  122.   char        alphasort[20];        // if blank, sorts on "band"
  123.   INTEGER     isdeleted;            // 0=NO, 1=YES
  124.   INTEGER     programnumber;        // not used yet - Set to 0
  125.   char        unusedbytes[26];      // not used yet - Set to 0's
  126.   INTEGER     datefontsize;         // size in points of date on FRONT of label
  127. };
  128.  
  129.  
  130.  
  131. =================================================
  132. == WTF 1.01 FILESPEC - FIELD OFFSETS IN BYTES  ==
  133. =================================================
  134.  
  135. class TAPEDATA
  136. {
  137.   HEXADECIMAL    DECIMAL      (record size: 1819 bytes)
  138.   start  end   start   end    field name
  139.   ----- ----   -----  ----    ---------------
  140.    0000-0014        0-  20    char band[21];
  141.    0015-001C       21-  29    char date[9];
  142.    001D-0047       30-  71    char location[42];
  143.    0048            72         char srcinitial;
  144.    0049-004A       73-  74    INTEGER source;
  145.    004B-004C       75-  76    INTEGER tape1type;
  146.    004D-004E       77-  78    INTEGER gen;
  147.    004F-0050       79-  80    INTEGER locationfontsize;
  148.    0051-0052       81-  82    INTEGER sets;
  149.    0053-0054       83-  84    INTEGER tape2type;
  150.    0055-0056       85-  86    INTEGER tape1time;
  151.    0057-0058       87-  88    INTEGER tape2time; 
  152.    0059-005A       89-  90    INTEGER qualityID;
  153.    005B-005C       91-  92    char tapeformat[2];
  154.    005D-04E0       93-1248    struct onesong songlist[34];
  155.    04E1-052F     1249-1327    char comment1[79];
  156.    0530-0531     1328-1329    char setinfo[2];
  157.    0532-0580     1330-1408    char comment2[79];
  158.    0581-0582     1409-1410    INTEGER dolbyinfo;
  159.    0583-0584     1411-1412    INTEGER flip_1;
  160.    0585-0586     1413-1414    INTEGER flip_2;
  161.    0587-0588     1415-1416    char extra[2];
  162.    0589-05BA     1417-1466    wtLOGFONT DateFont;
  163.    05BB-05EC     1467-1516    wtLOGFONT LocationFont;
  164.    05ED-061E     1517-1566    wtLOGFONT SongsFont;
  165.    061F-0650     1567-1616    wtLOGFONT CommentsFont;
  166.    0651-0682     1617-1666    wtLOGFONT SourceFont;
  167.    0683-06B4     1667-1716    wtLOGFONT BandFont;
  168.    06B5-06E6     1717-1766    wtLOGFONT Extra1;
  169.    06E7-06FA     1767-1786    char alphasort[20];
  170.    06FB-06FC     1787-1788    INTEGER isdeleted;
  171.    06FD-06FE     1789-1790    INTEGER programnumber;
  172.    06FF-0718     1791-1816    char unusedbytes[26]; 
  173.    0719-071A     1817-1818    INTEGER datefontsize;
  174. };
  175.  
  176.  
  177. =================================================
  178. == WTF 1.01 - SUPPORT CLASS BYTE OFFSETS       ==
  179. =================================================
  180.  
  181. typedef struct wtLOGFONT : (total size: 50 bytes)
  182. {
  183.   HEXADECIMAL   DECIMAL        
  184.   start  end   start end   field name
  185.    0000-0001       0- 1    INTEGER lfHeight;
  186.    0002-0003       2- 3    INTEGER lfWidth;
  187.    0004-0005       4- 5    INTEGER lfEscapement;
  188.    0006-0007       6- 7    INTEGER lfOrientation;
  189.    0008-0009       8- 9    INTEGER lfWeight;
  190.    000A           10       BYTE lfItalic;
  191.    000B           11       BYTE lfUnderline;
  192.    000C           12       BYTE lfStrikeOut;
  193.    000D           13       BYTE lfCharSet;
  194.    000E           14       BYTE lfOutPrecision;
  195.    000F           15       BYTE lfClipPrecision;
  196.    0010           16       BYTE lfQuality;
  197.    0011           17       BYTE lfPitchAndFamily;
  198.    0012-0031      18-49    char lfFaceName[32];
  199. };
  200.  
  201. class onesong : (total size: 34 bytes)
  202. {
  203.   HEXADECIMAL   DECIMAL        
  204.   start  end   start end  field name
  205.    0000-001F       0-31    char songtitle[32];
  206.    0020-0021      32-33    INTEGER guzinta ;
  207. };
  208.  
  209.