The IBM PC: Getting Rebel Assault Running

February 10, 2021

I was big into Star Wars as a kid. Long before the Mandalorian and Clone Wars, before JJ and Rian, heck, even before Jar Jar and Amidala. I watched the original movies on VHS every year on Christmas afternoon, I struggled with the SNES side scrolling games, and I played X-Wing and TIE Fighter to death.

In the mid 90s, I had my Amiga 500 (or maybe my 2000 by this point) and my dad had some generic PC. He had a CD-ROM drive in his machine, and he got LucasArts’s first CD-ROM only game, Star Wars: Rebel Assault. This game was super cool, with pre-rendered 3D flight sequences, because there was no way that computer was rendering anything more complex on its own than the original DOOM.

The trickiest part of Rebel Assault was not the spaceflight or taking down the Death Star…it was giving it enough memory to run! Rebel Assault ran on DOS, and required loading and configuring the sound card driver and the CD-ROM driver, by hand, using a pair of files called CONFIG.SYS and AUTOEXEC.BAT. These files have been around since the beginning of DOS, and only truly went away with Windows ME. Even in a simple OS like MS-DOS, you need to load a bunch of stuff at the start to make it work.

My dad’s PC was a 386, and most likely it had between 4 and 16 MB of RAM. In IBM PCs back then, the first MB of memory was divided up in a special way. The first 640K was roped off for direct program and data access in a place called Conventional Memory.

The breakdown of the first MB of RAM in an IBM PC, with an 8086 standing in front of it

Above that 640K is the Upper Memory Area, a place where the code for graphics card drivers and the BIOS lived. The original memory address boundaries and sizes of these areas are:

  • A0000-CFFFF, or 196608 bytes, for the graphics card
  • D0000-EFFFF, or 131072 bytes, for the graphic card ROM
  • F0000-FFFFF, or 65536 bytes, for the BIOS

Go past the 1MB mark and now you’re in the High Memory Area, a special 64k segment that, along with a special hardware switch called an A20 Gate, kept older DOS programs in their original 1MB playground.

Go a little further, and now you’re in to the good stuff. The memory above 1MB+64K. Normal DOS programs can’t get in here without tools like HIMEM.SYS and EMM386.EXE, but you’re Rebel Assault, a protected mode program that can throw open the A20 Gate and get access to it all. We just…have to…get it started…

Ugh, we’re out of conventional RAM, and/or the game is slow as heck, and/or the CD-ROM or sound card are acting up. Guess it’s time…

Topaz, holds up a floppy disk and says '...to make a boot disk!'

A boot disk contains a minimal CONFIG.SYS and AUTOEXEC.BAT, tuned precisely for your hardware and the game you want to play. It also includes all the drivers you need. Since PCs of this era could not boot off of CD-ROMs, and since you didn’t want to constantly modify your hard drive’s boot files, you’ll need to break out a floppy.

Loading in a CD-ROM driver or a Terminate-And-Stay-Resident program (a program that executes once and keeps running) that your hardware needs means taking up precious conventional memory, and Rebel Assault needed enough available up to start. Normally we could load drivers into the Upper Memory Area, but the tools to do that, HIMEM.SYS and EMM386.EXE, don’t play nice with Rebel Assault. Additionally, some TSRs need a large amount of RAM to get started, then release most of that back to the computer, which means load order counts. I bet my sound card needed a TSR, which is why I cared about this.

So what does an eager 15 year old do?

Topaz, holds up a QBasic window and says 'Write a QBasic program that helps you sort through all these options and spit out the most optimal CONFIG.SYS and AUTOEXEC.BAT files!'

It took a few days of coding after school, but I was eventually able to work out all the pieces I needed to put onto the boot disk, how to track memory usage before and after each piece loaded, and what file each part belonged in. Then I could stick the data into a QBasic program and get the results, giving me…

The Perfect Rebel Assault Boot Disk

Changelog

  • 2021-02-10: Initial post