Friday, April 19, 2013

The IBM PC Model 5150 as a Gaming Machine

The IBM PC Model 5150 is an extremely important, even an iconic, personal computer.  Its legacy is still directly felt even today, thirty-two years after its introduction, August 12, 1981.  It had an extremely long market life, only being discontinued on April 2, 1987.  No other PC compatible was on the market for so long, five and a half years.  Today, its descendants are undoubtedly the most powerful and expensive gaming machines on the planet.  Like the original 5150, today's PCs use the same fundamental microprocessor architecture and instruction set, the Intel x86.  They still use keyboards, have expansion slots, power supplies, input and output ports, joysticks and specialized computer monitors.  But the PC was not always known for its ability to play advanced games.  The common ancestor was conceived as an affordable microcomputer for the masses.  It was built to run programs like VisiCalc and WordStar.

Computer games of the time, 1980-81, were generally not very impressive graphically or aurally compared with the arcades or even the home consoles of the day.  The premier "gaming computers" at the time of the PC's introduction were the Atari 400 and 800 machines.  The Atari devices had custom co-processors and chips for color, graphical effects and sound and input/output.  Commodore and Texas Instruments would follow with home computers with specialized hardware.  The PC was closer in design and implementation to the Apple II and II+ computers, with relatively modest graphics and sound capabilities, but with a bus designed to expand the system.

CPU

At the heart of the PC is the Intel 8088 microprocessor.  This processor is a budget version of the 8086 microprocessor.  The 8086 is a fully 16-bit internal and external processor, but the 8088 has only an 8-bit external bus, which decreases its performance but allows it to use cheaper 8-bit interface chips.  IBM ran the 8088 in the PC at 4.77MHz, or 4/3 of the NTSC Colorburst frequency, 3.58MHz.  Even among its microcomputer contemporaries, the 6502 and the Z80, the 8088 was not a particularly fast CPU.  In many instances, it is roughly on par with the 1.02MHz 6502 in the Apple II machines.  The 8088 in the PC is socketed, so it can be upgraded with an NEC V20, which offers excellent compatibility and up to 15% improved performance over the 8088 at the same clock speed.  Other potential upgrades are discussed later.

Expansion Overview & Useful Components :

The PC is a little tricky when it comes to upgrades, due to the design of the case and available expansion slots.  IBM was conservative with expansion slots, whereas the Apple II had seven available slots, IBM only allowed for five, and at least one is always taken by a video adapter whereas Apple had its circuitry built in.  Additionally, Apple included a Game I/O port on its motherboard, on the PC it must be added by or as part of an expansion card.

You cannot maximize the system's expansion capabilities using IBM's expansion options.  IBM released separate expansion boards for the Diskette Drive (floppy) adapter, Monochrome Display and Printer Adapter (MDA), Color/Graphics Adapter (CGA), Asynchronous Communications (serial port) Adapter, Printer (parallel port) Adapter and Game (joystick port) Control adapter.  IBM made four memory upgrade boards, the 32KB, 64KB, 64-256KB and the 256KB Memory Expansion Adapters.  Each takes a slot and offers no additional functionality.

The external bays are also not easy to fill.  The case has two full height 5.25" bays, each intended to hold one Tandon TM100-1A single sided or TM100-2A double sided drives.  They can also house a 5.25" hard drive like an ST-412.  Half height drives will require an adapter mechanism, which IBM only provided its late model XTs.

Due to the unique placement of the expansion slots on the PC, you are essentially stuck with IBM's case.  3rd party AT cases will usually accommodate the IBM XT's and clone motherboards because an XT and an AT motherboard spaces eight expansion slots at the same particular distance apart.  This distance is reflected in the slot brackets on the rear of the case.  For the PC's motherboard, at the very least some expansion ports will be partially or fully blocked.  The placement of the cassette DIN may also cause a problem.

Memory Expansion

The early PC's motherboard only supported 16, 32, 48 or 64KB of RAM on the motherboard.  The PC's architecture, as of the third BIOS, supported 640KB of memory for programs and DOS.  The vast majority of PCs sold had the third BIOS, dated October 27, 1982 and a motherboard supporting 64, 128, 192 or 256KB of RAM.  Further memory expansion had to be by an expansion board.  Memory added on an expansion board is treated identically to memory located on the motherboard.  Using IBM's option required sacrificing two slots to get to 640KB, although in practice 512KB will usually do for most programs that run well on a PC.

Power Supply and Hard Drives

The IBM PC came with a 63.5W power supply, which was not considered sufficiently powerful to drive a floppy and a hard drive like the ST-412 10MB.  Whether it can reliably power a less power hungry drive like the ST-225 20MB drive is an open question.  The PC and XT use identically shaped power supplies, except the XT supplies 130W.  The IBM Fixed Disk Adapter is required to interface the drive to the system.

IBM's official solution for users wanting to use a hard drive with the PC was to purchase the IBM 5161 Expansion Unit.  This is a case that is physically identical to an XT's case and has a 130W power supply to power up to two full height drives.  It also adds seven additional expansion slots for the cost of one expansion slot in the main PC.  However, these were extremely expensive in the day and extremely difficult to come by today at reasonable prices.  It also requires an extender card, a receiver card and a heavy duty special cable, which may nor not be included.

I suspect that most people got away with purchasing an aftermarket drive and upgraded the power supply only if the system was unstable.  The IBM adapter, with the Xebec chipset, was notoriously slow and only supported the 10MB ST-406 for the first two revisions.  It only added ST-225 20MB support in the third and final revision.  The disk interleave supported by that controller officially was 6:1 (unofficially it could work with a 5:1 interleave), but third party controllers could offer 3:1 interleaves.

Keyboard

The IBM Model F Keyboard (83-key PC/XT type) was the only keyboard officially supported in the PC, even the IBM Model M 101-Key keyboard is not guaranteed to work in a PC.  True IBM manufactured Model M's will work in an XT (2nd or 3rd BIOS preferred), and offer your best chance to work in a PC.

Do not discount the 83-key keyboard, even though its layout is just this side of premodern.  The keyboard is extremely robust and heavy and made mostly of metal.  There is no membrane, the buckling spring contacts press against a PCB.  The clicky feeling is louder and crisper compared with a Model M.  The spacebar requires more force to push down.

Games of the first five years frequently assume that you are using the 83-key keyboard.  Digger, for example, uses F1 to shoot.  On a Model M, this is a puzzling choice, since the F1 key is at the top of the keyboard.  On the Model F, it is to the all the way to the left and makes more sense.

If you must have a 101-key keyboard, I would strongly recommend finding a Tandy Enhanced Keyboard.  Released with the Tandy TL and SL computers and their descendents, these are fully XT and AT compatible keyboards that work with anything with a 5-pin DIN or PS/2 port.  They simply aren't as clicky as an IBM keyboard, but they do not use cheap rubber dome technology.

Video Adapters and Monitors

