Tuesday, September 16, 2014

Tandy 1000s and Interlnk and the Laplink Cable

You may recall that I hypothesized that the Tandy 1000 parallel port was actually useful for more than just printers, http://nerdlypleasures.blogspot.com/2014/03/a-hypothesis-of-tandy-1000-parallel.html, and now I have proof that it is so.  Using the MS-DOS Interlnk program, you can use the Tandy 1000 parallel port to transfer data to and from the Tandy 1000 with a second computer.

First, let us review some of the flaws in the Tandy 1000 parallel port.  First, most of them use a card edge connector instead of the common DB-25 connector.  To use it with anything except some Tandy printers or with a Tandy cable (rare) requires making an adapter.  Second, one of the signals for the Control Port, the Select Input signal, is not present on the connector.  Third, the Select signal on the Status port must be jumpered inside the system.

In most 1000 systems, the Select signal has a 2-pin header.  In the TL/2, RL and maybe the SL/2, you will need to solder in a 2-pin a header or connect the pins through some solder.  For the TL/2, the points are marked E1 and E2, unlike the other systems, this was not generally documented.  In most systems, the jumper is usually in a fairly inaccessible place, like underneath the power supply.  You will need to jumper the Select Printer signal to use Interlnk.  If you have an RLX, RSX or TL/3, then you won't have any of these problems.

Pinouts


Signal Name IBM Printer Port DB-25 Centronics 36-pin Cable Tandy 1000 34-Pin Card Edge Motherboard/Multifunction 26-pin Header
Strobe 1 1 1 1
Data 0 2 2 3 3
Data 1 3 3 5 5
Data 2 4 4 7 7
Data 3 5 5 9 9
Data 4 6 6 11 11
Data 5 7 7 13 13
Data 6 8 8 15 15
Data 7 9 9 17 17
Acknowledge 10 10 19 19
Busy 11 11 21 21
Paper End/Out of Paper 12 12 23 23
Select Printer 13 13 25 25
Auto Linefeed 14 14 27 2
Error/Fault 15 32 28 4
Init/Reset 16 31 30 6
Select Input 17 36
8
Ground 18-25 16, 19-30, 33 2, 4, 6, 8, 10, 12, 16, 18, 20, 24 10, 12, 14, 16, 18, 20, 22, 24
Not Connected
15, 17-18, 34-35 14, 26, 34 (+5v) 26 (key)

Constructing an Adapter

In order to construct an adapter, you need three things, a 34-pin IDC Card Edge Connector, a length of 34-pin ribbon cable (less than one foot) and a DB-25 female connector.  The Card Edge connector can be harvested off floppy drive cables, but you will need to grind out the bit of plastic inside with a small knife or screwdriver because the Tandy printer card edge has no slot for the function of this plastic bit, which is intended to make sure that you don't insert the connector the wrong way.  Pin 1 of the card edge parallel port is always on the side closest to the expansion slots on the Tandy 1000s.  Align it with the red stripe of the ribbon cable.


The DB-25 connector ideally should have the same type of crimp connectors as the Card Edge connector.  With the crimp connectors, you don't have to solder.  An alternative would be a parallel port with a ribbon cable that attaches to a header on the motherboard or a multifunction card like the AST Six Pak Plus.  I have included the pinout for them above.  In fact, if you remove the BERG-style connector, you will have pre-crimped wires that correspond almost exactly to the Tandy pinout.  This is probably the best way to go about it, and you can find keyless IDC 34-pin connectors.


If you go with the crimping DB-25 connector, I would recommend connecting all the Card Edge connector pins to the ribbon cable, then attaching the appropriate wires to the DB-25, which should give you more room to work with.  You only really need to connect a few of the ground wires, but make sure they aren't being cut into by other wires.

Custom Converter Cable
If you go with the ribbon DB-25 connector, I recommend pulling all the not connected pins, 14, 26 and 34, to make your job easier.  For your first cable, you may want to go easy on yourself and only connect the ten pins needed for a Laplink cable, which are 3, 5, 7, 9, 11, 19, 21, 23, 25, 28 and the two ground pins 16 and 18 on the card edge.  I recommend pulling all the other pins in this case.

Custom Converter Cable Closeup

Laplink Cables

While you can use Interlnk with either a serial null-modem or parallel port, the parallel port transfer is much faster and your Tandy's single built-in serial port, if you have one, should be used for a mouse.  This cable is called a Laplink cable, and originally it was most useful for laptops to access larger hard drives on desktops. A proper Laplink cable only connects certain wires, and here is the pinout :

Signal Name Pin Pin Signal Name
Data 0 2 15 Error/Fault
Data 1 3 13 Select
Data 2 4 12 Paper End/Out of Paper
Data 3 5 10 Acknowledge
Data 4 6 11 Busy
Acknowledge 10 5 Data 4
Busy 11 6 Data 3
Paper End/Out of Paper 12 4 Data 2
Select 13 3 Data 1
Error/Fault 15 2 Data 0
Ground 25 25 Ground

Testing the Adapter with a Laplink Cable

A Laplink cable acts like a loopback cable in that it feeds the output of one computer into the inputs of another computer and vice versa.  The Laplink cable sends and receives five bits.  The output port of a computers first parallel port, called LPT1 in DOS, is typically located at I/O address 0x378.  This is an 8-bit port, but in the Laplink cable, only the lower five bits are used.  The input port of LPT1 is located at 0x379, but this port only uses the upper 5-bits of the port.  Thus, the input will be shifted three bits to the left compared to the output.  In addition, the high bit of the input port is inverted.  

Debug has the i and o commands that can be used to output and input bytes from I/O ports.  The output command is o 378 xx and the input command is i 379.  Try outputting a byte from one machine and then read the input from a second machine.  You should use the following commands :

Host              Client
- o 378 10     - i 379
                       00 (IBM) or 07 (Tandy) - All bits cleared to 0

- o 378 0F      - i 379
                       F8 (IBM) or FF (Tandy) - All bits set to 1

Do this in both directions.  If the value you receive on the input does not equal the results above, you have a faulty wire.  Convert the number to binary to see which bit(s) is or are not working.

Only the top five bits of the result are important for Interlnk.  The lower three bits seem to be set to 0s on IBM parallel ports and 1s on Tandy parallel ports.

The DOS Interlnk Device Driver and Program

Interlnk was first introduced in IBM PC-DOS 5.02 and can be found in MS-DOS 6.0 through 6.22.  It can also be found somewhere in a Windows 9x installation.  It consists of two components, INTERLNK.EXE and INTERSVR.EXE.  INTERLNK.EXE functions both as a device driver and external DOS command.   INTERSVR.EXE is run at the command line.

INTERLNK is a program that allows you to access drives remotely, and its really easy to use once you figure out which computer is going to the host and which will be the client.  The host computer is the one being accessed, the client is the one performing the access.  On the host PC, all you need do is run the INTERSVR.EXE program at the command prompt.  Make sure to run it first.  It usually does not need any command line arguments, but you can use the /X=A: /X=B: to exclude the floppy drives.  

On the client PC, you will need to load INTERLNK.EXE in CONFIG.SYS.   To use the parallel port, I would suggest the following line in CONFIG.SYS :
DEVICE=C:\DOS\INTERLNK.EXE /NOPRINTER /LPT1

If you are successful, INTERLNK.EXE will inform you which drives it has discovered and will allow you to access them as if they were physically attached to the client machine.  Typically this will add at least drive D: to the client machine.  

