• The Virtual Keyboard
The keyboard graphic responds to mouse clicks, touch events, and key presses. Hold your shift key while clicking the PET keyboard to get the graphics characters or use the toggling shift keys on the virtual keyboard.
(The emulator simulates pressing the PET's left shift-key at the same time as the clicked key.)
Using a real keyboard, the TAB key substitutes the up-arrow key of the PET and ALT/option + TAB the left-arrow key.
• Keyboard Modes
There are two keyboard modes to be selected from the respective pop-up menu below the virual screen: One for editing, featuring emulated key repeat and convenient touch interaction, and a games mode, featuring an immediate keyboard response and multi-touch interaction as suitable for playing games games.
• Active Cursor Positioning
Activate the checkbox "Touch-Cursor" for positioning the cursor freely on the screen by touches or clicks, while in edit mode. Especially useful for touch operated devices, like tablets, or for editing screen graphics.
Please note that this may result in unintended effects with programs that turn on the cursor while waiting for an INPUT or a GET statement. Hence, best disable this option while running a program.
• Loading and Saving Programs
The emulator has an IEEE-488 device attached at address 8, which can be used to load and save (.prg) files.
To load program files that are on your local disk, first select the file with the browse button. Then type LOAD "NAME",8 into the PET. To save a program, type SAVE "NAME",8 and then you'll be prompted to save the file.
You may also drag and drop a .prg or .pet or .p00 file onto the virtual PET's screen to load and auto-run the respective program.
(Note that IEEE-488 doesn't work very well with ROM version 1.)
Alternatively, you may also export a BASIC program currently in RAM as a binary PRG-file or as a portable source file in text format (converting any non-ASCII characters to CHR$-commands) by means of the "Export" menu. However, this will not be handled by the emulated PET, but by the emulator itself.
D64-disk images may be mounted either by the file-input or by drag-and-drop. The emulator will parse the disk image and present a file dialog to chose from. (You may bring up this dialog again by clicking the button "Disk Directory", shown to the left of the file-input button, once a disk image has been loaded.)
Update: There's now experimental support for T64 tape images, common with C64 emulation.
(Documentation for this format is somewhat lacking. The implementation has been tested with version $100 files and works, like VICE, for type 1 files, which are programs, only. Other file types, while parsed, will be ignored in the catalog. File sizes are checked to work around a common bug with early T64-files. Mind that T64 tape images are intended for the C64, however, some programs, like the type-in ones from books and magazines, will run on a PET with little adjustment. You probably want to load those programs as BASIC files and LIST them before running to check for POKE-commands, etc.)
Finally, you may load or drag-and-drop text-files (with extensions .txt, .ba, .bas) of BASIC source text. The emulator will generate a tokenized BASIC program and load it into memory, but will not run it automatically. The source code may be either in lower case or in upper case (or even mixed). The usual abbreviations for commands are recognized (works best in lower case source texts).
Some PET games with hot-links to run them in this emulation can be found in this file list.
A large collection of .prg programs is to be found at www.zimmers.net/anonftp/pub/cbm/pet/ALLFILES.html. Take a look under demos/Cursor/ and games/.
• Loading Programs from URL-Data
You may submit a BASIC program (either in upper-case or lower-case (but no Commodore BASIC abbreviations allowed) using the URL parameter "data=<URL-encoded-string>".
For base64-encoded data use a prefix as in "data=base64:<data-string>".
You may run a program atomatically by appending another URL-parameter "autorun=true".
Alternatively, you may also use the hash / fragment of the URL using the same parameters.
Use the "Export" menu (see below) to generate a data-link like this.
Note: The special character π is escaped as "\pi".
Mind that you may use data-URLs for direct mode (not a program starting with a line number) as well, using the URL-parameters "exec" or "execute". Direct mode data will be executed always at once. E.g., ?exec=print(100+20)*5 or ?exec=printsin(\pi/6)
• ROMs and RAM
Some programs don't run on ROM1 or require more memory.
Changing the size of memory or changing the ROM version forces a reset of the PET.
• Exporting Screen or Memory
Select an item from the "Export" menu to export any screen or memory contents.
The screen may be exported as:
— Unicode text, ready for copy-and-paste (mind that there isn't a Unicode equivalent for every PET character),
— a PNG image (with margins or without),
— a printer hard-copy (PNG image, dot-matrix style, black on white),
— a hex-dump of the screen memory,
— a BASIC program that will reproduce what is currently shown on the screen.
— a link for the current BASIC program
BASIC memory may be either exported as a listing in portable text format, converting any special characters in strings or PRINT-statements to CHR$(...)-sequences, as a hex-dump, or as a binary PRG-file.
Arbitrary memory ranges may be exported either as a hex-dump or in 6502 disassembly (both limited to the ranges of RAM and ROM).
Commodore PET 2001 by Commodore International / Commodore Business Machines (CBM), 1977-1979.
Commodore PET 2001 emulation © 2014 Thomas Skibo (all rights reserved, redistribution permitted).
PET keyboard image (SVG, rerendered to PNG) by Lovelac7, 2008, Wikimedia / Creative Commons.
Image of PET 2001 computer (edited) by Tomislav Medak, 2009, Creative Commons.
Revised interface, screen emulation, input and output handling, as well as import and export features by Norbert Landsteiner, 2017–2019, www.masswerk.at.
You may run programs by simply dragging and dropping files onto the virtual screen of the emulator.
Supported file formats are:
Binary files will be run automatically (hold SHIFT to override), while BASIC source files are just loaded in order to allow for an inspection of the generated BASIC program.
(BASIC source files may be both in lower and upper case, case is evaluated on a per-word basis. No attempt is made to translate non-alphabetic PETSCII characters, please use "chr$()" instead.)
For best gaming experiences set the keyboard to "Games"-mode (no simulated key repeat and immediate touch interaction) from the pop-up menu at the bottom of the virtual screen.
See here for some games (with hotlinks to load them into the emulator) and PET 2001 manuals.
Note for iPad users (9.5in): Consider adding this page to your home screen. If started from there, the navigation bar will be hidden and the interface should just fit the screen.
Drag or right-click to save