Remembering Memory: EMS, And TSRs

You often hear that Bill Gates once proclaimed, “640 kB is enough for anyone,” but, apparently, that’s a myth — he never said it. On the other hand, early PCs did have that limit, and, at first, that limit was mostly theoretical.

After all, earlier computers often topped out at 64 kB or less, or — if you had some fancy bank switching — maybe 128 kB. It was hard to justify the cost, though. Before long, though, 640 kB became a limit, and the industry found workarounds. Mercifully, the need for these eventually evaporated, but for a number of years, they were a part of configuring and using a PC.

Why 640 kB?

The original IBM PC sported an Intel 8088 processor. This was essentially an 8086 16-bit processor with an 8-bit external data bus. This allowed for cheaper computers, but both chips had a strange memory addressing scheme and could access up to 1 MB of memory.

In fact, the 8088 instructions could only address 64 kB, very much like the old 8080 and Z80 computers. What made things different is that they included a number of 16-bit segment registers. This was almost like bank switching. The 1 MB space could be used 64 kB at a time on 16-byte boundaries.

So a full address was a 16-bit segment and a 16-bit offset. Segment 0x600D, offset 0xF00D would be written as 600D:F00D. Because each segment started 16-bytes after the previous one, 0000:0020, 0001:0010, and 0002:0000 were all the same memory location. Confused? Yeah, you aren’t the only one.

Continue reading “Remembering Memory: EMS, And TSRs”

Exploring PC Floppy Protection: Formaster Copy-Lock

[GloriousCow] has started working on a series of investigations into the various historical floppy disk copy protection schemes used in the early days of the IBM PC and is here with the first of these results, specifically Formaster’s Copy-Lock.

This is the starting sector of track 6. It looks empty, but it’s not quite.

The game in question is King’s Quest by Sierra Entertainment, which used a ‘booter disk’ with the Copy-Lock protection scheme. Instead of having to boot DOS separately, you could just insert this disk and the game would launch automatically. Early copy protections often used simple methods, like adding sectors with non-standard sizes or tampering with sector CRC values to create disk errors. Copy-Lock employed several such tricks together, making it challenging for standard floppy disk hardware to replicate. In the case of Copy-Lock, Sector 1 on track 6 was intentionally written as only 256 bytes, with a 256-byte blank section to fill the gap. Additionally, the CRC was also altered to add another layer of protection.

When attempting to read the disk, the PC BIOS interrupt routine assumes it’s looking for a standard 512-byte sector, so when a “read sector” command is issued to locate the sector, it never finds it. To detect a dodgy copy, the game bypasses the BIOS and talks directly to the floppy disk controller using some custom code. The first part of the code uses the standard INT 13h routine to seek to track 6, sector 1, where it expects a fail since there is no valid sector there. Next, the floppy controller sends the “read track” command to perform a raw dump of all 512 bytes at this address and looks for a magic number, 0xF7, sitting in the final byte. That empty second half of the short sector is indeed not empty and is the check the game makes to determine if it was written with the Copy-Lock capable hardware. That last point is pertinent; you can’t create this disk structure with a standard IBM PC floppy disk controller; you need specialized hardware that can write different-sized sectors and incorrect CRCs, and that costs money to acquire.

We recently covered the copy protection scheme used for Dungeon Master on the Atari ST and the Amiga. If you’re thinking less about how a floppy got cracked and copied and more about how to preserve these digital relics, check this out!

The IBM PC: Brainchild Of A Misfit

We’ve read a number of histories of the IBM PC and lived through that time, too. But we enjoyed [Gareth Edwards’] perspective in a post entitled The Misfit who Built the IBM PC. The titular character is Don Estridge, a decidedly atypical IBM employee who was instrumental in creating the personal computer market as we know it.

It’s not that IBM invented the personal computer — far from it. But the birth of the PC brought personal computers to the mainstream, especially in offices, and — much to IBM’s chagrin — opened up the market for people to make add-on cards for printers, videos, and other accessories.

IBM was a computer juggernaut in the late 1970s. Its divisions were the size of other companies, and some have compared it to a collection of mafia families. The company was heavily invested in big computers, and management was convinced that personal computing was, at most, an avenue to video games and most likely a fad.

Known as a conservative company, the PC project drew from a number of corporate misfits who had been technically successful but often punished for coloring outside the lines. They developed a prototype. The post quotes one of the people involved as saying, “The system would do two things. It would draw an absolutely beautiful picture of a nude lady, and it would show a picture of a rocket ship blasting off the screen. We decided to show the Management Committee the rocket ship.” Wise choice.

That’s just the kind of tidbit in this post, and if you have any interest in computer history of the 1980s, you’ll definitely want to check it out. Estridge died in 1985, so he didn’t get to see much of the result of the market he opened up. Of course, there were many other players who appear in this story. The PC has many parents, as you might expect.

We’ve done our own recounting of this story. However, we tend to obsess more over the internals.

