WHAT GRAPHICS SCREEN?! I’M A COMMODORE PET!!   Leave a comment

WHAT GRAPHICS SCREEN?! I’M A COMMODORE PET!!

C64GRerror

The coloured blocks are an error message!

Getting back to another important subject now, while my next article in the series “Oh, that would be VERY difficult!”, which explains how the program works, is nearing completion with about 1,000 words typed already. TMR has made a stupid debunk of my last post, ignoring the fact that MSX BASIC is totally superior to Commodore BASIC V2, so I won’t waste my time de debunking it. I plan to make a few posts which will create a spectacular finale on this blog soon, because my life is in danger! Lots of other people’s lives are in danger as well. It’s all to do with some nasty people trying to make more money. If I could do a bit of White Hat hacking, then that would save my life, but that’s something I never managed to get into, probably because of how the C64 fiasco damaged my confidence, as well as my Dad saying “You’re not plugging any MODEM into my PHONE!!” If I manage to survive, then the next few posts could turn out to be a cliffhanger or lead to some even more spectacular revelations instead of a finale, though.

This post is about a problem and listing previously mentioned in “Debunking ‘What’s That Coming over the Hill?’” Previously I thought I should tell you about an amazing sequence of Commodore 64 POKEs I’ve found, which can return the C64 from the graphics screen to the text screen without clearing it, so that users can read an error message printed as a series of coloured blocks when a graphics program crashes! I found these POKEs in “The Home Computer Advanced Course” published in 1984 by Orbis which followed on from “The Home Computer Course”, but had no publicity saying things like “Want to draw graphics on the Commodore 64? Want to stop colours bleeding on the Spectrum? Want to play polyphonic music on the Electron? Then you need to read this!”, so that was why I didn’t read it in 1984-1985. I’m not sure if it includes programs to do those things on the Spectrum and Electron, because I’ve been concentrating on the fairly mind blowing Commodore 64 sections and I haven’t found the whole set of magazines anyway. I recently spoke to a former Spectrum user who said something like he tried to or actually did overcome the Spectrum attribute colour bleed using Z80 Assembly Language. Some people have actually succeeded in doing this, but I’m not sure when they did it. Back in 1984 I even got the impression “The Home Computer Advanced Course” may be in generic BASIC running on all home computers, without using graphics or sound. This obviously means that it was pure luck that any Commodore 64 owners read this magazine instead of spending their money on another dedicated Commodore magazine, or another book claiming to solve all their C64 problems instead.

