Software spotlight: Cassette software for the IBM PC

edited August 2019 in Software Spotlights

While people stick their noses up at floppies these days (or any physical media for that matter), few realize that the original IBM PC and PCJr both supported an even more primitive form of program storage: audio cassette tape.

First, a slight clarification. It turns out that the "Diagnostics 1.02" we had posted is actually the "Advanced Diagnostics 1.02", so that has been moved to a different release. And now we need the standard 1.02. It appears there were 4 different diagnostics releases.

https://winworldpc.com/product/ibm-pc-diagnostics/advanced-102

When the IBM PC was designed, adding a cassette tape port for storage was a fairly logical thing to do. Home oriented systems like the Apple II, TI-99/4a, Commodore, and TRS-80s could use audio tape storage, and had many published cassette tape titles. Many people already owned cassette tape recorders, and tape recorder systems were vastly less expensive than disk systems.

The obvious problem with cassette tape storage was that it was sequential access only, and very slow.

When the IBM PC was released in 1981, floppy drives were catching on. But it still wasn't absolute certainty how available floppy drives would be on the market.

In theory, having a cassette tape option helped protect IBM against market volatility. But some believe the only reason IBM added a cassette port was so they could market a lower cost "base model" without floppy drives that was TECHNICALY functional.

As it turned out, most of the business market that adopted IBM PCs were more than willing to spend the extra money for a floppy drive. This, even though only single sided "160k" drives were initially supported and readily available. It is possible some may have purchased a floppy-less base model only to add their own existing floppy drives.

So how does this work?

An IBM PC equipped with no floppy drives, or if disk boot fails, will boot directly to ROM "Cassette" BASIC. From there, you can load from, or enter and save a program to cassette.

IBM did not manufacture their own connector cables (except for the PCJr) or cassette recorder. The IBM PC used the same cable as the TRS-80, and could use any decent quality cassette recorder.

Annoyingly, there is no way provided to access the disk system from ROM's Cassette Basic. Similarly, there is no way provided to access the cassette from PC-DOS's Disk Basic.

You can use a computer or mobile device to play back the cassette file. But you may need to adjust bass and treble settings, and not all sound devices easily permit this (yet they will have a zillion other options).

Treble and bass settings essentially muffle the audio, reducing static and hiss. Unfortunately, our cassette programs ARE static and hiss! :)

Cassette operation in IBM PC ROM Cassette Basic is a little odd. When you save a program to tape, you must give it a name. Then when you load the program, you must specify the same name - or it won't load. For example, to load a program named Hello, you would type:

load "hello"

I guess the idea is that you can give it a name and then run through multiple programs on the tape until it gets to the one with that name. It will print the name of any programs it skips. But how are you supposed to know the name in advance? Most other cassette systems simply load the first program they encounter.

IBM BASIC doesn't prompt you to press play or stop, and it isn't very informative when something goes wrong.

The TI-99/4a was much friendlier, but hey, IBM's got to be IBM. :)

The IBM Advanced Diagnostics cassette consists of a two part program. The first is a BASIC loader stub. The second is a binary machine language program that the stub loads.

To begin loading the diagnostics, where "ldcass" is the program name, type:

load "ldcass"

Since computers can't "pause", you must hit the pause button on your player software the moment the loader stub finishes loading (listen for the second relay click). Type "RUN", and then resume playback.

The loader stub also provides the ability to copy the advanced diagnostics to a new cassette tape.

This involves loading the stub, saving it as "ldcass", then typing "run 100" which will load and re-save the binary machine language portion.

Details are provided in the stub's program listing comments. If you are transferring from computer to a real cassette recorder, this also involves switching the cables.

Interestingly the diagnostics program does have an option to test the floppy drives, although it can't do anything else with them. In the event of a floppy system failure, one could still load and run the cassette diagnostics.

It turns out that the posted version is actually the "Advanced" diagnostics. The Advanced diagnostics have more testing options than the standard diagnostics shipped with the IBM PC.

I have revised the download and added a "fresh" recording sampled directly from a 5150's cassette output. This should contain less distortion, and may work better for some people.

The standard "Diagnostics For The IBM PC" were bundled the IBM Guide To Operations manual shipped with each IBM Personal Computer.

It appears that there were two versions of the GTO manual, one for a floppy system, and one for a cassette (floppy-less) system.

From some research and extrapolating from Minuszerodegres.net , the following GTO manuals would have shipped with early IBM PC model 5150 systems.

