Saturday, April 29, 2023

IBM PCjr. Compatibility & PC Software

The IBM PCjr. had many faults, one of which were the compromises IBM imposed on the machine to limit its PC compatibility.  By the time the PCjr. was released and in people's homes and offices, there was over two years of software developed with only the IBM PC and IBM PC/XT in mind.  For a too-brief period of time, PCjr. compatibility was an important focus, especially as some companies updated their software to become PCjr. compatibile.  Then once the PCjr. was discontinued, PCjr. compatibility pretty much fell by the waist-side not too long afterward.  In this article we will identify the issues which held the PCjr. back and what needs to be done to show that a piece of software is truly PCjr. compatible.

Among the factors which lead the market to cool on the PCjr. and contributed to its very short official lifespan of eighteen months was its rather hit or miss compatibility with software designed to run on the PC.  There are four general areas in which the PCjr. behaved so differently from the PC to cause serious compatibility issues, and I call them the Four Horsemen.  They are: the Keyboard, the Disk Drive Controller, the Video Adapter and Memory Performance and Mapping.  I have already discussed them here in substantial detail.  

One can expect only so much of a typical 1980s home computer user.  For many people, the PCjr. was the first home computer they ever owned.  Experience on a PC or an XT at the office or school would have shortened the learning curve, but working on a non-PC compatible or a mainframe offered significantly less experience the user could transfer to a new machine.  New computer owners would often ask the salespeople at Computerland or similar stores what software would work with their system, even though the software was marked on the box.  Despite systems being packed with usable manuals, they would often buy how-to books and instructional videos on how to use their system.

I expect a typical user could plug in an expansion card, connect a ribbon cable, format a disk and generally follow instructions contained in a manual.  Competency with a screwdriver can be assumed.  I do not expect a typical user to be able to solder in an IC, hack a program with debug or connect to a BBS to ask others for help with their software.  

My Twelve Rules of PCjr Compatibility

1.  No Tandy Mod

Normally a PCjr. can address video memory in a window from memory address segment B8000-BBFFF (16KiB) to maintain a measure of compatibility with CGA.  The "Tandy Mod" is a hardware modification to the PCjr's memory address logic which makes the PCjr. able to use the entire memory address area from B8000-BFFFF (32KiB).  This is what a Tandy 1000 did to allow video modes (320x200x16, 640x200x4) which require 32KiB of memory to be able to use that area to access video memory instead of wherever the top of conventional memory was in a Tandy 1000.  

Many games that use Tandy enhanced graphics but do not officially support PCjr. enhanced graphics can be forced to display Tandy graphics by an installation option or a command line switch on the PCjr.  A game which supports Tandy 1000 video but not PCjr. video in one of the 320x200x16 and 640x200x4 video modes may show graphics as "venetian blinds", showing only every other line down the screen.  The 160x200x16 mode supported by the Tandy 1000 and PCjr. only uses 16KiB, so it will not show venetian blinds.  

The Tandy mod requires cutting traces and soldering a 74-series logic chip to accommodate for Tandy's memory arrangement.  The mod is easy as soldering mods go, but not something which could be expected of an average computer user of the 1980s.  It could have been done by PC Enterprises, but it was an expense and could deprive you of your computer for weeks, so it was not a viable option for many people.  The mod will break ScubaVenture, one of the PCjr.'s exclusive cartridge games.

2.  No V20s, CPU accelerators or math coprocessors

In the IBM PC, XT and Portable, the 8088 CPU was always socketed, which allowed the user to easily upgrade their CPU to the faster V20.  The V20 could offer a 10-30% performance boost to a program and the CPU could be purchased by a variety of sources.  But the PCjr. is different because small but significant percentage of these machines had soldered 8088 CPUs.  Having a customer desolder a CPU and solder in a socket or a new CPU was too much of an ask for your average 1980s home computer user.  It should be noted that a V20 will break all but the last version (v3.0) of Lode Runner and any version of Championship Lode Runner on any computer.

In addition to the performance benefits of the V20, somewhat more modern users found it useful because it supported certain CPU instructions that would otherwise only be available to 286 users.  In one famous case, some Parallel Port versions of the Iomega Zip Drive could be coaxed into running in a V20 upgraded PC or PCjr. because the official "Guest" driver used 286 instructions.  That was one way to permit mass storage and easy transferability of software from modern PCs to vintage PCs before the era of the XT-IDE.  Outside the PCjr., I have an 8-bit SCSI card, the Trantor T-130B, which will refuse to boot a hard drive in a system with an 8088 or 8086 CPU.  

