Home Photos About Us Cats Family Links

Bob Bybee's PolyMorphic Emulator program

See also:  Bob's computing background

(Note:  If you're not an experienced user of PolyMorphic Systems computers, this page won't mean much to you.  But you can read about my background with Polys and other computers by clicking the link above.)

To download and run the Poly Emulator, follow these steps:

1.  Create a directory (a folder) on your computer for the files.  You might create a directory called C:\PM.

2.  Right-click on some (or all) of the files in the following table.  For each file, select "Save Target As" and navigate to the C:\PM folder you created.  Click OK to save the file in that folder.

You will need at least the first three files in this set, and some of the others contain games and utilities which you might enjoy.  Note: All files must be saved into the same directory.

3.  After downloading the files, open a DOS command-prompt window.  (The Poly Emulator is a DOS program which will also run in a DOS-box under Windows, with some limitations.)  Type the following command:

cd C:\PM

Your "current directory" should now be C:\PM (or whatever folder name you chose).  Run the PM program by typing its name:

PM

And have fun!  Detailed release notes for the PM program are below.

pm.exe The emulator program.  You will need this.
polydev.dat A text file which assigns devices, such as the virtual disk names and printer.  You will need this.  You can alter its contents with a text editor such as Notepad.

Make sure this file gets downloaded with the proper name.  Some systems may try to change the file to polydev.txt or similar.  If necessary, rename it after downloading.

system.pm The "system" drive, an image of a bootable Poly disk.  This is identical to an Exec/96 disk except for the printer driver.
Files below this point are optional, but could be fun to try out...
games.pm Several games: maze, hangman, chess. biorhythm, battleship, bowling, flies, othello, several others.
games4d1.pm A bootable Poly disk with blackjack, hamurabi, wumpus, and other games.
worm.pm A "worm" program, with source code.
execwps.pm A bootable Poly disk with the word processing system, WPS.
advent.pm A bootable Poly disk with a version of the old mainframe game, "Adventure."
spg.pm The System Programmer's Guide disk, with useful utilities.
exec961.pm
exec962.pm
These two disks contained the last released version of the Poly operating system, Exec/96.
vga.fnt A text file which can be used with the emulator, to download a Poly character set to a VGA card.  Works if your system is a DOS machine or is a Win98 machine in DOS mode.

(This documentation was written circa 1989, so forgive any outdated references.)

Introduction.  Welcome to PM, the PolyMorphic Emulator program for IBM-PC compatibles. PM is part of our continuing effort to keep your Poly systems working for your benefit. PM allows you to run your existing Poly software on any IBM-PC compatible system, which gives you the advantages of readily available service, parts, and backups. PM does just about everything the Poly does. PM provides a complete PolyMorphic environment, in which any Poly programs will run, whether they were written in BASIC, assembly, or other languages. PM accomplishes this by emulating the hardware of the Poly, including the ROMs, memory map, interrupts, screen memory, and so on. Anything that runs on Poly hardware should run on PM, with a few exceptions noted below.

Why Emulate? If you're a loyal, long-time Poly user, you've reached 1989 painfully. You've spent a great deal of time and money developing programs to run on your Poly system, and you've bucked the trend of IBM-PCs for years. But with every passing year, it's becoming more difficult to stay with the Poly, especially so now that PolyMorphic Systems is no longer in business. You're worried about support, and about getting spare parts and service. Someday the last PolyMorphic will stop running. But software doesn't die of old age the way hardware does. With PM, you can move virtually all of your Poly software to a PC-compatible, and continue using it. And, if you want to, you can use the utilities available with PM to begin modifying your programs and data to run under MS-DOS.

The Vdisks. When running PM, you can access drives 1 through 7, just like normal. But each of the "drives" you are accessing is actually a "virtual disk", which we will call a "vdisk". A vdisk is just a file, in IBM-PC DOS, but that file happens to contain all the sectors of a Poly disk. To the Poly, it's a drive; to the PC, it's a file. Thus, to back up that Poly drive, you can just use PC-DOS and copy the corresponding file to a PC floppy, or run a tape backup, or however you normally back up your PC files. How does PM know what vdisk (PC-DOS file) corresponds to which drive? Your PC disk contains a file called POLYDEV.DAT, which contains lines like

drive 1 system.pm
drive 2 demo.pm

