Update – PiDP8 and text files

Looking back on my previous posts about the PiDP8 – a PDP8 replica that uses a Raspberry Pi as it’s compute engine, I realized that I never explained how I got text files (i.e. FORTRAN source and data files) from my Raspberry Pi into the PiDP8 emulator.

The process involves several steps. In overview, they are

  • copy the file to a directory on the Pi where SIMH can find it.
  • from within the PiDP8, escape to SIMH (<ctrl-e>)
  • in SIMH, attach the file to a Paper Tape Reader (a device supported by SIMH)
  • CON to return to the PiDP8
  • copy the file from paper tape reader to the PiDP8 disk using PIP

These steps are not all that difficult once you’ve done them a few times.

SIMH can only look for files in the SIMH execution path. That includes imagefiles (where it finds disk and tape images), so I used that as a starting location. I created a new directory /opt/pidp8/imagefiles/rsh to contain any text files I want to transfer to the PiDP8. To make things easier, in the home directory, I created a directory to hold the text files when I transfer them from my PC. I then created a symbolic link in that directory to the /opt/pidp8/imagefiles/rsh so it’s easy to copy files there.

From within the PiDP8, <ctrl-e> transfers control to SIMH. In SIMH, attaching a text file to the paper tape reader (PTR) is done wiht the command ‘att ptr ../imagefiles/rsh/text_file’. The text file can have any valid unix name. However, once you copy it to the PiDP8, you need to use PDP8 file naming conventions (6 char max + 2 char extension). Typical extensions are .FT for a  fortran source, .DA for a data file, and .TX for a text file. Once the file is attached to PTR, return to PiDP8 with CON.

In PiDP8, I found the best program to read the paper tape reader and store a file is PIP. Sadly, PIP is not on the default boot disk image. If you refer back to my post “Getting FORTRAN on the PiDP8”, that technique can be used to boot the image ‘os8.tu56’.  It needs to be attached to td0 (tape 0) and then you boot td0 and copy the file to RKA0 before rebooting rk0.

PIP is easy to use, with one note. If anything goes wrong with the copy operation, you must go back to SIMH and detach, then reattach the text file to PTR. To copy the file from PTR to disk, the command ‘R PIP’ is used. It return an asterisk meaning ‘command in progress’. Type ‘FILE.TX < PTR: /I’ to copy the file from PTR to FILE.TX on the PiDP8 disk (RKA0 by default). You can use ‘RKB0:FILE.TX < PTR: /I’ to copy it to RKB0 if you wish instead. While copying, you get a ‘^’  symbol, then the ‘*’ prompt again. Press “esc” and “return” to complete the copy.

Now you can go back to SIMH and DET PTR to detach the file from PTR if you wish.

Comments are closed.