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