Sunday, June 26, 2011

Evolutionary Issues of Sierra's SCI Games

When Sierra first released its adventure games using its Sierra Creative Interpreter its hardware support was limited at first.

SCI0 Games:
King's Quest IV: The Perils of Rosella
Leisure Suit Larry Goes Looking for Love (in Several Wrong Places)
Police Quest II: The Vengeance
Space Quest III: The Pirates of Pestulon
Hoyle's Official Book of Games: Volume 1
Hero's Quest: So You Want to Be a Hero
Leisure Suit Larry 3: Passionate Patti in Pursuit of the Pulsating Pectorals
The Colonel's Bequest
Codename: Iceman
Conquests of Camelot: The Search for the Grail
Hoyle's Official Book of Games: Volume 2
Mixed-Up Mother Goose
King's Quest I: Quest for the Crown
Jones in the Fast Lane


In King's Quest IV, Police Quest II and Leisure Suit Larry 2, the first games released using this system, the hardware support was limited.  SCI0 games all use a 320x200 resolution with 16 colors.

The text parsers used in these games generally responded to simple commands such as "open door" "look building" and "talk man".  Sometimes the parsers would expect a more complex command.  One innovation over AGI was that typing paused the action.  The text box did not take up the bottom portion of the screen, leaving more room for graphics.  Drop down menus were standard for these games.

Graphics supported were CGA, EGA/VGA, IBM PS/2 Models 25 & 30 and Tandy 1000.  PCjr. Graphics was not yet supported, nor was the Hercules Graphics Card.

CGA - CGA was supported for a surprisingly long time, all SCI0 and some 16-color SCI1 games have CGA drivers.  CGA was not the ideal choice, and Sierra always used a recoloring algorithm to downsample the native 16-color graphics into 4 or 2 color graphics.  The first 4-color drivers used the Red/Green/Brown palette, but later drivers used the unofficial Cyan/Red/White palette.  2-color drivers frequently used gray as the foreground color, but blue is also available as a choice.  Composite color was never intentionally supported in SCI.

EGA/VGA - Since the VGA offered almost 100% compatibility with the EGA, this is usually the option people chose.  Sierra did not take advantage of the VGA's palette abilities, nor did it use EGA features that would break compatibility with VGA cards.

IBM PS2 Models 25 & 30 - This utilizes the MCGA in these computers to show proper 16-color graphics.  Since MCGA did not have a 320x200x16 mode, it uses the 320x200x256 mode without any extra palette features.  Since this mode is compatible with VGA adapters, there is no harm in selecting this on a VGA system. It does not check the BIOS for the specific model of computer.

Tandy 1000 - By SCI, Sierra had no longer provided any special reason to use a Tandy 1000, except as shown below.  This mode does not require more RAM than other graphics modes.

Sound Support was initially limited to the IBM PC or Compatible Speaker, PCjr./Tandy Programmable Sound Generator, Ad Lib Music Synthesizer Card, Roland MT-32 Sound Module and IBM Music Feature Card.

Ad Lib - I am not sure whether Sierra was the first PC game developer to support the card, but its support really helped support sales of PC sound cards.  Sierra sold it in its Catalogs.

Roland MT-32 - Unlike the previous device, I am sure that Sierra was the first PC game developer to support this device.  It was rather expensive when first supported and required both the module and a Roland MPU-401 ISA interface card.  Although possessed by a minority of game players, this device is what received the best support.

IBM Music Feature Card - I am sure that Sierra was the only PC game developer to support this ISA sound card.  A non-Roland MPU-401 compatible midi interface coupled with the equivalent of a Yamaha FB-01 sound module onboard, Sierra's support for this card was never high its priority list.

Sierra's SCI games supported IBM or Tandy keyboards, a joystick and a mouse.  Before the mouse-driven icon interface, joystick support was important.  Mouse support in SCI0 games merely offered another way to control your avatar and was generally not particularly useful.  Still, mouse support was not ubiquitous in those days and a mouse driver had to be loaded in DOS beforehand.  Sierra was forward thinking enough to allow Tandy TL/SL/RL users to use IBM keyboards, because they did not use the 90-key Keyboard of the older Tandy 1000s.

Now for individual observations for certain games :

King's Quest IV - An absolutely huge PC game when it was released in September, 1988.  Originally came on nine 360K disks, far more than any other PC game of the time.  This game does not use custom patches for the MT-32.  The early releases of this game used slightly different sound drivers than later games.  As such, sound drivers for later games cannot be used with this game.

Leisure Suit Larry 2 - Like King's Quest IV, the early releases of this game used slightly different sound drivers than later games.  As such, sound drivers for later games cannot be used with this game.  Also, the early releases had an Ad Lib driver which played the music at a noticeably higher pitch than later versions.  This game is the first to use custom patches, and all other SCI0-SCI1 games, except for the next one, used custom patches.

Police Quest II - This game does not use custom patches for the MT-32.  First game with Hercules Graphics Card support and official IBM PCjr. Graphics support.  Unlike all other graphics modes, PCjr. requires 640KB, which was not officially supported on the PCjr.

Space Quest III - First game to support digitized speech and sound effects.  At the time, the only hardware which was supported on was the Tandy TL/SL/RL PSSJ sound chip.  Also added support for the Casiotone MT-540 and CT-460 sound synthesizers.  Later the CSM-1 sound module was officially supported, but can still use these drivers.  This still required a Roland MPU-401 interface.

Eventually games supported the compatible Roland MT-100, CM-32L, CM-64 modules.  However, unless the driver claims CM-64 support, there will be unwanted sound effects being played on the CM-32P portion of that device because the earlier driver is sending Ad Lib data on channels 11-16.  If you have a CM-64 or CM-500, you can copy a driver from a later game to the earlier game, except if you are playing the early versions of KQ4 or LSL2.

Creative Labs Creative Music System/Game Blaster Card began to be supported.  In the Game Blaster box drivers were available for all games, including KQ4 and LSL2.  You can use a later driver with an earlier game except for the early versions of KQ4 or LSL2.  The Game Blaster, like the Roland devices, supports stereo sound.  Too bad the music sounds pretty weak.  This will work on the Sound Blaster 1.0 or an upgraded Sound Blaster 1.5 or 2.0.

Sierra also officially began supporting the Yamaha FB-01 sound module, attached to a Roland MPU-401 interface card.  This driver will work for earlier games that support the IBM Music Feature Card except the early versions of KQ4 and LSL2.  Eventually, Sierra stopped shipping IBM Music Feature/Yamaha FB-01 drivers with their games, and support could only be found by downloading custom patches on Sierra's BBS.  Some patches may have been lost.

While all SCI0 games have support for the Game Blaster one way or another, they may not have support for the Casio modules, so copying over the driver will not necessarily work.

Hero's Quest - Notable for two reasons.  First, as the name sounded like Milton Bradley's Hero Quest, Sierra changed the name of the series to Quest for Glory in later releases of this game.  Second, this game allowed the use of a mouse click to function as a look [object] command for what was clicked on.  Hotkeys were available for "ask about", which was frequently used.

In SCI0 releases, Sierra almost always included both 5.25" and 3.5" disks in the box.  Later budget releases would nix one or the other, and when Sierra released SCI1 games, it ended this policy.

Sierra was one of the first companies that had a TUI install program.  To install an AGI game, one had to type "installh c:".  To install an SCI game, one had to type "install" and follow the menus and insert the disks.

King's Quest 1 EGA/VGA - Introduced support for the Sound Blaster card, giving a second option to hear digitized sound effects.  This driver could be used for Space Quest III for non-Tandy machine owners.  This game had some real differences from the original AGI version.

Mixed Up Mother Goose - Obviously one of Roberta Williams' favorite games, Sierra released this game quite often.  There was an AGI version, a 16-color SCI0 version, a 256-color SCI1 version, a CD-ROM version of the 256-color version and an SVGA version that had a Windows executable.

Hoyle's Official Book of Games - Showing that the SCI engine was more versatile than text parser adventure games, these were collections of card games (Volumes I, II and Hoyle Classic Card Games).  SCI would be used for puzzle games (Dr. Brain series) and board games (Jones in the Fast Lane, Hoyle's Book of Games Volume III).

SCI1 Games:
Quest for Glory II: Trial by Fire
Hoyle's Official Book of Games: Volume 3
King's Quest V: Absence Makes the Heart Go Yonder!
Leisure Suit Larry in the Land of the Lounge Lizards
Space Quest IV: Roger Wilco and the Time Rippers
Mixed-Up Mother Goose
Leisure Suit Larry 5: Passionate Patti Does a Little Undercover Work
EcoQuest: The Search for Cetus
Jones in the Fast Lane (CD-ROM version)
Mixed-up Fairy Tales
Police Quest III: The Kindred
Space Quest I: The Sarien Encounter
Conquests of the Longbow: The Legend of Robin Hood
Castle of Dr. Brain

When Sierra transitioned to the SCI1 system, it began to narrow its horizons.  Separate 16-color and 256-color releases were released, with the former generally coming on double density media and the latter on high density media.  The 16-color versions used graphics converted from the 256-color originals.

Quest for Glory II - Although this looks and functions like an SCI0 game, it uses the SCI1 engine.  Its interpreter is compatible with other 16-color SCI1 games, even though they use point-n-click interfaces instead of the mouse interface.

All games after Quest for Glory II used a mouse point-and-click interface, and the mouse was the ideal method of control.  The second mouse button could be used to cycle through icons.

Space Quest I, Quest for Glory I, Police Quest I & Leisure Suit Larry 1 - Although Sierra apparently received negative comments from many fans about disrespecting their classic games by selling remakes, Sierra continued undaunted for each of the first games in their series.  Quest for Glory was the last game in this series, and supported General Midi as the optimal music device instead of the MT-32.

