Commodore PET

The Commodore PET is a line of personal computers produced starting in 1977 by Commodore International. The system combined a MOS 6502 microprocessor, Commodore BASIC in read-only memory (ROM), a keyboard, a computer monitor and (in early models) a cassette deck for data and program storage in a single all-in-one case.
Development of the system began in 1976 and a prototype was demonstrated in January 1977 at the Consumer Electronics Show (CES). A series of problems meant that production versions did not begin to arrive until December 1977, by which time the TRS-80 and Apple II had already begun deliveries. The close release dates of the three machines led "Byte" to refer to them collectively as the "1977 trinity".
The original PET design underwent a series of significant updates, adding more memory, a better keyboard, larger screens and other modifications. The systems were a top-seller in the Canadian and United States educational markets, as well as European business uses. The PET formed the basis for Commodore's entire 8-bit product line, including the Commodore 64.
The name was suggested by Andre Souson after he saw the Pet Rock in Los Gatos, and stated they were going to make the "pet computer". It was backronymed to Personal Electronic Transactor.
History.
Origins.
In the 1970s, Commodore was one of many electronics companies selling calculators designed around Dallas-based Texas Instruments (TI) chips. TI faced increasing competition from Japanese vertically-integrated companies who were using new CMOS-based processes and had a lower total cost of production. These companies began to undercut TI business, so TI responded by entering the calculator market directly in 1975. As a result, TI was selling complete calculators at lower price points than they sold just the chipset to their former customers, and the industry that had built up around it was frozen out of the market.
Commodore initially responded by beginning their own attempt to form a vertically-integrated calculator line as well, purchasing a vendor in California that was working on a competitive CMOS calculator chip and an LED production line. They also went looking for a company with an existing calculator chip line, something to tide them over in the immediate term, and this led them to MOS Technology. MOS had been building calculator chips for some time, but more recently had begun to branch out into new markets with its 6502 microprocessor design, which they were trying to bring to market.
Along with the 6502 came Chuck Peddle's KIM-1 design, a small computer kit based on the 6502. At Commodore, Peddle convinced Jack Tramiel that calculators were a dead-end and that Commodore should explore the burgeoning microcomputer market instead. At first, they considered purchasing an existing design, and in September 1976 Peddle got a demonstration of Jobs and Wozniak's Apple II prototype. Jobs was offering to sell it to Commodore, but Commodore considered Jobs's offer too expensive.
Release.
The Commodore PET was officially announced in 1976 and Jack Tramiel gave Chuck Peddle six months to have the computer ready for the January 1977 Consumer Electronics Show, with his team including John Feagans, Bill Seiler, two Japanese engineers named Fujiyama and Aoji, and Jack's son Leonard Tramiel who helped design the PETSCII graphic characters and acted as quality control. 
The result was Commodore's first mass-market personal computer, the PET, the first model of which was the PET 2001. Its 6502 processor controlled the screen, keyboard, cassette tape recorders and any peripherals connected to one of the computer's several expansion ports. The PET 2001 included either (2001-4) or (2001-8) of 8-bit RAM, and was essentially a single-board computer with discrete logic driving a small built-in monochrome monitor with character graphics, enclosed in a sheet metal case that reflected Commodore's background as a manufacturer of office equipment. The machine also included a built-in Datasette for data storage located on the front of the case, which left little room for the keyboard. The data transfer rate to cassette tape was 1500 baud, but the data was recorded to tape twice for safety, giving an effective rate of 750 baud. The computer's main board carried four expansion ports: extra memory, a second cassette tape recorder interface, a parallel ("user") port which could be used for sound output or connection to "user" projects or non-Commodore devices and a parallel IEEE-488 port which allowed for daisy-chaining peripherals such as disk drives and printers.
A working PET 2001 prototype with wooden case was shown to the public at the Winter CES 1977 in January 1977 and the first 100 units were shipped in October, mostly going to magazines and software developers, while the machine was not generally available to consumers until December. However, the PET was back-ordered for months and to ease deliveries, early in 1978 Commodore decided to cancel the 4 KB version (also because the user would be left with barely of RAM).
Dan Fylstra of "Byte" magazine received one of the initial PETs in October 1977, S/N 16, and reported on the computer in the March 1978 issue. Fylstra praised its full-featured BASIC, lowercase letters, and reliable cassette system, while disapproving of the keyboard. His machine had three faulty RAM chips and after some difficulty contacting Commodore, was mailed a set of replacement chips and installation instructions by John Feagans.
Commodore was the first company to license Microsoft's 6502 BASIC, but the agreement nearly drove Microsoft into receivership as Commodore stipulated that they would only pay for it when the PET began shipping. This was delayed by over six months, during which Microsoft lost money and had their cash reserves further depleted by a lawsuit over ownership of Altair BASIC. At the end of the year, Microsoft was saved by Apple's decision to license Microsoft BASIC for the Apple II line.
The BASIC included on the original PET 2001 was known as Commodore BASIC 1.0; Microsoft supplied Commodore with a source listing for their 6502 BASIC, essentially a port of BASIC-80, and Commodore performed the rest of the work themselves, including changing the startup screen and prompts, adding I/O support, the SYS command for invoking machine language programs, and fixing bugs. BASIC 1.0 still had numerous bugs and IEEE-488 support was broken, so that when Commodore later came out with disk drives, they could not be used from BASIC (although the kernel routines supported them), and only supported 256 array elements. The PEEK function would not work on memory locations above 49152 so as to prevent the user from viewing the copyrighted code in the system ROMs.
Aside from the 8k BASIC ROM, the PET also included a 4k character ROM and an 8k kernal ROM. The first half of the kernal contained screen editor functions (the screen editor on 80 column PETs differed from 40-column models) with the second half containing a number of function calls for tasks such as inputting and outputting data to and from different I/O devices, reading the keyboard, and positioning the cursor. In addition, the kernal ROM received system interrupts and scanned the keyboard. The kernel, an idea of John Feagans, was a spiritual ancestor to the ROM BIOS on PC compatibles and the first personal computer OS ROM to be a distinct entity from BASIC. The character ROM was 4k in size, containing four different 128 character tables, the uppercase/graphics character set and upper/lowercase character set, plus reverse video versions of both. This included a number of graphics characters for creating pseudographics on the screen as well as playing card symbols (reportedly because Jack Tramiel's sons wanted to play card games on the computer). On the original PET 2001, the uppercase/graphics character set and upper/lowercase character set were reversed compared to how they would be on later machines; PET owners who upgraded their machines to the BASIC 2.0 ROMs often also swapped out the character ROMs for the newer version.
Although the machine was moderately successful, there were frequent complaints about the tiny calculator-like keyboard, often referred to as a "chiclet keyboard" because the keys resembled the chewing gum it was named after. The key tops also tended to rub off easily. Reliability was fairly poor, although that was not atypical of many early microcomputers. Because of the poor keyboard on the PET, external replacement ones quickly appeared. The PET had somewhat of a competitive advantage over its Apple II and TRS-80 rivals as both were using relatively primitive integer BASICs for their first six months on the market while the PET had a full-featured BASIC with floating point support, a sophisticated screen editor, and lowercase letters, the last being a feature that the two competing platforms would not have for a few years. On the other hand, Commodore were a year behind Apple and Tandy in making disk drives available for their computers.
In 1979, Commodore replaced the original PET 2001 with an improved model known as the 2001-N (the N was short for "New"). The new machine used a standard green-phosphor monitor in place of the white in the original 2001. It now had a conventional, full-sized keyboard and no longer sported the built-in cassette recorder. The kernel ROM was upgraded to add support for Commodore's newly-introduced disk drive line. It was offered in 8 KB, 16 KB, or 32 KB models as the 2001-N8, 2001-N16, and 2001-N32 (the 8 KB models were dropped soon after introduction). The 2001-N switched to using conventional DRAM instead of the 6550 (1kx4) SRAM in the original model. PET 2001-8Ns had eight 2108 (8kx1) DRAMs and 2001-16Ns used sixteen 2108s. The PET 4016 used eight 4116 (16kx1) chips. All 32k PETs used sixteen 4116 chips. Finally, Commodore added a machine-language monitor to the kernel ROM that could be accessed by jumping to any memory location with a BRK instruction. It did not include a built-in assembler and required the user to enter hexadecimal numbers for coding.
Commodore contacted Microsoft to upgrade BASIC for the new machines; this resulted in the soon-to-be-familiar BASIC 2.0 which removed the 256 element array limitation and had a rearranged zero page. Most bugs were fixed and IEEE-488 support in BASIC was made to be functional. The PEEK function was unblocked for memory locations above 49152. BASIC 2.0 also included an easter egg that Bill Gates personally coded, which would cause "MICROSOFT!" to appear if the user typed WAIT 6502,x (x being the number of times to display the message); this was reportedly due to a dispute with Commodore over ownership of BASIC (years later, when Microsoft developed BASIC for the Amiga, one of their conditions was that Commodore credit the original authors of BASIC, so BASIC 7.0 on the Commodore 128 displayed a Microsoft copyright notice). This feature was present in all 30xx series PETs. Commodore executives were unhappy when they learned about it and it was removed from BASIC on all subsequent Commodore machines. Microsoft also remained sensitive about their copyrighted code and pressured Commodore to not release any BASIC code listings to the public, although user groups eventually made disassemblies of BASIC.
Sales of the newer machines were strong, and Commodore then introduced the models to Europe. However, Philips owned a competing trademark on the PET name, so these models were renamed. The result was the CBM 3000 series ('CBM' standing for Commodore Business Machines), which included the 3008, 3016 and 3032 models. Like the 2001-N-8, the 3008 was quickly dropped. Later PET 3000 series machines switched to the BASIC 4.0 ROMs.
Education, business, and computer science.
In 1980, the 4000-series PETs were launched. These included the enhanced BASIC 4.0, which added commands for disk functions and significantly improved garbage cleanup. By this point, Commodore discovered that people were buying cheaper and models of the 3000-series and upgrading the RAM rather than paying extra for the model. Because of this, they punched out the memory sockets in the 4016 (there was no 4000-series PET) to prevent that practice. The 4032 was a major success in schools, where its tough all-metal construction and all-in-one design made it better able to stand up to the rigors of classroom use. Just as important in this role was the PET's otherwise underutilized IEEE-488 port. Used wisely, the port could be used as a simple local area network and allowed printers and disk drives (which were then very expensive) to be shared among all of the machines in the classroom.Unlike later Commodore machines, PETs had no kernel ROM functions for the IEEE-488 port and users had to write their own for using peripherals such as modems.
First year 4000-series PETs retained the same video hardware as the PET 2001/3000, but in 1981 this was replaced by the 12-inch screen and 6845-based CRTC hardware.
The PET's simple, rugged design and completely enclosed components made it an early favorite in the North American education market. At one point Commodore owned 67% of the Canadian education market. Schools preferred the 40-column models because the 40-column display's larger characters vs. the 80xx PETs were easier for young children to read. Commodore manufactured a variation on the PET called "Teacher's PET" - these were relabeled 2001-series PETs which were donated by Commodore as part of a "buy 2, get 1 free" program offered to schools as part of a promotion/tax write-off scheme.
Two more machines were released in the PET series. The 8000 series included a new display chip which drove an 80×25 character screen, but this resulted in a number of software incompatibilities with programs designed for the 40 column screen, and it appears to have been unpopular as a result. Unlike the 30xx series, the 40xx and 80xx PETs came standard with a 1-channel speaker for sound generation.
2001/3000 and 4000-series PETs used what became known as the "graphics keyboard". Numbers were exclusively on the numeric keypad and the row above the alphabet keys had only punctuation symbols. The 3032 and 4032 were produced in two special variants known as the B models with the so-called "business keyboard", which had a conventional layout with mathematical symbols and numbers above the alphabet keys. The keypad contained only numerals. On the other hand, all 8000-series PETs sported the business layout.
Entering graphics symbols on PETs with the business keyboard proved something of a challenge since they could not be directly typed out and usually it was necessary to display them indirectly via a CHR$ function.
The 4000/8000 PETs were more explicitly targeted at professional/business use than the 2001/3000. Business customers were the main target for the features of the enhanced BASIC 4.0, and a good selection of prepackaged business software was available. A large line of 5.25-inch and 8-inch floppy drives were made for the PET family, and even 5 and 7 MB external hard disks. While they became fairly popular for business use in Europe, they failed to make much impact on the US market in part because the 6502-based PETs could not run CP/M, which had become the standard for business software. In addition, the PET's 32 KB of memory was a disadvantage against the Apple II and TRS-80, both of which could accommodate 48 KB. The 8000-series PETs had a motherboard connector for a daughterboard that added an additional 64k of RAM for 96k total; this was a standard feature on the 8096. A register at $FFF0 is used to set the RAM configuration. The extra RAM is banked in four 16k blocks, the first two blocks are switched into $8000-$BFFF and the second two in $C000-$FFFF. Normally, banking in the expansion RAM will swap out the video RAM, I/O registers, and system ROMs, so interrupts must be turned off first, but it is also possible to set the video RAM and I/O registers to "peek" through. Regardless, switching the OS ROMs out will require the user to either have interrupts disabled or supply his own interrupt handler. The expansion RAM cannot be seen by BASIC and machines equipped with the RAM board will still report the standard 31,743 bytes free on power up. A relatively small amount of software could utilize it.
As noted above, 8000-series PETs (and later 4000s) used larger monitors and a different video controller than the 2001/3000 models. This created a notorious compatibility problem known as the killer poke. On 2001/3000 PETs, there was a register which when enabled did not allow reading/writing of the video RAM except during the vertical blanking in order to prevent snow on the screen, caused by the CPU and video controller trying to access the VRAM at the same time. This feature was used because of the extremely slow 6550 SRAMs in the PET 2001, although it ceased to be a problem on 3000-series PETs since they used faster 2114 SRAMs for the video memory instead. Ordinarily, this feature was enabled on power-up. If the user didn't mind snow, he could turn it off and get faster text output. BASIC programs and some machine-language software commonly did this for performance reasons. PETs with 12-inch displays (all 8000s and later 4000s) used a video controller based on the Motorola 6845 CRTC chip (unlike the TTL logic circuit in 2001/3000s/early 4000s) that eliminated the snow problem, but also placed a CRT control register in place of where the VBLANK flag had been on the 2001/3000. Hence software that tried to disable it would end up throwing the monitor out of sync and destroying the flyback transformer. BASIC programs intended for the 2001/3000 thus had to be modified in order to run safely on 12-inch PETs. Later machines had modified video circuitry to prevent killer poke damage; a TDA 1170 chip was used in place of the original analog circuit so that if no sync went to the monitor, it would merely be shut off rather than sent spurious signals.
The PET 2001 and 2001-8N had a register that would disable the video output; this was also used as output for the IEEE-488 interface, so screen flicker would occur during disk drive or printer use. It also became a popular method of producing explosion effects in games, but because the screen flickered while using the IEEE-488 port, the 16K and 32K models had this feature removed.
The last in the series was the SP9000, known as the SuperPET or MicroMainframe. This machine was designed at the University of Waterloo for teaching programming. In addition to the basic CBM 8000 hardware, the 9000 added a second CPU in the form of the Motorola 6809, more RAM and included a number of programming languages including a BASIC in ROM for the 6502 and a separate ANSI Minimal BASIC-compatible BASIC for the 6809, along with APL, COBOL, FORTRAN, Pascal and a 6809 assembler on floppies. It also included microEDITOR, a text editor for use in writing and maintaining programs for any of the 6809 languages. Also included was a terminal program which allowed the machine to be used as a "smart terminal" as well, so this single machine could replace many of the boxes currently in use at the university. Additionally this machine became a remote development environment where the user could later upload their creation to a mainframe after completing development and testing on the SuperPET.
In 1982, Commodore retired the PET line with the intention of replacing it with the B-series machines; however, they were a marketplace flop and also very expensive to manufacture. Because Commodore still had a strong business software market in Europe, the 80xx series PET was revived during 1984 in a new molded plastic case with a swivel monitor. Four models were offered, the 8032SK, 8096SK, and the new 8296 and 8296-D. The 8296 models had 128k of memory (96k on the expansion memory board) and the 8296-D had two internal half-height 8250 drives. In addition, the 8296 came bundled with an office suite on disk and the system ROMs included a menu program to launch each of its four applications. Early units contained leftover 8032/96 PCBs in order to get rid of remaining stock; after these were used up, Commodore equipped the machines with a new PCB that replaced the old triple-voltage 4116 DRAMs with more modern types.
The 8296 had a completely redesigned motherboard and handled expansion RAM in a different fashion than the 8096. While on the 8096, the expansion RAM cannot be accessed at all without switching out the OS ROMs and video RAM, the 8296 has a setup closer to that of the Commodore 64 where writing to the memory locations with the OS ROMs accesses the RAM underneath, but reading from those locations will read back the ROMs instead.
The 8296 also differs from the 8096 in that it has jumpers on the PCB to select the power-on memory configuration for $8000-$FFFF. The factory default configuration was to have the I/O registers, video RAM, and ROMs occupying $8000-$FFFF. When operating from BASIC, the machine would be nearly indistinguishable from an 8032. By setting the jumpers, one could swap out any 8k region of upper memory for RAM, and it was even possible to have everything switched out and convert the entire $8000-$FFFF to RAM, although such a machine would be useless with no I/O or system ROMs accessible. Like with the 8096, the user could also manipulate the register at $FFF0 to control which RAM banks occupied upper memory. The 8296's RAM is banked in 16k chunks like the 8096, although since it has 128k, there are six possible banks instead of four, three that can go into $8000-$BFFF and three that can go into $C000-$FFFF, and like with the 8096, the video RAM and I/O registers can be set to "peek" through.
The motherboard also sported "user" jumpers which "connected" the RAM banking to the user port, these required soldering to enable. If connected, the user port could be used to adjust the upper memory configuration via software.
The IEEE-488–based PET disk drive line was also updated; the large, heavy metal-cased drives were replaced by smaller units in 1541 cases; they looked almost identical to a 1541 drive except for the back sporting an IEEE-488 connector instead of the two IEC DIN connectors. Of the previously extensive PET disk drive line, the only drives that returned were the 2031-LP and SFD-1001 (basically a 2040 and an 8250 repackaged in a 1541-style case with half-height drive mechanisms). The resurrected PET was sold through 1986 and then finally retired for good, having been superseded by the Commodore 128, 1571, and 1581.
Although not officially a member of the PET series, in 1983 Commodore packaged C64 motherboards in plastic cases similar to the PET 4000-series in order to create the Educator 64. This was an attempt to retake some of the education market they had largely lost by then to the Apple IIe.
Graphics display.
In the home computer market, the PET line was soon outsold by machines that supported high-resolution color graphics and sound, mainly the Apple II (which shipped in June 1977), Atari 400/800 (1979), and, in particular, Commodore's own bestselling VIC-20 (1980/81). Commodore released a "High Resolution Graphic" board for the PET using the Thomson EF936x graphics chip with a resolution of 512×512 pixels. In addition, the Apple II, TRS-80 Model I, and Atari 400 (via 3rd party expansions)/800 could all be expanded to a maximum of 48 KB of RAM while the PET was limited to 32 KB.
Without the "High Resolution Graphic" board, the PET's graphics capabilities were limited to a character set hardwired in ROM. On many of the PET range's home computer rivals, the look-up address of the character graphics could be changed and pointed to RAM, where new characters could be defined by a programmer to create custom graphics shapes. From a programming point of view, this was a relatively simple method of producing good-looking graphics, which used negligibly more RAM than a standard character display, and significantly less RAM than bitmap graphics. The PET's lack of a remappable character set is a major weakness in the machine's design.
Somewhat offsetting this drawback, the PET's ROM-restricted character set — an ASCII-1963 deviation known as PETSCII — was one of the most varied and flexible of the era. It allowed PET games with rudimentary graphics to be created, exemplified by clones of video games such as "Space Invaders" and "Lunar Lander". The PETSCII character set was even flexible enough to allow for the creation of simple 3D games such as "Labyrinth". This flexibility was achieved by the use of two switchable character sets, allowing the choice of either mixed-case characters, or uppercase with graphics; either could also be displayed as a reverse field, negative image. For specialized applications, alternative character sets could be programmed into an EPROM inserted in the character set ROM socket. Alternative character set EPROMs with diacritics and mathematical symbols were available in the aftermarket. A 2001-8B model with katakana keyboard and character set was sold in Japan. 
Other than a PC speaker-class beeper, PETs did not have sound hardware (except for the 8000 models), but it was possible to rig a circuit (attributed to Hal Chamberlin) up to the 6522 "user" port that could be used to output square wave tones to an external amplifier, and some games supported this feature.
The PET had two empty sockets on the motherboard for adding expansion ROMs, which could be a total of 8k in size. A predecessor to the cartridge slots on later Commodore machines, they allowed various software add-ons such as machine language monitors. In addition, it was common for commercial programs to include a copy protection ROM that had to be installed prior to running the application; something of an inconvenience to users owning multiple applications protected in this way, as the chips would have to be swapped in order to run their respective programs.
Model summary.
Peripherals.
The original lineup of disk drives for the PET were the single-unit 2031 and dual-unit 2040, 3040. Then followed the 4040, 8050, and 8250. Later (near the end of the PET's lifespan), single-unit 2031 and SFD-1001 drives were produced that used the same case as the 1540/1541, but sported the PET's parallel interface instead of the VIC-20/C64 IEC serial interface. The 4040/2031 used the same format as the 1541 and is read compatible (although software that performs low-level drive access will not work, and a one byte sector–header size difference makes the formats write-incompatible). 8050 and 8250 drives had an incompatible higher density / format, but were popular well into the 1980s as server/BBS storage devices because of their large capacity.
In addition, Commodore had 8-inch 8060, 8061, 8062, and 8280 drives which used MFM encoding instead of the GCR used on their other disk drives and was mainly intended to allow PET users to read disks written on IBM mainframes/minicomputers. and hard disks were produced as well. They have no sub-directory support and are treated as simply a larger floppy disk.
All PET peripherals will work on VIC-20/C64/Plus-4/C128 machines with a IEEE-488 parallel to IEC serial adapter (reverse IEC serial to IEEE-488 parallel adapters were also made), and as mentioned above, using these adapters, 8050/8250 drives were sometimes used on C64s for BBS service because of their large capacity and faster interface.
An alternative option for adding floppy disk capability to the PET was the Computhink disk system. Although references to this system are hard to find today, it was nevertheless popular at the time, as it was both cheaper and considerably faster than the Commodore system and available from an earlier date. Unlike the Commodore units, it did not use the IEEE-488 interface, but instead required an extra circuit board to be installed inside the PET, connected to the PET's expansion connector, which used a Western Digital floppy controller chip to provide a standard Shugart interface. The board also held extra RAM for use as a disk transfer buffer, and ROM containing the disk operating software. This software was not compatible with Commodore standards and was somewhat awkward to use. Before using the disk system, it had to be initialized manually by issuing the command SYS45056. This made available a set of "pseudo-BASIC" commands for performing disk operations, which bore little or no resemblance to the standard Commodore commands for the same operations and in addition had to be prefixed with $, thus breaking the rules of BASIC syntax. It had a severe limitation in that it was only possible to have one file open at a time, which made many common tasks difficult and slow, though the direct interface to the motherboard made data transfer significantly faster than the CBM units using the IEEE-488 bus. The additional code hooked into the BASIC interpreter could slow the execution of BASIC programs by 20–30%, and it would break with programs which used the standard POKE to disable user STOPs. Nevertheless, it was still regarded as a useful system and as a great improvement over cassette storage.