Showing posts with label IBM PC. Show all posts
Showing posts with label IBM PC. Show all posts

Wednesday, October 30, 2013

The PCjr. and CGA Compatibility

When IBM designed the PCjr., it based it on its pre-existing IBM PC Color/Graphics Display Adapter (CGA).  However, IBM did not design it in a way that it would be guaranteed to be backwards compatible with all CGA software, especially games.  This article will demonstrate the limitations of the PCjr. with CGA games.

There are four types of games of CGA games, first those that are not aware of the PCjr (Adventure in Serenia), second those that are aware of the PCjr. but do not use the enhanced graphics features of the PCjr. (M.U.L.E.), third those that are aware of the PCjr. and enhance the graphics in some way (Alley Cat), and fourth those that do not really work on the PCjr. (Microsoft Decathlon).  (Interestingly, all these games were released by IBM).  This article is only concerned with the first two types of games.

CGA and the PCjr. are fully compatible at the BIOS level, but only partially compatible at the register level.  The PCjr. can do everything that CGA can do at the hardware level, it just has to do some things very differently.  The CGA is a relatively simple device with eight registers :

Hex Address       Register Function
3D4                    6845 Index Register (to access 18 internal registers)
3D5                    6845 Data Register
3D8                    Mode Control Register
3D9                    Color Select Register
3DA                   Status Register
3DB                   Clear Light Pen Latch
3DC                   Preset Light Pen Latch

IBM implemented all these registers except for the 6-bit Mode Control and Color Select Registers.  There is nothing present at 3D8 and 3D9 in the PCjr.  The CGA and PCjr. have true Motorola MC6845 CRTCs.  The PCjr. also has a video gate array that acts as the graphics controller.

In addition, the graphics memory window with CGA, B8000-BBFFF will also be found with the PCjr., regardless of the amount of memory the PCjr. has (since it shares its video memory with the CPU).

1.  What works

Anything that access the BIOS will work correctly in either the IBM PC with CGA or PCjr.  The PC BIOS through Int 10H, offers several video functions.  All the video functions in the PC are present on the PCjr. Among the chief functions of BIOS Int 10H include setting the graphics modes.  IBM defined seven modes in the BIOS for CGA, 0-6, as shown below

Mode 0 - 40 column x 25 line Text Color/Black and White
Mode 1 - 40 column x 25 line Text Color/Color
Mode 2 - 80 column x 25 line Text Color/Black and White
Mode 3 - 80 column x 25 line Text Color/Color
Mode 4 - 320x200 Graphics 4-Color
Mode 5 - 320x200 Graphics 4-Color/Black and White
Mode 6 - 640x200 Graphics Black and White

On an RGB monitor, all modes except 6 are color capable through the BIOS.  On a color composite monitor or TV, only Modes 1, 3 and 4 are capable of color.  IBM preferred the black and white modes so that text would appear legible on a color composite monitor or TV.

Two other important functions that Int 10H provides include setting the palette to either green/red/brown or cyan/magenta/white and setting the background + border color in the 320x200 graphics modes and the border color in the text modes.  Even though the register write is the same, it will not set the foreground color in the 640x200 mode.

Additionally, those tweaked text modes, found in games like Round 42 (160x100) or ICON : Quest for the Ring (320x200), may also work because the program tweaks the registers of the Motorola MC6845 CRTC.  ICON has a PCjr. executable, and some games like Styx had a PCjr. specific version.

2.  What doesn't work

Since the Mode Control Register does not exist in the PCjr., a program must select the modes using the BIOS.  Any program writing to the Mode Control Register to change its mode will not work.  In addition, for text modes CGA uses bit 5 to turn blinking off and allow a text cell to select the 8 intense colors.  Finally, when bit 2 is 0 it turns on color for the color composite mode.  This is the way that color composite graphics are shown on CGA using the 640x200 mode and the bit is 0 by default in Modes 1, 3 and 4.

The Color Select Register also does not exist in the PCjr., so any program that uses the register to select colors will not work.  Color selection in CGA is limited as follows :

For text modes, bits 0-3 selects the border color.
For 320x200 graphics modes, bits 0-3 select the background and border color.
For 640x200 graphics mode, bits 0-3 select the foreground color (background and border color is always black, works with color composite graphics when bit 2 of the Mode Control register is 0)

None of those functions will work at all on the PCjr.