Graphics wise, the SCI0 games supported 256-color VGA and gray scale VGA.  The grayscale driver was better for people who played these games on gray scale VGA monitors, which could display only 64 shades of gray.  Tandy graphics were still supported on the 16-color versions, but those games would play very slowly in most Tandy 1000 machines.

Sound wise, the SCI0 games had full support for the Sound Blaster and soon supported Mediavision's Pro Audio Spectrum.  Many of the SCI0 games would support stereo OPL2 output on the Pro Audio Spectrum, which was unique to that card.  People who owned a Sound Blaster Pro or Pro Audio Spectrum 16 were out of luck.  The Adlib card had one OPL2 chip, which supported 9 FM synthesis instrument channels or 6 instrument channels with 5 percussion channels.  The latter is what Sierra used.  While the two OPL2 chips of the Pro Audio Spectrum offered double the number of channels, Sierra games did not support extra channels, it just sent some existing OPL2 channels to the left chip and some to the right chip.  Games also supported the IBM PS/1 Audio/Joystick Card, which was an upgrade that plugged only into the IBM 286-based PS/1 Models 2011 and 2121.

Joysticks were still supported, but trying to play any of these games without a mouse was foolish.  Tandy keyboards were also still supported.  This series also introduced Expanded, Extended and XMS memory support which could speed up game play.  (Extended Memory and XMS Memory are very similar, and usually XMS Memory would be used.  Extended Memory should be available if an eXtended Memory Manager (HIMEM.SYS) was not loaded in the CONFIG.SYS).

Eventually, Sierra started supplying drivers that would allow the user to use their Sound Blaster or Pro Audio Spectrum for digital sound effects and the MT-32 for music, giving the user the best of both worlds.  The Disney Sound Source began being supported for digitized sound, and Music and Speech would be separated in the install program.

Leisure Suit Larry 5 - The only Sierra game with support for the extra sound effects of the LAPC-1/CM-32L.  Many other Sierra games will occasionally produce the incorrect sound if not played back on a rev 0 MT-32 (no headphone jack).

This was the first time that CD-ROM technology was used.  Jones and King's Quest V use it, and also support natively being run in Windows 3.x.

Kings Quest V - CD version loses its MT-32 soundtrack in the Windows executable and uses an inferior General Midi composition.  Windows 3.x was not particularly well-suited to the MT-32.

SCI1.1 Games:
EcoQuest: The Search for Cetus (disk version 1.1, CD-ROM version)
EcoQuest II: Lost Secret of the Rainforest
Freddy Pharkas: Frontier Pharmacist
The Island of Dr. Brain
King's Quest VI: Heir Today, Gone Tomorrow
Laura Bow: The Dagger of Amon Ra
Leisure Suit Larry 6: Shape Up or Slip Out!
Mixed-Up Mother Goose
Pepper's Adventures in Time
Police Quest: In Pursuit of the Death Angel
Quest for Glory I: So You Want to Be a Hero
Quest for Glory III: Wages of War
Space Quest IV: Roger Wilco and the Time Rippers (CD-ROM version)
Space Quest V: The Next Mutation

SCI1.1 introduced more subtle changes.  For these games, General Midi began to supplant the venerable MT-32.  Police Quest I and Lara Bow 2 were the last games with MT-32 optimized sound tracks, other games using this interpreter supply a generic set of patches that remap the MT-32 to the General Midi patch standard.  Except as indicated in the last sentence, the Roland SC-55 and compatibles were the devices upon which the music sounded best.  Tandy Keyboard support is eliminated.

More games would be released on CD-ROM, including King's Quest VI, Lara Bow 2, Freddy Pharkas and Leisure Suit Larry 6.  In almost every case, these releases occurred subsequent to the floppy releases.  Older SCI1 games like Space Quest IV and Mixed Up Mother Goose would have CD-ROM releases with SCI1.1.

King's Quest VI - Displayed in a 640x480 graphics resolution in the CD-ROM version using the Windows executable.  However, this is only noticeable in the character dialog portraits.  The 320x200 graphics for the backgrounds and sprites are kept, stretched in a non-optimal manner.

Leisure Suit Larry 6 had a Low Resolution only CD-ROM release using SCI1.1.  A high resolution release using SCI2 would follow.

Graphics wise, separate 16-color versions were no longer available, so a dithering EGA driver was provided instead.  New speech support included the Mediavision Thunderboard, the Pro Audio Spectrum 16 and the Windows Sound System.  The Sound Blaster Pro and 16 were eventually supported for higher quality digitized sound, but there was no separate option in the install program.  The game would detect the card using the SET BLASTER variable in the autoexec.bat.

At this stage, Sierra was heavily promoting CD-ROM versions of its titles, but they would be released after the disk versions.  The key addition of the CD-ROM was the inclusion of voice acting in games which had previously been text-only for lack of space.  However, like early motion picture talkies, Sierra's initial efforts were not always impressive.  In KQ5, SQ4, LB2, EQ1, Jones, and Mother Goose, Sierra's staffers provided the voices and the results are often cringe-inducing.  In KQ6 and LSL6, they used professional voice actors.

I have occasionally come across a game with Gravis Ultrasound driver for music and speech.  I do not believe that the work involved in getting the GUS to work is worth it.

16-bit digitized sound is supported using the Media Vision Pro Audio Spectrum 16 or Windows Sound System drivers in DOS, but for a Sound Blaster, even a 16, the sound would be 8-bit only unless you used the AUDBLAST.DRV driver from the Freddy Pharkas or Leisure Suit Larry 6 CD.

SCI2 Games:
Gabriel Knight: Sins of the Fathers
The Beast Within: A Gabriel Knight Mystery
King's Quest VII: The Princeless Bride
Leisure Suit Larry 6: Shape Up or Slip Out! (hi-res CD-ROM version)
Mixed-Up Mother Goose Deluxe
Phantasmagoria
Police Quest: Open Season
Quest for Glory IV: Shadows of Darkness
Shivers
Space Quest 6: The Spinal Frontier
Torin's Passage

SCI2 drastically reduces the available options.  Gone is support for EGA or joysticks.  These games require Extended Memory.  They use a DPMI extender to access it.  All were released on CD-ROM, and only Gabriel Knight, Police Quest IV and Quest for Glory IV had floppy releases.  At this point, there was little reason to use the floppies.

Police Quest IV - Supports 640x480 VESA graphics with the floppy install, all the other SCI2 games support high resolution graphics with their CD-ROM version only.  The floppy version allows the player to choose VGA or VESA, the CD-ROM auto-detects whether the video card supports VESA and selects that mode if it does.  Leisure Suit Larry 6 works in the same way.

Gabriel Knight 1 - The first Sierra CD game with actual "name & face" voice actors.  Previous Sierra efforts had the production team voice the characters, (KQ5, SQ4, LB2) or had professional voice actors (KQ6, QG4), but this was the first game where actors known (Tim Curry, Mark Hamill, Michael Dorn, Efrem Zimbalist, Jr.) or would become known (Leah Remini, Rocky Carroll) by face and name to the general public were used.  Never again would a Sierra SCI game feature so prominent a cast.

Quest for Glory IV is the only game using the SCI2 interpreter that does not support high-resolution graphics.

Gabriel Knight 2 and Phantasmagoria were the only SCI2 games to use FMV, coming on a whopping 6 and 7 CD-ROMs, respectively.  The former and Torin's Passage has digitized music, no more Adlib or MIDI support.

All CD-ROM only games support 640x480x256 graphics only.  This meant that they required SVGA/VESA capabilities, since straight VGA cannot support this.

King's Quest VII was originally only released for Windows 3.x.  It also could take the greatest hard drive space of any DOS SCI game, 100MB, if installed with the full options.  Version 2.0 added DOS and Windows 95 compatibility.  Mixed Up Mother Goose Deluxe and Shivers were the first SCI games never released for DOS.

Support for the Sound Blaster AWE32 for music was added.

Two observations about the gameplay of many of SCI2-3 games is that they no longer had that "death on every screen" aspect of earlier games.  While you could die in most of these games, there was an option to replay the sequence and hopefully avoid death.  This spared the player from the failure to save the game every minute.  In addition to lethal nature of earlier games, dead-end situations abounded.  These tended to be reduced in these titles.

The second observation is the elimination of icons.  Games began using just a cursor, which would function as a look, use, walk, talk and get command depending on the context.  Sometimes a command menu would be displayed.  The cursor would often highlight on an object on the screen that could be interacted with.

SCI3 Games:
Leisure Suit Larry: Love for Sail!
Lighthouse: The Dark Being
Phantasmagoria II: A Puzzle of Flesh
RAMA

The final version of SCI, SCI3, required a VESA compatible graphics card and were all released on CD and do not support Midi.

Phantasmagoria only supported Windows out of the box, Sierra released a patch so it could be used in DOS.  DOS only supports 256 colors, Windows supports 16-bit (65535) color.  

I originally included Shivers 2 on the list, but it apparently is not a true SCI game and it has no DOS support.

Lists of all known SCI games are available here : http://wiki.scummvm.org/index.php/Sierra_Game_Versions#SCI_Games

Monday, May 2, 2011

The Scourge of Preservation : Disk-Based Copy-Protection

In collecting and playing floppy disk IBM PC compatible games from the DOS and pre-DOS era, there are two obstacles, copy-protection and media decay.  I would like to concentrate on the first in this entry.  Let me start by describing the physical workings of a floppy disk, then an overview of copy protection methods, then finally solutions for them, both old and new.

1.  Structure of a Regular Floppy Disk

