Linux Format

Classic 486 PCS

Relive the halcyon 32-bit years of PC computing, play your favourite games and look back at Oses of yore with the ever-dependable Les Pounder!

- Les Pounder is associate editor at Tom’s Hardware and when not writing about Raspberry Pi he is found tinkering with old computers.

Les Pounder relives the halcyon 32-bit years of PC computing, plays your favourite games and looks back at Oses of yore!

This author first got their first PC back in 1994: a Dan 486 DX 33MHZ with 4MB of RAM. It was much more powerful than the Amiga 500, and almost three times the price. The author’s journey with computers so far had been via Commodore machines, but this Dan 486 PC captured his heart. He got it home and launched MS-DOS, but he had no manual or user guide. He taught myself MS-DOS and Windows 3.1 by making lots of mistakes, including formatting his 120MB hard drive and having to reinstall everything, and by installing a CD ROM drive incorrectl­y and the machine refused to boot.

The mid-1990s was a crazy time for PCS. They were still beige boxes that held mysteries such as IDE, SCSI, lots of wires and dust. Linux Format is devoted to Linux, but for this journey down memory lane we’ll take a look at emulating a Windows 3.1 era PC. First via a simple program that will enable us to run Dos-era games in Ubuntu. Then we’ll learn a little BASIC with Microsoft’s Quick Basic. Finally we’ll create our own Windows 3.1 PC in a virtual machine.

Emulating a retro PC

The retro PC scene has users who want to simply run their old games in an emulator, and it has users who want to run real hardware with a subtle 21st century twist. Let’s start with emulation because it’s the simplest route to enjoying retro content. The champion of retro PC emulation is DOSBOX which offers a quick hit of nostalgia with very little effort. To install DOSBOX on a Debian or Ubuntu machine, open a terminal and type the following:

$ sudo apt update

$ sudo apt install dosbox

With DOSBOX installed, launch the applicatio­n from the terminal.

$ dosbox

DOSBOX is an x86 emulator for 486 and early Pentium computers, and games. It’s dependable and works really well for a quick hit. When it first starts we see a familiar DOS prompt with drive Z as the active drive. DOSBOX provides a brief help menu – highlighti­ng that we’ve a Soundblast­er compatible sound card and that we can learn more about using DOSBOX via the

intro command. At any time we can obtain general help using help , or for more detailed help use

help /all

What can we do right now? Well, let’s remember a few DOS commands. First we’ve a command to list the contents of the current directly. We know this as ls but in DOS it’s dir .

This will show all of the files in Z:. Right now there isn’t much of interest, but as we move onwards we shall learn a few extra DOSBOX features.

Writing code

The retro PC era spans decades and with that we’ve a fantastic choice of languages and applicatio­ns with which to write code. To carry on from previous issues we’re going to focus on BASIC, in particular Quick BASIC

(Qbasic) that was bundled with MS-DOS. Qbasic is a cutdown IDE and it can be found easily online. We’re lucky enough to own MS-DOS 6.22 floppy disks and a hard drive with Qbasic installed.

Download a copy of Qbasic and extract the contents of the archive to a directory in your home directory. Remember the location of the extracted files as we’ll need that exact location for DOSBOX. Launch DOSBOX from the terminal. In the DOS prompt we shall use a command to mount the location of our Qbasic

download as another drive, C:. Our Qbasic directory is called QB45, but change this to match your own:

mount c: ~/QB45

A message will be printed to the screen, advising us that C: drive is mounted to that directory. Change to C: drive and the list the contents of the drive.

C: dir

We should now see a list of files, but we’re only interested in qb.exe which is Quickbasic, so let’s launch it by typing the file name and pressing Enter:

qb

Quickbasic’s user interface is basic, no pun intended. It has a simple menu at the top of the screen, and a blank section in the centre where we can write our code, and a shell interface, called Immediate, at the bottom where we can test code snippets. Our first quick test of

Qbasic is to write the familiar “Hello World” code, but this time it will be a little different and use a for loop to print the text 20 times. In the blank area of Qbasic is where we write the code.

We start by first declaring that we’re creating a variable, “counter” and that it’ll store an integer (numeric) value. Then we clear the screen of any existing data.

DIM counter AS INTEGER

CLS

We start the for loop, updating the value stored in the counter variable each time the loop iterates. It starts at 0 and ends at 20.

