Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Raspple II, Apple2Pi, and RS232/GPIO shield

587 views
Skip to first unread message

Chris Torrence

unread,
Feb 6, 2014, 11:34:51 AM2/6/14
to
Hi all,

I've been playing around with interfacing a Raspberry Pi to both my childhood Apple II+ and a "newer" Apple //e (enhanced).

I've been using David Schmidt's ADTPro, Dave Schmenk's Apple II Pi, and Ivan Drucker's Raspple II. First, let me congratulate David, Dave, and Ivan on writing such awesome programs. I haven't had this much fun on the Apple since I beat Bruce Jenner in Olympic Decathlon!

So far, I've been using a single Apple Super Serial Card (SSC) in slot 1, connected to a USB/RS232 serial cable in the top USB port of the Raspberry Pi. By starting each service and stopping all the others, I can manage to get all of the different apps to work: adtpro.sh, vsdrive, a2pid, and getty.

My question is: How can I get more than one service to work at the same time, without having to stop all of the other services? I know I could add another SSC card... What about using a Raspberry Pi RS232/GPIO shield, or the upcoming Apple2Pi board? If you talk directly to the Raspberry Pi's GPIO port, are you able to have more than one service/daemon connected to the port at the same time? Obviously you can't use both services simultaneously, I just want to avoid having to manually stop & restart them every time.

Thanks in advance for any help you can provide, and keep up the great work!

-Chris

Ivan X

unread,
Feb 6, 2014, 5:01:33 PM2/6/14
to
Schmenk would probably be better qualified to answer this, but as far as I know each of those three services gains exclusive access to a serial port. The Pi GPIO header is just another RS232 port, and so the Apple II Pi card is sort of an SSC with the necessary voltage conversion cable for the GPIO built in. If you really want to do it with a single SSC, and have the services run simultaneously, you might be able to use a rs232 switch box, but you'd still need three serial cables attached to your Pi (three USB-to-serial, or two plus one GPIO serial cable or Apple II Pi card).

David Schmenk

unread,
Feb 7, 2014, 2:07:40 PM2/7/14
to
On Thursday, 6 February 2014 14:01:33 UTC-8, Ivan X wrote:
> Schmenk would probably be better qualified to answer this, but as far as I know each of those three services gains exclusive access to a serial port. The Pi GPIO header is just another RS232 port, and so the Apple II Pi card is sort of an SSC with the necessary voltage conversion cable for the GPIO built in. If you really want to do it with a single SSC, and have the services run simultaneously, you might be able to use a rs232 switch box, but you'd still need three serial cables attached to your Pi (three USB-to-serial, or two plus one GPIO serial cable or Apple II Pi card).

Ivan pretty much summed it up. The A2Pi adapter card (announcement coming soon, I promise) will basically add a dedicated SSC for the Apple II for the a2pi connection. Login and ADTPro would then have to be managed through the actual SSC.

Dave...

Chris Torrence

unread,
Feb 8, 2014, 12:03:28 PM2/8/14
to
Sounds great. Thanks Ivan and Dave for the responses. I'm looking forward to the A2Pi adapter card!
Cheers,
Chris

ehu...@gmail.com

unread,
Feb 8, 2014, 6:21:13 PM2/8/14
to
Can you explain how to stop or start services to get Apple II Pi running? I'm using Apple IIc and one serial port.

Chris Torrence

unread,
Feb 9, 2014, 12:55:07 AM2/9/14
to
On Saturday, February 8, 2014 4:21:13 PM UTC-7, ehu...@gmail.com wrote:
> Can you explain how to stop or start services to get Apple II Pi running? I'm using Apple IIc and one serial port.

Okay, here are my raw notes. All of this was taken from either David, Dave, or Ivan's web pages, plus a lot of trial & error. Each section has the system requirements for the Apple and Pi, then another line starting with "pi>" that tells you what to type at the pi prompt. Note that before you start a new service you need to kill the previous service. The easiest way to do this is:
pi> ps ax | grep -i usb
pi> sudo kill -9 1234 <-- whatever the process number is

For ADTPro to work:
Apple IIe: SSC in slot 1 or 2 (change Config on ADTPro)
Pi: USB->Serial adapter in bottom or top USB port
(to get this to work in the top USB port, may need to run headless first...)
pi> adtpro.sh serial /dev/ttyUSB0

For VSDRIVE to work:
Apple IIe: SSC in slot 1 or 2 (still do CAT,S2,D1 even if slot 1)
Pi: USB->Serial adapter in bottom or top USB port
pi> adtpro.sh headless serial /dev/ttyUSB0


For A2PI to work:
Apple IIe: SSC in slot 1 or 2 (run -config)
Pi: USB->Serial adapter in bottom or top USB port
first make sure adtpro is not running (kill both the GUI and the Java headless server)
change a2pi to use the USB serial adapter, edit /etc/default/a2pi to set:
DAEMON_OPTS="/dev/ttyUSB0"
pi> sudo /sbin/a2pid --daemon /dev/ttyUSB0

Note: you may need to manually remove /var/lock/LCK..ttyUSB0


For Kermit or Modem.MGR to work:
edit /etc/inittab to change the baud rate. Add the following line at the bottom:
T1:23:respawn:/usr/local/sbin/usbgetty -h -L -scanttyUSB 19200 vt100

Then type:
pi> usblogin-off
pi> usblogin-on

For Modem.MGR:
Apple IIe: config Modem.MGR for vt200 with 7 bits, cursor keys normal, 19200 baud, parity 8+1+none, xon/off disabled

ehu...@gmail.com