A floppy disk, whether on a 5.25" or a 3.5" disk, is divided up into sides, tracks and sectors.  Except for the earliest programs, all regular IBM floppy disks use two sides.  The earliest drives that came with the IBM PC in 1981 were also single sided, but these were replaced by dual sided drives within a year.  All  compatibles released after 1982, even the PCjr., come with double sided drives.  These are the standard formats which DOS games used :

Floppy     # of       # of       # of      Total           Media
Type       Sides    Tracks  Sectors Capacity       Name
5.25"          1          40          8      160KB     Double Density
5.25"          1          40          9      180KB     Double Density
5.25"          2          40          8      320KB     Double Density
5.25"          2          40          9      360KB     Double Density
3.5"            2          80          9      720KB     Double Density
5.25"          2          80        15       1.2MB     High Density
3.5"            2          80        18     1.44MB     High Density

Each sector within a track stores 512 bytes of data.  Thus, for example, the capacity of a 360KB = 2 x 40 x 9 x 512.  An .img/.ima file is a raw dump of each sector in order from Track 0/Sector 0 to  Track 80/Sector 18 (assuming a 1.44MB disk).  The first track or so contains the DOS information, including the directory structure, file and attributes list, disk label (if one).  If the disk does not contain disk-based protection, an ordinary dump will be all that is needed to preserve the disk, assuming the contents are undamaged.  Regular DOS game disks are not bootable, DOS will need to be loaded from a hard disk drive or floppy disk before the game will work.

IMG/IMA files are raw dumps of a disk and should have file sizes equal to the total capacity of the disk, regardless of how much space on the disk is actually used.  A raw dump will preserve the disk label (used by some installation programs) and file date and time stamps.  While there is no difference between the two file extensions, DOSBox will only boot images with the IMG extension.  Thus there is an unofficial distinction whereby floppy images which can boot on a PC use the img extension and ordinary DOS disks the IMA extension.  An IMZ file has been compressed and should be extracted before use.

The idea behind copy protection is to prevent a game from working without the original floppy.  This means that the original floppy is non-standard in some way.  Before we discuss the ways in which a floppy can be non-standard, first lets categorize our IBM PC Games.

2.  Types of IBM PC Compatible Games

A.  PC Booter Games (Non-DOS Booters)

Officially, hard disks were not available for the IBM PC platform until the arrival of the IBM PC XT in 1983.  Even then they were extremely expensive, well out of the budget of your average home user.  Hard drives were not commonplace on consumer PCs until the late 1980s.  DOS was often used for two purposes, for running BASIC and saving and cataloging BASIC programs and for formatting disks for programs to save user files.  Most programs released during the early years were self-booting, you inserted the program disk in the drive, turned the computer on, and it would load your program.  When you were done you removed the disk from the drive and turned the machine off or inserted another program disk and did a hard Ctrl-Alt-Del reset.  The BIOS of the IBM PC and Compatibles would check the the disk in the first drive and see whether there was a boot loader on Track 0.  If there was, whether DOS or not, it would allow the program on the disk to control the system.  If not, IBM's PCs would go to the BASIC stored in ROM and clones and compatibles would usually ask the user to insert a bootable disk into the drive.

Games from these early years were frequently bootable and many times used their own custom and faster disk access routines, not using DOS's disk routines.  Since loading DOS first served no purpose, these games were free to structure themselves on a disk as they pleased.  Generally speaking, DOS could not read these disks.  Nor did these disks have to use the standard DOS formats described above, although most did.    Electronic Arts pushed the limits of the 5.25" Double Density drives by having 10 sectors per track, or 200/400K disks.  Bootable games tended to reside on two 5.25" double density or one 3.5" double density disks maximum and usually only supported CGA cards and Tandy/PCjr. graphics.  A few will support MDA, Hercules or EGA and Microsoft Serial Mice and IBM Graphics Printers.  Many arcade ports and clones can be found on PC Booters, but important series like King's Quest and Microsoft Fight Simulator first were released as booters.  Infocom's classic text adventures may have been released as booters.  Some small or early booters used single sided disks.  The first commercial IBM PC game, Microsoft Adventure, is a booter.

B.  DOS Floppy Only Protected Games

Not every game publisher felt the need to write custom disk routines when the ones from DOS worked well enough and were free if the user loaded DOS before starting the game.  Unlike the booter, these disks were generally not bootable unless the user copied the system files from a DOS disk to make the disk bootable.  These disk were readable in DOS and usually only the first disk had any protection.  However, early games were not intended to be installed onto hard drives (which the user or the programmers may not have been able to afford) and no benefit would result since the game would seek the files off the floppy disks.  Even though these disks were readable in DOS, they were still non-standard in some way so that they could not be copied using standard disk copying programs.  Many of these games still had no quit/exit to DOS capabilities,  requiring Ctrl-Alt-Del or a system shutdown to use another program.  Ultima II for the PC is a good example of this type.

C.  DOS Hard Drive Installable Protected Games

Later games realized that reading files off a hard disk, even slow ones, was faster than off floppies.  Moreover, a multiple floppy game could be installed to a hard drive, eliminating disk swapping.  Some games came on three or more 5.25" disks, and not everyone could afford or had room for two floppy drives.  These games would have programs on one of the disks to copy themselves to the hard disk drive or would give the user instructions on how to copy the files using DOS.  Still, the first disk had to be in the drive when the game was being used to access the protection.  Most games have quit commands in them by this time.  Frequently these games supported EGA cards, but some VGA games originally came on protected disks.  Lemmings the its Add-On Oh No! More Lemmings from 1991 was among the last-known of major IBM PC Compatible game with disk-based copy protection.

D.  Document Based Copy Protected Games

Due to the eventual proliferation of hard drives and annoyance with games that could not be backed up if the original got damaged or destroyed and had to be kept in the drive, companies moved away from protected disks.  However, to discourage people from sharing their games with every friend in their neighborhood, the companies used document checks instead.  The disks themselves would be ordinary DOS disks and full or partial hard drive installation would be encouraged.  So, upon startup or some point within a game, the game would ask a question which would require the user to refer to his documentation to answer it.  Sometimes the user would have to enter a word from a particular line of a particular paragraph from a particular page of the manual.  Sometimes he would have to enter a symbolic code from a codebook.  There may have been a codewheel included which the player would have to align as instructed.  Sometimes the player could only see the code with the help of a red filter gel.  Sometimes the game would refer the player to a paragraph in a book containing descriptions and dialog.  The idea was that the codes would be hard to photocopy or transmit through the BBSes of the day.  CDs, which were difficult to copy for several years, put an end of document checks.

3.  Methods of Floppy-Based Copy Protection

I do not pretend to be an expert on this subject, methods of floppy disk copy protection include :

Write Protection - The original disk was either physically write protected or not write protected, and if the user failed to duplicate the physical protection on the copy, the game would detect it and fail to work or trash the disk.

Fat or Thin Tracks - Normal double density disks had tracks of 8 or 9 sectors.  However, some games used 10 sectors per track or fewer than 8 sectors, which the disk controller could read.  Do not expect DOS to write non-standard tracks.

Oversized or Undersized Sectors - Normal sectors are 512 bytes, but valid sector sizes for the disk controller range from 128 bytes to 8,192 bytes, even though a double density track generally cannot store more than 6K of information.  DOS always assumes 512 byte sectors for standard floppy disks.

Extra Tracks - Data can be stored on Track 41 or above on a 5.25" disk or Track 81 or above on a 3.5" disk or 5.25" high density disk.  Something else DOS does not support.

Unformatted Tracks - The game can check for the existence of unformatted Track(s), a Track with no sectors defined, somewhere on the disk. If tracks are unformatted above a certain number, a game may fail if the copy formats those tracks.  DOS formats only all tracks on a disk.

Weak Bits - Some area of the disk could have information written onto it that cannot be reliably read.  A game can refuse to work if several reads to an area with weak bits protection produces the same result.  A standard PC floppy controller will not tell the drive to lessen the strength of the write signal.

CRC Errors - Each sector after the data contains CRC values for error checking for the data in the sector.  If the CRC check fails, an error will be produced.  Some games have deliberate CRC errors which can be read, and if not correct, can cause the game to fail.  A standard PC floppy controller cannot write bad CRCs.

Sync Byte/Gap Byte/Sector ID Manipulation - Before the data in each sector, there are sync bytes, gap bytes and a sector ID to organize and separate the sectors on a Track.  A game could manipulate this area and if the manipulation on the copy is not the same as the original, fail.

Burn Hole - Machines exist that could precisely burn a hole in the disk with a laser (not the sector 0 index hole).  A program could check for the existence of the hole and refuse to work if not encountered.  Typically used only on very expensive software, no games have been known to use it.

These methods can and have been combined.  Like with today's LaserLock, SafeDisc, SecuROM, and StarForce, certain protection methods were marketed under the names ProLok, SuperLock, EverLock, and Cops Copylock II.  An example of a famous protection scheme can be found here :

http://www.sierrahelp.com/GeneralHelp/FloppyDiskBackupProblems.html

4.  Ways to Defeat Disk Based Copy Protection

A.  Software Solutions

Some companies understood that there was a market for programs for users who wanted to protect their expensive software.  The most famous back in the day was Central Point Software, who made a software product called CopyIIPC.  CopyIIPC was designed to copy floppies only, not to preserve them in an image file.  As new protections were released, updated versions of CopyIIPC were released to handle new protections.  CopyIIPC allowed for better copies through better manipulation of the PC disk controller.  Pressure from some software copies eventually persuaded Central Point Software to remove certain functionality in later versions of the software, so a user may need an earlier version to break a particular protection scheme.  If CopyIIPC could not duplicate a protection on a copied disk, the program would have the program to remove or alter the protection so it would work with the copied disk.  Development stopped after v6.00 in 1990.

CopyIIPC also came with the nokey and noguard programs.  Nokey would allow users of DOS Protected Floppies to use their programs without having a keydisk inserted in the floppy disk drive while the program was running.  Noguard allowed otherwise non-hard drive installable programs to be installed onto the hard drive and even in later versions eliminated document checks for some games.  CopyIIPC has no innate capabilities of making images for later backup, so some enterprising programmer wrote a tool called Snatchit to allow backing up and restoring the image to a floppy.  These files use the .cp2 extension but no emulators are known support them.  CopyIIPC + Snatchit are speed sensitive and getting the combo to work in a fast 386 or better may not be possible.

Teledisk is a competitor to CopyIIPC and can handle many types of protections.  It can also archive protected disks into an image format without a Snatchit type program.  It will fail if it encounters an unformatted track, however.  Unlike CopyIIPC, it will run in any speed of PC, and its .td0 disk images are supported in the MESS and PCE emulators.

Other programs include Rawcopy, Diskdupe, Anadisk, Locksmith, Neverlock, CrackAid and The Patcher. Some will copy disks, others only remove protection.  Disk2FDI is a more recent, trialware program that is capable of reading but not writing disks, but requires two floppy drives (trial version) or a special floppy-to-parallel cable (registered version).  Its .fdi images are not widely supported in emulators.

B.  Hardware Solutions

The PC Disk Controller could read more of a disk than write it, so if software failed, then a hardware solution was needed.  Central Point Software released the CopyIIPC Option Board, an ISA card that was connected between the disk drive and the regular disk controller.  This card could read the magnetic flux transitions on the disk and write them too, essentially capable of making bit perfect copies of a disk.  The software, called Transcopy, was updated regularly to handle new protections.

The original Option Board was released in three variations, the long TTL board, the short TTL board, and the VLSI "Transcopy" chip board.  The long TTL board does not have a jumper to select DMA1, which is required for Tandy 1000 computers (and probably would not fit in them anyways).  All otherwise have the same capabilities, but the VLSI board is impossible to fix if the main chip goes bad.  There was an Enhanced Option Board, which was a regular Option Board with circuitry to emulate Burn Hole protection on disks and a switch to turn that functionality on and off.  Finally, there was a Deluxe Option Board that could copy some Macintosh disks and use high density drives to some degree.  No Option Board can copy High Density protected disks, but no games are known to come on disk-protected High Density disks.

Transcopy is an easy to use program, and it can archive images to a file for later recording or multiple copies.  The resulting files use the .img format, but are far larger and quite incompatible with the later .ima/.img format. Transcopy went up to version 5.4, but it seems only the Deluxe Option Board can use versions 5.x and below, while the original Option Board can seemingly only use versions 4.x and lower.  So if a disk image is made with version 5.x, it may not be writable with 4.x software.  Normally, it is best to use the latest version of Transcopy and go down if there is a problem (due to the pressure put on Central Point Software by software publishers), but it may be necessary to stick with version 4.x or below for widest distribution.

The Option Boards are 8-bit ISA cards and work in IBM PCs, XTs, ATs, Tandy 1000s, PS/2s (with ISA) and many compatibles.  Computers in the late 1980s (Tandy 1000 TX, IBM PS/2 Model 30) that supported 3.5" drives frequently provided power to the drives on the drive data cable, so custom cables will have to be made to get these machines working with the Option Board.  An end user can do this if he has the pinouts for the cable at hand.  Tandy machines require floppy cables without a twist in them.

Using Transcopy and the Option Board does not seem particularly speed-dependent.  I have heard users write that they were able to use the hardware and software in a Pentium II or III computer, which were among the last to regularly feature ISA slots.  Pentium IV and socketed Athlon boards with ISA slots tended to have incomplete ISA implementations.  However, there is a disadvantage in that the hardware is ISA based, so a vintage machine of some nature is required to use it.  The resulting .img format is not supported by any emulator I know.  The last Option Boards and the last update to the software was about 1990.

More recently, the Catweasel board was created that can read and write protected disk formats in a PC drive.  The Catweasel originally came in ISA (MK1) and Amiga Zorro III (MK2) but soon was released for PCI (MK3 & MK4 & MK4plus).  It usually has sockets for SID chips to be used with Commodore 64 emulators.  It was first released in 1996 and the last version of the card was put out in 2004.  Last drivers date from early 2007.  Even more recently, the Kyroflux board was released for USB.  Both are capable of imaging and (very recently for Kyroflux) writing to disks.  These products should work with PC protections, but can also image disks from the Commodore PET, VIC-20, 64 & Amiga, the Atari 8-bit and ST computers, the Apple II and Macintosh, the Tandy TRS-80 and Color Computers, MSX.   These boards are still in production, unlike the Option Boards.  Their availability tends to be iffy, so if you see one for sale, you should grab one if you can afford it.  Write support for protected PC disks has yet to be implemented.

Wednesday, June 30, 2010

Vintage Gamer's Guide to Sound Blasters (ISA)

Sound Blaster 1.0/1.5


These are the original models of the Sound Blaster.  The chief difference between the two is that the 1.0 version has two CMS-301 chips soldered onto the board while the 1.5 version has empty sockets for those chips.  The CMS-301 chips are Creative's name (put on stickers) for Phillips SAA-1099 chips.  These chips are the only source for stereo output on these cards, and if you can find two of these chips, you can turn a 1.5 into a 1.0.  Adding the chips provides for a very good degree of compatibility with Creative Music Systems Card and Game Blaster software.  This compatibility is not perfect because some programs and games (Taito) require the presence of a special chip found only on those cards. 

These cards contain a single Yamaha OPL2 (YM3812 + YM3014) chipset.  This chipset is the exact same chipset the Adlib Music Systems Card uses and is also located at the same I/O range (388/389h), which provides for perfect compatibility with any software supporting Adlib.  These chips may be socketed or soldered.

The gameport on these cards can be disabled via removing JP1.  It is IBM PC compatible and uses I/O address 201.

I/O addresses ranges include 210-21F; 220-22F; 230-23F; 240-24F; 250-25F; 260-26F.

Available IRQs are 2, 3, 4, 5, 7.  The only DMA channel this card can use is 1 and it cannot be fully disabled, despite the DMACTRL jumper.

These cards have no on-board mixer, volume control is done by the application and the volume wheel at the back of the card.  The output is amplified for headphones and unpowered speakers.

These cards support line out and mic in, there is no separate line in.  The mic in jack is often rusty with these old cards.

The large socketed chip is the Digital Signal Processor (DSP).  In earlier cards, DSP V1.05 is usually present.  DSP V1.03 is also confirmed to exist.  These DSPs will have a sticker label on them.  Some later cards use a DSP V2.0.  This DSP has an etched silkscreen on the chip.  The DSP handles digitized audio and midi I/O.  As the chip is socketed, it could be upgraded from a V1.xx to a V2.00.  Doing so would allow the card to achieve compliance with MPC-1 standards. 

DSP V1.xx supports single-cycle DMA mode, ADPCM modes from 8-4 bits, 8-3 bits and 8-2 bits.  It supports 8-bit mono output up to 23,000 kHz or 11,000-13,000 kHz using ADPCM.  It supports normal mode midi output.  DSP V2.00 adds auto-initialize DMA mode and UART midi mode.  The Sound Blaster is totally incompatible with the Roland MPU-401 midi interface, which is what early games that supported midi (generally the MT-32), used. 

The gameport also supports midi input/output and can use gameport-to-midi cables. 

This card uses T1 (Type 1) in the SET BLASTER line in your autoexec.bat.  The default SET BLASTER variable is as follows:

SET BLASTER=A220 I7 D1 T1

Sound Blaster Pro 1.0


These cards contain a dual Yamaha OPL2 (2 x YM3812 + 2 x YM3014) chipset.  The chips may be socketed or soldered.  This allows for stereo music output.  Game Blaster compatibility was removed to achieve this.

This card supports a Panasonic CD-ROM interface.  This interface is incompatible with standard IDE/ATAPI CD-ROM drives and requires special drives.  The interface does not use any additional resources beyond the normal I/O address range this card uses.

I/O addresses ranges available are 220-233; 240-253.

Available IRQs are 2, 5, 7, 10.  Available DMAs are 0, 1, 3.  Using DMA 0 is not a good idea because games assumed DMA0 would be used for refreshing system RAM.  However, AT class systems use dedicated refresh circuitry.  Using IRQ 10 is also not a good idea, many games will not recognize IRQs higher than 7. 

These cards support line out, line in and mic in.

This card uses DSP V3.01 and the CT-1345 mixer.  DSP 3.xx adds support for stereo digital output up to 8-bit/22,050 kHz and mono digital output to 8-bit/44,100 kHz.  It adds the high speed stereo and mono DMA modes.  The CT-1345 supports output mixing in 8 volume steps in stereo for Voice, MIDI, CD and 4 volume steps in mono for the microphone.  It has 8 volume steps for the Master Volume.  It can also mix PC Speaker output in mono.  It has a special register switch for digital stereo modes and a 3.2k output low-pass filter.

The volume control wheel is still present.

Has onboard CD-ROM input connector (white plug) and PC Speaker connector (2-pin).

Note that while this card has a 16-bit ISA slot connector, it is an 8-bit card.  The 16-bit portion of the connector only allows the card to use IRQ 10 and DMA 0.  It fits and works just fine in an XT machine.

This card uses T2 (Type 2) in the SET BLASTER line in your autoexec.bat. The default SET BLASTER variable is as follows:

SET BLASTER=A220 I7 D1 T2

Sound Blaster 2.0


See Sound Blaster 1.0/1.5, above for basic capabilities.  Changes include:

Card uses DSP v2.01 or 2.02.  It adds support for mono digital output to 8-bit/44,100 kHz.  It adds the high speed mono DMA mode.

Card has two sockets for CMS-301 chips and a third socket for a specially programmed PAL16L8 chip which is required to interface with the CMS-301 chips.  Without the PAL chip, which was included in the upgrade kit, the card cannot utilize the CMS-301 chips or provide any Game Blaster compatibility.  The PAL has been decoded and GAL chips can be programmed to work in the socket.  Boards have been shown to work with GALs manufactured by National Semiconductor and Lattice, but not with SGS Thompson GALs.  Boards with a CT1336A chip do not work with the upgrade, even the official upgrade from Creative Labs.

Card has line out, line in and mic out and a volume wheel.

I/O addresses ranges include 220-22F; 240-24F.

This card uses T3 (Type 3) in the SET BLASTER line in your autoexec.bat.  The default SET BLASTER variable is as follows:

SET BLASTER=A220 I7 D1 T3

Sound Blaster Pro 2.0


Identical to the Sound Blaster Pro 1.0, except for:
 
These cards contain a Yamaha OPL3 (YMF262 + YM512) chipset. The chips are always surface mounted.  Stereo music output is not programmed in exactly the same way on the OPL3 as on the dual OPL2 of the Pro 1.0.  Most games that support stereo OPL music support both types of Sound Blaster Pro.  DragonSphere and Ultima Underworld are exceptions, the latter only supports the dual OPL2 of the Pro 1.0 and the former supports dual OPL2 much better than OPL3.  DSP V3.02 has been seen on these cards, but V3.01 may be more common.

This card uses T4 (Type 4) in the SET BLASTER line in your autoexec.bat. The default SET BLASTER variable is as follows:

SET BLASTER=A220 I7 D1 T4

These are the first cards that have OEM versions that support a CD-ROM interface other than the standard Panasonic.  The retail version, the CT-1600, has a Panasonic interface.

Sound Blaster MCV/Sound Blaster Pro MCV

CT-5320 & CT-5330

 

These are the Micro Channel versions of the Sound Blaster and Sound Blaster Pro, respectively for the IBM Personal System/2 computer series.  They are full-length 16-bit Micro Channel cards.
 
The Sound Blaster MCV has identical features to the Sound Blaster 1.0/1.5 except they have no CMS-301 chips or sockets for them, no volume knob and cannot select IRQ2. I/O is selected in software. 
 
The Sound Blaster Pro MCV has identical features to the Sound Blaster Pro 2.0 except it has no CD-ROM interface, no volume knob and cannot select IRQ2.  I/O, IRQ and DMA are all selected in software.

These cards may not work properly in high speed Micro Channel systems.  Like all Micro Channel cards they require .ADF files to configure the cards (partially) when inserted into a Micro Channel system.  Compatibility wise they may be a bit more finicky than ISA sound blasters. 
 
The Sound Blaster MCV should use T1 in the SET BLASTER line in your autoexec.bat. The default SET BLASTER variable is as follows:

SET BLASTER=A220 I7 D1 T1
 
The Sound Blaster Pro MCV should use T5 in the SET BLASTER line in your autoexec.bat. The default SET BLASTER variable is as follows:

SET BLASTER=A220 I7 D1 T5
Sound Blaster 16


Early cards contain a Yamaha OPL3 (YMF262 + YM512) chipset.  Later cards may have true OPL3 functionality included in the CT-1747 chip.  Even later cards may use the CT-1978 CQM chip, which approximates OPL FM Synthesis (or improves upon it according to Creative.)  CQM in my opinion has a harsher sound than Yamaha FM Synthesis.

Card has line out, line in and mic out.

Has onboard CD-ROM input connector (white plug and/or black plug) and PC Speaker connector (2-pin).  Later cards may have AUX or MODEM or TAD connectors. 

Many boards have a 26-pin header for a Waveblaster-compatible midi daughtercard. 

Early cards still have a volume wheel; these cards also have jumpers that allows the user to disable the on-board amplifiers, making the wheel useless. 

Boards frequently support the Panasonic, Sony and/or Mitsumi CD-ROM interfaces or an IDE/ATAPI interface.  The Panasonic interface does not take up extra resources, but the Sony, Mitsumi and IDE interfaces require an IRQ and I/O for the IDE.  They may or may not be able to be disabled. 

Many of these cards have an empty socket for a CT-1748 Advanced Signal Processor (ASP) or Creative Signal Processor (CSP).  Some cards have the chip soldered onto the board.  This processor, which was supposed to provide surround sound and more, is not known to be used in games other than TFX.  There are jumpers to enable or disable the chip if the chip is in a socket. 

This card uses DSP (maybe V4.01) V4.04, V4.05, V4.11, V4.12 and V4.13 and the CT-1745 mixer. DSP 4.xx adds support for mono or stereo digital output up to 8-bit/44,100 kHz or 16-bit/44,100 kHz . It scraps the high speed modes of the Pros but allows the other pre-existing single-cycle and auto-init DMA modes to support digitized sound up to 44,100 kHz in 8-bit or 16-bit.  If a game uses single-cycle DMA modes, the listener will experience pops and cracks that would not be present in earlier cards.  DSPs 4.05 and lower are very noisy when it comes to digital audio output.

A UART mode compatible MPU-401 midi interface is added at I/O 330 or 300.  This interface may also be disabled on some cards via jumper.  It will not work with games requiring a 100% compatible Roland MPU-401 interface (namely games requiring normal/intelligent midi mode support).  Such games are typically Roland MT-32/LAPC-I games; General MIDI games will almost invariably work with a UART compatible MPU-401 midi interface.  The UART MPU-401 interface will communicate through the gameport or the wavetable header.  DSPs 4.11-4.13 are subject to the hanging or incorrect notes midi bug, with some cards more affected than others.  The bug tends to rear its head when the DSP is also trying to process digitized sound at the same time as midi. 

I/O addresses ranges include 220-233; 240-253; 260-273; 280-293.  Available IRQs are 2, 5, 7, 10. Available low/8-bit DMAs are 0, 1, 3. Available high/16-bit DMAs are 5, 6, 7. 

In the early cards, there are jumpers to select I/O addresses, IRQs, DMAs, Midi I/O.  Later cards allow software IRQ and DMA selection through the Creative Configuration Manager.  This program must be loaded on bootup to assign resources to these cards.  Even later cards are Plug-n-Play compatible, eliminating jumpers for I/O and many other settings. 

The CT-1745 mixer supports output mixing in 32 volume steps in stereo for Voice, MIDI, CD, Line-In, 32 volume steps in mono Microphone and 4 volume steps in mono for the PC Speaker.  It has a 32 volume step Master control.  It allows 4 levels of Gain control and 16 levels of Treble and Bass control.  It does not have the stereo switch of the CT-1345 and uses dynamic filtering instead of a set low-pass filter.  Certain cards may not include the CT-1745 mixer chip, their mixers tend to lose the Treble and Bass control and sometimes the Gain control.  These cards use chips marked ViBRA.  It is unknown whether any games use the Treble and Bass controls. 

The last cards in the series were the Sound Blaster 16 WavEffect cards.  CT-4170 is an example of such a card.  These use 2 low DMAs instead of 1 low DMA and 1 high DMA for 16-bit sound.  This may be incompatible with games that expect to use a high DMA for 16-bit digitized sound.  Few use the H-DMA channel. 

This card and its ISA successors all use T6 (Type 6) in the SET BLASTER line in your autoexec.bat.  The default SET BLASTER variable is as follows:

SET BLASTER=A220 I5 D1 H5 P330 T6

H refers to the high DMA channel, P refers to the MPU-401 midi I/O used.  By this time, the default IRQ has changed to 5, probably to avoid conflicts with the printer IRQ.

Sound Blaster AWE32/32


See Sound Blaster 16, above for basic capabilities. Changes include:

The biggest change is the inclusion of the E-mu (EMU8000 and EMU8011) midi processor chipset.  Except as noted below, this chipset can use 1MB of ROM plus up to 28MB or RAM to store sampled instruments contained in files called SoundFonts.  Two 30-pin SIMM slots are provided, but they use plastic retention clips that are very cheap and easy to break.  (Epoxy is your friend if they do.)  Up to 16MB SIMMs can be used, although 28MB is the maximum that the E-mu chipset can address.  While some DOS games supported these cards, they typically only used the ROM samples. 

Sound Blaster 32 and Sound Blaster AWE32 Value cards generally do not have a wavetable header.  Value cards also do not have SIMM slots for RAM upgrades.  Sound Blaster 32s do not have RAM onboard and use ViBRA chips but do have SIMM slots.  AWE32s usually have the ASP/CSP chip of the 16s soldered in. 

The AWE32 and AWE32 Value come with 512K of RAM for Soundfonts.  When RAM is inserted into the slots, the on-board RAM is disabled.  There is a "Goldfinch" card that can be used to upgrade a Sound Blaster 16 with the EMU capabilities.  Most Goldfinch cards do not have an audio-out mini-jack, seeing as they were an OEM product, so a special cable will be needed to output sound. 

Many of these cards have a 2-pin header for an S/PDIF connector.  This S/PDIF can only pass EMU and OPL sound output. 

Typical cards have a line in, mic in, line out and speaker out jacks.  Earlier cards come with Panasonic, Sony and Mitsumi CD-ROM interfaces, later cards use IDE.  If the IDE interface on these cards cannot be disabled or changed to an unused portion of the I/O space, then you may have a resource conflict with your motherboard. 

The default SET BLASTER variable is as follows:

SET BLASTER=A220 I5 D1 H5 P330 T6 E620