This establishes a connection between <1< and the vdisk called SYSTEM.PM, <2< and DEMO.PM, etc. PM reads this POLYDEV.DAT file when it starts. You can edit this file with any text editor to change your defaults. You can also use the PMU program, described later, to change these connections "on the fly," just as you could with Poly's Volume Manager.

Speaking of Volume Manager: Don't use it with PM. Its functions aren't needed with PM, and it contains hardware-dependent code that won't run correctly. Also, it occupies RAM space, whereas PM can do all of the same tricks without moving Top of RAM below FFFF. Use POLYDEV.DAT and the PMU program to do your volume-manager functions.

Getting Started. If you have a hard disk, create a directory for PM to run in, such as C:\PM. Copy all files from the PM IBM-PC disk into this directory. "CD" to this directory.  Type PM and hit Enter. You'll see this screen:

The upper window is the Poly screen, 16 x 64 characters. The lower window is used when you enter "supervisory" commands to PM, to start and stop the emulator, for example.

If you see the message "Waiting for printer..." on the lower window, hit Ctrl-Y to bypass the printer initialization, just as you would on a Poly. If you see that message, your printer was probably not connected or turned on when you told PM to run. After several seconds, you should see the Exec prompt in the upper window. (If you're using an older PC or XT, be patient. It'll take a little longer than you're used to.) Now, you should be able to type in commands, and have PM respond just like a Poly. You can list drives, edit a file, and so on. Since your POLYDEV.DAT file was set up with two vdisks, you can do things with drives <1 and <2 now. Later we'll explain how to use other drives.

Keyboard Mapping. You may want to leave your CAPS LOCK feature turned on when using PM, since most Poly commands are upper case. Unlike the Poly keyboard, you can use SHIFT while CAPS LOCK is on, and get lower case.

PM lets you use your PC keyboard in ways that are useful in the Poly environment. Here are some of the control-keys, and what they do:

DEL and the BACKSPACE key (the little left-arrow by itself) both do a Poly DELETE, which is used almost always used as a backspace.

The four arrow keys work as expected.

The PgUp and PgDn keys perform ^P and ^N, which the Poly editor uses for previous and next page.

Ctrl-PgUp and Ctrl-PgDn are ^B and ^E, which the editor uses for beginning and end of file.

F1 through F4 are Poly I through IV (only found on the Poly Keyboard III). These are equivalent to ^\, ^], ^^ (ctrl-carat), and ^_ (ctrl-DELETE).

F5 generates the same code as the Poly "Line Feed" key, ^J.

F6 generates the same code as the Poly "Backspace" key, ^H.

All of the other keys should generate standard characters, or not do anything at all inside of PM.  Other function keys and special keys may be defined for future enhancements.

Printer Support.  The PM system vdisk is mostly a "plain vanilla" Poly disk. PM is able to boot from any Poly disk; we didn't modify Exec in order to get it to run. But this vdisk has a special Sio.PS file, which is the PM printer driver. This file must be on any vdisk you plan to use as a System disk. If you want to use one of your own disks as a System disk, you'll need to remove Sio.PS from that disk, and copy ours onto it.

PM only supports printers when using a version of Exec that contains Sio.PS. Earlier Execs had the printer driver embedded in Printer.GO, and these Execs cannot be used with PM if you want to use a printer.

When running Setup, you can give any legal answer to the Baud Rate question, such as 9600. It doesn't matter to our Sio.PS file.

You can use PMU commands (discussed later) to send PM's printer output to a parallel or serial printer, or to an IBM-PC file. By default, PM's printer output goes to the printer attached to IBM parallel printer LPT1. You can also change the default printer by adding a line to your POLYDEV.DAT file, as we described earlier.

Note: The version of Sio.PS shipped with PM version 1.0 (the demo version shipped free to some Poly owners) would "hang" if the printer was not ready. This was fixed in PM/1.1. Do not use the System vdisk from PM/1.0 unless you copy the Sio.PS file from this release.

Fonts and Colors.  If your system contains an EGA or VGA color display, you can tell PM to give you a completely accurate set of Poly graphics characters. The "font" command in POLYDEV.DAT redefines the character set in an EGA or VGA, to make it produce Poly block graphics and Greek characters. We have provided two font definition files, EGA.FNT and VGA.FNT.

You can run the program SDEMO, provided on your System vdisk, to see what the Poly characters look like. The source to this program is provided in the file SDEMO-SRC.

On a VGA, and when running programs that draw large graphics areas, you may notice a problem. There will be occasional thin, dark, vertical lines in the middle of a large bright area. Sorry, folks... this is as good as I could get the VGA to do. An EGA color display doesn't have this problem.

