All posts for the month April, 2015

Why

In the early 90’s I needed a way to transfer Atari 8 bit software from an DOS PC to an Atari 8 bit. To solve it I built a null modem cable and connected it between the Atari 850 Interface serial port and the serial port on the PC. It worked at 9600 baud. Today we have much more sophisticated options at our disposal.

In conjunction to the cable I wrote a ProComm+ ASP script that acted as a server and accepted commands. On the Atari I used A-Modem and BobTerm for the communication program. The ASP script parsed input received from the Atari and responded appropriately. It worked great and did what I need it to do.

I used it for transferring files to/from the PC for archive storage, not daily use. Looks like I initially wrote it in 1993, with updates in 97+. If anyone wants to use, yeah right, feel free. This was my poor mans SIO2PC with a lot less features.

I also have a variant for the Atari ST, though I don’t recall using it. But I wrote it so I must have at some point. The main differences I can see is the linefeeds are different and the baud was increased to 19200. However, this post is about the 8 bit version.

Server commands were simple and few:

UP: Uploads a file from the Atari to the working directory on the PC (Atari -> PC). Supports Kermit, Xmodem (1K), Ymodem, and Zmodem protocols. It prompts for filename and protocol.

DOWN: Downloads a file from the working directory on the PC to the Atari (Atari <- PC). Supports Kermit, Xmodem (1K), Ymodem, and Zmodem protocols. It prompts for filename and protocol.

SIZE: Displays the size of a file in bytes, # of Atari single density (SD) sectors, and # of Atari double density (DD) sectors. It prompts for filename.

WORK: Changes the working directory on the PC. The default working directory is “C:\TEMP”. It prompts for the directory to change to. I have no recollection of why I didn’t use “CD” instead of “WORK”.

DIR: Generates a directory listing of the current working directory on the PC.

DEL: Deletes a file from the working directory on the PC. It prompts for the filename to delete.

TIME: Displays the PC’s current date and time.

BYE: Disconnects and exits the ASP script on the PC.

?: Displays simple help.

The server has a 4 minute wait timeout, then waits again. If I recall correctly this was done to overcome a limitation with ASP.

When using the upload and download functions, after initiating the command on the server side you drop back to the Atari terminals menu and initiate the corresponding function.

Like this:

In this post I make use of Automator to create a service available via any Finder window that will allow the quick conversion of one or more image files from TIFF, JPEG, etc to PNG. This could be modified to convert to whichever format you choose.

1) Open Automator.

2) Select Service and click Choose:

3) If Library is not selected (blue outline in top left, click it). Under the Actions, select Photos in the left most pane, then select “Change Type of Images”. Drag it to the right most pane:

4) When prompted select “Don’t Add”. This will cause the service to remove the original file after it has been converted. To keep copies of the originals, select “Add” instead:

5) Now the action has been added to the workflow in the right plane with default values:

6) Change the target image type to “PNG”:

7) Change the “Service receives selected” value from “text” to “image files”. Change the “in” application from “any application” to “Finder”. Both of these are at the very top of the workflow above the action:

8) Now save it and give it a name. Since this tutorial converts to PNG, I chose “To PNG”:

To use it, just select the file or files you want to convert, right click, choose Services, then “To PNG”. That’s it!

Like this:

So you have Java installed on Mac OS X and you have a program that needs the JAVA_HOME variable set, but you don’t know where Java’s home directory is. This is an easy way to find out. Open Terminal and run the following command:

/usr/libexec/java_home

It should spit out something like this which is the home location:

/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home

Now if you have a program that launches via script or command line and needs JAVA_HOME set, you can add this to the script to set it: