Discussion:
BINSCII decoder
Add Reply
m***@yahoo.com.sg
2017-10-06 07:25:04 UTC
Reply
Permalink
Raw Message
Hi,

I might be 20-30 years late and there might not be any use for another BINSCII decoder. However, I do know notice there are mirror links at the URL

https://mirrors.apple2.org.za/

which have many Apple II files encoded in BINSCII format. These files have a file extension of BSC or BSQ. A lot of e-mails sent to the newsgroup comp.binaries.apple2 contain BINSCII text blocks (called segments) embedded within the body of the posts.

For those unfamiliar with files in BINSCII format, each segment of an encoded file begins with the line

FiLeStArTfIlEsTaRt

and ends with a text line consisting of 4 printable characters. Small Apple 2 programs (<= 12K) are output as a single BSC/BSQ file. Larger Apple 2 programs will be encoded and output in multiple segments. The segments are usually written out as separate text files and given the file extension BSC/BSQ. To facilitate posting to newsgroups, the segments can be copied and paste to an e-mail. Multiple segments can also appear in a single BSC/BSQ file which BTW, is just a text file.

My program SciiBinX (which runs under MacOSX 10.5 or later) has a simple UI, a single drop window with a progress indicator. The user drag-and-drops one or more BSQ/BSQ files onto this window; the underlying decoder will extract the original Apple2 ProDOS file and writes it to the same folder as the BSC/BSQ file(s). Since it operates under Mac OS X, the original file’s attributes will be preserved as an extended Mac OS X file attribute.

This program was actually written years back but only updated recently to

a) handle situations like leading and trailing spaces in each line of a BINSCII segment of a BSC/BSQ file,
b) combining BINSCII segments in separate BSC/BSQ files to produce the original Apple2 ProDOS file.

It can handle interspersed non-block text as well as different types of line endings. It shouldn’t have problems if all the BINSCII segments of the encoded file are in a single text file.

What is required now is for the program to return concise error messages. I have not decided whether it’s better to log the error messages or put up dialogs. The former feature will allow the user to decode lots of BSC/BSQ files at one go. The message log can be viewed if there are failures as a result of data corruption.

Adding QuickLook and Spotlight plugins might be helpful to those who would like to maintain a repository of BSC/BSQ files.

Help needed either as a beta-tester or you could e-mail to me BSC/BSQ files which couldn’t be decoded.

Mark
I am Rob
2017-10-06 13:56:23 UTC
Reply
Permalink
Raw Message
Post by m***@yahoo.com.sg
Hi,
I might be 20-30 years late and there might not be any use for another BINSCII decoder. However, I do know notice there are mirror links at the URL
https://mirrors.apple2.org.za/
which have many Apple II files encoded in BINSCII format. These files have a file extension of BSC or BSQ. A lot of e-mails sent to the newsgroup comp.binaries.apple2 contain BINSCII text blocks (called segments) embedded within the body of the posts.
For those unfamiliar with files in BINSCII format, each segment of an encoded file begins with the line
FiLeStArTfIlEsTaRt
and ends with a text line consisting of 4 printable characters. Small Apple 2 programs (<= 12K) are output as a single BSC/BSQ file. Larger Apple 2 programs will be encoded and output in multiple segments. The segments are usually written out as separate text files and given the file extension BSC/BSQ. To facilitate posting to newsgroups, the segments can be copied and paste to an e-mail. Multiple segments can also appear in a single BSC/BSQ file which BTW, is just a text file.
My program SciiBinX (which runs under MacOSX 10.5 or later) has a simple UI, a single drop window with a progress indicator. The user drag-and-drops one or more BSQ/BSQ files onto this window; the underlying decoder will extract the original Apple2 ProDOS file and writes it to the same folder as the BSC/BSQ file(s). Since it operates under Mac OS X, the original file’s attributes will be preserved as an extended Mac OS X file attribute.
This program was actually written years back but only updated recently to
a) handle situations like leading and trailing spaces in each line of a BINSCII segment of a BSC/BSQ file,
b) combining BINSCII segments in separate BSC/BSQ files to produce the original Apple2 ProDOS file.
It can handle interspersed non-block text as well as different types of line endings. It shouldn’t have problems if all the BINSCII segments of the encoded file are in a single text file.
What is required now is for the program to return concise error messages. I have not decided whether it’s better to log the error messages or put up dialogs. The former feature will allow the user to decode lots of BSC/BSQ files at one go. The message log can be viewed if there are failures as a result of data corruption.
Adding QuickLook and Spotlight plugins might be helpful to those who would like to maintain a repository of BSC/BSQ files.
Help needed either as a beta-tester or you could e-mail to me BSC/BSQ files which couldn’t be decoded.
Mark
Hi Mark.

Are you the original author that wrote the BinSCii program to work under Mac OS9? If so, just want to say thanks, that made my life so much easier decoding .bxy files back when I was downloading as much as I could from Asimov.
m***@yahoo.com.sg
2017-10-06 21:04:22 UTC
Reply
Permalink
Raw Message
Post by I am Rob
Are you the original author that wrote the BinSCii program to work under Mac OS9? If so, just want to say thanks, that made my life so much easier decoding .bxy files back when I was downloading as much as I could from Asimov.
No. I wrote NuShrinkItX using Andy Fadden's NuFX library.

Currently, I am updating SciiBinX with 2 plugins: QuickLook and Spotlight.

Regards.

Mark
Hugh Hood
2017-10-07 03:23:55 UTC
Reply
Permalink
Raw Message
Mark,

Having written a couple of Spotlight plugins myself, I've got to ask.

Are you actually indexing the text content of the archived files, or
rather primarily the file names and ProDOS attributes?

And, if the former, how do you handle the indexing of say a binary
application, or even a HGR image? And, in turn, would your Quicklook
Plugin display the image?

IIRC, the plugin that comes with Virtual ][ (to handle disk images)
justs indexes the file names and attributes, much like the plugins I've
seen that index .zip archives.

Thanks, and nice work.





Hugh Hood
Post by m***@yahoo.com.sg
Post by I am Rob
Are you the original author that wrote the BinSCii program to work under Mac OS9? If so, just want to say thanks, that made my life so much easier decoding .bxy files back when I was downloading as much as I could from Asimov.
No. I wrote NuShrinkItX using Andy Fadden's NuFX library.
Currently, I am updating SciiBinX with 2 plugins: QuickLook and Spotlight.
Regards.
Mark
m***@yahoo.com.sg
2017-10-07 07:45:18 UTC
Reply
Permalink
Raw Message
Hi Hugh,
Post by Hugh Hood
Thanks, and nice work.
Thanks for the compliment.
Post by Hugh Hood
Are you actually indexing the text content of the archived files, or
rather primarily the file names and ProDOS attributes?
Just the filenames and ProDOS attributes. Indexing the text contents of an archive will mean decoding the entire archive. I don’t know if that’s a good idea especially if you have hundreds of archives which may contain an accumulated total of thousands (or tens of thousands) of files.
Post by Hugh Hood
And, in turn, would your Quicklook Plugin display the image?
Generating the image is never a problem. The QuickLook plugin of QuickViewSHR decodes the contents of each AppleIIGS SuperHires file and the user actually have some idea on how the IIGS graphic looks like.

The only problem I have is consistency; in a couple of the Spotlight plugins I had written, the Finder Info Pane does not call the respective plugin to display additional information under the “More Info” section. Two other plugins that were written for the applications QuickViewSHR and NuShrinkItX seems to have no problems at all. I wonder why.


Regards.

Mark
Hugh Hood
2017-10-07 14:05:29 UTC
Reply
Permalink
Raw Message
Post by m***@yahoo.com.sg
The only problem I have is consistency; in a couple of the Spotlight plugins I had written, the Finder Info Pane does not call the respective plugin to display additional information under the “More Info” section. Two other plugins that were written for the applications QuickViewSHR and NuShrinkItX seems to have no problems at all. I wonder why.
Mark,

I recall struggling with this same issue, as one of my plugins has the
Finder Info pane display the ProDOS attributes of AppleWorks files, like
this:

<Loading Image...>


I found that, on _certain_ files only, this information wouldn't
display. It turned out to be a couple of things:

1. I needed to rebuild my LaunchServices database (where file
associations are stored);

2. There was _another_ app or plugin (apparently with 'higher' priority
than my plugin) claiming that particular file based on either its:

-- file extension;
-- 4-character filetype code;
-- ???


There are a couple of ways to do item '1', either with a utility (e.g.
'OnyX') or from the command line.

As for item '2', I found RCDefaultApp to be very helpful in determining
what was claiming what.

<http://www.rubicode.com/Software/RCDefaultApp/>


I my case, I found that an unused, obscure app was claiming _some_ of my
files.

(AppleWorks presents over 98,000 possible filetypes, and even with a
recognized filetype, it you add an 'extension' to to the filename, that
'extension' may cause the file to be first claimed by something else).

Anyway, I deleted the app, rebuilt the LaunchServices database and presto!

Keep up the good work.




Hugh Hood

Loading...