Video And Audio Playback On Low-End MS-DOS Machines

For most people the phrases ‘MS-DOS’ and ‘video playback’ probably aren’t commonly associated, yet it was quite normal as those of us who were watching full-motion video with games like Command & Conquer can attest to. These audiovisual experiences did however require somewhat more capable hardware than something like an original, 4.77 MHz IBM PC. More recently, however, the removal of these limitations has been turned into a challenge that has been gleefully accepted by hackers, including [Scali] whose recent tinkering with getting not only real-time video but also audio working on these old beasts has been documented on their blog.

Unlike existing early video formats like FLIC from the 1990s, the XDC format developed over the past years enables real-time, 60 FPS video and audio playback on an 8088 IBM PC that has a SoundBlaster 2 and CGA card installed. As [Scali] notes, the SB2 card is convenient, because it enables DMA transports for the audio data, which saves a lot of precious CPU cycles. Unlike the original SB card, it also fixes some teething issues, but an SB2 is hardly ‘low-end’ for an early 1980s PC, so it has to go.

Continue reading “Video And Audio Playback On Low-End MS-DOS Machines”

The IBM MDA Should Have Been The CDA

If you are reading this on an IBM PC-compatible computer, it is a certainty that its graphics card will support the lowest common denominator of PC displays, the Monochrome Display Adapter, or MDA. This was a video card which delivered a text-only display in black-and-white that was an option fitted to the very first PC models. But was it really a monochrome display adapter? [TubeTimeUS] is here to show us that when connected to the appropriate colour monitor, it can produce text in colour. It seems that this was a feature only on the very earliest revisions of the card.

Reading up on the MDA card, we find that at its heart it had a Motorola MC6845 CRT controller, a chip that appeared in a huge variety of machines from that era. The beauty of this chip was that it provided the correct timing signals and memory locations for video to be created, but didn’t include any video circuitry thus the designer was free to craft a video device to their specification, allowing for it to appear in both colour and monochrome devices. While the MDA card only supported a text mode it seems its designers managed to put in some form of colour attribute support even if it was never marketed as such. We’re not students of IBM graphics card modes here at Hackaday, but it would be fascinating to know whether this undocumented mode works in the same way from the software side as the colour text modes on CGA and better colour cards.

Continue reading “The IBM MDA Should Have Been The CDA”

Browsing The WWW On A 1980s IBM PC Using MicroWeb

Do you ever sit at your 1981 vintage IBM PC and get the urge to pop onto that newfangled ‘WWW’ to stay up to date on all the goings-on in the world? Fret not, because [Al’s Geek Lab] has you covered with a new video (also embedded below), which you will unfortunately have to watch on a device that was made at the very least in the late 1990s. What makes this feat possible is a miniscule web browser called MicroWeb, created by [jhhoward], that will happily run on an 8088 CPU or compatible, without requiring any fiddling with EMS or similar RAM extensions.

Of course, you do need to have some kind of way to actually connect to the World Wide Web, which can be an ISA network expansion card, EtherSlip, as well as using a thin client as a network bridge with some Serial Line Interface Protocol (SLIP) action. Of course, some limitations exist, in that graphics and CSS are not rendered, JavaScript is totally off-limits, and for HTTPS-only websites a workaround like retro-proxy has to be used as TLS encryption would be completely unusable on a couple-of-MHz-CPU.

There’s also the FrogFind service, which will helpfully strip down a target website down to its barest HTML essentials, along with the 68K News site that strips down Google News, so that you can enjoy the WWW in its text-based glory as it would have looked in the early 1980s.

(Thanks to [Stephen Walters] for the tip)

Continue reading “Browsing The WWW On A 1980s IBM PC Using MicroWeb”

MS-DOS Meets The Fediverse

By now, most Windows users are set up with decently functional machines running Windows 10 or 11. Of course there are a few legacy machines still lagging behind on Windows 7 or 8 and plenty of computers in industrial settings running ancient proprietary software on Windows XP. But only the most hardcore of IBM PC users are still running DOS, and if you have eschewed things like Unix for this command-line operating system this long you might want to try using it to get online in the Fediverse with Mastodon.

The first step is getting DOS 6.22, the most recent version released in 1994, set up with all the drivers and software needed to access the Internet. At the time of its release there were many networking options so the operating system didn’t include these tools by default. [Stephen] first sets up an emulated NE2000-compatible networking card and then installs the entire TCP/IP stack and then gets his virtual machine set up with an IP address.

With a working Internet connection set up, the next step on the path of exploring federated social media is to install DOStodon (although we might have favored the name “MastoDOS”) which is a Mastodon client specifically built for MS-DOS by [SuperIlu]. There are pre-compiled packages available on its GitHub page for easy installation in DOS but the source code is available there as well. And, if this is your first time hearing about the Fediverse, it is mostly an alternative to centralized social media like Facebook and Reddit but the decentralization isn’t without its downsides.