top of page

LOADING...

SCREECH

Vintage & Modern Tech Blog

  • Stephen Nichol

< FIVE MINUTE BASIC #2 - 'My Spectrum is Made by Commodore'

Here's a fun little program that makes it look like your Sinclair ZX Spectrum is a Commodore 64. For the record, after owning a Spectrum all the way up to 1996 (I'm also probably one of the few people who tried to return a covertape to Your Sinclair after September 1993 - not too bright, that one really. Didn't notice the mag was on sale as old stock) I was lucky enough to be sold an Amiga 500 by a mate so, I'm not anti-Commodore or anything like that. I'm one of those annoying people who plays on all sorts of videogame platforms. I like Star Trek and Star Wars in equal measure too - I just like having more movies to watch - sorry!

Anyway, time for our little wind up. The C64 start screen is easy to recreate with some print commands and changes to the colour of the paper, border, and text on the Spectrum:

1 REM My Spectrum Is Made by Commodore

2 REM by Stephen Nichol 2014

10 BORDER 1: PAPER 1: INK 5: CLS

20 PRINT BRIGHT 0; INK 5;AT 1,1;"****

COMMODORE 64 BASIC V2 ****"

30 PRINT AT 2,0;" "

40 PRINT AT 3,0;"64K RAM SYSTEM 38911 BASIC

BYTES FREE"

50 PRINT AT 4,0;" "

60 PRINT AT 5,0;"READY."

70 PRINT AT 6,0;" "

80 PRINT AT 6,0;" "

90 PRINT FLASH 1;AT 7,1;" "

100 PAUSE 250

110 FOR p=0 TO 6 STEP 1

120 PAPER p: BORDER p+1: CLS

130 BEEP 0.1,RND*12: BEEP 0.2,RND*9

140 NEXT p

150 BORDER 7: PAPER 7: INK 0: CLS

160 PRINT AT 21, 0;"Did I fool you?!?"

170 PAUSE 100

180 PRINT AT 21,0;"(c)1982 Sinclair Research Ltd"

190 PAUSE 0

Explanation/Refresher (If required):

Lines 1 and 2 are REMarks indicating the nature and author of the program. Just about anything can be put in a REM statement and it won't affect the running of the program. There are other uses for these but remarks/comments is definitely the most common usage.

Line 10 sets the border and paper to colour 1 which is dark blue. Ink 5 means cyan ink.

Lines 20 to 90 set out the C64 style text, the AT statements position the screen on the low-res grid which works in a slightly odd way. Unlike the high resolution grid, it uses y,x co-ordinates instead of x,y.

Line 100 pauses for 250 screen refreshes. The PAL screen cycles at 50Hz so 250 divided by 50 is 5 seconds of pausing.

Lines 110 to 140 are a For...Next loop that change the colour of the screen and border in steps of 1. The +1 means that the border is always a different colour to the paper. That is also why the For statement ends at 6, instead of 7 which is the final colour, otherwise our program would stop working.

Line 150 sets the colours of the paper, border, and ink to the black and white attributes used in the Sinclair Research start screen found on all Western European Spectrums earlier than the 128k +2.

Line 160 prints a message asking if anyone was fooled. You could change the colour of this, or make it flash if you wanted to.

Line 170 pauses for 2 seconds (2x50hz = Pause 100)

Finally, line 180, prints the world famous Sinclair Research copyright message (please note - there is an actual copyright symbol on the Spectrum, instead of the brackets and letter c that I have used in this text) and Line 190 PAUSEes until any key is pressed.

39 views

Related Posts

See All
bottom of page