Skip to content

UsingPaperTape

Paul Kimpel edited this page Mar 3, 2026 · 4 revisions

Using Paper Tape

Paper Tape Reader

The paper tape reader is represented near the top of the Control Panel by a pull-down list to select the tape image file format, a standard file picker control for selecting tape image files, and a progress bar showing how much of the current tape image buffer is yet to be read.

G-15 Paper Tape Reader Panel

To use the reader, select the format for the tape image from the list, then click the file picker's Browse or Choose Files button and select one or more image files from your local system. The contents of the file(s) will be read into the reader's internal buffer, which is an analog to the tape cartridge used on a real G-15. The image data in the buffer will be read into the processor when the system executes a PHOTO TAPE READ instruction or you manually initiate a read using and ENABLE+p keystroke command.

The pull-down list supports the following tape image format selections:

  • Auto – loads the tape image according to the format specified by the file name extension. The reader recognizes extensions .pti, .ptr, and .pt. All other extensions are treated as if they were .pti.
  • .pti – loads the tape image as text where the tape frames are represented by ASCII characters.
  • .pt – loads the tape image as binary data where each tape frame is represented by a single byte with the punch pattern in the low-order five bits of the byte.
  • .ptr – loads the tape image as an alternate binary format, similar to .pt, but with the order of the bits in each byte reversed.

See Paper Tape Image Files below for details on these image file formats.

You can load multiple tape image files into the reader. They will be concatenated in the reader's buffer in the order loaded and will behave as one long tape image. When loading as Auto, each file is loaded according to its file name extension. When loading as one of the specific formats, each file is loaded as that format type.

Note, however, that if you select multiple files at once in the file picker control, the order in which the files are loaded is determined by the operating system and browser being used. If you need to control the order of the image data in the buffer, select the files one at a time with separate invocations of the file picker.

Loading a new tape image into the reader once any existing image data in the buffer has been read to its end replaces the existing image data with the new image instead of appending to it. [removed in v1.13]

Selecting image files always appends their contents to the reader's internal buffer. Once one or more image files are loaded into the reader, the only way to remove them and empty the buffer is to click the reader's UNLOAD button.

The progress meter shows how much unread data is still in the buffer. The meter bar will be all the way to the right after an image file is loaded into an empty buffer and will shrink to the left as the data is read, proportionate to the amount of data left in the buffer.

The block number below the progress meter shows the number of blocks of data that have been read from the tape buffer. When no tape image is loaded or the tape is fully rewound, the block number will be zero. The block number is incremented at the start of reading a block. It is reset to zero when a tape image is unloaded or when a new tape image is loaded after any existing image has been read to its end.

Tape in the reader does not move at a constant speed. The reader pulls tape through the reader by rotating its take-up reel. Therefore the linear speed of the tape varies with the diameter of the tape wound onto the tape-up reel – slower at the beginning of a tape and faster as more tape is wound onto the reel. The G-15 technical documentation quotes the "average" tape speed as 250 frames/second.

The tape cartridges used with the G-15 could accommodate tapes holding up to about 2500 words, but the capacity of the emulated reader's buffer is limited only by the amount of memory the browser is willing to allocate for it – probably at least several million frames.

Rewinding tape images in the reader is no faster than reading them, which is quite slow, so the emulator provides an alternate method. Double-clicking the progress meter will reset the reader to the beginning of its internal buffer and reset the progress meter and block number accordingly. See the PAPER TAPE Switch section of the Control Panel page for the native G-15 method of rewinding the tape.

Attempting to read from the paper tape reader with an empty input buffer or no tape image loaded causes the I/O operation to hang. The I/O can be manually canceled by keying ENABLE+s on the typewriter. See the Typewriter Switch Panel section of the Control Panel page on the ENABLE switch and its use.

Paper Tape Punch

On a real G-15, the paper tape punch was located within the system cabinet behind the paper tape reader. Punched tape came out through a slot just above the reader and fell to the floor. There was no take-up reel. A switch allowed you to run out the tape with blank frames so that the tape could be torn off after punching.

In the emulator, the punch is represented near the top of the Control Panel by a text box next to the PUNCH caption. The text box shows the most recent output of the punch, which scrolls to the left as it is generated. Blank frames in this text box are shown as middle-dot · characters for the purpose of visualization, but in a saved tape image (see below) they will be represented as spaces in .pti images and zero bytes in binary images.

G-15 Paper Tape Punch Panel

The punch operates at 17.2 characters per second, one character every two drum cycles. The capacity of the punch output buffer is about 250,000 characters, which represents about four hours of continuous punching. Once this limit is reached, further punch output is discarded by the emulator until the buffer is cleared.

To "tear off" the tape and access the punched data, click the UNLOAD button to the right of the text box. This will open a small panel on below that button with additional options to control the punch buffer:

G-15 Paper Tape Punch Unload Panel

