Sinclair ZX80/ZX81
There are several useful programs available for emulating the ZX80 computer. This Hands On Museum tutorial will focus on just one. When you become familiar with one specialized emulator, you learn to understand how to work most of the others. The emulator for this tutorial will be the Eighty One emulator.
The Eighty One emulator not only emulates the ZX80, but also a number of other Sinclair 8-bit computers, including the ZX80 (Timex/Sinclair 1000) and the Spectrum line of computers. You can find the emulator’s home page at:
…and download the EightyOne program ZIP file directly from: http://www.chuntey.com/eightyone.1.0a.zip
After you download and open the ZIP file, you will need to extract it to its own folder. I just created a folder called EightyOne in the My Documents folder on my Windows PC. To run the emulator, go to the folder you extracted it to and run the EightyOne.exe file. When it runs, you’ll eventually see a window that looks like this:
Yes, it’s tiny. But you should keep in mind that the screen resolution of your computer averages about 1900 x 1080 pixels and the ZX80 screen resolution is approximately 256 x 192 pixels, so it would look very tiny on screen. This can easily be fixed by changing the screen scaling. Go under the View menu, choose Zoom, then choose an appropriate screen multiplier. 200% should work for most computers.
The emulator opens up into ZX81 mode, which is fine, but let’s start with ZX80 first. To change emulation mode, choose the Options menu, then Hardware, or simply press F6. Click on ZX80 for the emulator type and click OK. You may not see much of a difference, but you are now in ZX80 mode.
One of the differences between the ZX80 and it’s younger sibling, the ZX81 is the use of decimal number. Let’s try out the emulator to see the difference.
Remember, the ZX80 (and others) use a mapped keyboard. You cannot rely on your PC keyboard to type in free form commands. EightyOne comes with a handy keyboard template that you can see using F1. Press F1 to view it and then drag it to the side. You can leave this keyboard visible for a reference.
The ZX80 cursor shows a “K”, meaning that it’s ready for a BASIC (K)eyword. Any of the keys with the white words above them are valid right now. Pressing the appropriate key will display the full keyword, then change the cursor to another character.
Press O and you will see the word PRINT appear. We’re going to tell the computer to do some quick math that should result in a decimal answer. The keyword PRINT is the command for the computer to print the result of the calculation typed beside it. We will try to divide 10 by 3, which would normally result in the answer 3.3333333333, etc.
The cursor should look like an “L” now, meaning (L)iteral. What key(s) you type now will be literally what is printed on the keyface. Type the number 10 You will now need to type the / (slash) key. It’s on the V key and it’s in yellow. This means you have to hold down shift first. Press SHIFT-V. You will see a slash appear (a notation for the “divide” function in BASIC). Then, press 3.
You should now see a line that looks like this:
PRINT 10/3
Press NEW LINE and view the result at the top of the screen. What do you see? You see a “3”, and not 3.33333333. This is because the ZX80 only works with Integer based math. You cannot have decimals or fractions. The computer rounded the number to the nearest integer. What happens if you try dividing 11 by 3? In real math, you should see 3.66666667 or something. On the ZX80, it will simply cut off the decimal part of the number and not technically round it. The result of 11/3 is 3 in this case. That’s the drawback with Integer BASIC dialects. They corrected that “oversight” in the ZX81. But for now, let’s try a bit of simple programming and make a word repeat and scroll on screen.
Press NEW LINE Type in the following program:
10 PRINT "HELLO....."; 20 GO TO 10
In case you’re still getting used to the keyboard entry of the ZX80, here are the exact keypresses needed (ignore the commas) to create the program:
1, (zero), O, (Shift-Y), H, E, L, L, O, ., ., ., ., ., (Shift-Y), (Shift-X), (NEW LINE)
2, (zero), G, 1, 0, (NEW LINE)
Notice that after you enter each BASIC line, it will move to the top of the screen with any other lines you typed. You do all of your entry at the bottom of the screen. Now run the program by pressing R, then NEW LINE. The screen will blank for a bit. This is the nature of the ZX80. The screen will blank as it runs a program. It will fill the screen with a continuous sequence of “HELLO…..” while blanked out until the screen fills up. The program will then stop and return control to you.
Unfortunately, the screen blanking causes problems when it comes to playing games. It’s not well suited for gaming in that fashion. At least as far as graphical games are concerned, also due to the lack of decimal numbers. It’s a good thing they ZX81 was designed. It maintains a familiar user interface, is faster, and supports graphics and related graphic calculations.
To dig in right away, let’s switch to the ZX81 mode and open a tape file.
To change emulation mode, choose the Options menu, then Hardware, or simply press F6. Click on ZX81 for the emulator type and click OK. You may not see much of a difference, but you are now in ZX81 mode. Notice that the keyboard map has changed to reflect the keyboard of the ZX81. Some of the keys maintain the same keywords as the ZX80. Some are different. PRINT is on P now, instead of O. You will also notice keywords below most keys. These are BASIC functions, used to manipulate data in mathematical calculations and perform other actions.
Now, time to load a tape file and play a game!
Tape files emulate actual cassette tapes used for these computers back in their day. Today, the tape content is digitally transformed into a new format which still give the same experience as the original. Under the File menu, choose Open Tape. You will see a file requester. The EightyOne program should take you directly to the folder of tape images files that came with the emulator. Not all of the tapes work with the ZX81 and are probably used with the other Sinclair systems emulated in EightyOne.
Choose the file QS.SCRAMBLE.T81 and click Open. This simulates taking a real ZX81 tape and putting it into a tape player. On a real ZX81, you would have to type in the LOAD command and press play on the tape player to load the game. The EightyOne emulator will accommodate you in that step by automatically entering the LOAD command and running the program after it loads. Let the game finish loading after this (a process that’s much faster in emulation than on a real ZX81), ignoring the on screen text about a “character board.” Soon, you will be sitting at a game screen with some rather simple block graphics. Welcome to 1981!!! We didn’t have many options for advanced 16 million, alpha channel, texture mapped, multiple shader 3D graphics in those days. BUT, games were playable.
This game is a home computer version of the popular arcade game, Scramble. The object of the game is to fly across the landscape, shooting flying targets and dropping bombs on ground targets. There is no sound. The ZX81 did not easily support sound without special hardware tricks that would prevent games from playing properly. To play the game, use your cursor keys to move your ship up and down. You can also use the traditional ZX81 up/down arrows labeled on the “6” and “7” keys. Your ship is the one with the number in the middle of it, indicating the number of lives you have left. The “9” key drops bombs, “0” shoots bullets. When the game ends, press Enter to start a new game.
As with the other History of Personal Computing “museum exhibits”, this article was intended to help you get started with emulating the Sinclair ZX80 and ZX81. Feel free to discover more about these computers on your own, and send feedback to feedback@historyofpersonalcomputing.com if you want to learn more. To get you started on some more programs and games, follow the link below where you can see a list of ZX81 programs. Click on a program name to learn some details about it and find the .TGX or .T81 tape file for download:
http://www.zx81stuff.org.uk/zx81/generated/tapetextindex.html