Bit 5 selects the 3-color palette in 320x200 Mode 4.  If the bit is 0, then the palette is green, red and brown.  If the bit is 1, the palette is cyan, magenta and white.  This is the default.  In Mode 5, this bit has no effect, the palette is always cyan, red and white.  The background color is the only color that is freely selectable in the 320x200 modes.  Since bit 5 is not implemented, any game that uses the Color Select Register to change the palette will show the cyan, magenta and white palette, even though that is not what was intended.  Also, the cyan, red and white palette will not appear, the default palette will be used.

Bit 4 determines whether the palette colors are in low or high intensity.  It works for all three palettes described above.  Thus green, red and brown becomes light green, light red, yellow; cyan, magenta and white become light cyan, light magenta and high intensity white; and cyan, red and white becomes light cyan, light red and high intensity white.  Since bit 4 is not implemented on the PCjr. games will only use the low intensity palettes.

Thus on CGA there are really six palettes available :

IBM PC CGA Mode 4 Palette 1 Low Intensity :

Ultima II - Revenge of the Enchantress
IBM PC CGA Mode 4 Palette 0 Low Intensity :

Digger
IBM PC CGA Mode 5 Palette 0/1 Low Intensity :

Donkey Kong
IBM PC CGA Mode 4 Palette 1 High Intensity :

Battlezone
IBM PC CGA Mode 4 Palette 0 High Intensity :

Shamus
IBM PC CGA Mode 5 Palette 0/1 High Intensity :

Tapper
On the PCjr., however, there are really only two palettes available for games that aren't PCjr. aware, if they work at all :

IBM PCjr. "CGA" Mode 4/5 Palette 1 :

Ultima II - Revenge of the Enchantress
IBM PCjr. "CGA" Mode 4/5 Palette 0 :

Shamus
Note that for PCjr. CGA Palette 1, cyan and magenta are the same as real CGA, but white has become high intensity white.  This is intentional and has been verified on real hardware.  Apparently IBM decided the original palette was not bright enough and so decided to brighten things up a bit.  For PCjr. CGA Palette 0, the intense palette is not available, even for games that intended to use it.  However, several games that used Palette 0 will use Palette 1 on the PCjr. because they used a register write instead of the BIOS function to set the palette.

However, in a 4-color mode, the PCjr. is not limited to the 78 possible combinations of the three preset colors and the background color.  Through its palette registers, the PCjr. can set each of the four colors to any color in the 16-color palette.  1,820 combinations become available.  Likewise, in a two color mode, the PCjr. can set the foreground and background colors independently, and the background color need not be black.  In addition, the PCjr. can set the border color independently in any mode, whereas the CGA can only set a unique border color in text modes.  Instead of only fifteen choices, 120 choices become available.

Even though Tandy copied the PCjr.'s video gate array and graphics capabilities, it restored the Mode Control and Color Select Registers giving it near perfect compatibility with any non-Tandy aware CGA program using the those registers.

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.

Thursday, October 18, 2012

Running an XT Class Computer in an AT World

The PC and XT standards were well supported in the 80s but were quickly supplanted in the 90s by fully AT compatible machines.  Yet XT class systems still have their uses.  They support CGA, PCjr and Tandy composite video output, they run at speeds that old software demand to be run at and support timing sensitive tricks and copy protection schemes.  They almost always have big pc speakers and also there is the PCjr./Tandy sound chip.  Yet there are many challenges in acquiring affordable hardware for these systems.  When the AT was released, it added several standards, changed a few, and really offered now-cheap peripherals for almost all of them.

Keyboards

There is the XT keyboard protocol and the AT keyboard protocol.  Modern machines still support AT keyboards, even the IBM PC AT 84-key Keyboard from 1984.  They do not support pure XT keyboards, including the IBM PC/XT 83-key Keyboard from 1981.  Machines supporting the XT keyboard protocol do not work with pure AT keyboards.  During the early years, there were machines with used unique keyboards (Tandy, Amstrad) which were not physically compatible with the XT/AT DIN connector or used a protocol different enough that they would not work with a standard XT keyboard.

If you cannot find a pure XT keyboard, you can use a switching keyboard like an IBM Model M, Tandy Enhanced or Northgate Omnikey.  The Model M works best in systems supporting extended keyboards like a PC XT with a 1986 BIOS.  The original Omnikeys had switches that would allow the keyboard to be used in Tandy 1000s and Amstrad PCs.

VGA

Most VGA cards use a 16-bit ISA connector.  Monitor support for VGA graphics is nearly universal, monitors working with CGA/TGA/PCjr. (except for composite out), EGA or MDA graphics adapters are difficult to come by.  Most 16-bit VGA cards with early chipsets from Paradise (PVGA-1A) will work okay, and even the TSENG ET-4000AX, among the fastest ISA VGA chipsets, will usually work as well.  The Trident 8900C is another decent choice.  The TSENG ET-3000 is an 8-bit chip.  The ATI Wonder+ supports 8-bit.  OAK chipsets are good choices for compatibility, but like Trident the speed is poor.

IDE & SCSI

8-bit IDE and SCSI cards are hard to come by these days.  There are two types of 8-bit IDE cards, the XTA card and the 16-to-8 bit IDE card.  The former only works with relatively few drives, which only come in 20 or 40 MB capacities.  Even though the systems were otherwise fully AT, IBM still used this crippled interface in its PS/2 Model 25 & 30 286s and the PS/1 Model 2011, which had a 10MHz 80286.

The 16-to-8-bit cards, including the ADP-50L and Acculogic S-IDE 8/16 work with drives at least up to the 504MB limit, but command a price premium.  SCSI, fortunately, was 8-bit back in the day, so finding drives is not as big a deal.  Finding cards with ROM BIOSes is an issue, because without the ROM BIOS, you will need to load a driver to use a SCSI device, and no booting is possible.  The XT-IDE project is also included in this category, but does not have the 504 or even 8GB limits anymore and the v2 cards offer really fast performance.  If an IRQ is used, it must be a low one as IRQs 8-15 do not exist in the XT architecture.

MFM and RLL controllers and drives are not intended to be interchangeable.  RLL requires a more precisely calibrated drive than the ones typically intended for MFM.  You should be able to use an RLL drive with an MFM controller if you low-level format the drive to the less efficient encoding algorithm.  The reverse (RLL controller, MFM drive) may not be reliable.  ESDI drives use the same 34 & 20 pin cabling, but only work with an ESDI controller, which are all 16-bit.  

High Density Floppy Controller

Introduced in the IBM AT, these do not use the 16-bit ISA extension.  Finding a multifunction card with an HD floppy controller is not too difficult.  Adding support to the BIOS is, since most multifunction cards do not have a BIOS socket.  There is a project underway on the Vintage Computer Forums to

Real Time Clock

AT machines always have this as standard, either with a battery or a Dallas 1287 or 12887 RTC & Battery module.  MSDOS will support this as of 3.0.  XT machines generally have two options, an 8-bit multifunction card like a Six Pak Plus or a piggyback Dallas 1215 chip.  The piggyback chips have to be installed underneath a ROM chip.  Both require a TSR to be loaded on bootup.  Tandy *L systems and Amstrads use the AT-style RTC.

286 & 386

A 286 does support Protected Mode, but not a lot of software supports it.  There is a good amount of software and code that uses instructions introduced with the 286.  A V20 or V30 implements most of those instructions and can be plugged into a socket that originally contained an 8088 and 8086 CPU, respectively.  Examples include the official DOS driver for an IOMEGA Zip-100 drive and the BIOS ROM extension found on a Trantor T-130B SCSI card.

Many, many software utilities and programs from the mid-90s were written to expect a 386 or better CPU that offered 32-bit registers, Protected and Virtual 8086 modes.  If the program requires a DOS DPMI extender like DOS4GW, DOS32 or CWSDPMI.

Accelerators generally were of the board-kind for 8088 and 8086 systems, like the Intel Inboard 386XT, which used a ribbon cable to connect to the original CPU socket.  For the 286s they usually plugged into a PLCC socket.  However, the Intel Inboard 386AT used a board with a ribbon cable.  

Expanded & Extended Memory

On an XT class system, the only way you will be able to address more than 1MB of RAM is through Expanded  Memory Boards.  They come in 8 & 16 bit flavors, with the 8-bit more expensive.  A few boards can be set to work in either 8 or 16 bit mode.  They are almost always 13" long, so systems with small cases will have a problem.  Unless your system has a 16-bit ISA extension, adding extended memory in a 286 or higher machine will not be possible.  286s do not have a memory controller that can convert extended to expanded memory, and 386 and 486 plug-in upgrades usually do not have their own memory.  The Tandy 1000RLX is one exception, as it can allow HMA use (for loading DOS high) or EMS (64KB only).  The 286 IBM PS/2 and PS/1 systems offer Extended Memory, but the modules are proprietary.

Network Cards

Not all 16-bit network cards work in an 8-bit slot.  There are 8-bit Ethernet cards like the NE1000, these will require a transceiver to connect the machine using CAT-5 cable.  The Intel EtherExpress 8/16 and true NE2000 cards will work in an 8-bit slot.

Sound Cards

16-bit Sound Blasters and Pro Audio Spectrums should offer support for everything except 16-bit audio recording/playback.  16-bit playback is impossible in a Sound Blaster 16 because there are no high DMA channels in the XT architecture.

Serial Cards

XT devices use serial cards based on the 8250 or 8250B UART.  AT devices uses the faster 16450 or 16550A UART, the latter with a 16-byte FIFO.  AT BIOSes do not like the 8250 parts and the 16450 and more advanced parts fix a bug with the interrupt enable register the XT BIOS relies on.  

Saturday, July 14, 2012

CGA and Tandy Compatibility

Tandy 1000s (except for the RLX and RSXes) have a built-in video adapter which was based on the IBM PCjr.'s internal graphics adapter.  However, Tandy decided to do what IBM should have done, which was to make the internal graphics fully CGA compatible.  The PCjr. is really only compatible with CGA at the BIOS level, allowing for a 16KB graphics window at B800, implementing a compatible Status Register and using a genuine Motorola 6845 CRTC.  It does support CGA color composite video (with a different color palette) and a light pen.  Tandy added the Mode and Color Control Registers to allow for full CGA compatibility with software that wrote to those registers directly.

With Tandy's Graphics Adapter, a very high level of compatibility with CGA is maintained.  However, it is not perfect for reasons largely not attributable to Tandy.  First, IBM and Tandy use slightly different character glyphs in text-mode graphics.  IBM's "d" and Tandy's "d" do not look exactly the same, for example.  Text characters in text mode or taken from the patterns in the BIOS ROM will look slightly different.  This difference would be barely worth mentioning except that games that use tweaked text modes for their graphics will show graphical differences.  ICON : Quest for the Ring and The Seven Spirits of RA are the only two examples I can think of.  These games use a 40-column text mode where the character cells are 2 pixels high instead of the usual 8.  These games are unique in that they use many different text characters instead of solid block characters.

The two screenshots can give you an idea of the differences.  First look at this screenshot, using the standard IBM character set :



That is taken from the MACROCOM's ICON demo and that is how it is supposed to look.  Now lets look at same screen displayed with the Tandy characters :


I took the above screenshot using MESS, so there are some color errors due to its imperfect CRTC emulation which would not be seen on a real Tandy 1000.  But what will be noticeable on the Tandy 1000 is the text, Siegfried's sword arm, the heads of the snakes, the kobold's tail and the Rhine Maid's mouth.  The game itself, ICON : Quest for the Rings, is also affected.  The 7 Spirits of RA from Sir-Tech uses the same graphics engine and similar anomalies are present in that game.

Second, the composite video colors are also different from IBM's CGA, the PCjr. and Tandy.  Although IBM early and late CGA cards have differences in their colors, the differences are minor.  Games supporting composite color graphics almost always had their graphics displayed to the IBM CGA standards.  Displaying these games on a PCjr. or Tandy 1000 will show the wrong colors outside black, white and maybe the grays.  The TV or monitor's tint control may not be sufficient to correct the graphics to the IBM standard.  Compare the results here :

http://vogons.zetafleet.com/viewtopic.php?t=12319&postdays=0&postorder=asc&start=500

Third, some games will not display CGA graphics on a Tandy because they detect a Tandy 1000 and will only display Tandy 16-color graphics instead!  In that sense, the Tandy is not CGA compatible, again, through no fault of Tandy.  Some games offered a command line switch or install program to allow the user to manually specify the graphics mode.  16-color modes generally work better with higher speed processors, so a gamer may have sought to trade graphics quality for game performance on a lower powered machine.  Other games do not offer a way to bypass graphics autodetection.

Strangely enough, Tandy SX and TX and later machines with ISA slots will disable the internal Tandy Graphics if a CGA graphics card is installed.  Depending on how compatible the CGA card is, #1 should be solvable and #2 may be licked if the character ROM is close enough to IBMs.  #3 requires debug talent or replacing the Tandy BIOS ROM with a ROM without the Tandy 1000 identifier byte.  (FC00:0000, 21).