RetroPCFun

READY.

Type it in.
Break the rules.

RetroPCFun is an interactive lab for 80s home computers. Boot a real ZX Spectrum in your browser, type in classic BASIC spy and horror adventures line by line, then hack them to write your own rules. No ads. No pirated games. Just you and a blinking cursor.

█ 10 PRINT "HELLO, 1982"

> SELECT YOUR MACHINE

One machine is plugged in and glowing. The rest of the 80s are warming up.

1982

● ACTIVE / ONLINE

ZX Spectrum 48K

Z80A @ 3.5 MHz

Rubber keys, rainbow stripe, Sinclair BASIC.

> Enter the lab_

1982

COMING SOON

Commodore 64

6510 @ 1 MHz

Breadbin legend with the SID sound chip.

> SID Chip warming up...

1984

COMING SOON

Amstrad CPC 464

Z80A @ 4 MHz

Built-in tape deck and a green monitor.

> Locomotive BASIC loading...

1983

COMING SOON

Apple IIe (DOS 3.3 / CP/M)

6502 @ 1 MHz

Beige classroom workhorse with floppy drives.

> Inserting 5.25" floppy disk...

1983

COMING SOON

MSX

Z80A @ 3.58 MHz

One standard, many brands, cartridges galore.

> Cartridge slot standby...

> ZX SPECTRUM 48K LAB

(c) 1982 Sinclair Research Ltd

Warming up the Z80_

Files open 100% in your browser (.tap, .tzx, .z80, .sna, .szx, .zip). Nothing is uploaded anywhere. Click the screen first so the keyboard goes to the Spectrum.

KEYBOARD CHEAT SHEET

The Spectrum has one key per BASIC keyword. At the start of a line it types the whole word for you. On your PC, Ctrl is Symbol Shift andShift is Caps Shift.

  • LOAD ""JthenCtrl+PthenCtrl+PthenEnterTape loading prompt
  • PRINTPThen type "text" with Ctrl+P for quotes
  • RUNRthenEnterStart your program
  • LISTKthenEnterShow the program
  • INPUTIAsk the player something
  • GO TOGJump to a line number
  • NEWAthenEnterWipe memory, start fresh

Delete = Shift + 0. Some browsers grab Ctrl shortcuts; if one does, use the on-screen menu or another browser.

SINCLAIR BASIC · TYPE-IN LISTINGS

The Little Book of
BASIC Adventures

Press Load into Spectrum to drop the program straight into the emulator, or Copy Code to take the listing anywhere. To learn the old way, type each line into the Spectrum and press ENTER; then type RUN. Typos are part of the fun: the Spectrum shows a flashing ? where it got confused. When it works, move on to Hack the Rules and make the game yours.

Program 1: Midnight Spy Mission

77 lines

Break into an embassy, crack the safe, escape by dawn.

Beginner · INPUT, IF...THEN, RND

LISTING 1⬇ .tap
10 REM MIDNIGHT SPY MISSION
20 BORDER 0: PAPER 0: INK 5: CLS
30 RANDOMIZE
40 LET h=5
50 LET d=0.4
60 PRINT "MIDNIGHT SPY MISSION"
70 PRINT "--------------------"
80 PRINT
90 LET p$="zebra"
100 PRINT "Agent 7, it is midnight."
110 PRINT "Steal the microfilm from"
120 PRINT "the embassy safe. Escape"
130 PRINT "alive. Health: ";h
140 PRINT
150 PRINT "1 Climb the drainpipe"
160 PRINT "2 Bribe the gate guard"
170 INPUT "Choose 1 or 2: ";c$
180 IF c$="1" THEN GO TO 300
190 IF c$="2" THEN GO TO 400
200 GO TO 170
300 CLS
310 PRINT "You climb the drainpipe..."
320 IF RND<d THEN LET h=h-1: PRINT "You slip! Health: ";h
330 IF h<1 THEN GO TO 960
340 PRINT "You reach the study window."
350 GO TO 495
400 CLS
410 PRINT "You slip the guard some cash."
420 LET r=INT (RND*3)+1
430 IF r=1 THEN PRINT "He takes it and nods you in.": GO TO 495
440 IF r=2 THEN PRINT "He wants more. You run!": LET h=h-1: GO TO 495
450 PRINT "ALARM! He calls the police!": LET h=h-2
460 IF h<1 THEN GO TO 960
470 PRINT "You dive through a window."
495 IF h<1 THEN GO TO 960
500 PRINT
510 PRINT "A steel safe, with a keypad."
520 PRINT "It wants a secret password."
530 INPUT "Type the password: ";a$
540 IF a$=p$ THEN GO TO 700
550 LET h=h-1
560 PRINT "WRONG! Alarm bell. Health: ";h
570 IF h<1 THEN GO TO 960
580 PRINT "Hint: a striped African animal"
590 GO TO 530
700 CLS
710 PRINT "CLICK! The safe opens."
720 PRINT "You grab the microfilm!"
730 PRINT
740 PRINT "Footsteps in the hall!"
750 PRINT "1 Hide behind the curtain"
760 PRINT "2 Run for the roof"
770 INPUT "Choose 1 or 2: ";c$
780 IF c$="1" THEN GO TO 820
790 IF c$="2" THEN GO TO 860
800 GO TO 770
820 PRINT "The guard walks past..."
830 IF RND<0.5 THEN GO TO 920
840 PRINT "...then spots your shoes!"
850 LET h=h-2: GO TO 890
860 PRINT "You sprint for the roof."
870 IF RND<0.7 THEN GO TO 920
880 PRINT "A guard dog bites your leg!": LET h=h-2
890 IF h<1 THEN GO TO 960
900 PRINT "Wounded, you still escape!"
910 GO TO 930
920 PRINT "You slip away clean!"
930 PRINT "Helicopter at dawn. Health: ";h
940 PRINT "MISSION COMPLETE, AGENT 7!"
950 GO TO 990
960 CLS
970 PRINT "You were captured. The film"
980 PRINT "is lost. MISSION FAILED."
990 PRINT
1000 INPUT "Play again? (y/n) ";y$
1010 IF y$="y" THEN RUN
1020 PRINT "Goodbye, Agent."

