• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

Port Access on early Macs

jukingeo

Member
Hello all,

I am interested in the older 68k Macs and I am looking into getting either an SE/30 or Classic II machine.

One of the main things I would like to do with the Mac is to use it for I/O control. I mainly would like it to be used for lighting/sensor controls for a haunted house project I am working on. I need a small, virtually small computer for that and I have been wanting to learn about the Macintosh computers for a VERY long time now.

Now, in terms of system control, I believe a simple routine using BASIC would work fine...however, I am talking PC talk now and I don't know how I/O is handled on the MAC. I do see that my options are very limited though since the MAC doesn't have a parallel port. So my choices would be the SCSI port or the serial port. Now I wouldn't know where to begin with the SCSI port and I doubt that BASIC would even access it...so that would pretty much leave the serial port. On a PC the port connection would be RS-232. But on the Mac it is RS-422. What are the main differences?

But all in all I would like to know if there is a version of BASIC that was made for these early Mac's that would allow access to the serial port. If so then it is possible for me to create an external serial device that would allow on/off lighting control.

Naturally any input and ideas would be MUCH appreciated.

Thanx,

Geo

 

Anonymous Freak

Well-known member
RS-422 is basically just higher-speed RS-232. It can be programmed just like RS-232 for basic serial communication.

The two big differences are in speed, and speed control. A 16550 UART on the PC side provides a 115,000 bps serial connection over RS-232. The RS-422 on a Mac is capable of double that, 230,000 bps, natively. However, the port can be 'externally clocked', so that a device can increase the clock even above that. Apple's serial networking protocol, "LocalTalk" could be externally clocked up to 2 Mbps!

 

jukingeo

Member
RS-422 is basically just higher-speed RS-232. It can be programmed just like RS-232 for basic serial communication.
The two big differences are in speed, and speed control. A 16550 UART on the PC side provides a 115,000 bps serial connection over RS-232. The RS-422 on a Mac is capable of double that, 230,000 bps, natively. However, the port can be 'externally clocked', so that a device can increase the clock even above that. Apple's serial networking protocol, "LocalTalk" could be externally clocked up to 2 Mbps!
Basically what I would like to do is hook up a controller or interface board to the Mac much in the same way that they have boards for the PC. These boards usually will take standard analog or digital inputs and they in turn have an output bus in which you can turn on/off relays. That is pretty much the extent of it. These boards though are PC based and use RS-232...so if RS-422 is compatible then I assume that all that would be needed is an adapter cable, correct?

I usually use BASIC to access the port.

In essence I would be treating the Macintosh as a monstrous "Basic Stamp". The major differences is that I have many more programs at my fingertips and I could write HUGE programs.

So that also goes without saying that I need a version of Basic that will run on the Mac and still be able to access that serial port.

Is that a can do?

Thanx,

Geo

 

jukingeo

Member
I'm pretty sure FutureBASIC 2 can access the serial ports. It's free, so no harm trying it out.
I have looked on Future Basic's website and I don't see a FutureBasic "2". FutureBasic seems to want OS X 10.4 so would it even work on the older Macs?

What is the Mac's equivalent to Window's Visual Basic?

Geo

 

Dog Cow

Well-known member
Microsoft BASIC can control serial ports. Have a look at my site. Check the Mac BASIC category in the Downloads.

 

jukingeo

Member
Microsoft BASIC can control serial ports. Have a look at my site. Check the Mac BASIC category in the Downloads.
There were several BASIC files there, there was Microsoft BASIC 3.0 (I assumed that was the one to download) and Microsoft QuickBASIC. I went with "3.0". The file extension is .hqx is that the executable for the Mac?

And this version of Basic will run on either an SE/30 or a Classic II?

Do you have a command list for Microsoft Basic? I basically (no pun intended) would like to examine the commands for handling the ports.

Thanx,

Geo

 

Dog Cow

Well-known member
I don't recall what the differences between 3.0 and QuickBASIC are, though I believe that QB is newer. QB is the one which I used on my SE/30 back in the day. 3.0 has separate versions for decimal and integer.

As for .hqx, that is an ASCII file encoding, so you'll need to decode that with BinHex or StuffIt and then there should be a .img file within. They are copies of my own disks if they had the orange star on the download page.

As for command list, I never had a manual for either 3.0 or QB, so I had to look at existing programs to learn the commands back then. Just recently, however, I was given the manual for QB, so I can make a command reference for serial ports if you would like.

QB has an Examples disk which has a Terminal program, so you can also look at that.

 

ClassicHasClass