The E variable refers to the starting I/O address of the EMU8000.  Its address depends on the addresses at 220-280.  If the main I/O starts at 220, then 620-623, A20-A23, E20-E23 are used.  If I/O starts at 240, then 640, A40, E40 are used.  I/O address 100 is used for the Creative 3D Stereo Enhancement effect of dubious value.  

In the AWE32 series, the cards choose IRQ and DMA in software, writing the settings to a small EEPROM.  The user still needs to set the I/O addresses manually for some of the earlier cards.  Later cards only tend to allow you to disable the MPU-401 interface and enable the SIMMs by jumper.  Even later 32s support ISA PnP for configuration, but those are virtually indistinguishable from the AWE64s.

There is no difficulty with trying to access a midi device connected to the wavetable header or gameport.  If you are trying to access the EMU as a midi device, and the program does not specifically support the AWE32, then you will have to load a TSR utility called AWEUTIL in order for the EMU to emulate a full midi device.  AWEUTIL takes up alot of conventional memory and is incompatible with programs that use DOS extenders (DOS4GW, CWSDPMI, DOS32A) such as DOOM and most DOS games released in 1994-present.  It also requires a system with a working Non-Maskable Interrupt (NMI). 

Since AWE32s use DSPs 4.11-4.13, they will suffer from the DSP hanging note bug described above when using ordinary midi devices.  The ones without a CT-1747 chip will use the CQM method of FM emulation (see Sound Blaster 16, above).  This includes most of the AWE32 PnPs and SB32s.  There is also the occasional card with YMF-262 or YMF-289 ICs, which are genuine Yamaha FM OPL3 chips.  For these cards, you cannot get S/PDIF FM audio output.

Sound Blaster AWE64


To DOS, this card is identical to the AWE32.  In Windows, it can provide 32 more software voices of polyphony in midi by use of the Wayesynth software.  This uses sythesized sounds, not digitized sounds from a soundfont file, and was little supported. 

Sound Blaster AWE64 Gold cards have S/PDIF connectors which add digitized sound support as well as OPL and EMU.  They come with 4MB of Soundfont RAM, whereas the standard card comes with 1MB and the value card 512KB.  The Gold cards come with gold-plated RCA jacks, the other cards must make do with mini-jacks. 

All AWE64s use CQM, but as they use DSP 4.16, they no longer suffer from the DSP hanging note bug.  All use CQM for FM synthesis emulation.

To upgrade the RAM to the 28MB maximum, one has to find proprietary Creative memory modules or use an adapter like AWE-SIMM or SIMMCONN with 30-pin SIMMs.

Thanks to wikipedia for providing fair use images.

Saturday, April 17, 2010

IBM Model M Tips and Resources

Today I will be posting for a third time on one of my favorite subjects, the IBM Model M Keyboard.  First, I will talk about tips, then give some links with a description about what can be found on them.

How to open/unscrew a Model M?

The shell of the Model M is held together by four hex nut screws.  Three are recessed.  You need a nut driver to open it.  The proper size is 7/32" and it should have a slim barrel.  You can find the correct driver in a Sears.
The proper name of the product is Craftsman 7/32 in. Easy-To-Read Socket, 6 pt. Deep, 1/4 in. drive, model #45815.

This is what it looks like:

Look here for the Sears product page:
http://www.sears.com/shc/s/p_10153_12605_00945815000P?keyword=craftsman+7%2F32

You will also need a 1/4 in. spinner to attach it to.  Craftsman 6 in. Spinner Handle, 1/4 in. Drive is what you need.  Sears carries it too here: http://www.sears.com/shc/s/p_10153_12605_00943393000P

Whenever I have a need to open a Model M, usually because of something I spilt, I could never seem to find my driver.  This meant an quick trip to Sears to buy another.  If you don't have an urgent need to open your keyboard and would like a one piece solution, see here:
http://www.clickykeyboards.com/index.cfm/fa/items.main/parentcat/11298/subcatid/0/id/105901

The Model M will not work with my PS/2 port

If your Model M does not work reliably or at all, your PS/2 port may be to blame.  The Model M is a device from the mid-to-late 80s, and the keyboard control board and LEDs inside the machine draw a lot more current than a throw-away, el-cheapo modern keyboard use.  It requires 275mA, whereas a modern cheapo keyboard may only need 1/10 of that.  Some PS/2 ports just cannot provide the current for a Model M to run reliably or at all.  I have never encountered this particular problem myself, but according to the link below, it can be found in many motherboards. 

There are two solutions to this problem, both are listed on this page:

Saturday, March 27, 2010

Ninja Turtles Mania

You would be hard pressed to find a boy who grew up in the 1980's who was not a fan of the green quartet known as the Teenage Mutant Ninja Turtles.   Our interests at Nerdly Pleasures are very broad, and we certainly remain very fond of them today.  In this article, we will reflect on the major incarnations of the Turtles to-date.


My introduction to the Turtles was typical. I first saw them in the original cartoon series which was first broadcast at the end of 1987 and lasted until 1996. This series was so tremendously popular that it became cemented in pop-culture heritage.  As they did not aspire to the high artistic merits of series like Looney Tunes/Merrie Melodies, Silly Symphonies or even Tom & Jerry, they tend not to earn serious attention from animation critics.

In 1988 only the first mini-series had been broadcast, so it was the earliest stages of TMNT mania.
 Playmates toys just landed on the store shelves, video games were in the works, and the live-action films were not yet on the horizon.  

The cartoon series lived up to its intent to be goofy fun.  The good guys were fun and funny, the bad guys inept but never truly vicious, and there was plenty of ninja action to go around.  Real effort was put into making the turtles unique from each other beyond the color of their bandanas:  Leonardo the leader, Donatello the nerd, Raphael the wise-cracker and Michaelangelo the wild and crazy dude.  There was even a small extent of character development over the series.


Not too long after I started watching the cartoon regularly, I was introduced to the Turtles' original media, the comic books.  I was never really a comic book junkie, but I quickly became a fan of the Mirage Comics series.

These Turtles were a revelation to me having watched their juvenile versions on TV.  They lived in a rather gritty world, they fought and argued with each other and actually killed their enemies!

The cartoon always had problems with Leonardo's Katanas and to a lesser extent Raphael's sais, as the sharp and pointy implements would cut and piece flesh instead of merely brusing it. Censors overseas had more problems with Michaelangelo's nunchucks, frequently editing them out of the broadcasts. Nunchucks are quite lethal in their own right, but Europe and Australia were in the midst of a moral panic over the concept of ninja in entertainment, believing children would copy the ninja moves they saw on TV.  However, katanas and sais remained in the program.  In contrast, in the comic book, Leo and Raph would not hesitate to use the business end of their weapons on any enemy.


As I mostly acquired the colorized graphic novels, I had difficulty appreciating that TMNT was a black and white comic.  When TMNT was first being published in the mid-1980s, the creators were essentially self-publishing the comic.   Self-publishing in those days was often something one did part-time, a status which would continue until if and when your book really began to sell.  Printing in color was simply beyond the resources of the TMNT creators, Eastman and Laird.  Even the comic book's cover did not gain full-color until #5 (after 1-4 and Raphael 1).  Like Cerebus, what began as a necessity continued as an artistic choice.

I really enjoyed Volume 1 of TMNT through issue 21, which concluded the Return to New York storyline.  After that, even I could tell that its creators were no longer seemingly involved in the stories and the style varied so wildly from issue to issue that I quickly became turned off.  I never did manage to read Volumes 2 or 4, and what little I read of Volume 3 did not encourage me to want to read more.  Officially it is treated as a red-headed stepchild.

Having acquired a love for all things Turtles, naturally my attention was drawn to the reports that there would be a TMNT game for the NES.  The NES was a constant companion in those days, and I eagerly awaited the release of the game with great anticipation.  I remember calling every toy shop and electronics place around to see whether they had the game in stock on opening day.  None did.  A week later my mom and I confirmed the existence of the game at a distant store and we traveled in the early morning to get there to get my copy before they ran out.


The game itself had been widely commented and criticized, but I will give you my impressions.  First, although based off the cartoon, the TMNT theme did not seem to be well-integrated into the gameplay.   No Krang, Baxter, theme music, mousers and foot soldiers that barely looked the part and somewhat of a grim atmosphere.  Second, the game was cruelly unforgiving.  Limited continues, poor hit detection, large hit area for your characters, nearly constantly respawning enemies, tricky jumps, lots of pits, limited health items.  Michaelangelo and Raphael were nearly useless due to their short attack ranges.  Donatello's bo was the most powerful weapon, so he had to be saved for bosses at all costs.  The graphics, although flickery, and non-traditional sound were very well done, a testament to the skills of Konami (published under its Ultra Games label).  However, the game really felt like it originally was not intended to be a TMNT game but the imagery was later tacked on.  On the other hand, back in 1989 when the game was first released, TMNT was still pretty new and the TV show concepts still somewhat under-defined.

Still, the game sold millions and Konami made up for it in its other TMNT games.  The Arcade Game was awesome.  One of the best beat-em-ups ever, it allowed for four player simultaneous action, which may not have ever been done in the beat-em-up before.  It had very colorful graphics, upbeat and catchy tunes and followed the cartoon to a T.   It sucked many a quarter or two out of me back in the day.  Its NES port may not have been anywhere as graphically impressive, but it was a superb port.  Konami tightened the control scheme in the NES port and even added additional levels not found in the Arcade version.  Konami followed it up on the NES with The Manhattan Project and the Arcade with Turtles in Time.  Ports of the latter game to the SNES and (more loosely) to the Genesis were also top notch.  Most ports of hot media properties to video games tend to be (especially back then) to be crap.  Not so with the Turtles, thanks to the talented designers at Konami.