Punch Run – This button is equivalent to the PUNCH RUN switch on a real G-15, but works slightly differently. Clicking the button will generate 75 frames (7.5 inches) of blank tape in the image buffer. The button will turn red while the frames are being punched and revert to normal after the process is completed. The most common use for this button in the emulator is to append a blank trailer to the tape image.

Save PTI – Converts the image buffer to the .pti text image format and opens a standard file-save dialog to store the image on your local system.

Save PT – Converts the image buffer to the .pt binary image format and opens a standard file-save dialog to store the image on your local system.

Save PTR – Converts the image buffer to the .ptr binary image format and opens a standard file-save dialog to store the image on your local system.

Extract – Opens a temporary window and copies the contents of the image buffer to that window as ASCII text, similar to the .pti image format. From that temporary window you can save the contents of the window to a file or copy/paste the data into another program. Most browsers will allow you to print the text using a menu item or the Ctrl+p keys or their equivalent. If you save the window, make sure that you save as text, not HTML. When you are finished, simply close the temporary window.

Clear – Clears the punch image buffer and closes the panel.

Close – Simply closes the panel.

Saving or extracting the image buffer does not alter the contents of the buffer. Thus, you can save the buffer in multiple formats if desired. Each of the save dialogs provides a default file name with the appropriate extension, which you can change before saving. If your browser saves the file without opening a dialog, check your browser settings – there should be an option to select where downloads are to be saved.

Paper Tape Image Files

A basic G-15 system supported only hexadecimal input and output, using digits 0-9 and letters u-z (instead of the more common 0-9 and A-F convention). The standard paper tape devices used a five-bit code, as follows:

  • If the fifth bit is a 1 (representing a hole in the tape), the tape frame is a data digit and the other four bits indicate the hexadecimal value of that digit, 0-9 and u-z.

  • If the fifth bit is zero, then the fourth bit is ignored, and the remaining three bits represent a binary control or punctuation code, thus:

    • 0_000 = 0: – Space (ignored on input by the reader)
    • 0_001 = 1: - – Minus sign
    • 0_010 = 2: C – Carriage return
    • 0_011 = 3: T – Tabulate
    • 0_100 = 4: S – Stop (end of block, halts the reader)
    • 0_101 = 5: / – Reload (copies four words from line 23 to line 19)
    • 0_110 = 6: . – Period (used for decimal points)
    • 0_111 = 7: H – Wait (on input, this is treated the same as data digit 0; on output, it indicates a digit in memory was intentionally skipped by the punch formatting codes).
  • Although the G-15 ignored the fourth bit in a tape frame when the fifth bit was zero, the following letter codes can be used to represent such tape frames. Apparently this was of some use in equipment with which the G-15 would exchange tapes. These codes can not be generated by the standard G-15 paper tape punch:

    • 01000: I equivalent to , Space
    • 01001: J equivalent to -, Minus sign
    • 01010: K equivalent to C, Carriage return
    • 01011: L equivalent to T, Tabulate
    • 01100: M equivalent to S, Stop
    • 01101: N equivalent to /, Reload
    • 01110: O equivalent to ., Period
    • 01111: P equivalent to H, Wait

See the G-15 Paper Tape Format document for more information on the construction of paper tape data.

The emulator supports three different paper tape image file formats, as follows:

PTI Format (.pti)

PTI images are ordinary ASCII text files. The characters to the right of the binary codes above are the ASCII codes used when converting the punch image buffer to .pti format. The punch outputs hexadecimal u-z in lower case and control codes in upper case, but the reader recognizes all letter codes in a case-insensitive manner.

To allow identification and descriptive information to be included in the file, comments may be included by prefixing them with a # character. A comment may start at any point in the file, including in the middle of data and control digits. The comment is terminated by the next ASCII carriage return (hex 0D) or line feed (hex 0A) encountered.

Any comments, or any characters in the file other than those specified above, are simply ignored by the reader and do not materially affect the speed with which the file will be read. When saving the image buffer as .pti, the punch will format an ASCII new-line sequence after each "/" or "S" code, which will then be ignored by the reader on input. This is done to enhance the readability of the resulting text file.

PT Format (.pt)

PT images are a binary byte stream. Each tape frame is represented by one byte with the five-level tape code represented in the low-order five bits of the byte, thus:

_ _ _ 5 4 3.2 1

where the "_" represent high-order bits in the byte that are ignored and should be zero, the digits 1-5 represent channel numbers as defined in the Bendix documentation, and "." is the location of the sprocket hole. In other words, channel 1 is the 20 bit and channel 5 is the 24 bit. Blank frames are represented a zero bytes.

CAUTION: The paper tape images on Paul Pierce's G-15 page presently have an extension of .pt but in fact their format is .ptr.

PTR Format (.ptr)

PTR are a binary format similar to PT that also stores one frame per byte. The difference is that the order of the channel bits is reversed, thus:

_ _ _ 1 2 3.4 5

Channel 1 is still the 20 bit and channel 5 is still the 24 bit.

Clone this wiki locally