Title                                    Spine       Document
GTO "First Edition (August 1981)"        6025000     6025003 Floppy Diagnostics 1.00 - 6172230
GTO "First Edition (August 1981)"        6025117?    6025113? Cassette Diagnostics 1.00? - ??????? 
GTO "First Edition (Revised April 1982)" 6025000     6025003 Floppy Diagnostics 1.02 - 6081552
GTO "First Edition (Revised April 1982)" 6025117     6025113 Cassette Diagnostics 1.02 - 6081562 

All later Guide To Operations manuals were floppy-only.

The "IBM PC Advanced Diagnostics" were bundled with the IBM Hardware Maintenance Service manual, a manual intended for repair personnel and advanced users. Each manual contained both a floppy disk and cassette tape.

Again, from some research and extrapolating from Minuszerodegres.net, the following HMS manuals would have shipped.

Title                              Spine    Document 
HMS "First Edition (August 1981)"  6025072  6025075 Advanced Diag 1.00 - Disk 6172231 Cass 6172401
HMS "Revised Edition (July 1982)"? 6025072  6025075 Advanced Diag 1.02 - Disk 6081557 Cass 6081566

All later Hardware Maintenance Service manuals were floppy-only.

In summary there should be 4 different diagnostic cassettes:

  • Diagnostics 1.00
  • Diagnostics 1.02
  • Advanced Diagnostics 1.00
  • Advanced Diagnostics 1.02 (we have this one)

Were there any other programs released on cassette? Well, one, apparently. "IBM Typing Tutor" but no one has ever seen one!

It was listed in a 1983 IBM product list

And the binder with the disk version has both the disk and cassette part numbers printers on it.

Winworld does have the disk version: https://winworldpc.com/product/ibm-typing-tutor

?

Is that it really it? Nobody seems to have ever seen any commercial cassette programs.

There is at least one other program that can USE the cassette port, although it is not for storage:

"One program that specifically supports the cassette port is Electronic Arts Music Construction Set. This program has a setting to output 1 note PC Speaker or 4 note (tweaked) PC Speaker music, and has an option to output it to the internal PC Speaker or the cassette port. 4-voice output may sound better through a powered speaker than the internal speaker, but the basic sound will be the same."

The WinWorld library has Music Construction Set: https://winworldpc.com/product/music-construction-set

"There's at least one early game that supports saving to a cassette (Galaxy from Avalon Hill) "

IBM PCJr

The IBM PCJr, the home-oriented scaled down follow-up to the IBM PC, also included a cassette port.

It required a different connector cable, this time one manufactured by IBM.

There are no known PCjr cassette titles, not even a diagnostic.

The PCJr, did, however add support for ROM cartridges, for which there were a few, including Lotus 1-2-3.

Once again, a cassette port on a home computer still made a bit of sense at the time, and IBM offered a floppy-less base version. But at this point it was even more likely that the only reason for it was the low base price.

IBM XT and later

The IBM Portable Personal Computer model 5155 and IBM XT Model 5160 omitted cassette ports, but retained ROM basic for compatibility.

Clones, such as the Columbia Data Product 1600, Eagle PC, and Compaq Portable, also omitted cassette ports as well as omitting ROM basic.

One Russian clone was reported to have had a cassette port, and early revision Compaq Portable motherboards had an unpopulated component area that could have been for a cassette interface.

XT class computers no longer supported a configuration with "zero" floppy drives, even though that had been technically valid on the IBM PC model 5150. Software was often hard coded to expect a floppy drive, even if it ran from a hard drive. For example the IBM Assistant/PFS software crapped itself running in DOSBOX because it reported zero floppy drives.

Although Cassette BASIC was retained for ROM compatibility on XT, AT, PS/2, and some Aptiva computers, it was useless as it could not save programs. With a hard drive installed, users of these machines would never even see ROM Basic.

IBM's PC-DOS Disk Basic would not run without Basic in ROM. In all probability, this was initially done to save RAM, as it re-used existing code in ROM. Microsoft's Basic and GWBASIC, shipped with most clones, did not have that restriction. Oddly, QBASIC in the first release of IBM DOS 5 artificially required ROM Basic to run, probably due to licensing reasons.

The IBM PC 5150 was discontinued in 1987, and even the last one off the assembly line had the cassette port.

Comments

  • The advanced diagnostics cassette sounds awesome! I'm gonna listen to it when working out.

    Is that it really it? Nobody seems to have ever seen any commercial cassette programs.

    Apparently Peter Norton wrote in one of his books that no such programs were made for the IBM PC.

  • The quote I see out there is that he never SAW any commercial cassette programs for the IBM PC.

    Not that I'm really doubting there weren't any others.

    It would, however, be interesting to see any earlier product lists. It is surprising that Cassette Typing Tutor even lasted to 1983 (or maybe they just still had a stack they couldn't sell :p ).

  • There is one commercial program for the IBM PC that was delivered on disk but would save data to cassette: Avalon Hill's Galaxy. It implements motor on, write to cassette, followed by motor off; no human interaction needed beyond inserting the cassette into the recorder. Also would read the file back. Like most of the other early AH games, Galaxy is a BASIC game and relies on the built in features of BASIC.

    The oddball in the cassette usage for the IBM PC was "The Desk Organizer" from Conceptual Instruments. TDO's first IBM PC version included a copy protection dongle that plugged into the cassette port; one of many blunders that rendered TDO very obscure. The author used to have a page on it https://web.archive.org/web/20060222130959/http://rhythmiclight.com/misc/DeskOrganizer.html
    TDO probably is historically important since beyond the cassette dongle, it was an early example of a TSR program and a commercial program built on UCSD Pascal.

    MS had stacks of printed Typing Tutor cassettes; Brutal Deluxe affords a picture of the Apple II version. I expect that had anyone actually ordered a copy for the IBM PC, MS would have used one of the other cassettes to store the IBM PC version and placed a sticker to conceal the original intended target.

  • I was aware of the tape drive option on the PC. As I kid I knew someone, who for a short time, used such a thing. But even then it was a very rare exception- the only one I ever saw in person in over 35 years !

  • But how are you supposed to know the name in advance? Most other cassette systems simply load the first program they encounter.

    You can do this in Cassette BASIC by specifying only the device name:

    load "cas1:"
    

    This will also work in Disk BASIC as well as GW-BASIC under DOS, so you have full access to the cassette from GW-BASIC:

    load "cas1:"
    save "cas1:myprog"
    

    There is no cas2, in case you were wondering. :)

  • From Cassette Basic, using cas1: isn't needed. It defaults to using the cassette.

    load ""
    would load the next BASIC file to start

    load "myprog"
    would list every file it finds and the file type until it finds a BASIC file named MYPROG which is loaded into memory. Rewinding and then LOADing the name of a file not on the tape will show all the files stored on the tape but could take 30 minutes.

    Append an ",r" to the LOAD to run the program immediately

    BLOAD works the same way but it is necessary to tell it what address to load at. Check out Retrohun's bootable game demos on cassette to see how BLOAD pushes a .COM program into memory and then executes it.

    The cassette can have multiple file types like tokenized BASIC, ASCII, the memory image format, and the modified ASCII files that result if someone was crazy enough to use the OPEN command for output. With only a single cassette, OPEN seems like a great way to over write the cassette unless the user is very careful using the forward and rewind buttons.

    The major failing of the IBM PC cassette support was that only one cassette port was available. Give a second like the Tandy Model 1 with expansion chassis or Commodore PET and many more business uses would exist. Though the Soviet cassette equipped PC clones managed cassette business software while only having a single cassette port so other methods could be found.

  • From Cassette Basic, using cas1: isn't needed. It defaults to using the cassette.

    load ""
    would load the next BASIC file to start

    This doesn't work in Cassette BASIC, the "cas1:" is required:

    load ""
    Bad file number
    Ok
    load "cas1:"
    ldcass  .B Found.
    Ok
    
  • Thomas Brase has made available an audio recording of PC Diagnostics 1.02:

    https://www.dropbox.com/s/01lgs9zz0cz3iv0/ibm_6081562.m4a?dl=0

    His web site with pictures of the cassette and the packaging is here:

    https://www.retrocmp.de/ibm/5150/cassette.htm

    I have tested the recording and it is indeed plain Diagnostics 1.02.

  • edited April 2020

    @hampa

    Hi.

    Well, the dropbox link seems to be wrong, or file seems to be deleted.

    I also have PC casssete data recorder cable (5-pin DIY).

    Cassette dump is not so easy to do, but I have experience in this work with MSX cassette.

  • Well, the dropbox link seems to be wrong, or file seems to be deleted.

    The dropbox link was sent to me by Thomas Brase. I don't know what happened. Here is the same M4A recording:

    http://www.hampa.ch/pub/pce/misc/ibm_6081562.zip

  • @hampa

    Thanks.

    Unfortunately I can't convert from M4A (or MP3) to CAS.
    I've tried to convert it to WAV, and convert WAV to CAS with WAV2CAS.
    But it can't be converted because of wrong WAV format.

  • Unfortunately I can't convert from M4A (or MP3) to CAS.
    I've tried to convert it to WAV, and convert WAV to CAS with WAV2CAS.
    But it can't be converted because of wrong WAV format.

    There is now a download link for the M4A file on Thomas' site.

    I have updated the ZIP file on my site to include the M4A converted to a mono 8 bit WAV as well as a CAS file.

  • @hampa

    It works well on PCE with IBM PC 5150 (64KB, Rev.A).

    Would you please convert WAV/MP3 to CAS of IBM Advanced Diagnostics 1.02?

  • Would you please convert WAV/MP3 to CAS of IBM Advanced Diagnostics 1.02?

    Here you go:

    http://www.hampa.ch/pub/pce/misc/ibm_6081566.zip

  • @hampa

    Thanks to your help, I can test cassette software for IBM PC.

    I wonder PCE can support WAV or MP3 format as cassette tape.

  • Emulators make the cassette port much easier to use than real hardware. No mussing to make sure volume control and the motherboard jumper work together. Give IBM credit, their implementation was a bit more forgiving of minor volume and speed differences than some of cassette routines available to other computers.

    The very tight CPU controlled timing loops make it impossible to do any form of background processing while the cassette port is being accessed. The motor does not stop and the next bit had better be ready on time or the whole file will be inaccurate. Also, CPU upgrades can alter the speed of the cassette port routines precluding sharing cassettes with any computer except one with the same upgrade. Just elements to keep in mind if considering doing an INT 15h adaption of software to match some of the cassette support available to LDOS or CP/M applications.

  • Caught this some where else but http://boginjr.com/it/sw/dev/5150caxx/ has a simple DOS application to access the cassette port and load/save file there. Written in Turbo C and assembler so the memory consumption is a bit excessive. It also only handles files shorter than the free memory so one would need to add loops to take a file in chunks for any useful utility.

    Took nearly 40 years but the IBM PC has finally caught up with the Apple II and CP/M machines running a Tarbell cassette interface.

  • In the late 80s in Russia released several cheap clones of IBM PC with a cassette interface. Drives and memory expansion could be purchased additionally, and it was possible to start working immediately with the cassette. For some users, the cassette remained the main storage device.
    About 200 DOS games were transferred to the cassette, and cassettes for Soviet IBM PC clones were just as popular as on ZX Spectrum.

    I recorded the load of several games:

  • edited May 2020

    Surprising seeing a clone make a cassette recording that could be read by a 5150. EACA clones only were able to read some of the complete library of cassettes available for the TRS-80 Model 1 being cloned. With only a 50 microsecond trigger window, very small timing differences become data corrupting issues. Hopefully, you will supply a web page detailing the conversion for replacing the Soviet system monitor ROM with a Cassette Basic loader.

    One minor correction to the main article. Having part of the BASIC in ROM allowed IBM to show off the full capability of BASICA on a 96 kB system. A system using GWBASIC needed 128 KB to pull off the same result. An extra 32K in 1981 cost $200 while the ROM only cost about $30. IBM pulled a similar trick to force competing systems to have a higher build cost with the AT. IBM for about a year had all the floppy controllers capable of running at 300 kbps and thus reading 360K floppies on 1.2 MB drives. Competing systems needed 2 drives to match making it difficult to undercut IBM on price. Just because IBM used off the shelf parts didn't mean they had to make it easy on the competition.

  • I don't know how I missed it in the past but there was an IBM compatible sold with a cassette port in the UK. Needed an expansion case for slots, drive controller, and drives.

    https://nosher.net/archives/computers/your_computer_1984-05-004
  • One more piece of software that uses the cassette port on the 5150 has shown up. It is sources for the IBM PC version of Basicode. This does something no other 5150 software does; it uses different timing routines to get the 5150's cassette port to work at the slower 1200 bps standard of Basicode. It also incorporates instructions and code to get a parallel port to cassette port adapter working on an XT or AT including most clones thereof.

    https://github.com/jacgoudsmit/Basicode
  • I've compiles notes about the physical 5150 cassette tape here:
    https://voidstar.blog/5150-setting-up-tape-deck-connection-because-the-5150-can/

    Along with a collection of DOS games (.COM files) that have been recorded to cassette and loaded back using ROM BASIC (two different approaches, and covered also how to use a smartphone as a tape deck -- but still need the proper TRS-80 cable)
  • Just as an FYI, 86Box now emulates the PC's cassette interface. In case you want to play around with this software in emulation.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file