FOR counter = 0 TO 20

The next lines of code don’t need to be indented, but we’ve chosen to do this to show that they are inside the for loop. We use the PRINT command to print the “Hello World” message to screen, then we pause the code for one second using SLEEP .

PRINT “HELLO WORLD”

SLEEP 1

Finally we iterate the counter variable, each time adding one to the previous value. When the for loop ends, the program ends.

NEXT counter

END

Save the code by pressing ALT then F and A. Name the file HELLO.BAS and save it to C drive. Use TAB to navigate through the sections. Press OK to save. This will save the code to our host machine, our Linux PC. When ready press F5 to run the code and you should see a DOS prompt appear and run the code.

Let’s make something a little more complex, a tool to calculate the circumfere­nce of a circle. Create a new file (ALT, F. N) and we start the code by clearing the screen of any data.

CLS

Now we ask the user a question, “What is the radius of the circle?” and we use INPUT to read the raw keyboard input, which is saved to a variable, R.

INPUT “What is the radius of the circle?”; R

We then create the variable C and in there store the answer to the equation which will work out the circumfere­nce of the circle using the value stored in R. LET C = 2 * 3.14 * R

We then print the answer to the screen, with a sentence explaining what the returned value, C, refers to. Finally we end the code cleanly.

PRINT “The circumfere­nce is”; C

END

Save the code as CIRCUMF.BAS (ALT, F, A) to your C: drive. Then press F5 to run the code. Type in a radius (we chose 10) and the code will print the answer. We can also make an EXE executable file from the Run menu. This will launch our code outside of Qbasic.

Playing a game

DOSBOX will run most DOS games, even from CD-ROM. We tested it with a vintage copy of Lucasfilm’s pointand-click adventure game Day of the Tentacle. Inserting the disc into our DVD drive, sr0, we opened DOSBOX and from the prompt entered a command to mount the CD-ROM. Note that we needed to go into the /media/ {username} directory to get the name of the directory used as a mountpoint: mount D /media/{username}/{directory name}

We now have our DVD drive mounted. Change to D: drive and list the contents of the disc.

D: dir

We can now read the drive and launch any executable­s that we need.

Creating our own Virtual 486

A is great for a quick hit, but what if we want something a little more permanent? Well, we can create a virtual machine to recreate a top-spec 486 (almost) machine and run Windows 3.1. For this you’ll need your own copies of Windows 3.1 and MS-DOS 6.22 saved as image file (.img). Luckily for us we have these in the attic, together with a USB floppy drive.

We start by downloadin­g Virtualbox from www.virtualbox.org/wiki/Downloads and then install the download. Open Virtualbox and create a new virtual machine (VM). We called our VM Windows 3.1 and this automatica­lly triggered the VM to configure itself for Windows 3.1. We next set the memory size to 32MB, a huge amount for this era. Then we created a virtual hard disk (VHD), fixed to 1GB in size. With the machine “built” we need something to boot from, and this is where disk one of MS-DOS 6.22 is needed. We can insert a disk image by going to the Settings option, then Storage>controller: Floppy and navigating to the floppy image. After inserting the disk, click Start and the VM will power up and load MS-DOS. Follow the standard install process and when prompted to swap disks, press the right Ctrl key to unlock the mouse, click the Devices menu, then Floppy Drives, then Choose a Disk File…

Navigate to the directory containing your MS-DOS disks and select the appropriat­e disk. Installati­on will take less than five minutes, much quicker than “back in the day”. Remove any disks, and reboot when prompted. If at any time you need to reboot, you can select Reset from the Machine menu.

MS-DOS takes seconds to boot, and the prompt is a great place to learn a few commands. We can get help at any time by typing HELP. Our goal is to install Windows 3.1, so now is the time to insert the Windows 3.1 floppy disk images (Devices>floppy Drives>choose a Disk File…). Change directory to the first virtual floppy drive and then list the contents of the disk.

A: dir

On A: drive there’ll be a setup.exe file – this is what we need to install Windows.

setup.exe

Follow the installati­on process, and swap disks just like we did for MS-DOS. In a few minutes Windows 3.1 will be installed. Reboot the machine (Machine>reset) and from the prompt type the following code to launch Windows.

win

In seconds the familiar Windows 3.1 desktop will appear and a few memories are sure to rise to the surface, too.

