ARKLNX by Peter Weighill ====== ARKLNX is a DOS based program which can be used to create information about .ARK and .LNX files containing sidplayer .MUS music files and their associated .STR, .WDS & .PIC files. You can either use the EXEcutable version or use the BASic version with QBASIC as supplied with MS-DOS 5 & 6. This program will hopefully make keeping a record of music files stored in your archives easier. Just type in the name of the file to be viewed and choose which format you require and a report file will be created with one of the following File extensions: .AS - ARK file, short format .AL - ARK file, long format .LS - LNX file, short format .LL - LNX file, long format Below are examples of the short and long format output. Both show the filename, the exensions of that filename (.MUS.STR.WDS.PIC) and the total blocks used by all those files. The long format also shows the description which is contained in the *.MUS files. Short format: ============ 9 LNG TL SALLY .MUS.STR 8 O HOLY NIGHT .MUS.STR.WDS 11 PIPER .MUS.STR.WDS 7 PEOPLEEATER .MUS 21 ROCK ME.MUS.WDS Long Format: ============ 9 LNG TL SALLY .MUS.STR /(C)APRıııııııııııııııııııı1987\ | ***** LONG TALL SALLY ****** | | RECORDED BY 'LITTLE RICHARD' | |SIDRANGED BY JERRY ROTH (DR J)| \-DEC-STEREOEDııMARK AD IIı1987/ 8 O HOLY NIGHT .MUS.STR.WDS O HOLY NIGHT . . WDS J.S.DWIGHT MUS A.ADAM . 6 VOICE BY DC STAR & CPR #, ııııııııııııı / - DECEMBER 1987 --------/|---- 11 PIPER .MUS.STR.WDS /-------------------\ /--------\ |THE PIPER FROM OVER| | STEREO | | THE WAY | | SID BY | | BY MAY H. BRAHE | | LYRIC | \-------------------/ \--------/ 7 PEOPLEEATER .MUS PURPLE PEOPLE EATER /..\ MUSIC BY SHEB WOOLEY # / -- \ ----------- -- |\''/| SID KERMIT R. WOODALL // - |- -------------------------------- 21 ROCK ME .MUS .WDS /--\ \ / \ | \ | | | . \ | -\\-\/-\/-/ + | | |-\ \ + /-\ | || |-/| | | |/\| | | | | |-/ \--// \-/\-\ \ \/\/ / \ \ \ \-/ Below I have listed the format of the .ARK and .LNX file formats as I believe the are. This is just my guess though from what I have seen of them and the programs LYNX and ARKIVE may have a different way of working out 'what is what' in each file. The BLOCK size in the files is 254 bytes long since the first 2 bytes on each sector of a disk is not part of the file and is used by the disk drive. .LNX ~~~~ Header: Junk until 3 or more zeros are reached. RETURN ($0D) No. of blocks for header (ascii number format) + version header eg.(LYNX VII BY WILL ...) RETURN ($0D) No. of files in .LNX file (ascii number format) RETURN ($0D) File: NO FIXED LENGTH per file header since 'No. of blocks' and 'No. of bytes in last block' are not fixed lengths. Filename, padded with shifted spaces ($A0) to 16 characters long RETURN ($0D) No. of blocks for file (ascii number format) RETURN ($0D) File type (letter P for prg, S for SEQ) RETURN ($0D) No. of bytes used in last block (ascii number format) RETURN ($0D) .ARK ~~~~ Header: Byte for No. of files in .ARK file ARK format does not include the number of blocks used for the header since this can be calculated by multiplying the 0number of files by 29, adding 1 and rounding up to nearest 254. File: FIXED length of 29 per file header. Byte for file type (same method as disk drive eg $81 SEQ, $82 PRG) Byte for No. of bytes used in last block Rest of header is what is normally stored in the directory header on a disk from the begining of the filename to the size of the file. Byte positon 3, filename, padded with shifted spaces ($A0) to 16 characters long Byte postion 28/29, No. of blocks for file in lo/hi byte format. * usually hi byte not used since most files smaller than 256 blocks. .MUS format ~~~~~~~~~~~ Two methods to locate the description at the end of a .MUS file. 1. Prefered method, since quicker, works most of the time and works more often than method 2. Bytes $03/$04, lo/hi size of 1st music voice Bytes $05/$06, lo/hi size of 2nd music voice Bytes $07/$08, lo/hi size of 3rd music voice Offset for description = sum of size of each voice + 8 extra bytes for the size bytes & start address. Check to see that byte before description offset is an "O", if not then try method 2. 2. Skip first 8 bytes of header information. Then find offset for third "O" in file. Description usually after this third "O". (Method sometimes fails and finds third "O" in music area of file, since I do not know the exact format of the music data, I cannot work out how to get around this problen.) 3. If both methods fail then description shown could either be blank or be junk. Uploaded & written by stuce@csv.warwick.ac.uk