unread,
Feb 9, 2014, 2:14:17 PM2/9/14
to
Thanks. It worked. The trick is to stay logged off and connected to lower usb port on Pi. Adtpro service is not running by default. On the upper usb port, all i need to do is usblogin-off and restart.
Thanks for your detailed explanation, and thanks goes to David, Dave and Ivan for writing this amazing pieces of software.

Ivan X

unread,
Feb 9, 2014, 5:22:03 PM2/9/14
to
Just to clarify: upon the appearance (including if present at startup) of any serial adapter on the upper port, or on a hub attached to the upper port, shell login will start up and grab it. However, "usblogin-off" disables all that.

ADTPro server behaves similarly, but for the lower port. However, there's no global command for disabling it from starting up, though adtpro-stop will stop it once running. It takes about 30 seconds to fully start up.

If there is more than one adapter in a hub, regardless of whether it's attached to re upper or lower port, adtpro grabs the adapter in the lower numbered port on the hub, and shell login grabs the adapter in the higher one.
Message has been deleted

bria...@gmail.com

unread,
Jul 17, 2016, 5:56:23 PM7/17/16
to
Chris Torrence於 2014年2月7日星期五 UTC+8上午12時34分51秒寫道:
I use the getty command '/sbin/getty -L ttyUSBupper 9600 vt100' , and success prompt to upper USB , but why I put in

/etc/inittab :

T1:23:respawn:/sbin/getty -L ttyUSBupper 9600 vt100

It just can not work while the Raspberry pi3 boot up ?

Brian Lai

David Schmenk

unread,
Jul 17, 2016, 8:07:09 PM7/17/16
to
The latest version of Raspbian, Jessie, doesn't use /etc/inittab. It uses systemd for service startup. I have used this file, located in /etc/systemd/system/getty.target.wants/serial...@ttyUSB0.service

# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.

[Unit]
Description=Serial Getty on %I
Documentation=man:agetty(8) man:systemd-getty-generator(8)
Documentation=http://0pointer.de/blog/projects/serial-console.html
BindsTo=dev-%i.device
After=dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service
After=rc-local.service

# If additional gettys are spawned during boot then we should make
# sure that this is synchronized before getty.target, even though
# getty.target didn't actually pull it in.
Before=getty.target
IgnoreOnIsolate=yes

[Service]
ExecStart=-/sbin/agetty %I 4800 $TERM
Type=idle
Restart=always
UtmpIdentifier=%I
TTYPath=/dev/%I
TTYReset=yes
TTYVHangup=yes
KillMode=process
IgnoreSIGPIPE=no
SendSIGHUP=yes

[Install]
WantedBy=getty.target

bria...@gmail.com

unread,
Jul 17, 2016, 11:36:29 PM7/17/16
to
David Schmenk於 2016年7月18日星期一 UTC+8上午8時07分09秒寫道:
It's work ,thank you very much.

jmfis...@gmail.com

unread,
Aug 28, 2016, 5:33:20 PM8/28/16
to
It's awesome to see my childhood obsession thriving! (OK, one of a few. But, our Apple II+ was the first.)

I'm trying to revive an old Laser 128 to share with a room full of high-school Robotics students who think "8-bit is cool" -- but equate that with Minecraft. (That said, most of them are at least proficient in C++ & Java. My goal is to make this machine relevant to them, so they don't get board at the command prompt. They've done pleanty of work with Arduino & RasPi. So, I thought I'd start them with your project.

Simple question: I found the Laser 128 with no more than the CPU. Not a single disk, power adapter, or anything else. I'm going to order an aftermarket adapter & a din-5 serial cable. We have pleanty of RasPi's & SD cards. But, do I need to get a boot disk to make this all happen? It would seem, without ProDos & maybe some utilities, we're still dead-in-the-water. Correct?

David Schmenk

unread,
Aug 28, 2016, 7:13:34 PM8/28/16
to
Not really. Since you have to create a serial cable anyway, you can use it to bootstrap the Laser 128. A good exercise, as you know the serial cable is working. Go here for all the info you need: http://adtpro.sourceforge.net

Dave...

jmfis...@gmail.com

unread,
Aug 28, 2016, 9:43:13 PM8/28/16
to
Thanks Dave! I just watched the video. It does look like a good exercise. But, I'll be sitting on pins and needles, since at this point, I actually have no way to even test the disk drive. I've actually put out a Facebook post to see if anyone I know has any working bootable 5.25 Apple disks -- before I add a serial & a pack of NOS floppies to the $25 aftermarket AC adapter I'm already buying. The whole thing is a great adventure. But, I'm going to try to stack the deck a little, before I set them up for failure. Ideally, I'm hoping someone I know has another Apple II, in case we need to troubleshoot this 30 year old machine.

In some ways, the smart thing would be to invest in a Floppy Emu. (Since we have a Mac+ here as well.) But, that just takes all the adventure out of it. Since I haven't gotten an AC adapter yet, next week we're bootstrapping an Apple Newton MP2000 from a PCMCIA, and adding wi-fi. It's my mission to make sure at least a few Millennials will be able to keep some of the old tech alive when the rest of us are gone.

Howard Poe

unread,
Aug 30, 2016, 11:20:06 PM8/30/16
to
The Laser 128 works with the external Apple 3.5 disk drive (all except the earliest Laser 128 models), same as is used by the Mac and the IIgs. It is possible to write ProDOS 3.5 inch disk images on the Mac, and use them on the Laser.

jmfis...@gmail.com

unread,
Aug 31, 2016, 11:17:43 AM8/31/16
to
Well, I do have the first generation. Not EX. I'm not sure if there were generational differences within the first. Unfortunately, though I have several early Macs, none have external floppies anyway, so no real way to test. Though, I'll say, the bootstrapping method via serial doesn't look so bad. But, it's always fun to try several methods.
0 new messages