This problem is caused by the Commodore 64 only having a version of Commodore PET BASIC built in. The Commodore PET has no graphics screen, so Commodore BASIC V2 doesn’t know what to do when there’s a error in a graphics program. It moronically prints an error message as coloured blocks on the graphics screen, not having a clue that the user can’t read this message and can’t easily return to the text screen without clearing the message by pressing RUN/STOP and RESTORE. Obviously, the C64 has no built in commands to define its function keys, so it would be very difficult to assign this sequence of POKEs to a function key. The trick is to type these commands in your program, but write it so that those lines are never executed when you RUN your program. When the program crashes and the coloured blocks appear, you can just type in direct mode GOTO [line number[ or of course G SHIFT O [line number] followed by RETURN. It may be best to put these commands in a one digit line number to cut the typing down to a minimum, as well as to isolate them from the rest of the program. The sequence of POKEs must end with STOP or END.

Here’s the listing from “Your 64” Issue No. 1 which caused the error. I must point out that before even running this program “Your 64” magazine said you must relocate BASIC by typing the following in direct mode…

POKE 642,64:POKE 44,64:POKE 16384,0:NEW

I think this is to lower the top of RAM available to BASIC. Users of other computers such as the Sinclair Spectrum and BBC Micro sometimes had to do this, but not to draw simple graphics. The technical reason for this on the C64 is because it’s crap!

10 POKE 53272,PEEK(53272) OR 8
20 POKE 53265,PEEK(53265) OR 32
30 FOR C=8192 TO 16191
40 POKE C,0:NEXT C
50 FOR C=1024 TO 2023
60 POKE C,22:NEXT C
70 X=160:Y=100
80 GOSUB 130
90 GET A$:IF A$=”” THEN 90
100 GOSUB 160
110 GET A$:IF A$=”” THEN 110
120 GOTO 80
130 GOSUB 190
140 POKE B,PEEK(B) OR M
150 RETURN
160 GOSUB 190
170 POKE B,PEEK(B) AND (255-M)
180 RETURN
190 B=8192*INT(Y/8)*320*INT(X/8)*8+(Y AND 7)
200 M=2^(7-(X AND 7)
210 RETURN

In line 200 the ^ appears as an up arrow in Commodore BASIC V2. When I first typed in this listing in 1984, I had already learnt that I must type in listings exactly as they appeared in print, as well as that different computers have different commands and syntax. I typed in the listing exactly as it appeared, then it cleared the graphics screen before crashing and printing some coloured blocks. I had no idea that the error was a missing right bracket at the end of line 200. I’m sure this happened to thousands or millions of other hapless victims of Jack Tramiel’s Commodore 64 con, whether it was from typing in this program, or another graphics program.

Let’s not forget the equivalent programs in MSX BASIC 1.0 and Amstrad’s Locomotive BASIC on their CPC computers.

MSX BASIC

10 SCREEN 2
20 PSET (128,96)
30 GOTO 30

AMSTRAD LOCOMOTIVE BASIC

10 MODE 1
20 PLOT(160,100)
30 GOTO 30

In MSX BASIC, line 30 stops the program from closing the graphics screen and returning to the text SCREEN 0, while in Amstrad Locomotive BASIC, it just stops the Ready prompt from reappearing. As Jack Tramiel originally bought his BASIC from Microsoft in 1977, if he’d agreed to carry on paying Microsoft for updated versions, then all C64 owners would have been able to type in and run something like the MSX BASIC listing above. Acorn Computers (as in BBC Micro and Electron), Memotech and other manufacturers didn’t buy their BASIC from Microsoft, but copied their syntax. This theoretical Commodore 64 BASIC could have been as follows, if the display modes were numbered as normal text=0, multicolour text=1, lores graphics=2, hires graphics=3.

10 SCREEN 3
20 PSET(160,100)
30 GOTO 30

The solution to finding the bug in the Commodore BASIC V2 program above is the following sequence of POKEs inserted somewhere in any graphics program. To use it, you just type GOTO 2 or G SHIFT O 2 in direct mode and press RETURN after the program crashes and prints coloured blocks on the screen.

1 GOTO 10:REM GOTO FIRST LINE NUMBER OF REST OF PROGRAM
2 POKE 53265,PEEK(53265) AND 223
3 POKE 53272,PEEK(53272) AND 240 OR 4
4 STOP

I found this amazing revelation in “The Home Computer Advanced Course” on page 338. It was part of a program to draw a few dotted lines. It came complete with a flowchart showing eight stages, including beginning and end, as well as two conditional branches. Even the title of this magazine could have put me and lots of other new computer owners off, because it’s called ADVANCED and because it followed on from the earlier “The Home Computer Course”, which started publication in 1983, before I had a computer, so that was why I didn’t buy the magazines in the first course.

Here’s a video showing this technique actually revealing the error message.

So, that’s it! “?Syntax error in 200” is the hidden message from way back in 1984!!

C64 error message revealed

The C64 error message is finally revealed!

Finally, here’s a video of the debugged program plotting and unploting a white pixel in the middle of a blue screen.

That’s all for now! The next part of the series “Oh, that would be VERY difficult!” will appear in a few days from now. Meanwhile, I think I’ll contact The Guinness Book of Records to tell them it took me about 29 years to find out how to draw a line across the C64 graphics screen AND that it took me about 31 years 6 months to find a way to read the error message in the pixel plotting “Your 64” program above!

 

This blog has no means of funding, I’m actually quite skint or broke, and my life is in danger from eviction by a property speculator, probably taking place in January 2016. If you’d like to make a donation, please send me an email on paul.londoner@gmail.com , then I’ll tell you how to do that.

Advertisements

Posted November 9, 2015 by C64hater in Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: