Sunday, March 15, 2015

My Complete IBM Important Video Card Collection : The Bedrock of DOS Graphics























In the above photo you can see five graphics cards.   They are the five most important graphics cards ever made for the PC compatibles of the 1980s and early 1990s.  They are, from top left :

1.  IBM Color/Graphics Display Adapter (CGA)
2.  IBM Monochrome Display and Printer Adapter (MDA or sometimes MDPA)
3.  Hercules Graphics Card (Hercules or HGC)
4.  IBM Enhanced Graphics Adapter with Graphics Memory Expansion Card (EGA)
5.  IBM PS/2 Display Adapter (VGA)

These graphics cards defined the graphics standards which DOS programs, not limited to games, used.  They were the only graphics expansion cards that were generally available to any PC compatible with a standard expansion slot that had widespread support.  Other graphics adapters, like the PCjr. Graphics Adapter, the Tandy and Tandy Video II Graphics Adapters, the Multi-Color Graphics Array (MCGA), the Amstrad PC-1512 Graphics Adapter were never released as expansion cards.  Also, except for the original Tandy Graphics Adapter and MCGA, they did not gain widespread support in the market.  Other expansion video cards like the IBM Professional Graphics Adapter and the Hercules Graphics Card Plus and Hercules InColor Card, had some support but it was not nearly as widespread as the canonical five shown above.  There is virtually no support in games.

For the first 13 years of the IBM PC, there was scarcely a DOS program that would not run if you had one of these cards or clone.  They are all 8-bit cards, so they can work on any PC with an ISA slot.  Let me discuss them in order of release :

IBM Monochrome Display and Printer Adapter (MDA or sometimes MDPA)

The first full graphics standard IBM released was the MDA back in 1981 with the introduction of the IBM PC.  It only has 4KB of RAM, an 8KB character ROM (only 4KB used) and can only display 9x14 text in an 80-column mode.  It uses memory addresses B0000-B0FFF and I/O ports at 3B0-3BF

It connected to a special IBM Monitor, the 5151 IBM PC Display.  This was a green-phosphor monochrome monitor designed specifically for this card.  This is why I call it the first full graphics standard, since IBM fully standardized the display at the onset.  Jumpering J1 is not a good idea at all.  J2 will connect to a light pen, but IBM never released a light pen under its own branding.  

This card has an oversized black bracket that was intended for IBM PC Model 5150s with the wider spacing between ISA slots.  This makes it annoying to use in later systems because it can take up two slots.  The back of the board has several hand-soldered thin yellow wires glued down which are commonly seen in complex IBM PCBs to fix mistakes.  

The MDA and CGA cards can coexist in the same system, and this was very useful in older workstations to take advantage of each card's respective strengths.  IBM intentionally designed these cards so their resources do not conflict.  The MDA card must be designated as the primary display in the PC to prevent damage to the IBM 5151 Display.  This is accomplished in a PC or XT or Portable by setting SW1 block switches 5 and 6 to Off.  The On position on the dipswitch blocks for any of these motherboards is always toward the power connector, the Off position is toward the ISA slots.  

On an IBM AT, there is a single switch, SW1, which determines whether the MDA or CGA card is installed.  When set toward the rear of the system, the MDA card is the only adapter installed or the primary video adapter.  When set toward the front of the system, the CGA card is the only adapter installed or the primary video adapter.  The IBM XT/286 and generic AT-class motherboards autodetect the adapter.  

High quality photos of the IBM MDA, CGA and EGA cards are here : http://www.minuszerodegrees.net/5150_5160/cards/5150_5160_cards.htm

IBM Color/Graphics Display Adapter (CGA)

This card was also available when the IBM PC was first released on August 19, 1981, but unlike the MDA, it did not have a monitor from IBM to go with it.  There were monitors available that could connect to the 9-pin monitor port, but typically did not implement the intensity bit or display color #6 as brown.  The IBM 5153 display was released in 1983, providing the defined standard for the display from an digital RGB input computer monitor.  IBM never released a composite color monitor for the card, so it was connected to both color composite monitors and TVs.  

This card has three headers, P1 is for connecting an RF switch box for the composite signal to display correctly on a TV.  IBM never released one for the CGA, but there may have been third party boxes like the Sup'r II Mod for the Apple II.  P2 is for a light pen.  P3 has a pair of solder pads but no pins.  I soldered pins onto my card.  When the pins are jumpered together, you will see the alternate thin-pixel text font. 

The default font in the CGA's 40 column and 80 column text modes use text characters drawn with double pixels.  This is also the font pattern contained for the first 128 ASCII characters in the PC BIOS for use by programs in graphics modes.  All IBM CGA cards also have a thin font available for text modes only that use text characters drawn with single-pixels, similar to Apple II text.

The IBM CGA card has 16KB of RAM and an 8KB Character ROM (only 4KB used).  In fact, the same exact ROM chip is used for the MDA and CGA cards.  4KB of the chip is used for the MDA font, and the other 2KB is used for the two CGA fonts.  It uses memory addresses B8000-BBFFF and I/O ports at 3D0-3DF

All 100% compatible CGA and MDA cards use an MC6845 CRT Controller.  I have an Epson CGA card that does not and is not quite 100% CGA compatible.  

The CGA card came in two varieties, old and new.  I have one of each, but the one shown in the picture was originally a new card which I converted into an old card.

On a PC or XT or Portable, the default text mode can be set to 40x25 by setting SW1 switch 5 to Off and 6 to On.  This is appopriate to connecting the card to a composite monitor.  For an RGB monitor, you should set the 80x25 text mode to the default by setting SW1 switch 5 to On and 6 to Off.  

Hercules Graphics Card (HGC)

This is the only non-IBM card in this collection, but the graphics mode provided by this card was widely supported in programs and games.  The MDA's text font could not be redefined without burning a replacement character ROM.  Moreover, the pinout for the socket is somewhat different than those for common EPROMs.  Replacing the text font with something appropriate for a non-Latin alphabet was not an easy task until the Hercules Graphics Card came around.  This provided a 720x348 graphics mode in addition to being fully compatible with IBM's MDA card.  The original Hercules card, found here, has a true 6845 CRTC : http://en.wikipedia.org/wiki/Hercules_Graphics_Card#/media/File:KL_Hercules_HGC.png

J1 is the header for a light pen, but is strangely missing on my card.  My card does have the plated holes, so I may add it back at some point.  

It has 64KB of RAM and a font that is identical in appearance to IBM's MDA font.  It uses memory addresses B0000-BFFFF and I/O ports at 3B0-3BF.  It functions exactly like an MDA card unless the program uses Hercules features.  There may be programs that operate differently depending on whether they detect Hercules or pure MDA, so the MDA above is not wholly redundant.

Some Hercules clones have a jumper or dipswitch to disable the upper 32KB of RAM in hardware to make it more compatible with CGA in a dual monitor system, but true Hercules cards do not.  A true Hercules card can disable the upper 32KB in software.  

IBM Enhanced Graphics Adapter (EGA) with Graphics Memory Expansion Card

This is the only modular card in this set, and it is very, very complex when it comes to options.  The base card has a 16KB ROM and 64KB of RAM.  This allows it to display 350-line text modes and 320x200x16 and 640x200x16 graphics.  Some later programs, however, expect the full 256KB that the EGA can support.  640x350x16/64 graphics require at least 128KB of RAM.  

To install the extra 192KB of RAM onto this card requires the Graphics Memory Expansion Card, shown to the left of the EGA.  It requires twenty-four standard 16K x 4bit chips (150ns or better response time) to fully upgrade the EGA.  The EGA will autodetect the extra RAM, and some later BIOSes will generate beeps if it is not present but will eventually work.  Each row can be populated independently to add 64KB or 128KB or 192KB to the EGA.  The card should be populated with RAM at U18-U25, then U10-U17 and finally U1-U8.  Most third party EGA cards either came with 256KB or could be upgraded to 256KB without a daughterboard.  

It always uses memory addresses at A0000-AFFFF and C0000-C3FFF.  Other EGA cards may use C0000-C7FFF.  It will use B0000-B7FFF if connected to a 5151 Display or B8000-BFFFF to a 5153 or 5154 display.  It always uses I/O ports at 3C0-3CF and will also use 3B0-3BF if connected to a 5151 Display or 3D0-3DF if connected to a 5153 or 5154 Display.  It can use IRQ2 for a vertical retrace interrupt, but few programs used this functionality.  

This card has three jumpers.  P1 determines the type of monitor connected.  If a CGA 5153 monitor is connected, then P1 should be covering pins 2 and 3.  This grounds pin 2 on the DE-9 video connector.  If an EGA 5154 monitor is connected, then P1 should be covering pins 1 and 2.  This allows the secondary red signal to appear on pin 2 of the DE-9 video connector.  P1 is irrelevant when a 5151 MDA monitor is connected.  

P2 is the light pen header, and is wired just like it is on a MDA or CGA card.  P3 changes the default address range of the EGA card.  When connected to pins 1 & 2, the EGA card will be at I/O addresses 3xx, which is the default and required if the EGA is going to be the primary video card in the system.  If the EGA card is going to be the secondary card in the system, P2 must be jumpered to connect pins 2 and 3.  This sets the card to use the hex I/O addresses at 2xx.

J1 and J2 are RCA connectors that do nothing unless something is plugged into the 34-pin header at J4, the EGA feature connector.  IBM never released anything that used the EGA feature connector.  J5 is the connector for the Graphics Memory Expansion Card, the card is supported by the 64 pin header and two plastic stakes on the other end of the card.  

This card can be connected to a 5151 PC Monochrome Display, a 5153 PC Color Display or a 5154 PC Enhanced Color Display.  When connected to a 5151, it emulates the MDA text mode and also provides a 640x350 graphics mode.  When connected to a 5153, it emulates a CGA (not with 100% compatibility) and provides 320x200x16 and 640x200x16 graphics modes.  When connected to a 5154 Enhanced Color Display, 350-line color text modes can be displayed as can the 640x350x16/64 graphics mode.  

In addition to P1 and P2, there is a 4-pin dipswitch accessible from the card's bracket that control its configuration.  The EGA card can work alongside an MDA or CGA card.  It can be the primary or secondary card in the system.  

Here are the settings when the EGA card is set to be the primary card :

SW1 SW2 SW3 SW4 EGA MDA CGA Notes
On Off Off On 40x25 Color Display Secondary None
Off Off Off On 80x25 Color Display Secondary None Best Option for 5153 Display
On On On Off Enhanced Display Emulation Mode Secondary None
Off On On Off Enhanced Display Hi-Res Mode Secondary None Best Option for 5154 Display
On Off On Off Monochrome Emulation None 40x25 Secondary
Off Off On Off Monochrome Emulation None 80x25 Secondary Best Option for 5151 Display

Here are the settings when the EGA card is set to be the secondary card :

SW1 SW2 SW3 SW4 EGA MDA CGA Notes
On On On On 40x25 Color Display Primary None
Off On On On 80x25 Color Display Primary None Best Option for 5153 Display
On Off On On Enhanced Display Emulation Mode Primary None
Off Off On On Enhanced Display Hi-Res Mode Primary None Best Option for 5154 Display
On On Off On Monochrome Emulation None 40x25 Primary
Off On Off On Monochrome Emulation None 80x25 Primary Best Option for 5151 Display

The Notes give the best option when the EGA card is connected to the monitor.  For the IBM card, the On position is when the switch is closest to the PCB and the Off position is when the switch is furthest away from the PCB.  

On a PC, XT or Portable, you must set SW1 switches 5 and 6 to On with an EGA, VGA or any other graphics adapter with a BIOS expansion ROM (including IBM's Professional Graphics Adapter).  AT class machines do not need have or need any switches for these cards to function.

IBM PS/2 Feature Adapter (VGA)


This card, as its name implies, was released after the discontinuance of the PC line on April 2, 1987.  It was originally intended to upgrade the IBM PS/2 Model 30's MCGA graphics to VGA graphics.  However, it works fine in an IBM PC, XT, AT or XT/286.  Newer motherboards may throw a few beeps at you before deciding to work with the card.  

This VGA card is a card version of the integrated VGA adapter found in the PS/2 Models 50, 60 and 80. The original VGA was designed around an 8-bit bus and this is the last mainstream graphics card IBM designed for the ISA bus.  When IBM began releasing PC-like (non-MCA) systems again with the PS/1, the video would be integrated onto the motherboard or a third-party 16-bit or 32-bit (S)VGA card would be used.  The VGA card is 100% backwards compatible with MCGA and almost 100% backwards compatible with EGA and MDA.  With CGA backwards compatibility is pretty basic.  

IBM's VGA card has a HD-15 connector, but there is no hole for pin 9.  Your VGA monitor must have no pin 9.  The original IBM monitors which it could connect to are the 8512 (14"/13" viewable) and 8513 (13"/12" viewable) color monitors.  These only support VGA refresh rates and the maximum resolution is 640x480x256 (because of 8514/A, XGA and XGA-2).  It also supports monochrome VGA monitors like the IBM 8503 or 8504 (both 13"/12" viewable) and will autodetect the monitor type.

It has 256KB of RAM and a 32KB EPROM which only uses 24KB.  It has two sets of 44-pin headers at J1 and J2, I have no idea what they were meant for.  I can only suggest that it was intended to upgrade the video memory, similar to the IBM 8154/A Display Adapter's and IBM Image Adapter/A memory expansion boards.  The 26-pin card edge connector on the top of the board is for the VGA feature connector.  I do not believe IBM ever released anything for it.  

This card always uses memory addresses at A0000-AFFFF and C0000-C5FFF.  It also uses 6KB at C6800-C7FFF and 2KB at CA000-CA800.  Other VGA cards just use C0000-C7FFF.  It will use B0000-B7FFF if emulating an MDA or B8000-BFFFF if emulating a CGA.  It always uses I/O ports at 3C0-3CF and will also use 3B0-3BF if emulating an MDA card or 3D0-3DF if emulating a CGA adapter.  It can use IRQ2 for a vertical retrace interrupt, but few programs used this functionality.  CGA emulation is the default for text modes and the B0000-B7FFF address range can be reclaimed for an Upper Memory Block by an Expanded Memory Manager.  

Wednesday, March 11, 2015

Cajoling Sierra and LucasArts Games to Play Tandy Sound on a Non-Tandy System

Sierra's AGI engine games, which formed the bulk of their mid 80s PC offerings, supported Tandy graphics and sound.  LucasArts' early SCUMM engine games also supported Tandy graphics and sound.  As far as sound went, the Tandy 3-voice chip was the only alternative to the PC Speaker.  However, Tandy sound chips were almost exclusively found in Tandy 1000s and PCjrs.  They were not generally available in PCs and never available to the general public as a sound card.

The main reason why no one put the 3-voice TI SN76496 sound chip inside their PCs was because it utilized the same address space (C0-C7) as the 2nd DMA controller in the IBM PC AT and clones.  The blame for this was on IBM, which had designed both the PCjr. and AT.  Although the 2nd DMA controller was not really important until the mid 90s, PC clones that wanted to manufacture AT compatibles had to include it.  While this was not the only reason why the sound chip was not generally available, it was a daunting hurdle when every game that used it had to write directly to the registers located at the contested I/O location(s).

Games cannot detect the Tandy sound chip because it can be written to but not read.  They can detect a Tandy 1000 or an IBM PCjr. by reading identifier bytes in the BIOS area of these machines.  For the PCjr. it is FD at F000:FFFE and 21 for the Tandy 1000s at FC00:0000.  When the programmers have their programs search for these bytes, then they know that Tandy or PCjr. graphics and sound are present in the machine.  However, Tandy allowed its machines, starting with the SX, to use other graphics cards, complicating matters.

Graphics cards can be detected by software.  A MDA adapter can be identified by reading from a status port at 3BA and a CGA by a status port at 3DA.  Hercules cards can be detected by some unused (by IBM) bits in the status port.  An EGA, MCGA or VGA can be detected via BIOS extensions and readable registers, particularly at 3C0-3CF.  MGCA can additionally be assumed if the system returns the ID byte for an IBM PS/2 Model 25 or 30, FA at F000:FFFE

Distinguishing CGA from Tandy video is tricky because Tandy video (almost) perfectly emulates the latter from a hardware perspective.  There are generally two ways a programmer can distinguish CGA from Tandy video.  First, Tandys use IRQ5 for vertical retrace, CGAs do not.  However, often this functionality is disabled because hard drive adapters also tend to use IRQ5 in 8-bit slots.  The other way is through the amount of video memory available.  Tandy video can use 32KB while CGA video only uses 16KB, so if a program writes a value to a memory location in the lower 16KB and a different value to the memory location exactly 16KB above the first memory location written, if the first memory location is the same as the second memory location, you have a CGA, and if the locations are different, you have Tandy.  This only works for CGA cards with access only to 16KB of RAM.

Despite these issues, an ISA card is being developed that will put Tandy sound on a non-Tandy PC.  If it is completed, you will be able to run virtually any DOS game that allows you to specify the audio in an install or setup program of via the command line.  Some games are a bit difficult when asked to do this, and here are instructions on how to coerce some games to work in this (for now) hypothetical scenario.

Sierra's Adventure Game Interpreter

Games affected :

King's Quest I, II, III, Space Quest I, II, Mixed Up Mother Goose, Police Quest, Leisure Suit Larry, The Black Cauldron, Donald Duck's Playground

Solution :

Any of these games released with an AGI Interpreter version of 2.917 or later can support Tandy sound with an EGA or VGA adapter present.  The latest interpreters are also required to avoid having graphical garbage be left on the screen from animation due to some self-modifying code in the graphics card drivers the game uses in earlier interpreters.  You will need the command line argument -t if you are not running the game on a Tandy 1000.  This tells the executable to use Tandy graphics and sound, but the program conducts checks for an EGA or VGA adapter and will use them if present.  It will still give you Tandy sound.

However, if you have a version of the game that uses an AGI Interpreter below 2.917, you will need to copy over the interpreter files from another game with that interpreter.  Here are the interpreter files :

AGI or SIERRA.EXE
AGIDATA.OVL
CGA_GRAF.OVL
EGA_GRAF.OVL
HGC_FONT
HGC_GRAF.OVL
HGC_OBJS.OVL
IBM_OBJS.OVL
JR_GRAF.OVL
SIERRA.COM or KQ[1].COM, KQ2.COM, KQ3.COM, LL[LSL1].COM, PQ[1].COM, SQ[1].COM, SQ2.COM, BC.COM
VG_GRAF.OVL

The real executable is the AGI file, the .COM file is a loader which implemented the key disk copy protection.  (The .COM file is also necessary to set up these games to work correctly on the PCjr., otherwise it is not needed).  To keep people from using these files interchangeably, Sierra included the initials of the game in the encrypted AGI file.  If that name does not match the game files, then the program will refuse to run.  You will need a cracked .COM file and a program called AGI Decryptor to decrypt the AGI file into an executable AGI.EXE.  Then you must hex edit the AGI.EXE file to change the name of the game.  Then it will run.

Games using AGI Interpreters with 3.xx work without any intervention required.

This will not work with any booter game, as Tandy video is the best video adapter they support, without major hacking.

LucasArts SCUMM

Games Affected :

Maniac Mansion (both non-Enhanced and Enhanced), Zak McKracken and the Alien Mindbenders (both non-Enhanced and Enhanced), Indiana Jones and the Last Crusade : The Adventure Game (both 16-color and 256-color versions).

Solution :

These games autodetect Tandy 1000s and will use Tandy graphics and sound.  If they are not being run in a Tandy 1000, they will use PC Speaker sound.  They support an EGA or VGA card in a Tandy 1000.  With a little bit of hex editing, you can force the executable to always use Tandy sound (but nothing else).  The instructions can be found here : http://www.vogons.org/viewtopic.php?t=31657#p260253

It is not impossible that the executable may be compressed because it was necessary to fit it on the floppy disks.  In that case, you will need an EXE unpacker like UNP or LZEXE before you can hex edit the files.

Indy 3 will always use Adlib sound if an Adlib or Sound Blaster is in the system, even in a Tandy 1000. If you use the above method, you will need to remove the sound card to hear Tandy music.  It will never autodetect a Game Blaster, which is supported in the 256-color versions and 16-color version 3.14.

While typically DOSBox's Tandy mode obviates the need for these patches, in the non-Enhanced versions of Maniac and Zak, you will be able to enjoy the crisper text of the EGA and VGA modes with this patch.

Notes :

Neither series of games will show the correct graphics with a CGA or Hercules card when these methods to force Tandy sound are used.

Digital Sales of DOS Games

DOS games were no longer generally being sold commercially, with certain exceptions, at retail after the 1990s.  Occasionally you could find some games in bargain bins or on a compilation CD, but generally speaking, if you wanted to purchase a DOS game, you went on ebay or a similar site.  There were also sites like Game Trading Zone, which I used to make a few trades and purchases before it went to a subscriber only format.

Getting DOS games to run in the first half of year 2000 decade was often an exercise in frustration.  Windows XP was generally less compatible than Windows 98SE with DOS games.  The ability to play DOS games with a sound card was often unsuccessful.  While there were narrowly-focused projects to emulate game engines like Exult, Frotz and SCUMMVM, there was no easy to use general solution for playing DOS games.  DOSBox had been in development since 2002, but for the first few years the software was still improving to the point where it could be counted on to run most games.

While companies like id Software and Apogee and 3D Realms were happy to sell from their back catalogs online, their combined output was only a very small portion of games available for DOS.  However, companies like Activision discovered that the open source nature of DOSBox freely allowed them to make their older catalog titles available again.  Vivendi/Universal did just that when it released The King's Quest Collection in 2006.  In 2008, the site GoodOldGames began to sell DOS games.  GoodOldGames, now just GoG, would bundle the game files with a preconfigured version of DOSBox to launch the game.

Selling old games to run on systems which they were never intended to be played on is not new and has been around as long as emulation has been around.  Actually, since early "authentic" releases like Microsoft's Return of the Arcade series simulated arcade games, the concept goes back even further.  Mostly these were limited to arcade and console games. When the Nintendo Wii was introduced in 2006, it introduced the Virtual Console which allowed players to buy select console games, which were emulated on the current system.  Sony has a Playstation and Playstation 2 classic line for the Playstation 3.

I have been generally indifferent to GoG on this blog.  GoG is emblematic about getting DOS games to run on modern hardware with a minimum of fuss.  This was the original intent of the VOGONS forum, as VOGONS stands for Very Old Games on New Systems.  In the beginning of the VOGONS forum, less ambitious emulators like VDMSound GliDOS, and OpenGLide also had a great deal of traffic on their forums.  GliDOS and Munt and SoftMPU still have a reasonable amount of traffic, but the site was much more oriented to emulation previous than it is now.  However, the focus became centered more and more around DOSBox.

Another development was in the movement to real hardware.  Retro computing, where the intent is to actually use old computers to run DOS games instead of simply emulating the operating system and enough hardware to get the games to run began to take shape in 2005.  Much of the early focus was on the MT-32, which was a difficult and demanding synthesizer to emulate.  However, eventually people started to understand that emulators cannot replicate the experience of playing games on the hardware they were intended to be played on.  Now, retrocomputing and hardware is undoubtedly the busiest part of the VOGONS forum.

Still, real hardware enthusiasts are a niche, the general game playing public are ignorant.  GoG and other digital download services like Steam and Origin cater to the general public and try to make the games as easy as possible to run.  You will find and be able to purchase DOS games from these sites, and I would like to discuss what is available generally and what to expect from each site.

GoG vs. Steam and Origin

GoG is the pioneer of selling DOS games bundled with DOSBox to get them running in modern versions of Windows.  Thanks to the portability of DOSBox, GoG can also make (some of) these games available on Mac OS X.  They were so successful that they were able to eventually offer Windows 9x era games and Windows XP era games, right up to new releases.  In this sense, they are a competitor to Steam.

While Steam does have some DOS games on offer, GoG is almost always the best choice.  GoG takes the original game files and tweaks DOSBox to run each game appropriately.  They will use reasonably current versions of DOSBox, 0.72-0.74 and they bear responsibility for getting every game they sell running.  By contrast with Steam, one producer may be very good about squashing bugs and making sure DOSBox is updated to the latest version, while others are not.  The aforementioned The King's Quest Collection is also available on Steam, but officially it only supports Windows 2000 and XP.  Support for Vista, 7 or 8 requires an unofficial fan patch.

Additionally, GoG releases are DRM free.  You do not need to connect to a GoG server after downloading the game.  You don't have to have a Steam client verify your account to play any game.  You can play your DOS games offline, as most were meant to be played.

Still, all is not perfect with GoG.  Games with CD Audio tracks may come with them in lossy mp3 format.  Don't expect anything like floppy images, most of GoG's games came off CD versions of CD compilations. Getting GoG games to run on retro hardware without DOSBox can be a challenge.  The GoG releases may be missing crucial install or executable files which are necessary to get the game running on a PC or to change the settings to match the hardware on the retro machine.   This is undoubtedly the case with any GoG game running via SCUMMVM instead of DOSBox.

SCUMMVM is a jack of all trades and a master of none.  It functions like a reverse engineered interpreter as well as an emulator.  When you run the game with its original executable in DOSBox, you are using the original interpreter and taking one very significant variable out of the equation.  Moreover, DOSBox has more robust graphics and sound support than SCUMMVM.  Finally, SCUMMVM only requires the data files, the executable and game driver files are not needed and are generally not included in distributions intended for SCUMMVM.  This includes GoG releases, which is one reason why I prefer to track down original discs.  That way, I can enjoy my games on real hardware.

Some GoG releases of large games give you a huge folder with all the files and a hacked executable allowing the game to load from the hard drive instead of a CD.  This may make it impossible to play the game on real hardware because the installation directory is so large or it is not obvious what the contents of each CD should be.  This is ultimately the reason why I seldom mention or have anything to do with digital downloads of DOS games.

I have created a list of all DOS games on sale at GoG's website as of the date of this post.  GoG sells games individually or in a bundle, but not both. This list shows what they are selling at the present time :

11th Hour, The
Akalabeth : World of Doom (needs replacement DOS extender)
Alien Breed (including Tower Assault)
Alone in the Dark
Battle Chess 1, 2 4000
Beneath A Steel Sky#
BioForge
Blake Stone Aliens of Gold
Blake Stone Planet Strike
Blood
Bloodnet
Cannon Fodder
Cannon Fodder 2
Capitalism Plus
Carmageddon
Castles 1-2
Catacomb 1, The Catacomb, Catacomb 3D, Catacomb Abyss 3D, Catacomb Armageddon, Catacomb Apocalypse
Challenge of the Five Realms
Cosmo's Cosmic Adventure: Forbidden Planet
Crusader: No Regret
Crusader: No Remorse
Crystal Caves
Cyberia
Dangerous Dave in the Haunted Mansion, Dangerous Dave's Risky Rescue, Dave Goez Nutz!
Darklands
Daryl F. Gates' Police Quest: SWAT
Defender of the Crown (CGA & EGA, Amiga Emulation)
Descent 1 & 2
Dragon Lore: The Legend Begins
Dragonsphere
Duke Nukem 1-2
Duke Nukem 3D Atomic Edition
Dungeon Keeper
F-117A Nighthawk Stealth Fighter 2.0
Flight of the Amazon Queen#
Gabriel Knight 2
Gabriel Knight: Sins of the Fathers
Gobliiins 1,2 & Goblins Quest 3#
Heroes of Might and Magic 1 & 2
Hocus Pocus
Hugo 1-2-3#
I Have no Mouth and I Must Scream
Indiana Jones and the Fate of Atlantis#
Inherit the Earth
Ishar 1-3 & Crystals of Arborea
Jagged Alliance
King's Quest 1-2-3
King's Quest 4-5-6
King's Quest VII
Labyrinth of Time
Lands of Lore 1 & 2
Last Express, The
Legend of Kyrandia 3
Legend of Kyrandia Book One#
Legend of Kyrandia Book Two#
Leisure Suit Larry 7
Leisure Suit Larry's Greates Hits and Misses (1, 2, 3, 5, 6, 1 Remake)#
Litil Devil
Little Big Adventure
Loom CD-ROM#
Lure Of The Temptress
Magic Carpet (including Hidden Worlds)
Magic Carpet 2
Manhole : Masterpiece Edition
Master of Magic
Master of Orion
MDK
Megarace 1-2
Might and Magic 1-5
Monkey Island 2 – LeChuck's Revenge – Special Edition
Monster Bash
Mortal Kombat 1-2-3
Oddworld: Abe's Oddysee
Personal Nightmare
Phantasmagoria 1-2
Pinball Illusions
Pinball Mania
Pinball World
Police Quest Collection (1 Remake, 2, 3 Open Season)
Populous
Populous 2
Pro Pinball: The Web
Pro Pinball: Timeshock!
Quest for Glory 1-5
Raptor Call of the Shadows
Rayman
Realms of Arkania 1-2
Realms of Chaos
Redneck Rampage
Return of the Incredible Machine: Contraptions
Return to Zork
Rex Nebular and the Cosmic Gender Bender
Rise of the Triad (including Extreme Rise of the Triad)
Robinson's Requiem & Deus
Sam and Max Hit the Road#
Screamer
Screamer 2
Secret Agent
Secret of Monkey Island, The – Special Edition
Sensible World of Soccer '96/'97
Seven Cities of Gold: Commemorative Edition
Shattered Steel
Sid Meier's Colonization
Sid Meier's Covert Action
Sid Meiers Pirates! & Pirates Gold
Silent Service 1-2
SimCity 2000: CD Collection
Simon the Sorcerer II
Simon the Sorceror#
Space Quest 1-2-3
Space Quest 4-5-6
Spycraft: The Great Game
Star Control 1-2
Star Trek: 25th Anniversary
Star Trek: Judgement Rites
Star Trek: Starfleet Academy
Star Wars TIE Fighter Collectors CD-ROM
Star Wars X-Wing Collectors CD-ROM
Star Wars: Dark Forces
Starflight 1-2
Stargunner
Stonekeep
Strike Commander
Sumbwar 2050 (including The Plot Deepens)
Superfrog
Sword of the Samurai
Syndicate Plus (Syndicate & American Revolt)
Syndicate Wars
TEENAGENT
Terminal Velocity
Tex Murphy : The Pandora Directive
Tex Murphy: Mean Streets & Martian Memorandum
Tex Murphy: Under a Killing Moon
The 7th Guest#
The Dig#
Theme Hospital
Theme Park
Time Commando
Tomb Raider
Tomb Raider
Toonstruck
Torin's Passage
Tyrian 2000
Ultima 4-5-6 (4 available for free separately)
Ultima 7 Complete (Black Gate & Forge of Virtue, Serpent Isle & Silver Seed)
Ultima 8 (including Speech Pack)
Ultima Underworld 1 & 2
Ultimate Body Blows
VR Soccer '96
Wacky Wheels
Wasteland
WaxWorks#
Wing Commander 1 & 2 (including both Secret Missions and Special Operations)
Wing Commander 3
Wing Commander Academy
Wing Commander Armada
Wing Commander Privateer
Wings (Amiga Emulation)
Wizardry 6-7
World of Aden: Entomorph - Plague of the Darkfall
Worlds of Ultima: Martian Dreams
Worlds of Ultima: Savage Empire
Zak McKracken and the Alien Mindbenders@
Zork Anthology ( Zork I, Zork II, Zork III, Beyond Zork, Zork Zero, and Planetfall)

Some games like King's Quest VII and Tomb Raider come bundled with their Windows sequels.  I have included any DOS games available, even if they are only available in a bundle with a Windows-only game like the Might and Magic games.  Games with an # next to them use SCUMMVM.  While there are 155 individual purchasing options on this list, GoG's total number of games run to 967.
From this list, I can discern what genres of DOS games are sufficiently popular that GoG would go to the trouble to secure the rights for sale.  Classic adventure games and role playing games constitute a fair proportion of this list.  Apogee's shareware catalog is mostly present, and strategy games like Castles and Populous and SimCity 2000 are represented.

When it comes to racing and flight simulators, the available games are mostly very narrowly tailored to specific series like Wing Commander and Star Wars.  These games tend to age poorly and usually have to find some other hook to be remembered in the long term.  For this reason, sports games, fighting games and more casual games have very few spaces on this list.

There are definitely some odd choices on this list.  Wacky Wheels and Ultimate Body Blows are definitely games people tend to look back on with rose tinted glasses.  Even in their time they were thoroughly trounced by Super Mario Kart and F-Zero and console ports of Street Fighter II and were sort of the console-less man's substitute. I have played many of these games and have at least heard of most of them, but Litil Divil is a new one for me.  This apparently was much more popular on the Amiga than on DOS.

Steam

It is harder to search for DOS games on Steam because Steam allows you to search by labels but not by year of original release.  Here are the DOS games currently available for purchase on Steam :

11th Hour
Across The Rhine
Blake Stone: Aliens of Gold & Planet Strike, Rise of the Triad (including Extreme Rise of the Triad)
Carmageddon Max Pack
Command H.Q.
Commander Keen 1-5
Darklands
Descent
Descent 2
DOOM II
Duke Nukem
Duke Nukem 2
Duke Nukem 3D Megaton Edition (includes Atomic Edition)
Eradicator
Fallout
Final DOOM
Harvester
Heretic: Shadow of the Serpent Riders
HeXen: Beyond Heretic
HeXen: Deathkings of the Dark Citadel
I Have no Mouth and I Must Scream
Indiana Jones and the Fate of Atlantis
King's Quest 1 Remake, 2, 3, 4, 5, 6, 7
Loom
MDK
Monkey Island 2 Special Edition (includes DOS version)
Nam
One Unit Whole Blood
Raptor: Call of The Shadows
Realms of Arkania
Realms of Arkania 2
Realms of Arkania 3
Realms of the Haunting
Secret of Monkey Island Special Edition (includes DOS CD version)
Shadow Warrior
Silent Service
Silent Service 2
Spear of Destiny
Star Wars: Dark Forces
The 7th Guest
The Dig
Tomb Raider
Ultimate DOOM
Wasteland
Wizardry 6-7
Wolfenstein 3D
X-COM: Apocalypse
X-COM: UFO Defense

You will note that there are several games available on both GoG and Steam.  While the 47 games available on Steam is only a fraction of those available on GoG, there are several exclusives.  Much of the id Software collection is available and it is exclusive.  There are more choices for LucasArts adventures.  X-COM and the all-mighty Fallout (previously available on GoG) can only be found here.  

I have included some remakes like the two Monkey Island games and Duke Nukem 3D Megaton edition because they allow you to play the original DOS games, upon which they are based, in the program.  Steam allows you to purchase most of these games individually or in bundles to save money.  

Origin

Electronic Arts' digital distribution service is especially aptly named Origin when it comes to releases of older games.  Here is the list of games available through its service :

Crusader: No Regret
Crusader: No Remorse
Dungeon Keeper
Lands of Lore
Lands of Lore 2
Magic Carpet
Populous
Populous 2
SimCity 2000 CD Collection
Starflight
Starflight 2
Syndicate
Tomb Raider
Ultima
Ultima 2
Ultima 3
Ultima 4
Ultima 5
Ultima 6
Ultima 7 Complete (Black Gate & Forge of Virtue, Serpent Isle & Silver Seed)
Ultima 8 (including Speech Pack)
Ultima Underworld
Ultima Underworld 2
Wing Commander
Wing Commander 2
Wing Commander 3
Wing Commander 4?
Wing Commander: Privateer

As you can see, most of these games were released by Origin Systems or under the Origin label after EA's purchase.  However, Bullfrog, Westwood Studios and Maxis, all of which EA purchased in the 1990s like Origin, are all represented.  I understand that Origin uses DOSBox, just like Steam and GoG.  Tomb Raider is owned by Square Enix, but apparently EA acquired rights to most games in the series.  Origin's descriptions for games are a little sparse, so I do not know which titles include their expansion packs.  I would almost guarantee that Wing Commander 1-2 do.  Origin does not bundle games and has no exclusive DOS titles, so I would suggest using GoG instead.  

Among the Missing

Even with all these choices, there are some substantial gaps where you would expect some games to be released.  None of the classic SSI AD&D Gold Box or Eye of the Beholder games are available.  Ubisoft bought SSI and does not offer classic games digitally.  Also, not only would Ubisoft but also Wizards of the Coast would have to be involved in licensing.

GoG offers Wing Commander 4 with DVD cutscenes.  Wing Commander 4 as it came on six CD-ROMs is a DOS game, Wing Commander 4 which came on a double-sided, single layer DVD is a Windows game, so it is not listed.  Origin does not give sufficient information to determine whether its version of WC4 is the DOS or the Windows version, but I suspect the latter.

Some of the original Sierra titles to their Quest series are missing either the AGI version or the SCI remake. GoG offers both with Quest for Glory and Leisure Suit Larry.  However, it does not offer the SCI remakes of King's Quest I or Space Quest I and does not offer the AGI release of Police Quest I.  The Steam release for the King's Quest Collection includes the SCI remake of King's Quest I but not the AGI release.
For some reason, Commander Keen in Aliens Ate My Babysitter! (a.k.a. Keen 6) is not available for purchase either on the Steam bundle or through id Software's site.  Nor is Wizardry 1-5 available; I would have expected GoG to offer it as they do 6-7.  

LucasArts' classics SCUMM engine games have seen a spotty release digitally so far.  Maniac Mansion, Indiana Jones and the Last Crusade, Day of the Tentacle and Full Throttle are all MIA.  The first two Monkey Island games are only available in their original form via the Special Additions, and even though they are windows games, the third and fourth games aren't available.  In my opinion, outside the voice acting, the Special Editions are pointless.  Double Fine is remastering Day of the Tentacle like they did with Grim Fandango, so it may include the original version as a playable extra like the Monkey Island Special Editions.  Zak McKracken and the Alien Mindbenders has recently been released on GoG, but it is the Japanese FM-Towns version, which I personally will give a pass because while it is not a true DOS game, it looks like one and acts like the actual DOS versions.  

Non IBM-PC compatible Games

So far, this article has focused on games that are available for purchase that originally ran on IBM PC and MS-DOS. The MS-DOS games released on Steam, GoG and Origin rely on emulation through DOSBox.  However, computer games for non-PC compatible systems have do not really have much of a presence through digital downloads.  GoG does offer the Amiga versions of Defender of the Crown and Wings, both Cinemaware games, via its custom emulator.  I have read its emulation does not hold a candle to WinUAE.  

Amiga Forever is the site where you can legally purchase the Kickstart ROMs required for Amiga emulation, and the package comes with games and demos.  Amiga.com sells 43 games for the Blackberry platform.  However, I am not aware of anything substantial being made available for purchase for other computing platforms like the Apple II, Atari 8-bit, Commodore VIC-20, 64 or 128, the Atari ST or the Apple IIgs.  

Tuesday, March 3, 2015

PC Keyboards I Have Known

IBM PC (Model 5150) Keyboard

While not the first keyboard I have ever used, the original 83-key IBM PC Model F keyboard is easily the most sturdy and well-constructed keyboard I have ever used.  Unlike the Model M, the 83-key uses a printed circuit board on which the keyboard traces are printed.  This circuit board is sandwiched between two pieces of steel.  The keyboard controller and circuitry is located at the top of the circuit board.

The 83-key keyboard can be completely separated and put back together though the use of steel tabs.  It is not something I advise, because once the back metal plate is removed, the key plates will go out of their places.  It is very tedious putting 83 of them back in their places, and the spacebar plate is especially tough to put back in place.  The top steel plate can show corrosion from any water or ill-usage.

The keys are easy to remove.  You can pop them out with a small, flat stiff object.  Once exposed, you will see the springs.  These should be treated with care, because if they get bent out of shape, the key will no longer work correctly.  The springs of a Model F may not be replaceable by those from a Model M.

The springs in the keys are stiffer than Model M springs and require more force to register a keystroke.  The spacebar is huge and also requires a lot more force to register its press.  The keyboard is extremely heavy but does have angle adjusting feet.  The feet require a good deal of strength to move their position.  It also has four cork pads to lie on and the keyboard can be disassembled with a slotted screwdriver.  The cork pads can fall off over time.

The PC Model F keyboard is not compatible with modern PCs, even with a 5-pin DIN to a 6-pin mini-DIN adapter. It is compatible with the IBM PC/XT, Tandy 1000 TL, SL and (with adapter) RL.  The IBM PC Portable uses the same keyboard but a different type of cable.

When you see the layout of the 83-key Model F, you can understand certain early conventions.  *.* makes perfect sense when you see the . and an * key where only two keys separate them.  Users of the IBM PC AT 84-key Model F keyboard lost out, because their . and * keys are not in a straight line horizontally or vertically from each other.  IBM rectified this in the Model M keyboard, the * key is three keys above the . key on the numberpad.  Ctrl Alt Del also made a great deal of sense when the keys were in an L shape.  Finally, when certain games use F1 as a fire key, it makes sense when the function keys are on one side of the keyboard and the directional keys are on the other side.

Even so, this keyboard is very difficult to get used to after using the standard 101/104 Windows key layout.  Ctrl is not in the place where you would expect, the shift keys are way too small and the vertical enter bar is difficult to hit.  The inverted T for the arrow keys is solely missed.

IBM Model M Keyboard

I have three Model M keyboards, one 1390120, one 1390131 and one 1391401.  These are the Model Ms intended for the IBM PC/XT, IBM PC AT and IBM PS/2 series, respectively.  The first two have the silver IBM badge in the upper right hand corner, the last has a oval gray IBM badge in the upper left corner.

The Model M uses two sheets of plastic for a keyboard matrix and they are sandwiched in between a plastic front and a steel rear.  This base is held together by plastic rivets that were melted and flattened during assembly.  They have a tendency to break off after rough usage, but there are so many that it will take many hard drops before enough break off so that the structural integrity of the keyboard is compromised.  Some people have removed them and drilled screw holes in their place.  The PCB containing the keyboard controller is connected to the plastic sheets and LEDs by plastic ribbons that are easily detachable.  The keyboard also has a metal cable that screws into the back plate (presumably to prevent ground loops) and can also be detached with a flathead screwdriver.

These Model Ms use four non-slotted hex screws.  These can be removed via a long-barrel 7/32" bit.  The keyboard cable on all three is detachable and uses a type of connector called an SDL connector.  It looks like an RJ-45 plug but is wider and has plastic clips on the side that lock it in place.  Even without the plastic clips, the friction between the plug and connector is sufficient for ordinary connections.

My 1390120 was made in 1989, after the IBM PC line was discontinued.  My 1390131 is from 1986 and my 1391401 is from 1989, but made earlier than the 1390120.   It has no status LEDs, which is only occasionally irksome.  Unlike my other two Model Ms, its uses a light gray plastic for the top half of the keyboard assembly.  My other Model Ms use black, which makes the keyboard seem much dirtier if looking down into it.  It also loses the stabilizer bars for the numberpad Enter and + keys.  This is a welcome thing, since removing the stabilizer bars (for cleaning) can often break the small plastic tabs keeping them connected in the first place.  The keyboard also had a tendency to shift a little in its chassis, but a little electrical tape solved that problem.

The Model M has the innovation of using removable key caps over the key stems.  This allows the user to customize his keyboard to a much more advanced degree than the Model F keyboards.  If you want a DVORAK layout, you can make it with a minimum of fuss, assuming the operating system supports it. Removing a keycap is pretty easy.  Unfortunately, this is the reason why you often see keyboards for sale with missing keycaps.

Model Ms can be found for very reasonable prices, Model Fs command huge sums due to their relative rarity.  The Model M does not have quite the level of force required of the Model Fs, and the sound is made by the keyboards is slightly less objectionable to others.  

All three of my Model Ms are autoswitching XT/AT keyboards.  They can work in XTs or AT class PCs without any switches.  My Model Ms do not work in my IBM PC Model 5150, but it is hit and miss which Model M keyboards can do this.  Because they are PS/2 compatible keyboards, they will work in just about any PC, even ones released today, either natively or though a PS/2 to USB adapter.  They will also work in a Mac with a USB adapter.

The build-quality on true IBM Model Ms is fantastic.  IBM made Model Ms from 1986-1992 before they handed them over to Lexmark, which in turn sold the designs and the equipment to make buckling spring keyboards to Unicomp.  I highly recommend scoring an original IBM Model M.  

IBM PCjr. Keyboard 7257

My PCjr. has the second version of the PCjr. keyboard.  The 7257 uses molded keys instead of the chicklet-style keys of the original keyboard.  However, both use the same printed circuit board and the same 62 keys.    These keyboards are rubber dome keyboards, but use a capacitative based approach.  Underneath each rubber dome is a conductive carbon pad that will complete the circuit on the PCB underneath.  The PCB is really thin and the keyboard controller is attached to it.  

These keyboard connect via a wireless infrared transmitter or an optional keyboard cable,  The keyboard cable uses an RJ-11 jack on one end and a unique PCjr. connector on the other end.  Wireless operation requires 4xAA batteries and can last for a few months.  If you obtain one of these keyboards, you may be disappointed to find ancient, corroded batteries inside the battery compartment.  Possible damage to the keyboard may have been caused, but at the very least the corrosion needs to be cleaned out.  The battery contact leads will require special attention, preferably with alcohol, white vinegar and Deoxyit in that order.  Fortunately, the PCjr. keyboard is only held together with Phillips screws.  

The PCjr. keyboard is very light compared to other IBM keyboards and virtually silent because of the rubber domes.  The newer keyboard, with its keys practically touching each other and the key symbols printed directly on the face of the key is much more acceptable to people who value a traditionalist IBM keyboard.  The older keyboard had much more space over the keys and labeled the keys above the keys instead of on the keys to accommodate keyboard overlays.  

This is the only rubber dome keyboard I own, and not out of choice but it is the only keyboard that I have that will work with the PCjr.  Using a PC keyboard on a PCjr required a special adapter with circuitry to account for the low level differences between the keyboards. 

Because there are only 62 keys, the remaining keys required key combinations to activate.  The Fn key was included for this purpose, and this Fn key has been used in laptops starting with the IBM PC Convertible in 1986.  The function keys do not exist, thus the equivalent number key and the Fn key serves the same purpose.  Of course, when programs use combinations like Ctrl F5, this becomes more cumbersome.  Most of the numberpad keys were lost.  The arrow keys pulled double duty as cursor control keys.  Typing the \ key required the use of the Alt key, which DOS users probably did not appreciate.  

Using this keyboard, with its mushy keys, does not give a very good tactile experience.  Moreover, due to the slow processing of keys by the PCjr., you will often have to "race the keyboard buffer".  Fast typing or holding down keys can give you a warning beep from the system telling you that the buffer is full and your key press will not be processed.  Also, key presses are not processed during disk accesses and the keyboard is should be ignored during serial port transfers.  

Tandy 1000 Keyboard

I have two of these keyboards, one for my Tandy 1000SX and one for my Tandy 1000TX.  The 1000 keyboards are physically identical each other and to the MS-DOS compatible (but not really IBM PC compatible) Tandy 2000 computer.  Tandy saw that the 2000's keyboard was good enough for the PC compatible 1000s.  I do not know if the 1000 keyboard works in the 2000, but I know it only otherwise works in the 1000/A/HD/SX(AX)/TX.  The all-in-one Tandy EX and HX have keyboard that function and feel like the standalone 1000 keyboard and share the layout, except their status LEDs are not in the keys themselves. 

The 1000 keyboard, unlike the Model F PC/XT keyboard, has status LEDs for the Num Lock and Caps Lock keys.  It does not have a Scroll Lock key.  It is held together by Phillips screws and uses square cork feet that can fall off over time.  The keys are susceptible to plastic yellowing from UV rays.  IBM's keyboards never seemed to have this problem.  

The keyboard has 90 keys.  Its F11 and F12 and keys are unique and only generally supported in Tandy Deskmate software.  Its inverted-T cursor control keys are unique only via their low level scancodes, their translated scancodes make them appear like numberpad cursor keys.  Nonetheless, this could cause confusion, which is why some programs require you to put the Num Lock on when using a Tandy keyboard. 

The Function keys are arranged at the top of the keyboard instead of on the sides.  This makes many older PC programs more difficult to use because they were written with the function keys were on the side.  Also, there is no easy way to do *.* because there is no distinct * key, and the \ character requires that Num Lock be off (which it is by default).  Ctrl Alt Del is also awkward due to the position of these keys, but the standalone Tandy systems have a reset button.  

One extremely annoying key is the HOLD key.  The closest key on the Model M keyboard is the Pause/Break key, but on the Tandy keyboard, the HOLD key acts something like a universal pause key. Unfortunately, you may hit this key by accident and it appears like the computer has frozen or crashed.  You have to press it again to unfreeze your program.  The key is right next to the Enter key, making it easy to brush up against.

The Tandy 1000 keyboard was designed by Fujitsu.  The keys use 3rd Generation Fujitsu Leaf Switches and use a linear design.  There is a PCB for the keyboard matrix and a a black metal base for holding the key stems and sockets.  The key caps are high quality double shots, with beige over black.  You can remove them with a chip puller, but I am not sure how to remove the spacebar without damaging the two retention clips on the sides, which acts like a stabilizer bar.  None of the other keys have stabilizer bars.  

While the 1000 keyboard does not use rubber dome technology, the keys feel somewhat mushy to the touch.  There is no question, however, that the keyboard was much improved over the PCjr. keyboard.  However, the shift keys are still too small, the enter and backspace keys are also small and the layout is very cramped feeling.

Tandy Enhanced Keyboard

This Tandy keyboard was used for the Tandy 1000 TL and SL computers and the later computers in the line and its other PC compatible computers after 1987.  The Enhanced Keyboard uses the same layout as the Model M.  Like the Model M, it is an autoswitching XT/AT keyboard.  However, the Tandy Enhanced Keyboard did work in my IBM PC Model 5150, even more versatile.  They come with non-detachable cables with a 5-pin or a 6-pin connector.  Unlike the Model M, the status LEDs are underneath the keycaps of the Num Lock, Caps Lock and Scroll Lock keys.  

The keys on this keyboard feel much stiffer than a Model M keyboard.  The Shift keys and the long Enter and + keys feel like they have large dead areas which feel hard to the touch and will not register a keypress.  To be fair, my Model Ms' right shift key also has this issue to a lesser degree.  

This keyboard is a rebadged Fujitsu keyboard, and has removable keycaps like a Model M.  These keyboards use Type 2 Fujitsu Peerless switches.  The key caps pull off without too much difficulty and use dye sublimation like IBM's keyboards.

Also like a Model M, the key stems sit on top of a rubber dome membrane.  The key action is much simpler, there is a spring underneath the key stem that pushes the key back up once it has pushed the rubber dome down.  Not quite as complex as the switch over membrane technology of the Model M, which use the movement of a spring to shift a piece of plastic that makes the two membranes contact each other.  

Dell AT101W

I found this keyboard at a thrift store for $1.00 sitting on a shelf with half a dozen cheap rubber dome USB keyboards.  I was told there were no returns, but the keyboard looked in good enough shape that I felt the dollar was worth it.  The Dell AT101W is my only 104-key keyboard, and its Windows keys and Menu key are the same size as the Ctrl and Alt keys.  Unlike a 101 keyboard, all the keys on this row until the cursor keys, are convex instead of concave.  A Unicomp 104 keyboard has convex keys on this row, except for the space bar.  The Unicomp's space bar is smaller than the Dell's, consequently the other keys on this row are the same size as a Ctrl or Alt key on a Model M.  

This keyboard uses complicated black ALPS switches.  The keycaps required a tremendous amount of force to remove, and I eventually resorted to using a chip puller, which worked well.  All the large keys have stabilizer bars : both shift and enter keys, the plus key, the backspace key, the numberpad 0 key and the spacebar.  This is a bit of overkill in my opinion due to the longevity concerns, but it eliminates dead spots on the right shift key.

The keyboard is not quite as large or as heavy as a Model M, and the keycaps show signs of UV yellowing.  The PS/2 connector has a purple sheath.  Interestingly, the are three channels underneath the keyboard where you can thread the keyboard cable to the left, right or center of the keyboard.  The keyboard is held together by Phillips screws and plastic tabs that are easy to pry open.  The top of the keyboard assembly is a metal plate that showed corrosion from whatever moisture got into the keyboard, just like a Model F.  

I am using this keyboard to type this article.  Since I acquired it recently, it is the only serious experience I have had with it so far.  There is still a sound when the keys are pressed, but it does not have the same harshness of a buckling spring.  The concave of the Ctrl key has gotten some taking used to.  I do not find that I miss the Windows keys since owning a Unicomp 104 some years ago.  The Menu key has always been almost useless.  Even so, after about two days of typing on the keyboard, I find that it is a very good keyboard for the time.  I make more mistakes than with a Model M, but less than with a nasty cheap rubber dome keyboard.  

Tuesday, February 24, 2015

Digital OPL2 and OPL3 Recording

The Yamaha YM-3812 OPL2 chip, used on the Ad Lib Music Feature Card and the early Sound Blasters and their clones, is fairly unique among computer and video game music chips because the output of the chip is still digital.  That output is intended to be fed into a YM-3014 DAC, then sent to the pre-amplifier (for line output to powered speakers) and amplifier (for amplified output to passive speakers and headphones).  This makes it possible to capture digital audio from the card.  Its successors, the YMF-262 OPL3 and its Yamaha descendants (YMF-278 OPL4, YMF-289B OPL3-L, YMF-7xx DS-1, CT-1747) also output digital data which is fed through a Yamaha DAC.  There have been several devices which can output some form of the digitized sound generated by an OPL2 or OPL3 chip.

Adlib Digi-Snap

The original PC compatible implementation of the OPL2 chip, the Ad Lib MSC, was not designed to provide the user with digital output.  However, the OPL2 and the DAC were discrete components, so by removing the DAC the data from the OPL2 could be captured.  This is what the Digi-Snap device does.  It requires the DAC, an 8-pin chip, to be removed and a small ribbon cable soldered or socketed in its place.  The other end of that ribbon cable connects to a parallel port in a second computer.  The digital data from the OPL2 chip can be read off the parallel port using a special program.  You can piggyback the DAC chip on top of the cable going out of the computer to retain the ability to hear the sound you are trying to record.

The YM-3812 OPL2 chip outputs a 16-bit serial monaural digital signal at a sample rate of 49,716Hz.  This odd sample rate is based on the input clock, 3,579,545Hz (a.k.a. the NTSC color burst frequency).  Essentially this signal is divided by 72 to get the sample rate.

The Digi-Snap requires an Enhanced Parallel Port (EPP) set to I/O 278 and IRQ5, MS-DOS in the recording PC.  The software requires 32MB of RAM (which should indicate the speed of the PC you should be using, a Pentium) and will record nine minutes of sound before overwriting the oldest data.  The resulting data is in a raw, signed 16-bit data format.  You will need to tell any playback software like Audacity the bit depth (16-bit signed), sampling rate (49,716) and number of channels (one/mono) to be used.  Audacity can easily convert RAW files to WAV files without any loss in quality, since both are uncompressed formats.

While I cannot recall ever seeing a true Ad Lib card with a socketed DAC, many Sound Blaster 1.0, 1.5, 2.0 and Pro 1.0s have socketed OPL2 and DAC chips.  Whatever differences there may be in their analog outputs, for the Digi-Snap's purpose, they will sound exactly the same (unless a game detects a Sound Blaster and uses its digitized audio output capabilities).

The sole limitation to the Digi-Snap is that it only works on OPL2 chips.  In theory it could be adapted to the YMF-262 OPL3 chip and its DAC, the YAC-512.  However, the YAC-512 is surface mounted instead of a through-hole chip like the YM-3014.  This makes it much more difficult to solder wires to it.  Also, the YMF-262 in its OPL3 mode acts like two OPL2 chips, so the amount of data that would be stored would be cut in half.  Finally, there are enough differences between the two DAC chips that the design may have to be changed.

There is no reason why the Digi-Snap could not be used with a Sound Blaster Pro 1.0 or a Pro Audio Spectrum.  Both have two OPL2 chips and two DACs and function completely independently in stereo mode.  You would need a second Digi-Snap board and a third PC to use them.  Essentially, each PC would record one of the OPL2 chip's outputs and you could recombine them in your audio editing program.  Synchronization may be an issue, however.

The instructions for building the Digi-Snap and the software for it can be found here.

Sound Blaster AWE32

The AWE32 was the first device that provided official support for obtaining digital output from an OPL chip.  The early AWE32s have a CT-1747 bus interface chip.  This chip contains a YMF-262 core.  An YMF-262 or CT-1747 OPL3 has a 14,318,180Hz master clock and divides this by 288 to obtain the same sample rate, 49,716Hz, as the OPL2.

The Sound Blaster AWE32 and Sound Blaster 32 cards which have a YMF-262, YMF-289 or a CT-1978 do not support OPL through their SPDIF connectors.  Instead they have discrete DAC chips that only go to the analog outputs.

CT-1978 is Creative Lab's clone/improvement that uses Creative Quadrature Modulation Synthesis (CQM) instead of Yamaha Frequency Modulation (FM) Synthesis of the OPL line to approximate the OPL2 and OPL3.  CQM usually is pretty close to the original, but common opinion is that it can sound harsher compared to FM synthesis.  If a card is marked as an AWE32 or SB32 and either has a CT-1978 or does not have a CT-1747 or YMF chip, then it will have CQM.  CQM was integrated into larger chips on Creative's later cards.

Unlike the Sound Blaster 16s with the CT-1747 bus interface chip, the AWE32s, including the "value" cards without SIMM sockets, have a 2-pin Sony/Phillips Digital Interface Feature (SPDIF) header.  SPDIF signals come in three main varieties.  First is the signal that the AWE32 and CD-ROM drives with a 2-pin digital out header and Sound Blaster Live! cards with a digital output mini-jack have, a +5v TTL signal.  Second is an optical signal, which converts a +5v TTL signal into digitized optical signal through the use of a TOSLINK transmitter.  The TOSLINK transmitters are those black, boxy SPDIF ports.  The signal is turned back into a +5v TTL signal by a TOSLINK receiver.  Third are coaxial SPDIF connectors, they use RCA connectors but use a 1v Peak to Peak signal.

There are two ways to make the SPDIF connector on an AWE32 useful.  First, you can connect the 2-pin header from an AWE32 to a 2-pin header on a sound card with a CD/SPDIF digital in.  Most Sound Blaster Live! and Audigy cards have this header on their boards or have it on their feature connectors.  The second is to use an I/O bracket with an optical connector on it.  You may need to fiddle with the wiring a bit, just remember that the O pin on the AWE32 is the digital output signal and the I pin is the ground.

In the YMF-289B OPL3-L and YMF-278 OPL4, these chips are fed by a 33,868,800Hz clock.  In this case, instead of a single divider like the OPL2 and OPL3, two different dividers are used.  One divider, for the waveform/phase/envelope/timer, uses a 684 divider to get a very close approximation of the 49.716Hz signal.  This ensures that the same data can be used for an OPL3 or OPL3-L chip and the user can expect it to sound the same.  Any differences in frequencies between the two chips would produce negligible error. The output sample rate uses a 768 divider to obtain a 44,100Hz output rate.  In a sense, this may lead to a coarser output, but human ears cannot tell the difference between a sample played back at 44,1000Hz and 49,716Hz.  The benefit to Yamaha and the companies that produced sound cards meant that one less clock crystal was needed.

Sound Blaster AWE64 Gold

The AWE64 Gold uses the same 2-pin header as an AWE32 for its SPDIF output, but this connector will connect to a standard coaxial I/O bracket.  It uses 1v Peak to Peak signaling, making it slightly more convenient than the AWE32.  However, the AWE64 Gold also provides the digitized audio from the Sound Blaster, but this is limited to Windows and may only work when the Windows drivers are invoked, something no DOS program would do.

Non-Gold AWE64s often have solder pads for the header, but they would only provide a +5v TTL signal and would not include the digitized Sound Blaster audio.  All AWE64s use CQM.

Yamaha YMF-7x4 Cards

Yamaha supplied low cost YMF-71x chips for OEMs to use for cheap ISA sound cards.  These chips included everything an ISA sound card typically needed, including a true OPL3 core, Sound Blaster Pro 2.0 and Windows Sound System compatibility, a gameport and and a UART compatible MPU-401 interface. Later, the Yamaha WF-192 Waveforce was among the first PCI sound cards, and it used the Yamaha YMF-724 chip.  This chip replaced WSS compatibility with a cut-down XG MIDI synthesizer core.  The The YMF-744 was a similar PCI chip that supported 4-channel analog audio output for surround sound and DirectSound 3D.   As these cards are based off a YMF-289 core and use the same 33,868,800Hz clock and they would output to the same sample rate.

Some YMF-7x4 cards have a coaxial or optical digital output.  The digital output can be used for anything generated by the chip, including OPL2 and OPL3 music.  It can also be used for Dolby Digital AC-3 passthrough.  The digital SPDIF output has a fixed sample rate of 48,000Hz and the only clock crystal on these cards is 24,576,000Hz.  However, it appears from the YMF-724 datasheet that the OPL3 core is still using the 44,100Hz sampling frequency because there is a digital phase locked loop in the chip that converts the 24,576,000Hz master clock to 33,868,800Hz.  This would square with the claim that the OPL3 core in these chips is register compatible with the YMF-289B.  While it is beyond question that the OPL sample rate has been converted from 44,100 to 48,000 when output via the SPDIF connector, it is unknown whether the same is true for the analog output but it probably is when mixed with samples from other sources.

Samples

All other consumer PCI sound cards of the late 1990s, most of them adhering to the AC'97 specifications, also sample all input at 48,000Hz. Unfortunately, the Sound Blaster Live! and Audigy cards have a poor reputation when it comes to their resampling.  But is it deserved?  I have an Sound Blaster AWE32 CT2760 and a Sound Blaster Live! CT4760.  On one PC, I played Wolfenstein 3D and DOOM with the AWE32.  I ran a 2-pin cable from the AWE32's SPDIF out to the CD Digital Input on the Sound Blaster Live!, which was installed in a second PC.  The second PC recorded the digital input through an old version of Audacity (1.2.6) running on Windows 98SE.  Here are the results :

DOOM Episode 1, Mission 1 :



Wolfenstein 3D Episode 1, Mission 1 :



Conclusion

There is no such thing as a perfect digital recording from an OPL2 or OPL3 chip.  The 49,716Hz frequency is odd and except for the Digi-Snap device, is not something you are going to record digitally.  Even so, nothing but an OPL chip is likely to output at that frequency.  The typical ideal will be a 44,100 frequency, but most recording devices will resample this to 48,000Hz.  (DOSBox supports the 49,716 frequency to improve the OPL emulation, but your system will resample it).  Ultimately, all audio is analog, and the methods discussed in my previous post,  about capturing the data writes to the OPL chips should, if nothing else, make your file sizes smaller.

Sunday, February 22, 2015

Windows 9x and CD Images

Virtually all Windows 9x games come on CDs and expect to be installed from CDs and most will only run with one of the game's CD in the drive.  Several Windows 9x games come on multiple CDs, Baldur's Gate  and its expansion pack take 6 CDs, Myst III requires 4, Tex Murphy : Overseer uses 5, Sanitarium comes on 3 and there are too many 2 CD games to count.  Even an early DVD conversion like Wing Commander IV needs 2 DVDs.

Optical drives are noisy, require physical effort to change CDs and require you to keep a stack of breakable, scratchable CDs near your computer.  Because they have moving parts, drive lifespans are limited.  Disk images have none of these disadvantages.  They can be loaded in with virtual CD drive software like Daemon Tools and run invisibly to the program.

However, disk images are fairly large and a library of CD images can easily overwhelm the limited, reliable disk space of a Windows 98SE system.  Windows 9x is generally not reliable when dealing with hard disks greater than 128GB in size.  Windows 9x in general was designed in the days of parallel IDE ports and 28-LBA (at best).  Support for more than 128GB requires third party partitioning tools, and drivers to implement 48-bit LBA and probably SATA.  Also, if you are running a motherboard based on the popular Intel i440BX chipset or its precedessors and close relatives, you will need a BIOS extension ROM to add 48-bit LBA support.  Even with all this, it is not advisable to install Windows 9x on a drive greater than 128GB in size.

One way to deal with the disk image problem is to host the images remotely.  In the days of Windows XP, this was easy enough to do via Network Neighborhood.  You should access a Windows XP computer from a Windows 9x computer or vice versa.  Unfortunately, by Windows 7, the communication via this method was strictly one way : you could send and receive data from the Windows 7 or 8 computer to the Windows 9x computer, but Windows 9x would be unable to access the data on a Windows 7 or 8/8.1 computer.  I assume Windows Vista acts like 7 and 8/8.1 in the regard.  This effectively closes off the vast amount of storage available to the Windows 9x system.

All is not lost.  What you cannot access via Network Neighborhood you can access by Mapping a Network Drive in Windows 9x.  In Windows' 9x Windows Explorer, you will find the option.  In order to Map the Network Drive, you will need to configure the following :

1.  First, make sure both your computers are connected to the network and are on the same Workgroup.  Typically the default Workgroup's name is Workgroup.

2.  Second, you need to know the name of the Windows 7/8 computer or its static IP address.

3.  You will need to share a folder containing your CD images on your Windows 7/8 computer.  You should add Everyone to the group or user names that will have permission to view the shared folder.  You also should limit Everyone's permissions to List folder contents and Read.  There is no reason for Full control,  Modify or Write access for a folder containing only CD Images.

4.  Let's say the name of your shared folder is CD Images and the System Name is WINDOWS8PC.  In the Path box under Windows 9x's Map Network Drive, you would enter \\WINDOWS8PC\CD Images.  Set a drive letter that will not conflict with your physical and virtual drives and that should be all you need to now access your CD images without having to copy them to your Windows 9x hard drive.

As far as virtual drive tools go, I have always preferred Daemon Tools.  The last version of Daemon Tools with Windows 9x support was 3.4.7.  It is easy enough to find on oldapps.com.  This version of Daemon Tools is sufficiently advanced to emulate most CD protections like Safedisc, SecuROM, Laserlock, and RPMS.  It can mount four virtual CD drives.  Unfortunately, it does not allow you to create a swaplist which you can switch disc images with the press of a key combination.  Obviously, if you need to run a DOS game in real mode DOS, virtual drive tools will not work.

One limitation of using CD disc images instead of the physical CDs is that Redbook CD audio support may be hit or miss.  Daemon Tools is a bit tricky to work with when it comes to CD audio.  The easiest way to handle it is to set the emulated drive to D: and any physical drives to something after D:.