You must all the INTERSVR.EXE program to remain running on the host machine, otherwise the benefits will be lost.

You can type INTERLNK at the command line of the client computer to determine the status of the INTERLNK connection.  

All Tandy 1000s can use MS-DOS 6.22, and the INTERLNK.EXE device driver takes up a very reasonable 7K.  INTERLNK requires a fully working parallel port adapter for the Tandys.  I would suggest using drivparm=/d:1 /f:x in your CONFIG.SYS for MS-DOS to fully recognize 720KB floppy drives, replacing the x with 0, 1 or 2 depending on which drive is a 720KB drive.

With a Tandy 1000 TX, you may be able to obtain a 40KB transfer rate from and to a hard drive.  If you are reading from or writing to floppy disks, expect something in the neighborhood of 5-8K.

Early Tandy 1000s

This guide applies to the Tandy 1000 EX, HX, SX, TX, TL, TL/2, SL, SL/2, RL and RL-HD.  The Tandy 1000/A/HD has an earlier version of the card edge port that puts Autoline Feed on pin 32, which is not relevant for the Interlnk cable but may be for other parallel devices.  They may connect the Select In pin instead of the Select pin.  If that is true, then the port is useless unless you connect the pin from the Parallel Port Array chip to the card edge.  However, the Tandy Technical Information Series Notes and Jumpers indicates that the Tandy 1000A and HD have a jumper to connect the printer select to the parallel port like the later models.

Wednesday, September 10, 2014

The Mysterious Covox PC Sound Devices

Covox, Inc. had a niche throughout the 80s and early 90s for making devices that could support some type of speech with home computers.  One of its first products was called the Covox Voice Master.  There was a version for the Apple II and the Atari 8-bit computers and the Commodore 64.

Covox Speech Thing

One of Covox's original PC products was the Covox Speech Thing.  This was a parallel port dongle that functioned as a digital to analog converter.  The 8 data bits of the parallel port would pass through a resistor network and then to an audio output jack.  This device was supposedly released around 1986.  However, it was purely software driven, the CPU had to feed the DAC bytes at a certain sampling rate to allow for convincing digitized sound.  This is a direct drive DAC.  Typically 11kHz was considered the standard for comprehensible human speech, and the resulting performance impact on the IBM PCs of the day was considerably high.  The methods used to create digitized sound on the PC speaker or Tandy 3-voice chip have similar performance issues.  In fact, I do not know of any games supporting this device until 1990.

A true Covox Speech Thing came in at least the two varieties shown here :


The one with the white shell has a 3.5mm and a 2.5mm output jack, the one with a gray shell only has the 3.5mm jack and it is larger, so it is probably an older variant.

A sample of what the Speech Thing sounds like can be heard in this video : https://www.youtube.com/watch?v=spOenlrSSOE

As the Speech Thing is a parallel port device, games that support it will typically allow it to be selected at LPT1-3, depending on which device name the BIOS uses for each parallel port it detects in the system.

Speech Thing Clones

There is nothing special about the Covox Speech Thing, it should consist of purely passive components and the functionality behind the device was widely cloned.  There are schematics available online which you can use to build your own Speech Thing with only a few dollars worth of resistors and a DB-25 connector and shell.

FTL released a version of Dungeon Master with a Covox-style parallel port DAC.  It was called the FTL Sound Adapter.  Rather weirdly for a game designed for mouse input, the adapter had a DE-9 port to plug in an Atari joystick, which presumably used the input lines of the parallel port.  FTL's device could be detected by Dungeon Master, a standard Covox device cannot be detected.

Around the same time (1990), Disney Software released an inexpensive parallel port device called the Disney Sound Source.  The dongle connects to a speaker powered by a 9v battery, and device has active circuitry that is powered from the speaker.  It has several advantages over the Covox, a good low pass filter (no high pitched whines), a 16-byte FIFO that is transfered to the DAC at a fixed sample rate of 7kHz.  It can be autodetected;  The low sampling rate limits the ability of the device to play back music, but it is quite adequate for speech and sound effects.  While Disney Sound Source works with Covox devices, the latter is not true because the DSS has control commands that must be sent for the adapter to work and does not support the variable rates of a dumb device like the Speech Thing.

Covox Voice Master and Voice Master Key

There was two Covox ISA cards, I believe one was the Voice Master and the other was the less functional Voice Master Key (not to be confused with the Voice Master Key System II).  Presumably this is the circuitry of the external Voice Master box put on a sound card.  One of the great benefits of any ISA device over a parallel port device for speech synthesis is its ability to be able to use DMA access to feed its DAC directly with minimal CPU intervention.  This requires the signals on the ISA bus to access a DMA channel and an IRQ channel to tell the program that the buffer is low or empty.  Because 8-bit DMA in the PC is limited to a single 64KB segment, digitized sound typically would fit into 64KB, and if a longer sample was used, more 64KB samples would be fed into the buffer.

If this is the Voice Master card, then it would fit the necessary criteria for DMA usage:



The large chip is an 82C54, a Programmable Interval Timer which contains the counters necessary for DMA usage.  There is also a VMDMA 1.2 silkscreened on the PCB.  The card can use I/O ranges at 22x (default), 24x, 28x and 2Cx, DMA 1 (default) or 3 and IRQ 3, 4, 5, 6 or 7 (default).  Its DAC port is 22F.

This is the Voice Master Key card :

Courtesy of modelrail.otenko

This card has no counter and no DMA capability.  It uses 22F, 24F, 28F, 2CF for its DAC port, selectable via jumper.  The poster of this excellent blog article has gotten the card to work with Covox Speech Thing-supporting games by reassigning the I/O port assigned to LPT1.

Both cards have two M(icrophone) inputs, as does the Sound Master II.  According to a poster for the Sound Master II, one input supports Dynamic microphones and the other input supports line level input or Condenser microphones.  There is an Intsersil ADC to convert the audio input from the microphone from analog to digital.  All output on all these cards is mono.

A second huge benefit of the ISA bus is the ability to support analog to digital conversion.  A standard PC parallel port is not designed to function as an input device.  The standard, unidirectional port only has 5 input lines and some of them are inverted.  (An Atari CX-40 joystick has exactly five inputs, which makes the FTL adapter described above theoretically work without any active components.)  While you can read the port eight times to get the least common multiple, it is generally easier just to read the 8 data bits of the ISA bus.  The Voice Master can record voices.  For non-DMA devices, it can poll the input port at whatever rate the system can support and the available memory will allow.

Covox Sound Master

When the Adlib Music Synthesizer Card was released, the card eventually sparked a great interest in sound cards, mainly for gaming purposes.  Covox Sound Master was one such card and it became available in 1989.  The Sound Master was almost a trial run for the Sound Blaster, but it was not successful or widely adopted in games.  This card contained a Microchip AY8930 music chip that was backward compatible with the popular General Instruments AY-3-8910 3-voice PSG.  It also had a few improvements, but they were seldom used.  The AY-3-8910 and AY8930's registers could be read, unlike the TI SN76496's registers, allowing it to be used as a timer for DMA usage.  The tone registers act as a 12-bit counter and the programmer can read the values, allowing for their usage as crude timers.

The card did support direct drive and DMA fed methods for accessing the DAC.  There is a silkscreened VMDMA 1.3 on the PCB.  Finally, it had two DE-9 ports for using Atari-style joysticks.  These should only be used for true Atari CX-40 style joysticks and Sega Master System pads.  The Sound Master does not emulate a standard gameport, the bits from the joysticks are read via a pair of latches.  It was supported in only a few games, SimCity being the most prominent.

