GettingStarted - pkimpel/retro-1620 GitHub Wiki
Getting Started with the retro-1620 Emulator
The retro-1620 emulator is an implementation of the IBM 1620 Model 2 computer system. The 1620 was a late-1950s/early-1960s, transistorized, decimal, core-memory system. The Model 1 was released in 1959 and ran with a memory cycle time of 20µs. The Model 2 was released in 1962, and while object-compatible with the Model 1, had a memory cycle time of 10µs, and used redesigned logic with different electronics.
This page describes how to set up and start the emulator.
The emulator runs in a standard graphical web browser. It is written entirely in JavaScript, with HTML and CSS used to define the user interface. The emulator displays a replica of the 1620 control panel in your browser. You operate and interact with the emulated 1620 through this control panel and your workstation keyboard and pointing device. The intent is that you work with the emulator in much the same way you would have with a real 1620.
Quick-start Overview
To set up and use the web-based emulator, you will need to do the following things, which are discussed in more detail in the sections that follow:
- Use a suitable web browser – at present that means Mozilla Firefox, Google Chrome, Apple Safari, or the newer version of Microsoft Edge that is based on WebKit. See the following section on The Web Browser.
- Optionally, download and set up the emulator files on a web server. Instead of using your own web server, however, you can run the emulator from our hosting site. See the following sections on The Web Server and The Emulator Files.
- In your web browser, access the
webUI/1620.html
home page on the web server to run the emulator. See the following section on Starting the Emulator. - For information on configuring the emulator and its input/output devices, see Configuring the Emulator.
The Web Browser
The retro-1620 emulator must be run in a modern web browser, as we are taking advantage of many features in HTLM5, its related DOM APIs, and CSS 3. It should run fine on any reasonably-recent version of the popular modern browsers. It has been tested in Mozilla Firefox, Google Chrome, and Microsoft Edge under Windows, and in Apple Safari under OS X. The emulator does not work in Microsoft Internet Explorer or the original versions of Microsoft Edge that are not based on WebKit.
You will need a reasonably powerful workstation for the browser. Emulation of the 1620 instructions requires very little, but update of the panels and I/O devices can be graphics-intensive, and requires a fair amount of horsepower. Any standard PC manufactured since 2010 should be adequate. It also helps to have a good-sized display, multiple displays, or both.
Allowing Pop-up Windows
By default, most modern browsers restrict the ability of a web page to open additional windows on the screen. The primary reason for this is to prevent advertisements from opening pop-up windows all over your screen. The retro-1620 emulator will open several pop-up windows, however, and for good reasons. It will not function properly if these windows are blocked from opening.
There are separate windows for the main Control Panel and for each of the configured I/O devices. Implementing these as separate windows supports variable configurations and allows you to move and overlap windows on the screen, which is especially important if you have a smaller screen. You can also minimize individual windows if you don't need to see them, and restore them later as necessary.
If windows do not open when you start the emulator, or you get an alert that windows are not opening, you will need to enable pop-ups for the domain from which the emulator is loaded. You should only need to do this once for a given browser on your workstation.
Most browsers will allow you to completely disable pop-up window blocking, but allowing any page to open pop-ups by default is usually not a good idea. Most browsers will also allow you to selectively allow or disallow pop-ups based on the domain name from which the page originated. If you are using our hosting server, that domain name is phkimpel.us
. If you are running the emulator from a local web server on your workstation, the domain is usually localhost
or the loop-back IP address, 127.0.0.1
.
- In Google Chrome, open the Settings tab from the menu. On that tab, select "Privacy and Security" from its menu, then select "Site settings" from the list of options that displays. Scroll down the list of settings and click the entry for "Pop-ups and redirects." On the resulting display, under "Allowed to use pop-ups and redirects," you can add domain names in fully-qualified format, e.g., "https://www.phkimpel.us", including "www." if necessary.
- In Mozilla Firefox, open the Settings tab from the menu. On that tab select "Privacy & Security" from the list on the left. On the right side of that tab, scroll down to "Permissions" and find the line for "Block pop-up windows." The check box on that line controls the global pop-up setting for the browser. If it is ticked, click the Exceptions... button to the right. That will open a dialog on which you can enter domain names and indicate they are allowed to open pop-ups.
- In Microsoft Edge, open the "Settings" tab from the menu. On that tab, select "Cookies and site permissions" from its menu, and from the resulting list select "Pop-ups and redirects." On the view that opens you can add domain names that are allowed to open pop-ups, using the same format as for Chrome.
- In Apple Safari for OS X, go to the site where the emulator is hosted and display the home page, but don't start the emulator yet. Open the Safari Preferences panel and click on the "Websites" tab. In the list on the left of that tab select "Pop-up Windows." In the list on the right of that tab, under "Currently Open Websites," you should see the domain name for the emulator's site, probably with a setting of "Block and Notify." Change that to "Allow." The global setting for the browser is below that list: "When visiting other websites." You will normally want to set that to "Block and Notify."
Mobile Devices
Note that the emulator will not work properly in most mobile devices, including smart phones and tablets, as the browsers for those do not support multiple active windows or a continuously-active keyboard.
The Web Server
The easiest way to use the emulator is to load it from the web site we have set up on a hosting service. Just point your browser to the following URL:
The web server is needed only to load the emulator into your local workstation. Once the emulator is loaded and running, it requires no further access to the server.
If you choose not to use our hosting site, or some other site that is already set up to serve the emulator files, you will need to configure a web server and load the emulator files to it. See the appendix Setting Up a Web Server for the necessary information.
The emulator will likely not work properly if run directly from your local file system, although it can be turned into a standalone desktop application using Electron.
Starting the Emulator
This section describes how to run the emulator and prepare it to run 1620 programs.
To run the emulator from our hosting site:
- In your browser, access the page at http://www.phkimpel.us/IBM-1620/.
- Click the 1620 Emulator Home Page link on that page.
- On the resulting page, click the blue Start the Emulator button.
To run the emulator from another web server:
- Open the
webUI/1620.html
page under the URL for the virtual directory you have set up. - On the resulting page, click the blue Start the Emulator button.
The emulator home page should look similar to this:
When you start the emulator, it will open a number of sub-windows for the Control Panel and I/O devices. These browser windows may be resized and moved around your screen, although there is no advantage to resizing the Control Panel window larger, and resizing it smaller may make it difficult to use.
You may minimize these windows, but do not close them – closing I/O device windows will render those devices unusable until the emulator is restarted, and closing the Control Panel window will terminate the emulator and discard any output you may have generated. The emulator may display an alert if you attempt to close its windows, but this is browser-dependent. Most modern browsers will display a close-window alert only if you have previously interacted with the window in some way, e.g., clicked on one of its elements.
In addition, while the emulator is running, it is not a good idea to minimize the window with the emulator home page or make another tab active in that window. Current versions of at least Firefox and Chrome slow down the execution of scripts running in minimized windows or inactive tabs, which in turn will cause the emulator to run very slowly. It is best to open the home page in its own window and not allow any other application's window to completely cover the home page window.
Next Steps
When you initialize the emulator from the home page, it automatically "powers on." Within 2-3 seconds, the white POWER READY lamp on the Control Panel will come on and the emulator is then ready to use. To shut down the emulator, double-click the POWER OFF button, which will close the Control Panel and all I/O device windows.
Upon initialization the emulator core memory will be cleared to zeroes, except that the multiplication table required by the instruction set will be loaded to addresses 00100-00299. All Control Panel switch settings and most I/O device settings are preserved across an emulator restart.
The default configuration for the emulator includes the Typewriter, the 1622 Card Reader/Punch, and 40,000 digits of memory, but not the Line Printer, Disk Drives, index registers, floating-point arithmetic or the binary capabilities. Unlike the Model 1, the MF, TNS, TNF instructions, indirect addressing, and automatic division are standard features for the Model 2.
To modify this default configuration, click the Configure System button on the home page. This button is active only when the emulator is "powered off." See Configuring the retro-1620 Emulator for more information.
After initialization, there are two ways to run a program:
-
Press the INSERT button on the Control Panel. The TWPR SELECT and AUTOMATIC lamps on the Control Panel will light. You can enter numeric digits from the keyboard to insert object code into the system's memory starting at address 00000. This technique is typically used to enter a short bootstrap sequence for some other program as it is limited to inserting 100 digits. At the end, press the RELEASE button on the Control Panel, followed by the START button to begin executing at location 00000. As a shortcut, you can press the Release/Start (R/S) key on the keyboard, which in the emulator is the
#
key. -
Load a deck of punched cards for an object program into the 1622 card reader. Press the LOAD button on the card reader (do not press the reader's START button first). The system will read the first card numerically into locations 00000-00079 in memory and start executing at location 00000. The first card is typically a short bootstrap program that will load the remaining cards.
View the other pages in this wiki for detailed information on using the Control Panel and the I/O devices. See Using the Disk Drive for information on loading the Monitor I operating system and booting it into memory.
Documentation and References
The IBM-1620 PDF document archive at bitsavers.org has PDF scans of a number of manuals for the 1620. You may wish to refer to the following in particular:
- IBM 1620 System Summary
- IBM 1620 Central Processing Unit, Model 2
- IBM 1620 Data Processing System, Model 2 Binary Capabilities and Index Registers
- IBM 1621 Paper Tape Unit
- IBM 1622 Card Read-Punch
- IBM 1443 PRINTER for 1620/1710 Systems
- IBM 1311 Disk Storage Drive
- IBM 1620 Model 2 Reference Card
For information on the internals of the 1620 CPU, see
Appendix
Setting Up a Web Server
This section describes setting up and configuring a web server to host the retro-1620 emulator.
Using Your Own Server
You can run a web server on your local workstation and serve files from there, or you can access some other server remotely over the Internet.
If you need a small, simple web server to host the emulator locally, we have had good success with mongoose (https://github.com/cesanta/mongoose). It can run on the same workstation as your browser to serve the emulator files using the loop-back port (localhost or 127.0.0.1). Versions are available that run under Windows, Linux, UNIX, and Mac OS. It is easy to set up. Under Windows, it can run either on demand as a user program or as a Windows Service.
The Emulator Files
Unless you are running your web server on the same workstation as your web browser, you do not need to download or store the emulator scripts on your workstation. You load it as you would any other web page.
If you want to set up your own web server, the easiest way to obtain the emulator files is to download them from our GitHub project repository. You can clone the project with Git or Subversion, or download a ZIP archive of the files. To do this, click the green Code button on the right-hand side of the page and select Download ZIP:
The emulator is hosted in two directories of files:
emulator/
contains the Processor and various utility modules.webUI/
contains everything else you need to run the system. In particular, it contains the Control Panel user interface and the peripheral device drivers.
A third directory, software/
, contains source and object code for the software projects and miscellaneous utilities that have been developed with the emulator. These are described in other wiki articles and the README
files embedded within their directories.
A fourth directory, webSite/
, contains the web pages for the hosting site. You are welcome to use these if you wish. The home page for the hosting site is index.html
and must be located at the root of the project files. Use the "1620 Emulator Home Page" link on that page to run the emulator.
Establish the Web Server
The general steps to set up the emulator files are:
- Create a new virtual directory for the web server, e.g.,
/retro-1620/
, to hold the emulator files. - Download the emulator release as described above.
- Place the files in the directory on your server's file system to which the virtual directory is mapped. You will need the files from at least the
emulator/
andwebUI/
directories. Those directories must reside at the root of the virtual directory. - If you choose to use the
webSite/
files, that directory and theindex.html
file must also be at the root of the virtual directory. - To support the web fonts used by the emulator and hosting site, you may need to create a MIME-type mapping in the web server configuration for at least one of the following file extensions:
.woff
toapplication/font-woff
.ttf
toapplication/font-sfnt