Following our rough chronology, I soon learned that the Turtles were coming to the big screen.  The first TMNT movie is pure corn, and the sequels even more juvenile.  The movies did not seem to take themselves any more seriously than the cartoon.  But this was live-action, and the silliness that the cartoon could get away with looked foolish at the multiplex.  The guys in green looked exactly like what they were, actors and stuntmen in costume.  The costumes were pretty good looking, and the face masks did a nice job of lip-syncing, but the facial expressions were rather limited.  At least the Shredder had an air of menace until he stupidly tried to run Splinter through with his spear.  And I know Splinter has always been depicted as old, but in this movie he seems positively arthritic and you could almost see his wires or motors being manipulated.  The Turtles were born in comics and found a home in cartoons, but just cannot fit within the confines of live action film.  I have yet to see the computer-animated film, but it is in my Netflix queue.

Like many childhood interests, my interest in TMNT faded as I grew older.  Lately, feeling the need to recapture some of my youth, I have reawakened my interest in the franchise.  I had known that there was a new cartoon series, closer to the darker, more mature (non-Archie) comics.  But being on the 4kids channel and often on Saturday mornings, I never got around to watching them.  However, when they did a countdown of the 10 greatest episodes recently, I used my DVR to examine this series.


Upon watching several episodes, I was struck how closely the series hewed to some of the old Mirage storylines.  Being a more maturer version than the '87, series, it is incredibly violent for a kids' show.  The Shredder is a vicious creature indeed.  A fair comparison between the old cartoon Shredder and the new would be Cesar Romero to Heath Ledger's respective Jokers in Batman.  Characters die and even get maimed in the show.  The foot soldiers, while still not much more than the Turtles' practice dummies, are human beings, not robots as in the original show.

There are many positive things about the new show.  It takes itself seriously and treats the Turtles with respect.  Raphael is his true bad-tempered self, Leonardo practically embodies the concepts of honor and fidelity.  Donatello is more sensitive and Michelangelo (preferred spelling), is good-natured without constantly spouting dated one-liners or looking for a pizza.  Having read the comics, it is fun to watch how the episodes deviate from the printed stories.  There is a strong sense of continuity throughout the series with returning allies and villains.  Eventually, the series started to progress to season-long storylines, which people tend to love or hate.  (My view tends to be closer to hate, unless the whole series is on DVD or demand.)


A digression before I conclude.  TMNT and Other Strangeness by Palladium Books was my first experience with a pencil and paper RPG.   This book was awesome, but it took me a while to really appreciate it. It had artwork from Eastman and Laird, even an original story or two.  It gave the stats for all the major characters that had appeared in the TMNT Mirage comic up to that point.  As the point was issue #4 (after Raphael #1).  It had pages of equipment, multiple adventure scenarios, and an excellent animal character creation system.  However, it was not the ideal game to bring a brand new player into RPGs.  Also, unless the RPG was AD&D, it was difficult to find other players.

This week I watched the TV movie TMNT Forever.  This is a movie-length episode of the new series where the current Turtles meet up with the Turtles from the old cartoon.   The modern Turtles and characters were the same as always, but the older cartoon characters seemed to suffer by comparion.  The modern characters always remark on how silly the behavior, ideas and technology of the old characters by comparison.  The movie shows that the old cartoon Turtles are seemingly unequipped to deal with the challenges faced by the modern Turtles.  Still, it was an entertaining hour-and-a-half and nice to see the old characters return to the screen after nearly fifteen years,  Shame they couldn't get the old voice talent.

To conclude this epic post, I would  point to the title.  I always used to hear non-fans refer to the franchise referred to as "Ninja Turtles".  No Teenage, Mutant and often not even a "the".  That pretty much summed it up for those who could not appreciate it.  Appreciation of the franchise requires a love of the ridiculous, which is appropriate for an idea that began as a parody of serious comic books like Daredevil and Ronin.  The franchise has been accused of being the epitome of banal commercialism.  Yet it appealed to a generation of young boys, for a while.  Not too long after it became popular, it seemed  you were a dork for admitting to liking the Turtles.  Each one of my elementary/middle school associates was quicker to distance himself than the last.

Sunday, March 21, 2010

Tutorial : How to Get the Roland MT-32 working with DOS Games

As a followup to my previous post about the Choices for Roland LA Synthesis, I have decided to write a tutorial on how-to make DOS games work with them. This tutorial assumes that the reader has or will have a real Roland MT -32 or one of the compatibles listed in my previous post on the subject. This tutorial is not intended for those using the MT-32 emulator called Munt or any other hardware device that claims MT-32 compatibility.

With that out of the way, there are two guaranteed methods get your MT-32 or compatible working with DOS games. Method 1 is by using a hardware Roland MPU-401 Midi interface. Method 2 is using DOSBox.

Method 1 : Hardware Midi Interface

(a.k.a. the Intended Way). Ah, if you are going the Method 1 route, you are truly adventurous and deserve respect for attempting it. You have your MT-32 or compatible unit, probably acquired off eBay or Yahoo Auctions Japan. Now you need a midi interface for the game to communicate with the module. (That is what those DINs on the back of these modules are for.) Since we are playing DOS games on an IBM PC or compatible, you are going to need a midi interface in the machine. (Atari ST users had midi interface ports with DIN ports built into the system, a design feature that never made it into the PC world.) Moreover, most of the DOS games of the MT-32 era, which runs from 1988-1992, assumed that the interface would be a Roland MPU-401 interface.

A bit of back-history here: Roland, makers of the MT-32, designed an interface box called the MPU-401 Midi Processing Unit so a computer could communicate with midi modules, whether its own or from a competitor such as Yamaha, Casio or Korg. The original MPU-401 could have been released in 1984 but would certainly have been available in 1985. The Unit is pretty large and looks like this:



It is a little hard to make out from the picture, but the Unit has two MIDI OUT ports. The rest of the ports are unimportant to a gamer. You have to connect a 5-pin DIN cable from the MIDI OUT of the Unit to the MIDI IN of your MIDI module or keyboard. On the other side, which is not visible, there is a DB-25 pin female connector.

The MPU-401 Midi Processing Unit was not tied to any specific computer. Roland made adapter cards and cartridges to allow the Unit to work with Apple IIs (MIF-APL), Commodore 64s (MIF-C64), IBM PCs (MIF-IPC & MIF-IPC-A) and most popular Japanese PCs. These MIF cards/cartridges only contained some simple glue logic to give the computer access to the data port and command/status port on the Unit. The adapter card/cartridge connect to the Unit via a mostly standard DB-25 male to male cable.  The only difference between a standard cable and an MIF-IPC or MIF-IPC-A card is that pins 13 & 25 (ground) are connected in the cable.

If you obtain an MPU-401 Unit, it is useless without an adapter card. As previously mentioned, Roland made two for IBM PCs and compatibles, the MIF-IPC and MIF-IPC-A. The MIF-IPC came first and is designed for bus of the IBM PC and IBM PC/XT (also works with the IBM PC Portable should work with most 8088 processor-based PC compatibles). It is an 8-bit ISA card, and does not reliably work properly with an IBM PC AT or faster computer (essentially anything with an 80286 processor or better) The MIF-IPC-A is the simplified version and is compatible with the IBM PC, IBM PC/XT & IBM PC AT. It is also an 8-bit card and is not bus-sensitive, so it should work in any ISA slot of any IBM-PC compatible, regardless of CPU speed. The MIF-IPC-A is an incredibly simple card, someone with the proper skills and a few parts could easily reproduce it on an ISA prototype board. The schematic is here:



Although the Unit was developed and sold long before Roland convinced Sierra On-Line to support its MT-32 in King's Quest IV and other high-profile 1988 games, Sierra used the MPU-401 to provide the interface between computer and module. Sierra sold the MT-32 to its customers so they could hear great music in its games, and also bundled a MPU-401 interface.

By this time, Roland had made an IBM PC-specific product called the MPU-IPC. This product contained an 8-bit ISA card, which contained the midi interface, and a smaller breakout box which contained the connectors for midi modules. A DB-25 pin cable connected the two. Often on ebay you may see either the card or the breakout box but not both. Both are required to communicate with an MT-32 or compatible. If you have the interface card, you can make a midi output port with a few electronic parts. Like its immediate predecessor, the MPU-IPC should work in any computer with an available ISA slot.

Before I continue with my description of MPU-401 interfaces, I must talk for a moment about setting up your game and card to work with the interface. The MPU 401 interface on an IBM PC or compatible requires certain system resources, two input/output ports and one IRQ. The previously mentioned cards are all wired to use I/O 330/331 and IRQ 2/9. This cannot be changed absent soldering and trace cutting on the cards. As this was the default, games expect that the interface will use these ports and IRQ. Later cards allow the user to change these resources, but I always say that you should keep to the default. All you need to do with your game is to set it to use the MT-32 whenever offered (chiefly for music but sometimes for sound effects) and it will work. You do not need to load any drivers (outside of the game) or type any strings in your AUTOEXEC.BAT file.

The next year, Roland introduced two new MPU-401 compatible products, the MPU-IPC-T and LAPC-I. The first was a cost reduced version of the MPU-IPC and and for our purposes, is identical to it with one exception. This was the first interface product whereby Roland allowed the user to change the settings for the system resources to be used via jumpers. If you obtain this card, you should make sure the jumpers are set to use the default system resources I/O 330/331 and IRQ 2/9. The proper settings are illustrated in the manual, which is available at Roland's US site, backstage.rolandus.com/login.php, after a free registration. Also, there is a schematic diagram in that manual that will allow you to make a MIDI OUT port for either the MPU-IPC or MPU-IPC-T if you don't have the breakout box.  Finally, the breakout box for the MPU-IPC will work with the MPU-IPC-T and vice versa. The MPU-IPC-T looks like this (the MPU-IPC looks almost exactly the same):