Do not use anything which requires +5v volts like Atari/Commodore Paddles or a  Sega Genesis pad, or you may blow the latch chips.  The card only has an audio output jack, so it cannot record voices.  This is the best photo I have come across of the card (with its PAL chip removed)  :


The card can use I/O ranges at 22x (default), 24x, 28x and 2Cx, DMA 1 (default) or 3 and IRQ 3 or 7 (default).  Its direct write DAC port is at 222, 242, 282 or 2C2.

The Sound Master was not a popular card, the joystick ports were not standard and the music chip was behind the times compared to the FM-synthesis based Adlib, and few companies supported it.  The Covox Sound Master is extremely rare, like the Innovation SSI-2001, only two original cards are known to exist today.

Here are a few samples of AY music from the card, all recorded by a VOGONS user named moturimi1 :







Covox Sound Master Plus and Sound Master II

Covox struck back with two new products in 1991, the budget Covox Sound Master Plus and the Covox Sound Master II.  Neither were particularly successful, and by 1993 Covox was essentially dead.  The Covox Sound Master Plus was an Adlib clone with the ability output digitized sound via direct drive methods. I believe this is a photo of the card :


The Adlib ports can be changed from the default 388-389 to 380-381 and the DAC port from 330 to 338.

The Sound Master II was closer to a Sound Blaster.  It had the OPL2 YM-3812 FM Synthesizer found on the Adlib Music Synthesizer, MIDI in and out via a DE-9 port and a dongle and direct drive and DAC fed digitized sound input and output.  Its MIDI is probably based off the MC6850 ACIA, so it would not be MPU-401 compatible.  It did not have a gameport, which must have hurt its sales.

The Sound Master II has an NEC D71054C Programmable Timer/Counter.  From what I can tell, this chip is compatible with the 82C54 chip found on the Voice Master.  Stamped on one of its chips is VMDMA 3.0.  This is what it looks like :



Like the Voice Master and Voice Master Key, the Sound Master II has a pair of input jacks, marked M1 and M2.  The card can use I/O ranges at 22x (default), 24x, 26x and 28x, DMA 1 (default) or 3 and IRQ 3, 4, 5, 6 or 7 (default).  There are selections for DMA and MIDI IRQs.  The MIDI port defaults to 330-331, but can be changed to 338-339.  The Adlib ports can be changed from the default 388-389 to 380-381.  Its direct write DAC port is at 22F, 24F, 26F or 28F.

The Sound Master, Sound Master Plus and Sound Master II had a 2-pin header on their boards that could be used to mix the input of the PC Speaker with the output from the card, similar to a Sound Blaster Pro and above.  All of Covox's boards typically had a round "Proud to say - Made in USA" sticker on them.

Feature Summary


Device Name Bus Type Music Chip DMA Gameport MIDI Voice Input PC Speaker Input
Covox Speech Thing Parallel Port None No No No No No
Covox Voice Master ISA 8-bit None Yes No No Yes x 2 Yes
Covox Voice Master Key ISA 8-bit None No No No Yes x 2 No
Covox Sound Master ISA 8-bit AY8930 Yes Non-standard No No Yes
Covox Sound Master Plus ISA 8-bit YM-3812 No No No No Yes
Covox Sound Master II ISA 8-bit YM-3812 Yes No Non-standard Yes x 2 Yes

Game Support

Game Name Covox Speech Thing Covox Voice Master Covox Sound Master Covox Sound Master Plus Covox Sound Master II
Alone in the Dark
DMA
Music, DAC? Music, DAC
BattleTech : The Crescent Hawks' Revenge

DAC
Music
Bad Blood                          
Big Business


Music
DAC


DAC
Cobra Mission



Music
Conan – The Cimmerian

Music

F-14 Tomcat

DAC
Music
Galleons of Glory: The Secret Voyage of Magellan

Music, DMA

Grandmaster Chess

DAC
Music
Joe Montana Football

DAC
Music
Lemmings (Covox Demo)



Music
MegaTraveller 1: The Zhodani Conspiracy

DAC

MegaTraveller 2: Quest for the Ancients

Music, DMA

Pinball Dreams DAC DMA

DMA
Pinball Dreams 2 DAC DMA

DMA
Pinball Fantasies DAC DMA

DMA
Prince of Persia

Music, DMA

Call of Cthulhu: Shadow of the Comet



Music, DAC
SimCity

DMA

SimEarth: The Living Planet

Music

Space 1899

DAC

Spirit of Excalibur

Music

Super Jeopardy DAC DAC DAC

The Punisher

DMA

Twilight: 2000

Music

Ultima VI : The False Prophet

Music

Vengeance of Excalibur

Music

Where in the World is Carmen Sandiego? 256-Color Version

Music, DMA
Music
Where in Time is Carmen Sandiego

Music AY8930, DMA
Music
Wizardry : Bane of the Cosmic Forge
DAC DAC
DAC
Wizardry : Crusaders of the Dark Savant
DAC? DAC?
“Music DAC”

Comments on Games

This is not meant to be a truly comprehensive list of game support.  While it has categories for both, Mobygames cannot be trusted to distinguish Sound Master supporting games from Sound Master II games.  For example, it wrongly states that Eye of the Beholder II: The Legend of Darkmoon and The Lost Files of Sherlock Holmes: The Case of the Serrated Scalpel have support for a Covox device, they do not.  Similarly, it claims that Might and Magic III: Isles of Terra has support for the Sound Master, the install program clearly states Covox SMII.  Sometimes the box cannot be trusted, as A-Train's system requirements label distinctly mentions the Sound Master, yet there is no actual software support for the card. 

Most of the information on this list came from this post : http://www.vogons.org/viewtopic.php?t=18571

If a game is listed that supports the Sound Master II for music, that really means it supports it as an Adlib card and does not take advantage of any digitized sound features of the Sound Master II.  This is true of the "Covox Lemmings" demo.  

For digitized sound, the Sound Master II and the Voice Master should be identical.  Therefore, I am quite confident to say that Super Jeopardy will work on the Sound Master II using the Voice Master setting.  Fortunately, the game works well with the Speech Thing.

Where in Time is Carmen Sandiego is the only known game to take advantage of the AY8930's enhanced features over the AY-3-8910 for music.  The AY8930 has a 16-bit frequency control for the tone channels, an 8-bit noise frequency control, individual envelope control for each of the three tone channels, 5-bit amplitude control for each channel, a duty cycle control for each channel (to turn a square wave into a rectangle wave) and two registers for noise masking.  The AY-3-8910 has a 12-bit frequency control for the tone channels, a 5-bit noise frequency control, one envelope generator for all three channels and a 4-bit amplitude control.  

For Wizardry : Crusaders of the Dark Savant, while the game has install options for the Sound Master and Voice Master, the game may not actually support either.  When sound is supposed to be played, the timer is programmed but no bytes are written to the card's I/O ranges.  The previous game supported both by direct-drive writes to their respective DAC ports.  The Sound Master II is supported because it uses the same OPL2 direct drive DAC method as the Adlib and Sound Blaster options use.  See my prior post for more details.   Similarly, Transylvania III: Vanquish the Night has install options for the Speech Thing and Sound Master and installs sound files if those options are selected, but the game does not contain code to interact with these devices.

Finally, the floppy version of Alone in the Dark has a mysterious option for the "Sound Master +"  The game only supports FM synthesis, and the options are Adlib, Sound Blaster, Sound Master II and Sound Master +.  For sound effects, it supports "Sound Blaster (DMA)", "Sound Blaster (no DMA)", Sound Master II, Internal Voice Master, the Disney Sound Source.  I assume that "Sound Blaster (no DMA)" is the option for owners of Sound Blasters with a 1.xx DSP, which did not have support for auto-init DMA.  The Sound Master + option gives I/O port selections at 22x, 24x, 28x and 2Cx.  The card described above does not quite fit.  Therefore, either that card is not the Covox Sound Master Plus, (its just the Covox Adlib clone) or Infogrames was misinformed about the card's features.  The driver, when selected, outputs direct drive data to a DAC at 22F.  The driver for the Covox Sound Master II does the same, but the game can detect the presence of a Sound Master II and Voice Master and refuses to let you select those options if it does not detect those cards.  The Alone in the Dark "Sound Master +", if it ever existed, is an Adlib with a direct drive DAC at 22F, 24F, 28F or 2CF.  

Conclusion

The most important devices discussed here are the Speech Thing, which is easy to make and the Sound Master, which is unique both for its music chip and for its music-chip driven DMA method.  Unfortunately, they were rarely used, but are valuable because it is the only representative of the widely used AY-3-8910 chip for the PC (a Deluxe version of the Bank Street Music Writer came with a Mockingboard clone, but that was the only software that used that obscure card.)  Additionally, there are games like Sim City that do not support any other sound cards for their digital sound, so for Sim City its either the Sound Master or a Tandy TL/SL.  Fortunately, like the Innovation SSI-2001 there is some interest in cloning this ultra-rare card.

The Sound Master II and Voice Master are not worth bothering over, a Sound Blaster will always be supported in games 

Sunday, September 7, 2014

Non-PC Speaker Digitized Sound Part II : Sample Time

In a prior post, I discussed the ability of sound devices other than the PC Speaker to produce digitized sound.  In this entry, I will share some recordings I have made of these digitized samples.  Most of the samples will be voice, but there are some sound effects and even music.

First off, here is Touchdown Football for the IBM PCjr., with an 8088 CPU @ 4.77MHz and using the TI SN76496 :



Next, here is the same game in its Tandy version, running on a Tandy 1000 RL, which uses an 8086 running at 9.44MHz, using a PSSJ-based TI SN 76496 core :



This code is very speed-sensitive.  Even on an RL in the slow 4.77MHz mode, it still runs too fast.  I believe that the code was only meant for an 8088 running at 4.77MHz, not a V20, and not an 8086 (which is what the RL has).

Here is the same sample, but being run by a Tandy 1000 SX, which uses an 8088 CPU running at 7.16MHz and an NCR 8496 (clone of the TI SIN 76496) :



This time, the sample sounds much more appropriate than the chipmunk like rendering by the faster machine.  However, this game was released when the only Tandy 1000 on the market was the 4.77MHz only 8088 CPU of the original Tandy 1000.  A Tandy 1000 TX running at 4MHz sounds very similar.  Because the SX can also run at 4.77MHz, I have been able to record the sample at that speed, and here it is :



If you compare this sample to the PCjr. sample, it becomes clear that the same voice is being used for both software versions.  Therefore, in order to run this game at its intended speed, an 8088 running at 4.77MHz is necessary.

While Touchdown Football turned out not to be a PCjr. exclusive, the next sample clip is from The World's Greatest Baseball Game.  This game, as far as I know, only officially supported PCjr. for enhanced graphics and sound.  I have included the music and speech that play before you start a game :



The announcer does sound a bit more synthetic than the announcer for Touchdown Football, but the speech is easy enough to comprehend.

The next sample clip is a fairly long one, and it is my recording of the movement sounds and battle sounds from the original, 16-color version of Battle Chess.  In this case, Battle Chess is running on a Tandy 1000 TX, 8MHz 80286, using an NCR 8496 clone of the TI SN 76496 :



Roughly, the clips are in the following order:

Pawn Moves
Knight Moves
Bishop Moves
Knight Takes Bishop
Bishop Takes Pawn
King Takes Bishop
Knight Takes Knight
Queen Takes Pawn
Rook Moves (King and Queen move silently)
Queen Takes Knight
Queen Takes Pawn
Knight Takes Queen
Queen Takes Knight
Rook Takes Queen
Bishop Takes Knight

Battle Chess in its 16-color version only supports PC speaker and Tandy 3-voice sound.  The PC speaker version lacks movement sounds, and the sound quality is pretty awful compared to the Tandy sound.  It was too awful to record, play the game in DOSBox if you want to hear it.  Fortunately, the 256-color version supports a Sound Blaster and plays identically to the 16-color version.  Interplay could have done better, as we will see soon enough.

Before I continue, I would note that I am recording all the Tandy 3-voice and PC Speaker samples through the RCA audio out jack of the Tandy 1000 TX.  This jack provides line level output.  I decided to avoid using my Tandy 1000 TL because a game may inadvertently utilize the Tandy DAC, and that is not the point of these samples.  For the Adlib and Game Blaster and Sound Blaster samples, I recorded them off a Sound Blaster 1.5 with C/MS upgrade.  That card only has an amplified out, so those samples are comparatively louder in these recordings than the Tandy and PC Speaker samples.  I decided not to tamper with them.

The next three games support PC Speaker or Adlib for digitized sound.  Wizardry, Bane of the Cosmic Forge and Super Jeopardy also supports the Covox Sound Master, Voice Master and the Innovation SSI-2001, but I do not have access to any of the Covox boards.  [I will try to put up a recording from the SSi-2001 clone I purchased].  Bill and Ted's Excellent Adventure sounds very impressive with the Adlib.  Additionally, both Wizardry and its sequel, Wizardry Crusaders of the Dark Savant uses the Adlib for digitized sound, even though they are quite aware of a Sound Blaster.  The digitized sound in the Wizardry Bane intro is not very long, so I did not bother to record a PC Speaker reference sample.











Finally, I will demonstrate Activisions "Omnimusic" driver from BattleTech : The Crescent Hawks' Revenge. This driver provides digitized sound through the PC Speaker, the Tandy 3-voice sound chip, the Adlib and Game Blaster chips, the Sound Blaster DSP, the IBM PS/1 Audio/Game Card, the Covox Sound Master and the Innovation SSI-2001.  It is a jack of all trades as far as sound devices of the late 80s and early 90s go.  However, not all things are equal, as you can judge for yourself.











As you can hear, the PC Speaker only does the digitized sound effects, and not very well at that.  The Game Blaster has a high pitched whine in its playback not heard with Tandy or Adlib, but the samples sound pretty decent  The Sound Blaster provides reference quality samples.

There are other PC games that support digitized sound through an Adlib card or clone.  These include Dungeon Master, Another World/Out of this World and Electro Man / ElectroBODY.  All these games support Sound Blaster and that is what anyone with a Sound Blaster should use.

If you want some more samples of what the Tandy chip can do when pushed to incorporate digital samples, then listen to some of these recordings from my friend Cloudschatze's channel :

688 Attack Sub : https://www.youtube.com/watch?v=M2A8GbsKcYQ
One on One : https://www.youtube.com/watch?v=M2A8GbsKcYQ
Kings of the Beach : https://www.youtube.com/watch?v=t2N7VLF0ZQo
Skate or Die : https://www.youtube.com/watch?v=I8_z_CI37JE

Saturday, September 6, 2014

A: B: and C: (and later D:)

A Brief Overview of the History of Disk Drives and DOS

MS-DOS assigns drive letters to disk drives, whether they are physical drives or virtual drives.  All user-level drive access through DOS is via drive letters.  This is why to copy a file from drive A: to drive B:, you can type at the command prompt :

copy b:\myfile.txt a:

The PC BIOS itself had no concept of drive letters, all it originally acknowledged were floppy controllers.  (The PC and PCjr. BIOSes also had routines to interface with a cassette recorder, but this was not accomplished with specialized hardware and is unique to these systems).  The PC Floppy controller could originally support two internal drives and two external drives, but few systems ever used a four drive system.

Due to the flexibility of the PC expansion bus, just about any kind of storage device could be made to work with the computer.  A tape drive, for example, may attach to a specialized interface card.  Later, it would likely be SCSI compatible and attach via a SCSI interface card.  An internal hard drive could use an ST-506  MFM or RLL style controller with the separate command and data ribbons, an IDE interface card or a SCSI interface card.  In order to do anything with these devices, either the PC BIOS had to be aware of them, they had to have BIOS extension ROMs on their interface cards, device drivers for the operating system with which they were intended to work or a specialized program that could talk directly to the card via I/O ports or its upper memory range.

In the days of PC-DOS 1.0-3.2, it would have been very unlikely for drive letters to get above C:.  This is because most computers used two floppy drives at best and hard drives were not yet ubiquitous.  A standard MFM controller could control a pair of drives, but not all systems had four half height 5.25" drive bays.  MFM controllers were generally limited to internal hard drives.  More importantly, hard drives cost a great deal in the 1980s, often half the price of a computer was due to the purchase of hard drives.

The use of the letters of the alphabet to access drives seemed reasonable at the time.  The concept of someone having twenty-six physical drives in a system was still more fantasy than reality.  Then DOS 3.3 came along with support for the creation of logical drives within the extended partition.  Prior to DOS 4.0, each drive letter could only recognize 32MB of storage.  Thus you could have one primary 32MB partition, the boot partition, and an extended partition up to 2GB.  Within the extended partition, you could carve out logical drives, each no larger than 32MB.  Each drive would get assigned a drive letter.  A: and B: being reserved for floppy drives, you could have a maximum amount of usable storage of 768MB in DOS 3.3 (24 x 32MB).  Because DOS 4.0 acquired a reputation of being a buggy memory hog, many people stayed with DOS 3.3 until the release of DR-DOS 5.0 in 1990 or MS-DOS 5.0 in 1991.

Even though MS-DOS 3.3 had severe partition limitations, few hard drives of its day came anywhere near 768MB.  However, each physical drive had to share the same 24 available drive letters.  MS-DOS 5.0 allowed each partition, whether primary or extended, to be up to 2GB.  The Int 13h disk BIOS routines only supported 8GB hard drive parameters, and thanks to different ATA IDE limitations, the storage space was even more limited to 504MB until BIOS makers began using workarounds such as LBA and BIOS translation.  By the time 2GB hard drives became affordable, Windows 95 was in use.

The CD-ROM drive, despite its read-only capabilities, was to be accessed like a disk drive.  While at first it used proprietary interfaces, usually tied to a sound card, eventually it would usually use IDE or SCSI interfaces.  While DOS increased its support for hard drive capacities over the years and the PC BIOSes added support for the standard AT-IDE interface starting with the IBM PC AT, full support for CD-ROM drives was never included in the BIOS and DOS never integrated it into its core operating files.  Instead, the CD-ROM was accessed through a device driver specific to the drive and interface loaded in CONFIG.SYS and MS-DOS CD-ROM extensions program MSCDEX loaded in AUTOEXEC.BAT.  MSCDEX would assign a drive letter to the CD-ROM drive.

Each set of IDE ports can support a master and a slave drive, and the PC can support up to four sets of IDE ports, the primary, secondary, tertiary and quaternary.  With IDE you can have eight devices, assuming you have a tower large enough to hold them.  One SCSI interface can support seven or fifteen devices (the interface counts as a device), depending on the SCSI version.

Drive Letter Assignment Over the Years

With the IBM PC, which only supported full height drives and typically came with two 5.25" full height double density Tandon TM100-1 (single sided) or -2A (double sided) drives, one drive was Drive A: and the other drive was Drive B:  There were only two bays for disk drives and they were only designed to support full-height drives.  More adventurous PC owners could find a third-party kit to mount two half-height drives in the full height bay, use a hard card or an external disk drive.  The IBM PCjr. only supported one disk drive, and it was Drive A: and B:, DOS being able to redirect commands meant for Drive B: to Drive A:

The IBM PC/XT shared the same number of bays as the PC and originally came with one 5.25" full height Tandon TM100-2A and one 10MB ST-412 MFM full height hard disk drive.  You might think that the hard drive would be assigned to Drive B:, but to maintain compatibility with two floppy disk systems, DOS 2.0 assigned it to drive C:   With the IBM PC AT, with two external half height bays and one internal half height bay, drives A:, B; and C: were now quite feasible.  A typical AT configuration would have one 1.2MB half height drive and one 360KB half height drive (for compatibility with double density disks) and a 20MB internal hard drive.  Unlike the PC and XT floppy controller, the AT hard disk and floppy controller did not have a port on the bracket for external floppy drives, so the two floppy drive maximum limit was firmly established with these machines.

Nonetheless, PC and MS-DOS 1.0-3.3 and DR-DOS up to and including 6.0 assigned drive letters to the first four floppy drives, then to other kinds of drives.  PC and MS-DOS 4.0 and above, reflecting a greater understanding of how PCs were actually used, assigned A: and B: to floppy drives, then C: and letters thereafter to hard drives, and then it assigned letters to any further floppy drives the user may have in the system.

However, drive lettering after C: was very flexible in DOS, and as most home users only had one hard drive, CD-ROM programs typically ran off Drive D:  In fact, there are some games, both for DOS and Windows 3.x and 9x, that refuse to run unless run off Drive D:  MSCDEX could reserve Drive D: for the CD-ROM drive, and hard drive partitions could be assigned to use Drive E: or above.

Even today with Windows 8.1, much of this drive lettering arrangement is still followed.  Drive letters A: and B: are still reserved for floppy drives, even though a typical user is unlikely to have physical floppy drives in his modern system.  Fortunately, floppy drive emulators can use A: and B: without difficulty.  Drive C: is always a boot drive.  Thereafter, things get very flexible.  Dual-boot Windows systems, like Windows XP and Windows 7 can each be Drive C:, depending on which OS is being active.  Drive C: can be just about anything except a floppy (too small) or an CD/DVD/Blu-ray (not made for rewriting) drive.  It could be a hard disk drive, a solid state drive, a Compact Flash or SD Card or a USB stick.  Drive D: and above could be an optical drive, physical or virtual or any of the above.  Windows will let you assign whatever drive letter you want.  However, there is no Drive AA:, even in Windows 8.1.  The twenty-three available drive letters can get fully used today.

The Ideal Vintage Drive Setup

I believe that if you are buying a specific system, like an IBM PC Model 5150, a Compaq Portable or a Tandy 1000 RLX-HD, it is usually preferable to stick with the drives it came with, especially the floppy drives, assuming they work.  For systems with few bays, using things like CF cards or DOMs mounted directly onto an XT-IDE header may be required.

For systems of the 1980s, it is typically best to have at least one 360KB drive and one 720KB drive, where possible, and a hard drive.  Actually, virtually any 1.44MB drive will work as a 720KB drive, which can be rare.  The same cannot be said for 1.2MB drives, and generally they were not used for games during the 1980s.  With such a setup, you have your A: B: and C:, and you can play just about anything.

For systems of the 1990s, it is best to have one 1.44MB drive, one 1.2MB drive and one CD-ROM (early to mid-90s) or DVD-ROM (late 90s) drive with a hard drive.  With your optical drive as D:, you have one of everything.  For the late 1990s, you can get away with the 1.44MB drive, or no floppy drive at all if you have no need for a boot disk.  Unfortunately, all floppy drive emulators that I know of require at least Windows 2000.

Friday, September 5, 2014

The Underrated Voodoo 3 Chipset

The Voodoo 3 was 3dfx's first performance oriented 2D & 3D card.  Released in 1999, it was designed to compete with the nVidia TNT2 chipset, the Matrox G400 and the ATi Rage 128.  It often gets overshadowed by the Voodoo 5, which came out in 2000, and the nVidia Geforce, which was the first GPU to support Hardware Transform and Lighting.  However, it is a really nice card to have, especially with Glide games, which were still very common in 1999 and 2000.  I would like to discuss some of its good qualities here.

There are five good Voodoo 3 cards, the Voodoo 3 2000 PCI, Voodoo 3 2000 AGP, Voodoo 3 3000 PCI, Voodoo 3 3000 AGP, and the Voodoo 3 3500 AGP.  There are also Voodoo 3 Velocity cards, but they are low-end OEM cards with only 8MB of SDRAM and a clock speed of 125MHz.

Superior Performance and Image Quality to Voodoo and Voodoo 2

While the Voodoo 3 may not be able to run every ancient Voodoo 1 game, it will run most of the good ones. The only games that will fail are those that have old statically linked glide dlls that typically only work on a Voodoo 1 and may be coaxed to work on a Voodoo 2.  Here is a compatibility list for DOS games : http://www.vogons.org/viewtopic.php?f=46&t=35721&hilit=voodoo+matrix&start=80#p344241

The Voodoo 3 has better image quality than either the Voodoo or Voodoo 2, even with lower resolution 3D graphics.  Voodoo and Voodoo tend to have fuzzy image quality and washed out color, whereas Voodoo 3 is sharp and saturated.  SLI cards may display more aliasing due to the interleaved nature of the graphics output using two cards.

A Voodoo 3 3000, even though it only has 16MB, usually surpasses a Voodoo 2 SLI 24MB in most benchmarks.  The Voodoo 3 is far more efficient in using its unified memory, whereas the Voodoo has separate frame buffer and texture memory.  In addition, the Voodoo 3 chipset is clocked higher (143 for the 2000, 166MHz for the 3000 and 183 for the 3500) than the Voodoo 2 (90-95MHz) and uses SDRAM over less efficient EDO DRAM.

The Voodoo and Voodoo 2 use a VGA passthrough cable to output the analog 2D card's output through the input of the Voodoo card, and then onto the monitor.  The analog passthrough results in degraded image quality, especially at high 2D resolutions like 1024x768.

One Slot Usage, Excellent Windows and DOS Compatibility and Speed

The Voodoo 3 has an integrated 128-bit 2D accelerator core that supports VBE 3.0.  It works with just about any game that supports VGA or better.  It handles all the common non-BIOS VGA Mode X graphics modes, supports common SVGA modes and 15-bit and 16-bit color VESA modes.  In Windows, the 2D resolution can go up to 2048x1536 @ 75Hz.

The Voodoo 2 can eat up to three slots to provide similar speed and performance (two cards for SLI plus a third card for 2D support).

Relatively Easy to Find

The only time you really saw 3dfx hardware inside systems of the late 1990s was with the Voodoo 3.  The Voodoo and Voodoo Rush were too early for the big OEMs like Dell, HP and Compaq to put in their computers, the Voodoo 2 was too high end and the Voodoo 5 was too little too late.  Only the Voodoo Banshee and Voodoo 3 ever really saw the insides of these systems, which sold in the millions.  When these systems get stripped for parts or sold or dumped as junk machines, there is often a golden nugget or two inside.

The Banshee is more common but only implemented one of the two texture units of the Voodoo 2.  Part of the improved performance of the Voodoo 3 is due to the addition of the second texture unit.  More complex games like Quake 3 and Unreal can take advantage of multi-pass texturing, and the better performance with these titles will be had with a Voodoo 3.  Additionally, the Banshee was manufactured by many OEMs like Diamond and Creative, while the Voodoo 3 board were almost exclusively manufactured by it through its STB subsidiary.  The result is a more consistent level of board design and quality along the Voodoo 3 line.

The Voodoo 4 & 5 is not that much better

While the Voodoo 4 and 5 have improved performance and true 32-bit color support, their greatest benefit is probably the support for full screen anti-aliasing.  However, as far as being future proof, they lack support for hardware transform and lighting, just like the Voodoo 3.  Hardware T&L was a feature of DirectX 7, and by 2004 it was a must-have feature, even if the game only had optional support for it.

No Voodoo 3 card has a fan or needs one if the case has good airflow and the card is not being overclocked.  All Voodoo 4 and 5 cards do, and the Voodoo 5 requires a 4-pin Molex connector. Voodoo 4s and 5s are much harder to find at reasonable prices.  In my personal experience, there are more things that can go wrong on a Voodoo 5 and have done so.

32-bit support was highly touted back in 1998-2000, but there was a strong argument that many gamers preferred the increased speed of 16-bit graphics over the less noticeable improvement of going from 65 thousand colors to 16 million colors.  The Voodoo 3 cannot quite show 32-bit color in 3D modes, but it can get very close with its filtering, which eliminates banding issues seen in 16-bit color modes.  The Glide API was typically built around 16-bit color.

Little Difference between PCI and AGP Cards

The Voodoo 3 2000 and 3000 came in PCI and AGP versions.  The clock rate was the same on the PCI and AGP cards of each model number.  The Voodoo 3 chipset was designed with PCI in mind and really does not see a measurable benefit by using the AGP bus.  It does not support the major AGP features like the sideband bus or AGP textures using system memory.  Any benefit comes from the increased bandwidth of a 66MHz dedicated AGP slot over a 33MHz PCI slot shared with other peripherals.  However, the Voodoo 3 3500 only comes in an AGP variety and has the highest clock rate of any Voodoo 3 board.

Two of AGP cards do come with more than just a VGA output connector.  The Voodoo 3 3000 AGP comes with TV output support through a socket that uses an S-video connector.  The Voodoo 3 3500 has a DVI-like port that connects to an AV dongle.  While it does not support LCD DVI, it does have a TV tuner and AV inputs.  The dongle is required to obtain any video output from the card.

The lack of practical performance benefit of the AGP cards means that you can use the PCI card in an Intel i440BX motherboard, which does not have a 1/4 AGP divider which allows for trouble free overclocking at a 133MHz Front Side Bus speed.

Flavors of PC Compatible BASIC and Why You Should Care

Cassette BASIC :

In 1981, when IBM released the IBM PC Model 5150, it included BASIC in ROM.  In the 5150, it was contained on four 8KB chips, in later machines, it was included within the 32KB chips that included the BIOS.  In every IBM PC model it occupies the space from F600:0000 to FDFF:0000.

Cassette BASIC, as its name implies, has commands for saving and loading only to a compact cassette.  In order to save to or load a program from a cassette, the user needed to connect a cassette drive to his IBM PC with a special cable.  On the back of the IBM PC Model 5150, there was a 5-pin DIN next to the keyboard DIN that this cable would plug into.  At the other end of the cable there would be a 3.2mm audio jack for the auxiliary or microphone input (to save/record data from a PC), a 3.2mm audio jack for the earphone output (to load/playback data to the PC), and a 2.5mm jack to control the tape recorder remotely. The PC had a relay circuit on the motherboard that would start and stop the motor so that the user would not have to.

IBM did not offer a cable for the 5150, but Tandy/Radio Shack TRS-80 and Color Computer tape recorders came with the correct cable.  Most older tape recorders, including those Radio Shack sold for their non-PC compatibles, had four audio jacks, the EAR, REM, MIC and AUX.  Current recorders ditch the AUX input and only have a MIC input.  REM is the smaller jack that controls the cassette deck.  There was a jumper on the system board to set the appropriate signal strength for a MIC input or an AUX input.

Cassette BASIC comes in three versions, C1.0, C1.1 and C1.2.  C1.0 will only be found in the very first IBM PCs, typically those with a 16-64KB system board and a BIOS version dated 04/24/81 or 10/19/81. C1.1 generally should come with all IBM PC Model 5150s with a 64-256KB system board or those systems with a BIOS version dated 10/27/82 (the last).  However, the BIOS in the IBM PC is contained in one chip, U33, and can be updated in an 16-64KB system board without updating BASIC.

All later IBM PCs, the XT, Portable, AT, XT/286 and Convertible, contain Cassette BASIC C1.1.  The PCjr. (and probably the PC JX) uses Cassette BASIC C1.2 for reasons described below.  All PS/2s released during the 1980s and early 90s, and the early IBM PS/1s, also contain Cassette BASIC C1.1 for compatibility reasons.  No other PC Compatible system, unless an exact clone of one of these systems, included Cassette BASIC.

Unlike the disk-based versions of BASIC, Cassette BASIC does not require PC or MS-DOS to run.  However, because the IBM PC and IBM PCjr. are the only PC-compatible systems known to come with circuitry to drive a cassette recorder, Cassette BASIC can only save or load programs on these two systems. 

Disk BASIC, Advanced BASIC and GW-BASIC :

Disk BASIC and Advanced BASIC were included with PC-DOS v1.0 and every version thereafter, 1.1, 2.0, 2.1, 3.0, 3.1, 3.2, 3.3, 4.0 and 4.01.  They were replaced by QBASIC in PC-DOS 5.0.  The version number for Disk BASIC and Advanced BASIC correspond directly to the version of DOS they came with.  This you will see D1.1 for the version of Disk BASIC accompanying PC-DOS 1.1 and A3.3 for the version of Advanced BASIC that came with PC-DOS 3.3.  Disk BASIC is invoked by executing BASIC.COM in DOS, and Advanced BASIC by BASICA.COM in DOS.

The Disk BASIC-Advanced BASIC split was due to the low amounts of memory that came with early IBM PCs.  You could buy an IBM PC with only 16KB of RAM, but with that amount of RAM, you could only run Cassette BASIC.  Disk BASIC required 32KB of RAM, and Advanced BASIC 48KB of RAM.  Disk BASIC could do everything that Cassette BASIC could do and added support for saving and loading programs to floppy disks and serial port access, keeping track of the date and time and supporting two additional printers.  Advanced BASIC does all Disk BASIC does and more, such as support for more graphics and sound statements and event trapping.

PC BASIC does not support multiple memory segments, it runs everything within one 64KB segment.  Thus, after PCs began shipping with 128KB of RAM or more, there was no further need to use Disk BASIC.  In fact, as of DOS 3.3, BASIC.COM was just a small (1-2K) stub that called BASICA.COM and was only present for compatibility.  DOS 1.0-3.2 had a functional BASIC.COM.  PC BASIC would keep up with DOS features, like the added support for subdirectories in DOS 2.0 and the IOCTL calls in DOS 3.0.

With non-IBM machines, vendors and OEMs released system-specific versions of MS-DOS.  With these operating systems, GW-BASIC was included.  GW-BASIC did not require Cassette BASIC.  In these systems, sometimes there is a large BASIC.EXE and a small BASICA.COM.  BASICA.COM is the stub that executes BASIC.EXE.  Sometimes there is also a BASIC.COM stub.  In certain systems, the file was BASICA.EXE or GWBASIC.EXE.

Tandy's GW-BASIC for the Tandy 1000 series included the commands found in Cartridge BASIC to control its PCjr-derived advanced graphics and sound capabilities.  The AT&T 6300's GW-BASIC included commands for the advanced graphics capabilities of that system, and the Hercules Graphics Card came with a utilities disk with HBASIC, which allowed the use of the 720x348 graphics mode these cards support.  A generic GW-BASIC would not support these special features.  Microsoft began releasing generic, non-OEM specific versions of MS-DOS starting with MS-DOS 3.2.  A generic version of GW-BASIC can be found on them.

IBM also released Compiler BASIC which allowed users to compile their program into object code so it does not require a BASIC interpreter to run the program.  Most companies that released games found it simpler to run their code through an interpreter, because every computer with a disk drive and DOS should have had one during the 1980s.

Cartridge BASIC :

The PCjr. included Cassette BASIC C1.2 in its system ROM.  Due to the differences between the PC and PCjr., the BASIC code cannot be identical.  However, to maintain compatibility with applications written for Cassette BASIC, all the functionality of PC Cassette BASIC is included in PCjr. Cassette BASIC, and nothing more.  IBM released an official cassette cable that plugged into a unique male BERG-style port on the PCjr., but it requires a cassette recorder with an AUX input.

IBM released Cartridge BASIC with the PCjr., and the user had to buy it separately.  It is a 32KB cartridge that plugs into either cartridge slot of the PCjr.  Cartridge BASIC included commands to take advantage of the PCjr. video adapter and sound chip.  Cartridge BASIC has only one version, J1.0.  Disk BASIC and Advanced BASIC, when run on the PCjr., will show the version as J1.0, regardless of DOS version.  Disk BASIC and Advanced BASIC will not run unless Cartridge BASIC is present.

Using Cartridge BASIC in a PCjr. with more than 128KB of RAM imposes special problems.  Cartridge BASIC was not designed for more than 128KB, and programs run it may not run correctly or at all. However, the PCjr. will not recognize extra RAM unless a device driver is loaded in DOS.  If DOS is loaded, either from a disk or a hard drive without a device driver loaded, then Cartridge BASIC should run normally.  You will be limited to the first 128KB of RAM and the poor performance resulting by running BASIC code within it.  The popular device driver JRCONFIG 3.1 included an unsupported /q command line switch where it will lie about the amount of memory available to BASIC, but it will warn you that anything contained in a RAM Disk or Print Spooler created by JRCONFIG will be in danger.

QBASIC :

In PC-DOS 5.0 and MS-DOS 5.0, Disk BASIC and Advanced BASIC were no longer included with the operating system.  Instead, QBASIC version 1.0 was included.  QBASIC was a cut down version of Microsoft QuickBASIC.  QBASIC does not require line numbers and supports a mouse cursor, split windows, drop down menus and multiple colors in its text-based user interface.  The MS-DOS EDIT.EXE program requires QBASIC.EXE, QBASIC.HLP and EDIT.HLP to work.  QBASIC tends to be a poor performer on 8088-based XT-class and low speed 286-based AT-class machines.

