home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / cbm / 3187 < prev    next >
Encoding:
Text File  |  1992-07-23  |  1.6 KB  |  41 lines

  1. Newsgroups: comp.sys.cbm
  2. Path: sparky!uunet!psgrain!m2xenix!clark!cis501
  3. From: cis501@clark.edu (Charles Boling)
  4. Subject: Finding the text in SIDPlayer files
  5. Message-ID: <1992Jul23.145813.1593@clark.edu>
  6. Summary: use voice lengths
  7. Organization: Clark College, Vancouver, Wa.  USA
  8. References: <1992Jul22.1115.5439@dosgate>
  9. Distribution: comp
  10. Date: Thu, 23 Jul 1992 14:58:13 GMT
  11. Lines: 28
  12.  
  13.  
  14. The following is taken from "SIDPLAYER MUSIC FILE CONTENTS" by Dick Thornton:
  15.  
  16. The general format of the .MUS file in memory is:
  17. [1] 2-byte length of voice1 (low-byte/high-byte)
  18. [2] ---------------- voice2 --------------------
  19. [3] ---------------- voice3 --------------------
  20. [4] Data for voice1, ending with a HLT command ($01 $4F)
  21. [5] -------- voice2 ------------------------------------
  22. [6] -------- voice3 ------------------------------------
  23. [7] Text lines - 5 lines, each containing 0-32 bytes & ending with a CR.  
  24.     A $00 follows the last byte of the last line of text.
  25.  
  26.  
  27.  
  28. So, the most direct way would probably be to add up the first 3 words
  29. (the voice lengths) and then add 6 to that. This will give you the offset of
  30. the beginning of the text area.
  31.  
  32. Another way, I suppose, would be to search from the end of the file backwards
  33. until you found a $01. (the first byte of the HLT command for voice3)
  34.  
  35.  
  36. -- 
  37. /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
  38. \ Charles L. Boling   cis501@clark.edu             Clark College       /
  39. /                     cis501@wsuvm1.csc.wsu.edu    Vancouver, WA  USA  \
  40. \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
  41.