You can use a Xircom PE3-10BT with the Parallel Port Sidecar to transfer files over a network to or from a PCjr, its packet driver is 8088-compatible.  Of course you should not modify your parallel port sidecar for bidrectional parallel transfers and faster speeds.  

The PCjr. has no socket for a math coprocessor.  While most programs from the 1980s did not require a math coprocessor, those that supported one could see a considerable performance enhancement when one was installed.  I believe that PC Enterprises also offered a 286 CPU upgrade.  PC Enterprises and possibly others offered a mod that allowed the PCjr. to use a math coprocessor, but many PCjr. owners never knew of the existence of PC Enterprises.

There is an overclocking mod called the PC Sprint mod which worked with most 8088-based machines, including the PCjr.  It requires desoldering the Intel 8284 clock generator and a custom PCB, so it was out of reach of most PCjr. owners.  PC Enterprises did manufacture replacement motherboards that fit into a PCjr. case with 286, 386 or 486 CPUs, but at that point the system is no long a PCjr.

3.  640K Max RAM, Memory Managers permitted

This should be fairly obvious, but a program that runs on the PCjr. must run within 640KiB of RAM.  Programs cannot require expanded memory, extended memory or so much conventional memory that there is not enough room for DOS and any contemporary device driver like a mouse driver needed to be loaded.  While more modern memory upgrades permit up to 736KiB of conventional memory, that was not a common thing back in the day.

In order to use memory above the 128KiB area in DOS, you must run a memory manager to configure that memory appropriately.  IBM and Microsoft released sidecar memory adapters and they came with a driver disk.  These drivers had various option such as how much memory did you wish to set for video and whether you wished to create a RAM disk with the remaining portion of the lower 128KiB.  These days most people use the more versatile JRCONFIG memory manager, but these memory managers work in the same way for their common features.

Appropriate use of a memory manager unlocks the PCjr. to DOS programs requiring 256KiB or more RAM.  It can even get games working that should work with the PCjr. but do not due to developer oversight.  Space Quest I v1.0x and Police Quest v2.0A do not come with executables which are PCjr. aware and fail to set the memory correctly, but memory managers can overcome this limitation.  I expect your average computer user might not have figured this out on his own, especially as the command line switches must be set in a particular manner, but a call to Technical Support could have guided him through the process.

4.  No DMA

DMA was almost never a thing on the PCjr. unless you bought the Racore ATcessory, which added a DMA controller and a 1.2MiB floppy drive.  It cost almost as much ($895) as the PCjr. did ($1,195) and was not a big seller.  The upgrade is a rare find today.  Unlike Tandy 1000s, which always had an upgrade path that included DMA if it was not present on the system as sold, the PCjr. did not.  The PCjr's BIOS knows nothing of the DMA chip and most programs use the BIOS to interact with the floppy disk drive.

Normally the use of Int 13h for disk drive transfers makes the underlying process invisible to a program.  Whether using the CPU or DMA to make the transfer, programs just sit and wait until the transfer is complete.  But when a copy protection routine requires DMA to work, such as in several Sierra On-line games, they will fail on the PCjr.  This might seem as ironic given Sierra's later incredibly devoted PCjr. support.  Crossfire, Frogger, Ulysses and the Golden Fleece and the first version of Ultima II, all from Sierra, fail in the PCjr. for this reason.  Sierra released Crossfire both as a PCjr. cartridge and a PCjr-only disk and special versions of Ultima II and Ulysses for the PCjr. (the latter has yet to be dumped and uses 16-colors like the PCjr. version of Wizard and the Princess).  

Despite the keyboard using the Non-Maskable Interrupt and the floppy controller IRQ6, the floppy disk has the ultimate ruling authority in the PCjr.  You can always press a key again, but if you lose data during a floppy drive transfer, that can be catastrophic.  Due to the lack of DMA, the CPU must handle all data transfer from and to a floppy drive and RAM.  So if the CPU's attention is constantly on the disk drive, it has no time to service keyboard inputs.  Similarly, IBM prioritized keyboard input over serial input, so if your terminal or modem-using program does not block keyboard access during data transfer, using the keyboard can corrupt serial data input.  This is especially true at baud rates higher than 1200 baud, the CPU is not fast enough to handle keyboard input and serial input at the same time.  So don't touch your keyboard when you are handling serial transfers.