Well-known member
I'm pretty sure FutureBASIC 2 can access the serial ports. It's free, so no harm trying it out.
I have looked on Future Basic's website and I don't see a FutureBasic "2". FutureBasic seems to want OS X 10.4 so would it even work on the older Macs?

What is the Mac's equivalent to Window's Visual Basic?

Geo
Dude, it's on their front page! Look under NEWS! FB II is Available for older Macs -- the download link is right there.

 

jukingeo

Member
Dude, it's on their front page! Look under NEWS! FB II is Available for older Macs -- the download link is right there.
Ok, Ok...We are obviously talking about the same page. The Wiki references a link that takes you to a different site.

So I did a bit of my own digging and came up with this site:

http://www.stazsoftware.com/futurebasic/

This one doesn't work,

So I found THIS site next:

http://www.futurebasic.com/

Ok, so now I see Futurebasic II, but guess what happens when you click on the download link? You are directed to the site above...which isn't working. So throw me a bone here if the wiki for Future Basic doesn't send me to the right site in the first place!

I don't recall what the differences between 3.0 and QuickBASIC are, though I believe that QB is newer. QB is the one which I used on my SE/30 back in the day. 3.0 has separate versions for decimal and integer.
As for .hqx, that is an ASCII file encoding, so you'll need to decode that with BinHex or StuffIt and then there should be a .img file within. They are copies of my own disks if they had the orange star on the download page.
So is BinHex (or StuffIt)a program for the Mac ?

As for command list, I never had a manual for either 3.0 or QB, so I had to look at existing programs to learn the commands back then. Just recently, however, I was given the manual for QB, so I can make a command reference for serial ports if you would like.
Sure that would be great.

QB has an Examples disk which has a Terminal program, so you can also look at that.
Ok, thanx.

Geo

 

LCGuy

LC Doctor/Hot Rodder
Egad - unfortunately it appears that Staz Software is no longer at that domain, its been bought out by a domain squatter. > :(

And Stuffit Expander is a free program that allows you to open archives created in Stuffit (.sit) format, as well as BinHex (.hqx) and MacBinary (.bin).

 

jukingeo

Member
Egad - unfortunately it appears that Staz Software is no longer at that domain, its been bought out by a domain squatter. > :(
Bummer! So that means I am probably out of luck with FutureBasic.

And Stuffit Expander is a free program that allows you to open archives created in Stuffit (.sit) format, as well as BinHex (.hqx) and MacBinary (.bin).
Do you run these programs on a PC or the Mac?

Thanx,

Geo

 

ClassicHasClass

Well-known member
Oh dear, it sure does look like Staz is under water. That's a shame, I remain a big fan of FutureBASIC. I'll dig it out of my archives, since they made it freeware anyway.

 

jukingeo

Member
So is BinHex (or StuffIt)a program for the Mac ?
Originally, yes. However,

Both had their source ported to Unix C, so if you really wanted to, you can have a look here: xbin.
So then I have to unpack that hqx file while under the Mac and not within Windows, correct?

Today, there is a Windows and Mac version of StuffIt. See here: http://www.stuffit.com/
Oh, ok, so then I CAN do it in Windows. LOL!

Oh dear, it sure does look like Staz is under water. That's a shame, I remain a big fan of FutureBASIC. I'll dig it out of my archives, since they made it freeware anyway.
Yeah, I know I was going nuts trying to find it, but as I pointed out...everything kept going back to that notice.

Ahhhh, cool! Thanx! I downloaded that for 'future' (pun intended) use.

GEo

 

aftermac

Well-known member
Today, there is a Windows and Mac version of StuffIt. See here: http://www.stuffit.com/

Oh, ok, so then I CAN do it in Windows. LOL!

It's not necessarily a good idea to extract (classic) Mac software on a Windows machine. That's a good way to blow away the Resource Fork along with the File and Creator types.

 

Bunsen

Admin-Witchfinder-General
Yes, in general it's best to transfer the compressed archive to the Mac, and uncompress it there. This makes sure that all the different parts of a Mac file stay together.

 

jukingeo

Member
Today, there is a Windows and Mac version of StuffIt. See here: http://www.stuffit.com/

Oh, ok, so then I CAN do it in Windows. LOL!

It's not necessarily a good idea to extract (classic) Mac software on a Windows machine. That's a good way to blow away the Resource Fork along with the File and Creator types.
Ok, that went over my head, but is that the long way of saying push the red self destruct button? LOL!

Yes, in general it's best to transfer the compressed archive to the Mac, and uncompress it there. This makes sure that all the different parts of a Mac file stay together.
Ok, got it then, just move everything compressed to the Mac and take care of it there. That was my original question anyway.

Thanx,

Geo

 
Top