Bsc Version 1.00 Bsc is a program which creates BinSCII files on UNIX systems. COMPILING --------- To compile: cc -o bsc bsc.c Bsc was written and tested on a BSD-based UNIX system. If you have a System V-based UNIX, you might try compiling with the command cc -DSYSTEMV -o bsc bsc.c However, I don't really know whether or not this will work, since I don't have access to a true System V UNIX system. You may be on your own here. After you compile bsc, feel free to rename it to whatever you want--it's smart enough to figure out its own name. EXECUTING --------- To run bsc, use: bsc [] The following options are available: -t type Sets the ProDOS filetype stored in the BinSCII header to "type". The type may be specified in any of several ways: Type Meaning ---- ----------- LLL 3-letter abbreviation dd decimal 0xdd hexadecimal $dd hexadecimal 0dd octal Note that a 3-letter abbreviation must be specified in lowercase, and that if you use a hex number in $dd format you will have to quote or escape the $ to protect it from the shell. If no "-t" option is present, the filetype will default to 6 (BIN). (See the file "pftypes.h" for a complete list of recognized 3-letter ProDOS filetype abbreviations.) -a auxtype Sets the stored ProDOS auxiliary filetype to "auxtype". The auxiliary type may specified in any of the following forms: Syntax Base ------ ----------- dd decimal $dd hexadecimal 0xdd hexadecimal 0dd octal If no "-a" options is present, the auxiliary filetype will default to 0. -m mode Sets the stored ProDOS access mode to "mode" The mode may be one or more of the following: Mode Meaning ---- --------- d destroy n rename b backup-needed i invisible w write r read If no "-m" option is present, the access mode defaults to "dnwr", which corresponds to an "unlocked" ProDOS file. To create a "locked" file, use "-m r". -s num Sets the number of BinSCII segments per output file to "num". As above, the number may be specified in decimal, hex, or octal. If no "-s" option is present, or if "num" is 0, then all BinSCII segments will be written to a single output file. To cause each segment to go into its own output file (like the Apple II BINSCII program), use "-s 1". See below for an explanation of output files. -h Print a short summary of bsc's options on the standard output. These options, if present, may appear in any order, provided that they appear before the filename. Spaces may appear between an option letter and its value, but are not necessary. The filename is the name of the UNIX file to be BinSCII'd. The stored ProDOS filename will be taken from the UNIX name, with lowercase letters converted to uppercase and with invalid characters replaced with the letter "X". The ProDOS name will be truncated to 15 letters if the UNIX name is longer than that. The stored ProDOS creation and modification times will be taken from the UNIX input file. The output of bsc is a set of one or more files, each containing one or more BinSCII segments. By default, all BinSCII segments are written to a single output file, which has the same name as the input file with a ".0" appended to the end. If the "-s" option is given on the command line with a value greater than zero, then the number of segments per output file will be limited to the specified value, and if more than one output file is needed, the second file will have ".1" appended to the name, the third will have ".2" appended, and so forth. For example, if "foo" is a large UNIX file, the command "bsc -s3 foo" will create files "foo.0", "foo.1", "foo.2", etc., each containing 3 BinSCII segments. WARNING: IF A FILE WITH THE SAME NAME AS A BSC OUTPUT FILE ALREADY EXISTS, THE PRE-EXISTING FILE WILL BE SILENTLY OVERWRITTEN BY THE BSC OUTPUT FILE. Before typing "bsc foo", it is probably a good idea to make sure you don't already have an important data file called "foo.0". Bsc will refuse to BinSCII a file larger than 16777216 bytes (16 meg), since that is the maximum size of a ProDOS file. An example: Suppose a UNIX file called "picture" contains a standard Apple IIGS super-hires screen image. The command bsc -tpic picture will create the file "picture.0" in a format suitable for downloading to an Apple II and un-BinSCIIing, or for posting to comp.binaries.apple2. When un-BinSCII'd on an Apple II, it will automatically be converted to a PIC ($C1) file. INFORMATION ----------- This program is freeware. It comes with no warranty of any kind--in particular, I cannot guarantee that it is free of bugs. Use it at your own risk. When the inevitable bugs DO appear, send e-mail to one of the addresses below. I welcome bug reports, comments, complaints, and suggestions for improvement. Thanks to Marcel J. E. Mol, whose sciibin program was a valuable source of technical information on BinSCII. - Neil Parker parker@corona.uoregon.edu nparker@cie.uoregon.edu parkern@jacobs.cs.orst.edu