The second product, the LAPC-I, combines the MPU-401 MIDI Interface with the circuitry from a Roland CM-32L module all one one 8-bit ISA card. It is a perfect solution for MT-32 DOS games except for those (few) games that utilize bugs on the first generation MT-32 modules. It also allows you to change the settings, so please refer to the manual (available at Roland's US site) for the proper settings. All the caveats that I mentioned in my previous post on the subject of the Roland LA Synthesis devices apply here. This card is 13" long, so your case and motherboard cannot block it. It needs a -5v power source from the PSU, which may not be available on all computers. It also tends to go for very high prices on eBay. If you want to use an external module, such as a Roland SC-55 or MT-32 for the MIDI messages, you will need the MCB-1 breakout box.

In 1991, Roland released the SCC-1 GS Sound Card. Similar to the LAPC-I, the card combines the MPU-401 MIDI Interface with the circuitry from a Roland CM-300 module all on one 8-bit ISA card. This card should be compatible with all IBM PCs, and is much smaller than the LAPC-I. To connect to external midi modules, it uses mini-DINs on the card bracket. You will need a mini-DIN to DIN adapter to connect to an MT-32 or compatible. Two were included with the card, but if your eBay purchase did not come with them, you will need to find a substitute. No one makes these adpaters, but Creative Labs included compatible adapters on their Sound Blaster Live! Audigy and X-Fi card that came with I/O Drives that fit inside a 5.25" computer case drive bay. I do not believe that Roland or Creative carry any spares in stock anymore. Here is the pinout to make an adapter cable yourself (red is ground) :


The last true Roland MPU-401 Midi Interface card was the MPU-401AT, released in 1994. This contained the interface on a small 8-bit ISA card. To communicate with external modules, it uses the same mini-DIN ports of the SCC-1. The above diagram should also work fine if you lack the proper adapter cables. The card comes with no midi module circuitry but has a 26-pin Waveblaster port to connect a midi daughterboard. Roland offered combinations of the card with its SCB-7/SCD-10 daughtercard (containing the GM-compatible circuitry of its SC-7 module) and the the SCB-55/SCD-15 daughtercard (containing the GM/GS compatible circuitry of an SC-55ST). The combinations were sold as the SCM-10AT (GM) and SCM-15AT (GS/GM). Any other waveblaster-compatible daughterboard, such as the Yamaha DB50XG and Creative WaveBlaster I or II will work well here. The SnR is better on this card than many Creative cards (which created the waveblaster standard). The MPU-401AT looks like this:


The following third party MIDI interfaces or devices have been confirmed to contain the Roland MPU-401 chipset or are 100% Roland MPU-401 compatible :

CMS CMS-401
CMS CMS-444

Midiman MM-401%

Music Quest MQX-16(s)
Music Quest MQX-32(m)*

Voyetra V-4000
Voyetra V-4001
Voyetra OP-4001
Voyetra V-22/24

* - This card has been observed to cause freezes or incorrect MIDI playback in Origin Systems games like Wing Commander and Ultima VI.

% - Has been reported to have problems with working consistently with Legend Entertainment's Gateway compared to a Roland MPU-401.

Music Quest also released a pair of basic MPU-401 compatible cards.  The pure 8-bit card looks like this :


The dongle has one MIDI in and one MIDI out.  The jumpers can select IRQ 2, 3, 5 and 7, and the jumper marked P controls the address.  If the P jumper is covered, the address will be at Address 330, and if removed it will be at address 300.

There are two ROM versions for this card.  The earlier version is v.004 and the later version is v.010.  Fortunately Music Quest marked their ROMs.  The earlier ROM will not work with Wing Commander or Wing Commander II and may have trouble with other Origin games that support the MT-32.  The later ROM will fix the problem, but requires desoldering and replacing the old ROM.   Here is a shot of a card with the old ROM for reference purposes :


Music Quest later released a version of this card with a small 16-bit connector.  All the connector did was allow you to use IRQs 10, 11 or 12.  The rest of the options remained the same as the older card.  The ROM is embedded into the microcontroller chip, and as it is a later card it would not have the problems of the ROM v.004.  


If you don't have the dongle for the card, do not despair.  You can make a dongle like the one in the second picture with this handy diagram :


A final word about other MIDI interfaces, do not bother with them. The above choices are your only guaranteed choices for DOS Games using MT-32 or compatibles. The reason why? These cards are the only cards known to guarantee to implement the MPU-401 Normal (a.k.a. Intelligent) Mode reliably. DOS Games that support the MT-32 and compatibles frequently use this mode when setting up the interface or communicating through it. Most later games, including games that are GM compatible, use the MPU-401 UART mode, which is much simpler to implement in "MPU-401 compatible" hardware. The Sound Blaster 16 and up only support MPU-401 UART mode, making them unsuitable as a reliable interface for older DOS Games with MT-32 support. The older Sound Blasters do not support MPU-401 at all. Even later Roland products, including the Roland S-MPU, S-MPU II, SCP-55 or RAP-10AT do not support intelligent mode or have problems with it. Some MT-32 DOS games will work with an interface that supports Normal/Intelligent Mode, but a true MPU-401 interface will ensure hassle-free operation.

There are cards that try to fool games into thinking that an intelligent MPU-401 interface exists by sending an ACK byte in response to every command to the MPU-401.  However, the actual command sent to the MPU-401 is not processed.  This works for most games, but not games from Legend Entertainment, whose MPU-401 usage cannot be defeated by such simple tricks.  Cards with this functionality incldue the Ensoniq Soundscape ISA series, the Yamaha SW-20PC and the MediaTrix AudioTriX Pro.

Even if you have a true MPU-401 Interface, if your computer is too fast, your game may be sending MIDI data to the MT-32 or compatible faster than the module can handle. This is the cause of the dreaded Exec. Buffer Overflow (first gen MT-32s only) and the Exec. Checksum Error (all modules). The first is very common in faster computers, the second is a lot less common. Expect either issue if you are using an MT-32 with a Pentium III computer (the last that generally had ISA slots as standard).

Method Number 2 : DOSBox

(a.k.a. the easy way out). DOSBox is an PC emulator that concentrates on getting DOS games to work. It emulates a lot of video and sound cards. It also emulates an MPU-401 interface, including the Normal/Intelligent Mode. For MT-32 and compatibles and GM/GS/XG modules, the emulation is superb. Considering that DOSBox takes the need for a Roland MPU-401 Interface and a computer with ISA slots out of the equation, it is easy to see why people prefer it. DOSBox is mostly a matter of configuring software, but a Midi Interface is still required.

This part of the guide will only consider DOSBox MIDI interface support in Windows operating systems, since that is all I am familiar with. In order to work with DOSBox, your sound card must have its MIDI drivers installed in Windows. On-board sound chips on modern motherboards tend not to support external midi. If you have a chip or a sound card that does, it generally will connect through the DA-15 game port. If you have a midi/gameport in your computer or on your card, you will need a gameport midi cable. Creative Sound Blaster cards also can use the I/O Drives or external breakout boxes that have midi ports on them.

If your audio device will not support an external midi connector, then you can use a USB MIDI adapter. However, you have to be picky, as not all USB midi adapters are created equal. I have used a Roland UM-1X for years and never have had a problem. Unfortunately it has been discontinued. Some USB MIDI adapters have had problems being able to transmit system exclusive messages to an MT-32, which is what DOS Games use create custom sounds with the MT-32.

Having obtained some kind of MIDI interface with support for external modules, connect the MIDI OUT cable to the MIDI IN port on the MT-32 or compatible module. That completes the hardware assembly. Having properly installed your drivers for your midi product, you need to set the Windows midi device to use external interface. In Windows XP, go to your Control Panel and click on "Sound and Audio Devices". Under the "Audio" tab, go to the Midi dropbox and select the name of your external device. Usually it is quite evident. Press the OK button. Under Windows 98, go to your Control Panel and click on "Multimedia". Under the MIDI tab, in the Single instrument box select the name of your external device. Press the OK button. This completes your Windows configuration.

Since Microsoft, in its infinite wisdom eliminated the selection of midi devices in the Control Panel in Windows Vista & 7, you have to select the MIDI device to use program by program. To do this in DOSBox, start DOSBox up and enter the command "mixer /listmidi". This command will show you all the MIDI devices available in your system. Make a note of the number next to the name of the external midi device. Go to your dosbox.conf file, and under [midi] there will be a line that says "midiconfig=". Enter the number of your MIDI device as DOSBox reported it after the =, save the configuration and DOSBox will use your external MIDI interface instead of the Windows default midi. If the external device is the only other midi device other than the Windows GM/GS synthesizer, then the number will be 1.

DOSBox configures its settings through the dosbox.conf (really a text) file or through a shortcut under its program folder in the start menu. Open the config file up and make sure [midi] that "mpu401=intelligent" is there. It should be by default I believe. Once that has been done, start DOSBox and configure your game to use MT-32 for its music and/or sound effects. Exit your game's configuration program, start the game and get ready to listen to some great music. Watch the MT-32 display for midi messages and make sure that there are no errors in transmission. If you are getting buffer overflow errors on a first gen MT-32, adjust the machine cycles down by using Ctrl F11. 2000 cycles should be good to start, and if you are not using a joystick you can increase them later in the game.

Currently there is a good Roland MT-32 and CM-32L emulator called Munt.  Munt is a device that emulates an MT-32 or CM-32L in software on a modern machine.  It requires the PCM ROM and Control ROM from an MT-32 or CM-32L.  You should dump your own, or if you own one of these devices you can find it without too much difficulty on the Internet.  Once installed and configured with the appropriate ROM set, it will show up in DOSBox's mixer /listmidi and you can use it by setting the MIDI device.