I read that the original version of QBASIC in PC-DOS 5.0 still required Cassette BASIC in ROM, but it only used checked to see that it was there before loading QBASIC.  This requirement was removed in the QBASIC that came with PC-DOS 5.02.  QBASIC version 1.1 was included in MS-DOS 6.0 through Windows ME and NT 4.0.

BASIC Games :

The first game ever written for the IBM PC was Donkey.  This simple game was included as the file DONKEY.BAS with several other demonstration programs included on the DOS disks.  In fact, half the files included in PC-DOS 1.0 and 1.1 were BASIC demonstration programs.  It is included with PC-DOS 1.0-3.2.  With DOS 3.3, virtually all the demo programs were eliminated.  

QBASIC in MS-DOS 5.0 and PC-DOS 5.0 came with two games, Gorillas and Nibbles.  Their files are called GORILLA.BAS and NIBBLES.BAS.  Nibbles is a text mode game that uses an 80x25 column mode, but appears as a 80x50 column mode by the use of a half-bar ASCII character (where the top half uses the foreground color and the bottom half uses the background color).  It works with any video adapter. Gorillas uses either the 320x200x4 CGA Mode 04 or the 640x350x16 EGA Mode 0F.  They are intended to be run on a low-end 386 or a high end 286.  Both games would be gone by MS-DOS 6.22 and PC-DOS 6.1

Games Requiring BASIC :

Several games, usually early games, used Cassette/Disk/Advanced BASIC.  Some were copy-protected DOS disks that directly accessed Cassette BASIC.  They must be run on an IBM system.  Nine games commercially released by IBM early in the life of its PC line require Cassette BASIC or Cartridge BASIC.  They are

Adventures in Math
Arithmetic Games Set 1*
Arithmetic Games Set 2*
Bumble Games*
Bumble Plot*
Casino Games
Juggles Butterfly*
Monster Math
Strategy Games

* - Copy Protected (The Learning Company games) or probably Copy Protected (Science Research Associates, Inc.)  IBM never seemed to copy protect the games it developed internally, but did with any game it released that was licensed from or developed by another company.  Any game that is not copy protected, or has been cracked to run on a generic disk should be able to be run with GW-BASIC. Mobygames lists 75 games that require BASIC, and some are sophisticated commercial releases like Battle of the Bulge, some are old classics like Temple of Apshai and others are small single file games that just need a BASIC interpreter. There are many, many freeware games that run on QBASIC, and while Mobygames may not document every Cassette/Disk/Advanced BASIC game ever made, it does not really list any games that use QBASIC other than Gorillas an Nibbles.  A good place to start to find QBASIC games is here :

http://www.qbasic.com/games/
http://www.petesqbsite.com/index.php

Monday, September 1, 2014

How many FPS? - DOS Games and Framerates

The refresh rate is the number of times the display redraws the screen per second.  In the DOS world, three refresh rates were typically used by monitors.  Displays compatible with the MDA and Hercules Graphics Card used a 50Hz refresh rate.  To reduce flicker, they also used slow-decaying phosphors, giving a ghosting effect.  A high pixel resolution of 720x350 was available, but these displays used a TTL signal composed of a video and an intensity line, instead of an analog composite signal.

The CGA was designed for TV screens and color RGB monitors, so its displays used a 60Hz refresh rate.  As a tradeoff, the resolution of this adapter could not exceed 240 lines.  The adapter did not support interlaced video modes, which generally use 480 or more lines and which ran at ~30Hz.  The flicker caused by an interlaced signal on a CRT is very noticeable when the user is close to the screen.  The monitor used a 4-bit digital input for RGBI monitors, but was otherwise similar to analog RGB monitors like the Amiga 1084.  The PCjr. and Tandy Graphics Adapters used the same displays.  The EGA could use either an Monochrome Display, a Color Display or an Enhanced Color Display that supported 350-lines and 6-bit digital RrGgBb input.  The refresh rate for the Enhanced Color Display was still 60Hz.

Later, the VGA and MCGA supported high resolution analog RGB monitors.  To reduce flicker, these monitors refresh all resolutions at 70Hz, except for 640x480, which uses 60Hz.  SVGA and later standards would typically allow the user to set the refresh rate for the resolution he wished to use, and some CRT monitors of the late 1990s could handle refresh rates up to 120Hz at 640x480 and 85Hz at 1024x786 or better.  Refresh rate also tended to depend on bit depth, and the monitor may not be able to handle a 32-bit graphics mode at a high refresh rate.

The increase in refresh rate was mainly done to combat flicker.  When someone sits five feet from a TV screen, interlacing and flicker are generally not so great a problem as to distract a person.  However, when someone sits five inches from a computer monitor, 60Hz can become a problem, especially as screen sizes grew from 13" to 15" and beyond.

Just because the display adapter is drawing the screen 60 times per second, that does not necessarily mean that there is some movement occurring on the screen at that framerate.  Many DOS games, like adventures, are fairly static games where often little is occurring on the screen.  In this sense, the game's framerate is only the rate needed to update the animation.  Games with cursors can redraw the cursor as fast as the refresh rate allows.  Therefore, despite the potential of the displays, actual high frame rate games are comparatively uncommon.  Many CGA and EGA games will limit themselves to 30 (Test Drive), 20, 15 (Lemmings), 10 or 5 frames per second.  By keeping the frame rate to an even divisor of 60, the game can avoid screen tearing.

Similarly, in many action games of the 1990s that used VGA, the frame rate would not intentionally exceed 35 frames per second during the action.  Some of ID Software's games from this period follow this rule, including Commander Keen 4-6 and Keen Dreams and the DOOM games.  The use of 35 frames, even in a 16-color game like Keen, demonstrates that ID was using VGA, not EGA, to develop the game.

Commander Keen 1-3 use a "cinematic" 24 frames per second approach, and Commander Keen 4-6 and Keen Dreams for CGA allow up to 60 frames per second.  This may be to compensate for the lack of scrolling hardware with CGA.  Dangerous Dave, Monster Bash and Catacomb 3-D use 60 frames per second with EGA and 70 frames per second with VGA.  Wolfenstein 3D is a 70 frames per second game using an updated Catacomb 3-D engine.  Jazz Jackrabbit is a very fast and fluid game, and it uses 60 frames per second in its action sequences.  To avoid screen tearing, the game uses a custom 320x199 resolution to allow it to specify a custom 60Hz refresh rate.

The best DOS pinball games are also high frame rate games.  Epic Pinball, Pinball Fantasies and Pinball Illusions all use 60 frames per second for the tables.  This makes sense because they are trying to simulate the fast action of a pinball table and ensure smooth screen scrolling as the table has to frequently shift from the upper and lower portions of the table.  Pinball Dreams and Pinball Dreams 2 actually use 70 frames per second for their tables.

High framerates assumes your hardware can push those frames out to the adapter.  Lower-end hardware will not be able to keep up, and the responsiveness of the screen will not be as fluid.  However, on the other end of the spectrum, older games may be run too fast on newer hardware, and thus may approach 60 or 70 frames per second when they were intended only to produce a fraction of that rate.  In Sierra's AGI games, for example, while the frame rate is usually in the teens, if you use the fastest setting on a 486, for instance, you may go to at least 60 or 70 frames per second.