There are three main choices for video adapters in the PC.  The first is the Monochrome Display and Printer Adapter (MDA).  This only displays 80-column text, (9x14 pixel cell size) so it is unsuitable for non-text games, with few exceptions.  (IBM's 101 Monochrome Mazes requires an MDA card, some games support the MDA as an alternative without graphics).  The MDA requires a special monochrome monitor, and the IBM 5151 Monochrome Display usually accompanies it.  This is a green, long persistence phosphor display that plugs into the PC's power supply.

The second choice was not an IBM product but the very popular Hercules Graphics Card (HGC).  This card was fully compatible with the MDA, including printer port, but also offered a 720x348 monochrome graphics mode.  This graphics mode could be displayed on an IBM 5151.  Many more games support Hercules monochrome graphics.  Of course, these cards are not as common as straight MDA cards, but the functionality was widely included in 3rd-party cards.

The third choice was the IBM Color/Graphics Adapter.  This card offered 40 and 80-column text in 16 colors with a color selectable border.  The text used an 8x8 pixel cell size.  It also supported 320x200 graphics with four colors, with two (really three) sets of three color palettes in two intensities and a selectable background color, and 640x200 two color graphics with one color selectable.  It has two video connectors, a DE-9 for a digital RGB display like the IBM 5153 Color Display and an RCA output for a connection to a color composite monitor.  IBM did not release the 5153 until 1983, so until then many games relied upon the composite color output.  Composite color output can turn 640x200 two-color graphics into 160x200 sixteen-color graphics.  It also works with 320x200 graphics, although the results are not quite as impressive and it can look worse if the graphics are not optimized for composite color.

You can use a CGA and a MDA or HGC card together in a PC with the appropriate monitor attached for each.  The MDA handles regular text duties, and its text is sharper and does not suffer from CGA snow.  The graphics adapter will be used as programs see fit.

CGA Snow, random white dots or lines appearing in games that use the 80-column text mode, is unavoidable on a CGA or clone card.  The CGA does not have the capability to quickly refresh the screen in synchronization with the CPU accesses to video memory in 80-column mode, hence causing snow.   Its a hardware issue not present in other video adapters.

The IBM Enhanced Graphics Adapter was released in 1984 and was an expensive upgrade option for most of the PC's operational life.  It added 320x200 and 640x200 graphics in sixteen colors with a 5153 Color Display, 640x350 monochrome graphics with a 5151 Monochrome Display or 640x350 graphics in sixteen colors from a sixty-four color palette with the 5154 Enhanced Color Display.  It is fully compatible with the MDA but only mostly compatible with the CGA.  Games writing to the CGA registers directly, which do not exist in the EGA, will have problems.  3rd-party EGA adapters can offer better CGA compatibility, but few support composite color.  The PC will have major difficulties driving most EGA graphic-supporting games at playable speeds.

8-bit VGA adapters, or 16-bit VGA adapters that work in an 8-bit expansion slot, do exist, but are not easy to find.  While they are useful in that the VGA display connector is still widely supported today, VGA graphics are rarely CGA compatible beyond the basics and the PC does not have the power to drive VGA graphic nodes.

Floppy drives

In addition to the issue with the bays, the extremely common IBM diskette drive controller and clones only support double density drives.  This means that 5.25" disks are only supported up to a 360KB capacity and 3.5" drives can only use 720K disks.  High density 3.5" drives can be reliably used, but 1.2MB 5.25" drives cannot.  3rd party controllers that supported high density floppy drives and work in an XT are not common. Moreover, a BIOS extension ROM will be necessary to support normal operations and booting off high density disks and 5.25" drives.  Controllers that can support the data rates required by high density drives and have a BIOS extension ROM are not commonly found.

There are several games which must be booted off a floppy to play, and several more that are better played off the floppy because the hard drive conversion is less than perfect.  A floppy drive and plenty of 360K disks are essential.  Some games only have 720K booters available.

Ports

IBM made three I/O cards that had any lasting staying power outside the business world.  The serial card is useful for external modems (IBM never offered a widely used modem) and more useful for mice.  The printer card or the MDA adds a parallel port.  While these ports are unidirectional, they can easily be modified to support bidrectional PS/2-style capabilities.  In addition to printers (which some games support), many 100MB Parallel Port ZIP Disk Drives can be supported.  The palmsys.zip driver is required for those using the 8088 CPU, those using a V20 can use IOMEGA's official driver.  The Game Control Adapter adds analog joystick support, but needs a Y-adapter for two joysticks.  IBM never officially offered a joystick for the IBM PC, but they did for the PCjr.  The PCjr. joystick is a copy of the Tandy Color Computer and Kraft joysticks, boxy devices with an 8-way analog stick, two push buttons, two adjustment controls and an axis-lock.  Apple II's also used analog joysticks but used a different potentiometer value and different connectors.

Each card takes up an expansion slot, so if you had a video adapter and disk controller adapter, that would leave you only three slots for ports.  To have one of each port by IBM's expansion options would leave no room to upgrade the memory.  Fortunately there is a swiss-army knife card for the PC called the AST Six Pak Plus.  This was a very popular upgrade for the PC.  It offered up to 384KB of RAM, one serial port, one parallel port, one game port and a Real Time Clock.  IBM even offered it toward the end of the PC's life.

There were no-slot-clock RTC chips available, but they typically required an XT or better because they required a 28-pin ROM socket.  The PC uses non-standard 24-pin ROM sockets.  The Dallas 1216E chip will not fit without a soldering mod in an IBM PC, Apple II or II+.  

A few caveats about the Six Pak Plus.  The printer and game ports are run off the main board with ribbon cables, and are intended to occupy the second bracket.  The game port on most of these cards is unusable unless a 74LS244 and an NE558 chip are added to the appropriate sockets.  The RTC requires a driver to be loaded in your AUTOEXEC.BAT file, but it does use a common CR2032 battery.  I do not know if the printer port can be modified to support bidirectionality.  It does essentially allow you to use two slots that would have been occupied by IBM's port cards.

Not Particularly Useful Upgrades :

CPU Upgrades

Further upgrades to the PC come in the form of CPU Accelerator Boards.  They take up a slot, are very hard to find and do not offer quite the same level of performance as a full system running at the equivalent speed.  A list of accelerators that were available back in the day can be found here : http://www.atarimagazines.com/compute/issue117/p42_upgradefever2_ACCELERATOR_CARDS.php

I discourage use of accelerator boards.  While nice to collect, they fundamentally alter the character of the underlying machine.  If you want a 286 and more advanced, go buy an AT or clone.  You won't be held back by the slot placement, the full-size bays or the like.

Sound Cards

The PC only comes equipped with a PC Speaker.  For good or ill, the PC Speaker in the PC has a 2.25" diameter speaker cone and can be really loud.  This is important for those games that tweak the cone to expand and contract faster than it is designed to do.  Piezo tweeters like those found in the PCjr. and many of the PS/2 computers cannot do these tweaked sounds justice.

You may be tempted to put an Adlib or Sound Blaster card in the system, but for gaming purposes, these cards are better used in faster systems.  The first game supporting any sound card was King's Quest IV (SCI Version), a game that runs incredibly slowly on a PC.  So few games will use an Adlib and run playably on a PC, it just is not worth it to put one in there.

Modems

A modem is not terribly useful in a PC in the modern world.  Games that support modem play tend not to play very quickly on a PC.  Connecting to the Internet requires a dial up ISP and the wherewithal to get the dial up internet gateway working with the PC.

Expanded Memory

To get memory beyond the 640KB conventional memory limit, you had to add an Expanded Memory Board.  These were a popular option for users wanting to run lengthy, computationally intensive Lotus 1-2-3 spreadsheets.  Games did not support Expanded Memory until 1990, and by that time no game was going to run well on a PC with or without expanded memory.

Coprocessor

The Intel 8087 coprocessor was inserted into the empty 40-pin socket.  It had virtually no practical application for games.  SimCity may have used it, however.  It does no harm, however, to insert one.

Games that People Play

For the first five years of the PC's life, most games released for that platform were specifically tailored to work at the PC's speed.  There was nothing slower (PCjr. being an exception), and the much faster IBM AT cost a fortune.

Virtually any game released as a PC booter will run well or tolerably on the IBM PC.  Good ports like Alley Cat and Shamus are fine examples.  Digger and Styx, classic knockoffs of Mr. Do and Qix, respectively, also run well but can benefit from a speed boost.  These games were released by IBM and Windmill Software, respectively, so they will run in a PC.  Windmill Software's games do not run on an EGA card.  Round 42, Sopwith, Rogue, Starflight, Elite are also other great PC games.  Pirates! should be playable.  Any Infocom or other text game will also work fine, assuming CGA snow does not bother you.

As far as Sierra's AGI games go, the PC was not the ideal platform for King's Quest and other games using this engine.  These games were made for the PCjr and Tandy 1000 in mind.  With the booter versions of KQ1-2 and The Black Cauldron, each time the screen changes, the game will load a new screen from the floppy.  This can take 6-8 seconds per screen.  In the booter versions, you can see the machine draw the vectors and fill the shapes on a PC.  The hard disk versions are somewhat better, depending on your hard drive's speed, but even with a fast device expect to experience a few seconds of waiting for the screen to load or draw.  An EGA card is ideal for the hard drive versions.  Sierra SCI games are way too slow for the PC.

I would avoid any booters released by Data East.  Some of their games require 512K, which is really high for the simplistic arcade-style games and suggest that they were not well-programmed or used a high level language like C, which is not as fast as well-programmed assembly on a PC.  I would generally be wary of any game that requires 384-512K, and 640K games rarely run playably on a PC.

Lucasarts' SCUMM games were very popular, but I would recommend only playing the low resolution Versions of Maniac Mansion and Zak McKracken and the Alien Mindbenders.  The high resolution versions of these games scroll the screen pitifully slowly and take longer to load their screens.  These two games are best played on the Tandy for enhanced sound.

Most RPGs released in the 1980s will work fine with the PC.  Ultimas 1-4, (5 is a bit slow in spots), The Bard's Tale series, Wastleland, Dragon's Lair, Might and Magic 1 (and maybe 2) and Wizardry 1-5 all run well on the PC.

Monday, April 8, 2013

Meet a Video Card - The Diamond Stealth 24 VLB

In this entry I will discuss one of my favorite video cards, discuss its features and why I recommend it to anyone building a vintage computer system.  The card in question, as mentioned in the title to this post, is the Diamond Stealth 24 VLB.  It looks like this :


Thanks to http://www.vgamuseum.info for the photograph.

As you probably know, the edge connector on the back of the card is for the VESA Local Bus (VLB) slot.  This bus is almost totally exclusive to 486 processors, as it is essentially an extension of the 486 bus.  If you are building a 486 system, VLB cards are an excellent fit for video if your motherboard supports them.  (Whether they are as good a fit for hard drive interfaces is a debate that must be put off for another day.)  The ISA bus is just too slow for a 486 and games needing fast video like DOOM, especially as so many boards have VLB slots.

Later 486 motherboards tend to support PCI slots, but the conventional wisdom of the time was that 486 PCI implementations were generally immature.  PCI slots came into their own on Pentium Socket 7 motherboards.  Small wonder that the number of Pentium mainboard chipset makers and motherboard builders seemed to shrink dramatically.  In my opinion a VLB slot is to a 486 as a PCI slot is to a Pentium as an AGP slot is to a Pentium II and above

Back to this board, you can see that it has eight pieces of V53C104 DRAMs.  Each chip supports 256kx4 bits.. Eight chips gives you 8 megabits or 1 megabyte of video memory.  This is four times the basic VGA memory requirement.  The PLCC chip near the VGA connector is a Diamond SS2410 High/True-Color DAC.  This is an optional feature for the S3 805 chip.  Without this kind of DAC or an equivalent DAC, the card would only be able to support 8-bit color resolutions.  With the DAC, it can support 15-bit, 16-bit or 24-bit color resolutions as the maximum memory allows.

The S3 805 can support up to 2 megabytes of video memory, but this was a cheap accelerator card and cannot be upgraded to 2 megabytes.  1 Megabyte of video memory was standard for VLB video cards, 2MB was a premium card, and 4MB was almost unheard of.

This card boasts some VESA compliance.  The Modes 101h-104h are VESA modes.  The only mode of any real importance for DOS is the 640x480x256 and 15/16-bit and 800x600x16 and 256 modes.  It does support 640x400x256, even though it does not list VESA Mode 100h in its supported display modes.  Rise of the Robots uses that resolution and works fine with the card at that resolution.  System Shock CD does not allow that mode to be selected, so UniVBE may be necessary to play the game in that mode.  It can support refresh rates up to 72Hz at 1024x768 or below and refresh rate of 60Hz at 1280x1024.  These graphics modes were tested with WHATVGA.EXE and work :

101h - 640x480x256 packed
102h - 800x600x16 planar (also 6Ah)
103h - 800x600x256 packed
104h - 1024x768x16 planar
105h - 1024x768x256 packed
106h - 1280x1024x16 planar
110h - 640x480x32K
111h - 640x480x64K
112h - 640x480x16M 
113h - 800x600x32K
114h - 800x600x64K
124h - 1152x864x256 packed (did not work in WHATVGA)
206h - 1280x960x16 packed (not a VESA mode)
208h - 1280x1024x16 planar (not a VESA mode)

WHATVGA.EXE had some issues with displaying planar 1024x768 and 1280x1024 modes, and did not display the extended text modes 54h 132x43 and 55h 132x25.  

Not much is known about the BIOS revisions.  I have read that there exist 1.11, 1.24 and 2.01, the last being required to use the latest windows drivers.  My card has 2.02.  

One slightly annoying issue this card has is that its I/O addresses conflict with the default COM4 addresses, 2E8-2EF.  This is due to its 8514/A derived design and is not unique to this card.  It has a jumper to enable or disable IRQ2, but few games required that functionality on a VGA card.  I have not found any problems with it and an MPU-401, which also uses IRQ2 by default.  Games rarely use the IRQ functionality of the MPU-401 anyway.  

Diamond still provides drivers for the Stealth 24 VLB and other cards on its website for Windows 3.1.  This will allow you to use better resolutions than Windows 3.1 default VGA 640x480x16 resolution.  Get them here : http://www.dmmdownload.com/legacy.php.  These cards tend to be among the most plentiful VLB cards you can find today.  Windows 95 comes with drivers for the card.

Game compatibility with EGA and VGA games is excellent.  I have tested the card with almost every piece of software on this chart : http://gona.mactar.hu/DOS_TESTS/.  I did not try Quake, Duke Nukem 3D above 640x480 or Tomb Raider.  Software works perfectly (Commander Keen 4-6 needs the SVGA Compatibility option turned on, as does Dangerous Dave and Keen Dreams with the /comp switch).   Silpheed has some minor extraneous flickering lines during its intro, but they do not appear during the actual gameplay.  UNIVBE works with the chipset, and there is a utility to set the refresh rates, look for S3REFRSH.ZIP.  It reports that you can set 640x480, 800x600, 1024x768 and 1280x1024 to 60Hz or 70Hz/72Hz, 800x600 at 56Hz and 1024x768 and 1280x1024 to 43Hz/45Hz interlaced.

According to this article, it should have good Windows 3.1 acceleration features and speed : http://books.google.cz/books?id=PTwEAAAAMBAJ&pg=PA39&dq=Diamond+Stealth+24&hl=cs&ei=q6ROTOe0EIWL4QafmuyUCA&sa=X&oi=book_result&ct=result&resnum=3&ved=0CDMQ6AEwAg#v=onepage&q=Diamond%20Stealth%2024&f=false