★ HACK THE RULES

  • Line 40More health. Change LET h=5 to LET h=9. Nine lives, almost a cat!
  • Line 50Slippery drainpipe. d is the chance of slipping (0 to 1). Use LET d=0 for a safe climb or LET d=0.9 for pure chaos.
  • Line 90Secret password. Change "zebra" to any lowercase word, then rewrite the hint on line 580 to match.
  • Line 420Friendlier guard. Change INT (RND*3)+1 to INT (RND*2)+1 and the guard can never call the police.
  • Line 830 / 870Escape odds. The numbers 0.5 and 0.7 are your chances of a clean getaway. Raise them to make the finale easier.

Program 2: The Haunted Manor

87 lines

A detective, a missing lord and a ghost with a key.

Intermediate · GO SUB, computed GO TO, flags

LISTING 2⬇ .tap
10 REM THE HAUNTED MANOR
20 BORDER 1: PAPER 0: INK 6: CLS
30 RANDOMIZE
40 LET s=6
50 LET k=0: LET c=0
60 LET w$="candle"
70 PRINT "THE HAUNTED MANOR"
80 PRINT "-----------------"
90 PRINT "Detective, Lord Ashby has"
100 PRINT "vanished. His ghost is said"
110 PRINT "to guard the cellar key."
120 PRINT "Find the key, open the cellar"
130 PRINT "and uncover the truth."
140 PRINT
150 PRINT "Press any key to begin..."
160 PAUSE 0
170 GO TO 1000
700 PRINT
710 PRINT "1 Hall 2 Lib 3 Cellar 4 Attic"
715 IF s<1 THEN GO TO 9000
720 INPUT "Where to? ";r$
730 IF r$="1" OR r$="2" OR r$="3" OR r$="4" THEN LET r=VAL r$: GO TO r*1000
740 GO TO 720
800 REM SCARE ROUTINE
810 IF RND>0.5 THEN RETURN
820 LET s=s-1
830 PRINT "A cold hand touches you!"
840 PRINT "Sanity: ";s
850 RETURN
1000 CLS
1010 PRINT "GRAND HALL"
1020 PRINT "Cobwebs and a clock stuck"
1030 PRINT "at midnight. A lantern hangs"
1040 PRINT "on the wall."
1050 GO SUB 800
1060 IF c=1 THEN GO TO 700
1070 INPUT "Take the lantern? (y/n) ";a$
1080 IF a$="y" THEN LET c=1: PRINT "Lantern taken."
1090 GO TO 700
2000 CLS
2010 PRINT "LIBRARY"
2020 PRINT "Dusty books. A diary lies"
2030 PRINT "open on the desk."
2040 GO SUB 800
2050 PRINT "Lord Ashby wrote:"
2060 PRINT "'The cellar word is ";w$;"'"
2070 GO TO 700
3000 CLS
3010 PRINT "CELLAR"
3020 PRINT "An iron door, sealed by a"
3030 PRINT "lock and a spoken word."
3040 GO SUB 800
3050 IF k=0 THEN PRINT "You need the key first!": GO TO 700
3060 INPUT "Say the secret word: ";a$
3070 IF a$=w$ THEN GO TO 8000
3080 PRINT "The door shrieks! No!"
3090 LET s=s-1
3095 GO TO 700
4000 CLS
4010 PRINT "ATTIC"
4020 PRINT "A pale ghost floats above"
4030 PRINT "a rusty key."
4040 IF k=1 THEN PRINT "The attic is quiet now.": GO TO 700
4050 GO SUB 800
4060 IF c=0 THEN PRINT "In the dark it grabs you!": LET s=s-2: GO TO 700
4070 PRINT "Your lantern blazes!"
4080 IF RND<0.7 THEN PRINT "The ghost flees. Key found!": LET k=1: GO TO 700
4090 PRINT "It resists! You stumble back.": LET s=s-1
4095 GO TO 700
8000 CLS
8010 PRINT "The door swings open..."
8020 PRINT "Lord Ashby's chair, and a"
8030 PRINT "confession: his butler faked"
8040 PRINT "the haunting to steal the"
8050 PRINT "family gold!"
8060 PRINT
8070 PRINT "CASE SOLVED, DETECTIVE!"
8080 PRINT "Sanity left: ";s
8090 GO TO 9500
9000 CLS
9010 PRINT "The manor claims another"
9020 PRINT "soul... You flee, mad with"
9030 PRINT "fear. CASE FAILED."
9500 PRINT
9510 INPUT "Play again? (y/n) ";y$
9520 IF y$="y" THEN RUN
9530 PRINT "Sleep well, if you can..."

★ HACK THE RULES

  • Line 40Stronger nerves. Change LET s=6 to LET s=12 to survive many more ghostly scares.
  • Line 60Secret word. Change "candle" to any lowercase word. The diary in the library prints it for you automatically.
  • Line 810Haunting level. IF RND>0.5 means a scare about half the time. Try 0.9 for a calm house or 0.1 for pure terror.
  • Line 4080Ghost-busting odds. Change RND<0.7 to RND<1 and your lantern always wins. Change it to RND<0.2 for a real fight.
  • Line 4060Fear of the dark. Change LET s=s-2 to LET s=s-4 if you want exploring without the lantern to be brutal.