From 0549fd36848b47db5413e46781353f0ddf40c89a Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Wed, 11 Sep 2013 13:31:12 -0700 Subject: [PATCH 1/5] Update README.md --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7c4b32f..6730302 100755 --- a/README.md +++ b/README.md @@ -8,7 +8,13 @@ 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.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:
+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'. To build the FUSE driver needed to mount ProDOS devices under Linux, you will need the libfuse-dev package installed. Get thris from apt-get, aptitude, or whichever package manager you like. Build with 'make fusea2pi' and install with 'sudo make fuse-install'. + +The following is no longer neessary as the install script carefully makes all the following adjustments automatically. I left this here so you know what the script is doing. + + + +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 @@ -39,6 +45,8 @@ right before the line: 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 From c82057e2d14f4c3c17230aaee7eb9fec0e8bed17 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Wed, 11 Sep 2013 13:39:28 -0700 Subject: [PATCH 2/5] Update README.md --- README.md | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 6730302..3a60e16 100755 --- a/README.md +++ b/README.md @@ -12,9 +12,8 @@ Installing and configuring the Raspberry Pi: Download the apple2pi project to y The following is no longer neessary as the install script carefully makes all the following adjustments automatically. I left this here so you know what the script is doing. - -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:
+>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 @@ -24,29 +23,27 @@ You will also want to disable the console messages that go out to the serial por dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait -If you are using an HDMI port to display video, skip the overscan settings. This was for my monitor and your values may vary (a lot). I adjust the NTSC output so it fits nicely on my //c monitor, I edited the setting in /boot/config.txt such that: +>If you are using an HDMI port to display video, skip the overscan settings. This was for my monitor and your values may vary (a lot). I adjust the NTSC output so it fits nicely on my //c monitor, I edited the setting in /boot/config.txt such that: - +> overscan_left=26
overscan_right=-8
overscan_top=-8
\#overscan_bottom=16
-To run the a2pid daemon automatically at boot time, edit /etc/rc.local and add: +>To run the a2pid daemon automatically at boot time, edit /etc/rc.local and add: - +> /usr/local/bin/a2pid --daemon -right before the line: +>right before the line: - +> 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 @@ -55,7 +52,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. 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. +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 6551) that can be used to access the Apple II memory and execute arbitrary code. Look at a2lib.c for implementation. Enjoy, From 999ec7e4ee0875f3f3c497f6eb5ef542355fd732 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Wed, 11 Sep 2013 13:40:25 -0700 Subject: [PATCH 3/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3a60e16..7be9bb2 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.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'. To build the FUSE driver needed to mount ProDOS devices under Linux, you will need the libfuse-dev package installed. Get thris from apt-get, aptitude, or whichever package manager you like. Build with 'make fusea2pi' and install with 'sudo make fuse-install'. +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'. To build the FUSE driver needed to mount ProDOS devices under Linux, you will need the libfuse-dev package installed. Get this from apt-get, aptitude, or whichever package manager you like. Build with 'make fusea2pi' and install with 'sudo make fuse-install'. The following is no longer neessary as the install script carefully makes all the following adjustments automatically. I left this here so you know what the script is doing. From 06909e0da348ea3ab98198b55341fde91c84e94b Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Wed, 11 Sep 2013 14:05:12 -0700 Subject: [PATCH 4/5] Update tools.txt --- docs/tools.txt | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/tools.txt b/docs/tools.txt index c52cd59..26d116d 100755 --- a/docs/tools.txt +++ b/docs/tools.txt @@ -15,6 +15,8 @@ This documents the utilities included in the Apple II Pi project. See the proje ----------------- bload - Load binary file brun - Run binary file + merlin2text - Convert MERLIN text files to unix text files + text2merlin - Convert unix text files to MERLIN text files a2lib.c - Simple a2pid connection library Disk image tools @@ -89,7 +91,19 @@ Like bload, brun will load the binary file but will also jump to the loading add brun
[IP addr] -4.3 a2lib.c: +4.3 merlin2text: +---------------- +If you develop on the Apple II, most likely you have had experience with the MERLIN assembler. Great assembler for small projects, but it uses a high ASCII format and spaces instead of tabs. This quick utility quickly reformats the MERLIN text into a unix palatable text file for your favorite editor. Ran as: + +merlin2text < > + +4.4 text2merlin: +---------------- +REverses the process above to put the text file back on to ProDOS media. + +text2merlin < > + +4.5 a2lib.c: ------------ All the tools include a2lib.c as a very poor, cheesy, horrible, etc. way to implement the Apple II Pi daemon API. Only useful if you are looking to write your own tool or modify the code of the existing tools. From 2f808eb1bc556a28194a974efd2abf9a13fd31f9 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Wed, 11 Sep 2013 14:06:39 -0700 Subject: [PATCH 5/5] Update tools.txt --- docs/tools.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tools.txt b/docs/tools.txt index 26d116d..fd3d41d 100755 --- a/docs/tools.txt +++ b/docs/tools.txt @@ -37,7 +37,7 @@ This documents the utilities included in the Apple II Pi project. See the proje a2serclk - Raspberry Pi GPCLK for Apple II Pi hardware a2pid - Apple II Pi Linux daemon - A2Pi.PO + A2PI.PO 3.0 Interactive Tools: ======================