From d3b943c369bf1361642e92403d2e8ed477e1fc67 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Fri, 31 May 2013 17:22:02 -0600 Subject: [PATCH 1/5] update build and non-RPi run instructions --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6bce374..8e848e8 100755 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Apple II Pi works by connecting an Apple II to a Raspberry Pi using a RS232 seri Installing and configuring the Apple II: You will need an Apple //c or Apple //e w/ SuperSerial Card. An Apple II Mouse is recommended for that full-on retro feel, but not required. Download and install the A2PI.DSK disk image onto a 5 1/4 floppy. ADTPro would be the recommended tool for that operation. -Installing and configuring the Raspberry Pi: Download the a2pid.c to your Raspberry Pi. Compile the daemon with 'cc a2pid.c -o a2pid' and copy the result with 'sudo cp a2pid /usr/local/bin'. You will need to disable the Raspbain serial login by editing /etc/inittab and commenting out the line (probably at the very bottom) to look like:
+Installing and configuring the Raspberry Pi: Download the apple2pi project to your Raspberry Pi. Enter the apple2pi/src directory. Compile the daemon and tools with 'make' and copy the results to /usr/local/bin with 'sudo make install'. You will need to disable the Raspbain serial login by editing /etc/inittab and commenting out the line (probably at the very bottom) to look like:
\#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100 @@ -45,3 +45,5 @@ Theory of operation: Apple II Pi works by running code on the Apple II and the Enjoy, Dave Schmenk + +P.S. For non-Raspberry Pi owners: This isn't actually tied to the Raspberry Pi in any way, except for the default serial port used to connect the Pi to the Apple II. On most up-to-date Linux distributions, you should be able to build all the files. To run the daemon on a specific serial port, just add it as a command line option i.e. a2pid --daemon /dev/ttyS0 From 7cb7f1fdc7f36e00e972d11d510892605a29dc13 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Fri, 31 May 2013 17:24:50 -0600 Subject: [PATCH 2/5] Info about socket interface --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8e848e8..9dd45ca 100755 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Reboot the Apple II with the newly created floppy in the start-up drive. If eve Using a2pi: The Apple //c and //e keyboards are pretty minimal compared to modern keyboards, and the Apple II Mouse only has one button. In order to provide most of the funcitonality required of modern OSes, the Open-Apple and Closed-Apple keys are used as modifiers to enhance the keyboard and mouse. On the keyboard, Open-Apple acts just like the Alt key. The Closed-Apple key acts like a Fn key, changing the actual key codes. Currently, the Closed-Apple key will modify the number keys 1-0 as funciton keys F1-F10 and the arrow keys as Left-Arrow=Home, Right-Arrow=End, Up-Arrow=PgUp, Down-Arrow=PgDn. For the mouse, when you click the mouse button by itself, that is the left(default)-click. Open-Apple along with the mouse button will return the right-click, and Closed-Apple along with the mouse button will return the middle-click. If you should ever need to exit a2pi, press Closed-Apple ESC on the Apple II keyboard. This will exit both the code on the Apple II and the Raspberry Pi. This is useful when developing and debugging the drivers/daemons. a2pid can be run directly (not as a daemon) by leaving off the '--daemon' option. Enabling printf's in the code allows one to watch the packets arrive and get processed when run from a network ssh session. -Theory of operation: Apple II Pi works by running code on the Apple II and the Raspberry Pi, talking to each other with a simple protocol. The Apple II basically appears to the Raspberry Pi as an external peripheral, not unlike a USB keyboard and mouse. The Apple II floppy boots into ProDOS and runs a simple machine language program that scans the keyboard, and mouse if present, sending the events out the serial port to the Raspberry Pi. It is a very simple protocol and the serial port is running at 115.2K baud, so it is fast and low overhead. On the Raspberry Pi, a little daemon runs, waiting for packets on the serial port, converts the Apple II events into Linux compatible events, and inserts them into the input subsystem. +Theory of operation: Apple II Pi works by running code on the Apple II and the Raspberry Pi, talking to each other with a simple protocol. The Apple II basically appears to the Raspberry Pi as an external peripheral, not unlike a USB keyboard and mouse. The Apple II floppy boots into ProDOS and runs a simple machine language program that scans the keyboard, and mouse if present, sending the events out the serial port to the Raspberry Pi. It is a very simple protocol and the serial port is running at 115.2K baud, so it is fast and low overhead. On the Raspberry Pi, a little daemon runs, waiting for packets on the serial port, converts the Apple II events into Linux compatible events, and inserts them into the input subsystem. This daemon also has a socket interface (port 6502) that can be used to access the Apple II memory and execute arbitrary code. Look at a2lib.c for implementation. Enjoy, From 5a4f6cd5c21e88ae883b077926a9cc491fe23cf6 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Sat, 1 Jun 2013 14:26:36 -0600 Subject: [PATCH 3/5] update disk image name from A2PI.DSK to A2PI.PO --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9dd45ca..2fb7a9a 100755 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Apple II client/server for Raspberry Pi Apple II Pi works by connecting an Apple II to a Raspberry Pi using a RS232 serial connection. In order to get the Raspberry Pi to talk RS232 from it's 3.3V GPIO serial port, you will need to build or buy a converter. They are very cheap on eBay, so I would recommend going that route. To ensure you've hooked the converter up correctly, try loggin into the Raspberry Pi from another modern-ish computer. Raspbian, the default Debian based Linux for the Raspberry Pi, opens up a login (getty) session on the serial port at 115.2K baud. You will probably need a null modem or cross-over cable to login from another computer. Once it all checks out, time to connect your Apple II. All the 3.3V converters I see have a DB-9 connector and many of the Apple II era connectors are DB-25 so you may need a DB-9 to DB-25 converter. -Installing and configuring the Apple II: You will need an Apple //c or Apple //e w/ SuperSerial Card. An Apple II Mouse is recommended for that full-on retro feel, but not required. Download and install the A2PI.DSK disk image onto a 5 1/4 floppy. ADTPro would be the recommended tool for that operation. +Installing and configuring the Apple II: You will need an Apple //c or Apple //e w/ SuperSerial Card. An Apple II Mouse is recommended for that full-on retro feel, but not required. Download and install the A2PI.PO disk image onto a 5 1/4 floppy. ADTPro would be the recommended tool for that operation. Installing and configuring the Raspberry Pi: Download the apple2pi project to your Raspberry Pi. Enter the apple2pi/src directory. Compile the daemon and tools with 'make' and copy the results to /usr/local/bin with 'sudo make install'. You will need to disable the Raspbain serial login by editing /etc/inittab and commenting out the line (probably at the very bottom) to look like:
From 1869fe7d3189596450bc5419c7922c93736bbd23 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Sat, 1 Jun 2013 14:28:08 -0600 Subject: [PATCH 4/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2fb7a9a..5e68983 100755 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Apple II client/server for Raspberry Pi Apple II Pi works by connecting an Apple II to a Raspberry Pi using a RS232 serial connection. In order to get the Raspberry Pi to talk RS232 from it's 3.3V GPIO serial port, you will need to build or buy a converter. They are very cheap on eBay, so I would recommend going that route. To ensure you've hooked the converter up correctly, try loggin into the Raspberry Pi from another modern-ish computer. Raspbian, the default Debian based Linux for the Raspberry Pi, opens up a login (getty) session on the serial port at 115.2K baud. You will probably need a null modem or cross-over cable to login from another computer. Once it all checks out, time to connect your Apple II. All the 3.3V converters I see have a DB-9 connector and many of the Apple II era connectors are DB-25 so you may need a DB-9 to DB-25 converter. -Installing and configuring the Apple II: You will need an Apple //c or Apple //e w/ SuperSerial Card. An Apple II Mouse is recommended for that full-on retro feel, but not required. Download and install the A2PI.PO disk image onto a 5 1/4 floppy. ADTPro would be the recommended tool for that operation. +Installing and configuring the Apple II: You will need an Apple //c or Apple //e w/ SuperSerial Card. An Apple II Mouse is recommended for that full-on retro feel, but not required. Download and install the A2PI.PO disk image onto a 5 1/4 floppy. ADTPro would be the recommended tool for that operation although once you have the latest apple2pi version running, you can use the included dskwrite and dskread utilities for writing and reading ProDOS floppies. Installing and configuring the Raspberry Pi: Download the apple2pi project to your Raspberry Pi. Enter the apple2pi/src directory. Compile the daemon and tools with 'make' and copy the results to /usr/local/bin with 'sudo make install'. You will need to disable the Raspbain serial login by editing /etc/inittab and commenting out the line (probably at the very bottom) to look like:
From 49cb9f4a6e88545549cdee9a279a25dc3587f60a Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Sat, 1 Jun 2013 14:34:12 -0600 Subject: [PATCH 5/5] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5e68983..b2aae30 100755 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ apple2pi Apple II client/server for Raspberry Pi --------------------------------------- -Apple II Pi works by connecting an Apple II to a Raspberry Pi using a RS232 serial connection. In order to get the Raspberry Pi to talk RS232 from it's 3.3V GPIO serial port, you will need to build or buy a converter. They are very cheap on eBay, so I would recommend going that route. To ensure you've hooked the converter up correctly, try loggin into the Raspberry Pi from another modern-ish computer. Raspbian, the default Debian based Linux for the Raspberry Pi, opens up a login (getty) session on the serial port at 115.2K baud. You will probably need a null modem or cross-over cable to login from another computer. Once it all checks out, time to connect your Apple II. All the 3.3V converters I see have a DB-9 connector and many of the Apple II era connectors are DB-25 so you may need a DB-9 to DB-25 converter. +Apple II Pi works by connecting an Apple II to a Raspberry Pi using a RS232 serial connection. In order to get the Raspberry Pi to talk RS232 from it's 3.3V GPIO serial port, you will need to build or buy a converter. They are very cheap on eBay, so I would recommend going that route. Alternatively, you can use a USB serial port converter, but you will need to know its tty device name. To ensure you've hooked the converter up correctly, try loggin into the Raspberry Pi from another modern-ish computer. Raspbian, the default Debian based Linux for the Raspberry Pi, opens up a login (getty) session on the serial port at 115.2K baud. You will probably need a null modem or cross-over cable to login from another computer. Once it all checks out, time to connect your Apple II. All the 3.3V converters and USB serial ports I see have a DB-9 connector and many of the Apple II era connectors are DB-25 so you may need a DB-9 to DB-25 converter. Installing and configuring the Apple II: You will need an Apple //c or Apple //e w/ SuperSerial Card. An Apple II Mouse is recommended for that full-on retro feel, but not required. Download and install the A2PI.PO disk image onto a 5 1/4 floppy. ADTPro would be the recommended tool for that operation although once you have the latest apple2pi version running, you can use the included dskwrite and dskread utilities for writing and reading ProDOS floppies. @@ -36,6 +36,8 @@ exit 0 followed by rebooting the Raspberry Pi. +NOTE - For USB serial port users and non-Raspberry Pi owners: This isn't actually tied to the Raspberry Pi in any way, except for the default serial port used to connect the Pi to the Apple II. On most up-to-date Linux distributions, you should be able to build all the files. To run the daemon on a specific serial port, just add it as a command line option i.e. a2pid --daemon /dev/ttyUSB0 + Reboot the Apple II with the newly created floppy in the start-up drive. If everything is configured correctly, you should be able to login to the Raspberry Pi with your Apple II keyboard. If you have an Apple II Mouse, that should control the cursor in X, or in the console if you have gdm installed. Using a2pi: The Apple //c and //e keyboards are pretty minimal compared to modern keyboards, and the Apple II Mouse only has one button. In order to provide most of the funcitonality required of modern OSes, the Open-Apple and Closed-Apple keys are used as modifiers to enhance the keyboard and mouse. On the keyboard, Open-Apple acts just like the Alt key. The Closed-Apple key acts like a Fn key, changing the actual key codes. Currently, the Closed-Apple key will modify the number keys 1-0 as funciton keys F1-F10 and the arrow keys as Left-Arrow=Home, Right-Arrow=End, Up-Arrow=PgUp, Down-Arrow=PgDn. For the mouse, when you click the mouse button by itself, that is the left(default)-click. Open-Apple along with the mouse button will return the right-click, and Closed-Apple along with the mouse button will return the middle-click. If you should ever need to exit a2pi, press Closed-Apple ESC on the Apple II keyboard. This will exit both the code on the Apple II and the Raspberry Pi. This is useful when developing and debugging the drivers/daemons. a2pid can be run directly (not as a daemon) by leaving off the '--daemon' option. Enabling printf's in the code allows one to watch the packets arrive and get processed when run from a network ssh session. @@ -45,5 +47,3 @@ Theory of operation: Apple II Pi works by running code on the Apple II and the Enjoy, Dave Schmenk - -P.S. For non-Raspberry Pi owners: This isn't actually tied to the Raspberry Pi in any way, except for the default serial port used to connect the Pi to the Apple II. On most up-to-date Linux distributions, you should be able to build all the files. To run the daemon on a specific serial port, just add it as a command line option i.e. a2pid --daemon /dev/ttyS0