What’s on the demoscene?

Just like many other machines, the PC enjoys a rich demoscene of artists, musicians and coders all eager to share their skills and show off their talents. After researchin­g on pouet.net we found Memories, a demo from Desire who released this demo at the Revision 2020 demo party. This demo has no music, but it achieves what should be impossible: it squeezes an entire demo into 256 bytes. That’s not a typo by the way! This is a tiny demo that illustrate­s what great coding can do.

Here at the start of 2021 the PC demoscene is still very much active. New demos that push even the most

powerful hardware to its limits are being produced by artists who favour the keyboard and the mouse as their tools of expression.

We would think that with newer, more powerful hardware that the retro PC scene would be dead and buried. Oh how wrong we were. The price of 486-era machines online can vary from bargains which require a little “work” to new old stock machines that are perfect specimens. The sweet spot of the 486 era was a 486 DX2 66Mhz with 8MB of RAM and prices for those machines vary wildly. Research and patience will yield the best price. Don’t just jump into the first machine that you find.

Safety first

So you have a retro machine – what do you do now? The first thing to do is check that it’s safe for use. Are there any leaking capacitors, dodgy wires? Check everything before applying the power. If the machine boots up to a DOS prompt or Windows desktop then we can consider the machine good.

There’s one thing to address and that’s hard drives. A period perfect drive is now around 20 to 30 years old and it will fail at some point. Fear not as the community has your back, in the form of an IDE to Compact Flash adapter that can be purchased for around £5. We use one of these inside an Amiga 600 along with a 2GB card which holds Workbench and our games.

Using adapters and drive enclosures you can clone your original hard drive to a CF card and replace the drive with a smaller, quieter and more reliable option. Versions exist both for internal and external use, along with SD card versions. External versions are particular­ly handy because we can swap hard drives without opening the case. They simply fit to a rear ISA/PCI slot and connect directly to the IDE interface.

The retro PC community is a strong and passionate place. We just have to look at Reddit’s retro battlestat­ions subreddit to see that the 386/486 and early Pentiumera machines are cherished by their owners. With new community-designed and produced hardware being created to enhance the experience for all, the future of retro PCS is bright and it lives on in the continued success of the demoscene and the many Youtubers such as 8bit Guy, LGR, RMC and Nostalgian­erd who have created vast amount of content devoted to showing off the best of this era.

Whether you just want to dabble with some retro games, or you have a need for real antique hardware, this era of PCS is an exciting and challengin­g time where standards were created and legacies created.

 ??  ?? The 486 DX 33 may have only run at 33MHZ, but coupled with 4MB of RAM and a little imaginatio­n you could fly an X-wing for the Rebel Alliance.
The 486 DX 33 may have only run at 33MHZ, but coupled with 4MB of RAM and a little imaginatio­n you could fly an X-wing for the Rebel Alliance.
 ??  ??
 ??  ?? QB64 is a modern-day version of Quickbasic, which runs on Linux, Windows and Mac. It’s also compatible with Quickbasic 4.5.
QB64 is a modern-day version of Quickbasic, which runs on Linux, Windows and Mac. It’s also compatible with Quickbasic 4.5.
 ??  ?? Hello World isn’t exciting, but it enables us to grasp enough of the syntax to check that everything is working, including our brain.
Hello World isn’t exciting, but it enables us to grasp enough of the syntax to check that everything is working, including our brain.
 ??  ?? In DOSBOX we can mount a directory or drive to a specific drive letter. It can link out Linux host machine to DOS – handy for sharing files.
In DOSBOX we can mount a directory or drive to a specific drive letter. It can link out Linux host machine to DOS – handy for sharing files.
 ??  ?? Day of the Tentacle was a point-and-a click adventure. It was released on floppy disk and a “talkie” CD-ROM with specially recorded speech.
Day of the Tentacle was a point-and-a click adventure. It was released on floppy disk and a “talkie” CD-ROM with specially recorded speech.
 ?? Credit:microsoft ?? Windows 3.1 sat upon MS-DOS and provided a functional means to work with files and applicatio­ns. For many computer users was their first taste of a GUI.
Credit:microsoft Windows 3.1 sat upon MS-DOS and provided a functional means to work with files and applicatio­ns. For many computer users was their first taste of a GUI.

Newspapers in English

Newspapers from Australia