5.  No unofficial patches, the game must run with the resources provided in the box 

During the first 10 years after the PCjr's release (1984-1994), the World Wide Web and Internet Browsers really did not exist for most people and getting online with a PCjr. was essentially limited to Bulletin Board Systems.  Patches that allowed games to run on the PCjr. existed and were distributed this way or via PCjr. specific clubs and user groups.  However it was a bit of a stretch to expect your average computer user to know about these resources or devote that much time and effort into tracking down a PCjr.-specific patch or entering cryptic commands into debug.  Exploring the world of BBSes was quite the adventure and when the telephone company charged long distance rates by the minute, an expensive one.  

So patches which add PCjr. compatibility are not permitted unless the company issued such a patch.  I know of none for games, if you wanted to play a version of a game that supported the PCjr, you needed to wait until the company released a version of its software with PCjr support.  After its discontinuance only Sierra did that.  Issuing patches for a game was not a regular process until the mid-1990s.  While you could contact customer support and complain about hardware incompatibility, the company's customer service representative could always  point to the label on the box and ask you "can you tell me where it says "PCjr.?"  If you "jumped the gun" and bought an early version of King's Quest IV (SCI interpreter), Leisure Suit Larry 2, Police Quest II or Silpheed which do not support the PCjr. and refuse to run in it, Sierra might have been willing to send you PCjr.-compatible versions of those games when they were ready.

6.  Must run on real PCjr. hardware, emulators aren't good enough

Emulators are important tools for retro computer enthusiasts, but of all the early PC-compatible machines, the PCjr. is the one in most need of a hardware emulator that can truly encompass its quirks.  A PCjr. emulator must utilize the PCjr's BIOS, not implement DMA, must fully support the PCjr's version of the video graphic adapter chip, not add CGA compatibility registers and must handle the weird interrupt system correctly.  It must also handle disk, keyboard and CPU performance as a PCjr. would, not as a PC or Tandy 1000 would.  Games running in the first 128KiB must run as slowly as they do in a real PCjr.  No emulators I know of, not DOSBox, not PCem, not 86Box, not MAME, handle all these things correctly.

Running a game on an emulator in PCjr. mode may give a false positive that the game actually works with a standard PCjr when it does not.  The game may seem to run at a playable speed on the emulator only for the user to discover it runs like a dog on the PCjr.  Additionally, although far more rarely, a game may not run on an emulator but may run on original hardware, a false negative, because the emulator does not sufficiently emulate the PCjr's distinctive hardware well enough.

7.  Must run from original disks or disk images written back or emulated with copy protection preserved, no cracks

Honest people in the 1980s were expected to buy their software legitimately, and to keep them from temptation to "copy that floppy", most big box PC game publishers implemented disk-based copy protection.  Before these publishers transitioned to document-based copy protection, they could implement schemes which were decidedly PCjr. unfriendly.  

Using original disks or disk images has long been a weakness of the retro computing world.  Preserving original disk images was not commonly done until the 2010s.  The collection of PC booter images housed at Retrograde Station were full of issues.  Before the introduction of the KryoFlux in 2011, games were extracted from disks or "scene releases" from long ago and posted to Abandonware sites were often the only way you could play many PC/DOS games if you did not own your original disks and have some way to read them.  Methods such as TeleDisk or ImageDisk relied on the PC's FDC and could not capture the raw flux or bitcell data stream from the disk drive.  Other methods required vintage hardware like a CPS Option Board or Amiga-focused hardware like a Catweasel.  Only now are archives of properly preserved disk images becoming available for people to run games as they were originally released on the PCjr.

8.  No PC ID or BIOS Modification cartridges, original BIOS must be used

The PCjr's cartridge slot has the ability to replace the BIOS located at F0000-FFFFF with one provided by the cartridge.  The Racore PC ID Cartridge or the PC Enterprises Configuration Cartridge can fool programs into thinking they are being run on a PC by changing the system ID byte from PCjr to PC. Other cartridges from PC Enterprises alter BIOS routines and while may make them faster, may also break software expecting the original routines. These cartridges  may allow some programs to work which otherwise would not work, but it may not be a perfect compatibility solution due to other hardware issues.  These cartridges were not ubiquitous.  

9.  Input must work with a PCjr. keyboard and/or joystick