On either color display, you can use the "colors" command in your POLYDEV.DAT file to make the screen more attractive. This command takes four arguments. The first two are the foreground and background colors for the Poly portion of the screen (the 16 by 64 window), and then the foreground and background colors for the remainder of the screen.

To set the Poly portion to "white on blue", and the remainder to "green on black", you would insert this line in POLYDEV.DAT:

colors white blue green black

You can brighten either of the foreground colors by prefixing the color name with "b-", for example "b-white" instead of white. Legal color names are: black, blue, green, cyan, red, magenta, yellow, and white. If you want a yellow foreground, be sure to say b-yellow, otherwise it may look like a dark orange. PC colors aren't perfect.

POLYDEV.DAT commands.  Here is a list of the commands you can put in your POLYDEV.DAT file.

drive n pcfile Assigns IBM-PC file named "pcfile" to Poly drive number n.
printer LPTn
printer COMn
printer NUL
Assigns the PM printer output to go to a parallel printer port on the IBM-PC (LPT1 through LPT3), or a serial port (COM1 or COM2). Use NUL for no printer.  You can change the assignment later using PMU. PMU can also redirect printer output to an IBM-PC file.
colors fg1 bg1 fg2 bg2 Sets the foreground and background colors for the Poly portion of the screen, and for the rest of the screen.
fpb on Turns on the NorthStar hardware floating-point board emulation, which can speed up mathematical operations in Poly BASIC programs.
font vga.fnt Downloads a font file to the VGA display adapter.  Only works if used in a full-screen DOS session in Win98, or a real live DOS machine.

The Buts.  There are always exceptions. Here's a list of some known things PM can't do (at least in this release).

The Poly serial port hardware isn't emulated, so programs like FTP that access the serial port directly won't run. Using our Sio.PS printer driver, though, you can use any printer that your PC normally uses.

Some speed-dependent programs won't run correctly. The speed of PM is dependent on what type of PC you're using, and what your programs spend most of their time doing. In general, a program that computes a lot will run slower, but a program that does lots of disk I/O will run faster, than a real Poly system. Use the fastest PC you can get. Running PM on a 286 or 386- based PC is about as fast as a real Poly. On a PC or XT, it's slower, but it does work.  (That was written in 1989.  Today, PCs are so blinding fast compared to the 2 MHz PolyMorphic CPU that all apps will run faster.  However, the Poly's 60 Hz real-time clock isn't simulated exactly, so programs which rely on that feature may run at different speeds than they were designed to.)

Screen Mapping.  The Poly's screen is 16 x 64 characters. PM displays this in a window of the PC's 25 x 80 screen. A Monochrome Display Adapter (MDA) or Color Graphics Adapter (CGA) can't display all of the Poly characters accurately... some of the Greek characters are missing, and none of the "block graphics" characters will look exactly right. Beginning with PM/1.3, we support EGA and VGA displays with full Poly character sets. See the "font" command, discussed earlier, for details.

Commands at the [pm] Prompt.  When you start PM, the emulator immediately starts running.  To stop it, hit ALT-F1. Then, to quit PM, type 'quit' or 'q'. For best results, don't do this unless you're at the Exec prompt, with the $ or $$ showing on the Poly screen. If you interrupt the program while it's doing something like updating a disk directory, you could damage some Poly files. If you've interrupted the emulator with ALT-F1, you can continue where you left off by typing 'r' again. Some other commands you can type at the [pm] prompt:

b: Boot the system. This is equivalent to pressing LOAD on a Poly. The warnings about 'quit' also apply here.

g: Go until a certain address is reached. If you type 'g 3200', the emulator will execute instructions one at a time (very slow!) until the Poly's program counter register equals 3200 hex. Then it will stop, display all 8080 registers, and return you to the [pm] prompt.

t: Trace. Executes one 8080 instruction, and displays registers. x: Examines (displays) registers, but does not execute anything.

d: Dump memory. 'd 2000 20' would dump 20 (hex) bytes starting at 2000 hex.

u: Unassemble memory. Same format as 'd'.

The PMU Program.  PMU is the "PM Utility" program. It handles things which involve the PM environment, or interactions between the IBM-PC and the emulator program. It's also the PM substitute for Volume Manager. To run PMU, just type its name at the Exec prompt:

$PMU
pmu:

When you see the "pmu:" prompt, type in any of the PMU commands described below. If you don't have this document handy, type HELP to get a brief list. Commands may be entered in upper or lower case.

Show   The SHOW command lists the current PM vdisk assignments. Example:

pmu: SHOW
Current drive assignments:
1: system.pm
2: demo.pm
3:
4:
5:
6:
7:

Connect   The CONNECT command changes a drive assignment. Type the CONNECT command, followed by the Poly drive number, then the PC filename for the vdisk. For example:

pmu: CONNECT 3 STUFF.PM

would assign Poly drive <3 to the PC file STUFF.PM, which should be a Poly vdisk. If it isn't, you'll get the message "disk directory destroyed!" when you try to access it.

Size   This command changes the size of a Poly vdisk. (Try that, Exec!) You can increase the size until it uses all available disk space (or 65535 sectors at most). You can also shrink a vdisk until it only has room for the files currently stored on it (and therefore has 0 sectors free). Example:

pmu: SIZE 3 500

If you request a disk size that's smaller than the number of sectors in use, PMU will complain. If you request a size that's larger than the amount of free space available on your PC disk, PMU will increase the size as much as it can, using all that available space, then will tell you what the size was actually set to.

Copy   The COPY command moves files between the Poly and IBM-PC file systems. You must specify the source and destination filenames. For example,

pmu: COPY <1<POLYFILE.TX C:PCFILE.TXT

would copy the Poly file <1<POLYFILE.TX to IBM-PC file C:PCFILE.TXT. You can copy in either direction, from Poly to PC or vice-versa. You must include a path specifier on either the Poly filename (like <1<), on the PC filename (like C:), or both. Otherwise, PMU can't tell which is which, and will complain. For best results, don't put \ or : in your Poly filenames, since it will make them look like PC filenames. PMU will then ask,

Text or Binary treatment (T or B) :

Press T or B, and then Return. If you select text treatment, the file is copied with the proper end-of-line characters (CR alone on the Poly; CR/LF on the PC) and the NUL bytes at the end of the Poly file are stripped out. If you select binary treatment, all bytes are transferred. Remember that Poly filenames are case-sensitive (upper and lower case are considered different), but PC filenames are not.

Printer   The PRINTER command allows you to re-direct where PM's printer output goes. You can specify an IBM parallel printer port, with a command like

pmu: PRINTER LPT2

which would begin sending printer output to device LPT2. You can also specify an IBM serial port (COM port), with

pmu: PRINTER COM1

Or, you can give an IBM-PC filename, such as

pmu: PRINTER OUTPUT.TXT

which would create a new IBM-PC file, called OUTPUT.TXT, and begin sending PM printer output to it. The file remains open, and output continues to go into it, until you use PMU to send output elsewhere, or until you leave the emulator. Note: Poly software sometimes sends NULs (the character with hex value 00) to the printer device. Most printers will ignore that character, but PM will obediently send it to an IBM-PC file if you have redirected your printer output. Watch out for that character in any files you've created with printer redirection. (The PM printer handler does not eliminate NULs, since some programs may deliberately be sending them to the printer, perhaps to perform some graphics functions.)

If you're using a serial printer, you must set your serial port's baud rate to agree with your printer. You can do this with DOS's MODE command, and you should do it before running PM.

For example, to set the COM1 port to 9600 baud, 8 bits, no parity, one stop bit:

C:\PM>mode com1:9600,n,8,1

When using a serial printer, PM's printer driver supports the "input from printer" function. Some programs may be able to use this to read from the serial port. However, most Poly programs that do input from the serial port try to access the USART hardware directly, and PM doesn't emulate this hardware, so they won't work. Poly's FTP program doesn't work in PM.

DOS   The DOS command suspends operation of PM and takes you to a "DOS shell." Use this to perform a few simple DOS commands, look around at files, etc. But don't plan to stay here for long; PM is still loaded in memory and may interfere with any large programs you run while in the DOS shell. If you plan to do much with DOS, exit PM with ALT-F1 and Q. When you're done with the DOS shell, type EXIT to return to PM.

Quit   The QUIT command exits PMU and returns you to Exec.

Fine print:  This copy of PM and associated software is provided for historical reference purposes.  We do not claim any copyright to the original code included in the PolyMorphic operating system or ROMs.  We also do not provide any warranty whatsoever, although the program has been tested and used successfully in a business environment for over 10 years.  PM does not make any changes to your system's registry or other files.