Due to the keyboard reading being very different between a PC and a PCjr., there are programs which simply will not work because they will not receive keyboard input from a PCjr.  Microsoft Decathlon might otherwise work in the PCjr. but for its keyboard input.  The first thing it does on boot is ask whether you have a color display and will sit at that prompt until you press Y or N and Enter.  Some early games, expecting PC joystick timing, will not accept PCjr. input due to the slowness of the PCjr. and that timing may not be fixable by the trimmers on the PCjr's joysticks.

There were replacement keyboards sold for the PCjr. and you can use TexElec's adapter to make PS/2 keyboards work with a PCjr.  They may make for more convenient keyboard layouts and faster typing than the mushy PCjr. keyboards but will not solve the internal keyboard processing issues.  There are games that assume the layout of the 83-key PC keyboard and will be very inconvenient to play on a PCjr.'s keyboard.  

10.  Even if it says PCjr. Compatible on the box or the disk label, unless a program is from IBM or Sierra On-line, it must be tested on original hardware.

IBM, as might be expected, was always good about alerting people whether its software was PCjr. compatible.  Prior to the PCjr's release, IBM released an advertising brochure indicating whether the software it released prior to the PCjr. was compatible with the machine.  After the PCjr's release, IBM's packaging would indicate whether the program was PCjr compatible.  IBM pretty much stopped selling any software a consumer may care about outside of Operating Systems like PC-DOS and OS/2 with the end of the PC line in April of 1987.  

Sierra On-line's support for the PCjr. was admirable even after it was discontinued so quickly after it was released.  The games it released under its own brand label (not Dynamix and other labels) are fully known which support PCjr and which do not.  It is not known with certainty for all games released by other companies.  

Even disk labels and magazine advertisements can sometimes lie about PCjr compatibility.  Football, released by subLOGIC, is an example of a game which indicates PCjr. compatibility on the box and in the manual but is horribly broken when run the PCjr. even with original disks.  Demon's Forge was advertised in the PC Enterprises 1994 Catalog with the express claim that the game works with the PCjr.  The version pictured in the catalog, by Mastertronic, does not.  Only the earlier version released by Boone Software is compatible.  Both Football and the Mastertronic version Demon's Forge will boot on the PCjr. but will crash before the gameplay begins.  

11.  If DOS is required, the DOS version must be between PC-DOS 2.1 and PC-DOS 4.01

The official versions of DOS which fully supported the PCjr. are IBM's PC-DOS 2.1 (which was designed to incorporate the PCjr.), 3.0, 3.1, 3.2, 3.3, 4.00 and 4.01.  All these versions of PC-DOS could be purchased on 5.25" disks.  PC-DOS and MS-DOS 5.0 and later are not PCjr. compatible without patching their keyboard handling routines via debug.  MS-DOS versions prior to 3.2 were bundled with specific computers and these OEM versions may not be PCjr. compatible.  PCjr. BASIC, especially PCjr. Cartridge BASIC, is only properly handled by PC-DOS.  

12.  Double Density Floppies Only

All software developed or intended for the PCjr. came on 5.25" floppy disks (cartridges and cassettes excepted) which had a maximum standard storage capacity of 360KiB.  However, the PCjr. disk drive controller can support 3.5" floppy drives but are limited to double density disks and 720KiB for storage size.  DOS 3.2 or higher must be used to access 720KiB disks.  Given that you could have fit a 720KiB drive in a PCjr with some creative mounting and an adapter for the molex power cable, I do not restrict PCjr. software to the 5.25" physical format but to the double density storage format.  

Exceptions to the Rules

1.  Minor Video and Audio Differences

A game is not incompatible because it has slight differences in its video presentation between CGA and PCjr.  The PCjr. implemented the two 320x200 official palettes that the PC and CGA provided via BIOS Int 10h, but the cyan/magenta/light gray palette was modified to show cyan/magenta/white.  Also, while CGA could vary the intensity of the palettes, the PCjr cannot do this in the same way, so a game may show light green/light red/yellow on CGA but green/red/brown on a PCjr.  

However entering 640x200 color composite mode is done differently on a PC versus a PCjr., so if a game which is not PCjr-aware tries to enter this mode, it will show up as monochrome on either an RGB or Composite display or a 4-color mode with wrong colors.  These games cannot be truly said to be PCjr. compatible unless they offer an RGB display option.

Due to the differing speeds of the PC versus PCjr. when programs are being run out of the first 128KiB of memory, music from the internal speaker which is generated by CPU-timed Pulse Width Modulation may not sound as "correct" with a PCjr because the PCjr,'s slower performance.  Use of PWM was rather uncommon in the early PCs.  

2.  CGA and/or PC Speaker Only

There are many games which will run perfectly on a PCjr. but only with CGA graphics even when they support EGA, Tandy or MCGA/VGA graphics.  Similarly, some games support sound cards and 3-voice Tandy/PCjr. music and sound effects, but only on the Tandy 1000.  PCjr. owners are left only to listen to their games on the PC Speaker.  This does not make them PCjr-incompatible, it just makes the PCjr. a less than desirable machine to run them on.

PC Enterprises made a VGA sidecar and a Sound Blaster compatible sidecar.  TexElec makes an add-on to their version of the jrIDE which adds Adlib functionality with OPL3 enhancements.  If your game sees a PCjr. as a generic PC, then it could very well work with these adapters.  But such adapters were released well into the afterlife of the PCjr., and most PCjr. owners upgraded to faster systems rather than use these kind of upgrades back in the day.

3.  2nd Disk Drive or Hard Drive

IBM never offered a 2nd disk drive or a hard drive upgrade option for the PCjr.  Even less than dedicated home computer enthusiasts quickly learned what a chore it could be to operate a PCjr with only one disk drive.  DISKCOPY required a lot of disk swapping.  Third companies stepped in to fill this gap, which was much needed for serious PC usage.  Racore and Legacy advertised and sold add-ons which sat on top of the PCjr to add a second disk drive and/or a hard drive and PC Enterprises released SCSI sidecars.  More recently the jrIDE sidecar offers hard disk drive support. TexElec currently sells it. 

So the requirement of a second disk drive or a hard drive does not disqualify the PCjr. from compatibility with that program.  A program which only installs to a hard drive is a really borderline issue as many PC owners decided to upgrade their systems rather than pay for an expensive hard drive upgrade if they could even find one.  

4.    No Bootability is OK

Not a few games were released as requiring DOS but had dummy system files on the disk to permit the disk to be booted with loading DOS beforehand by copying system files over with the sys command.  The instruction manual or a batch file on the disk could instruct or handle the procedure for the user.  Of the three files required, IBMBIO.COM, IBMDOS.COM and COMMAND.COM, the PC-DOS 2.1 versions of these files are only 128 bytes larger, combined, than the PC-DOS 2.0 versions of these files.  If a disk is large enough to accommodate the files required by PC-DOS 2.0 to boot, it can accommodate PC-DOS 2.1.  The disk size may not be enough if the program expects PC-DOS 1.0 or 1.1, whose executables are about 25KiB smaller than 2.0 and 2.1s.  Sierra used a 160KiB disk for the first release of Ultima II but there was only enough disk space to fit DOS 1.0-1.1's operating system's files.  For the PCjr. release which followed, Sierra used a 180KiB disk which had just enough space left after the game files for DOS 2.0-2.1.  Just because a program cannot be made to boot due to the earlier version of DOS required to make its disk bootable does not mean that the program is not PCjr. compatible.

5 comments:

  1. I tried kqv on the pcjr hoping the egg version on 5.25 would work. It booted but had the blinds look so obviously sierra only focused on Tandy compatibility with their later games that could still run on an 8088. Quest for glory will run but it’s painfully slow.

    ReplyDelete
    Replies
    1. You need the Tandy mod or maybe an SCI0 video drive to run KQ5 on the PCjr. Breaks two rules :P

      Delete
  2. "Having a customer desolder a CPU and solder in a socket or a new CPU was too much of an ask for your average 1980s home computer user."

    Well, yes and no. It's surely true for professional users who spent lots of money on expensive equipment. They didn't dare to experiment. But homebrewing/do-it-yourself as such was a thing among home conputer users of the 70s/80s. At the time, electronic hobbyists and radio amateurs were still known to society, too. The Atari and Amiga users not seldomly installed sockets in order to upgrade the boot ROMs or install accelerator boards. Some upgrades also had to be soldered atop existing components (68000 etc). So I would say that low-level knowledge was there and that many users had experience with soldering irons. A popular and yet simple upgrade for the C64 was installation of a reset button, for example.

    ReplyDelete
  3. Is "fell by the waist-side" intentional, or was that supposed to say "wayside"? (I´m not a native speaker so please excuse if I missed a pun.)

    ReplyDelete
    Replies
    1. It was supposed to be "wayside", I never gave much thought to the expression before now.

      Delete