Archive for September 2014

AN INTRODUCTION TO BASIC: TRAMIEL TORTURE – PART 5   Leave a comment

AN INTRODUCTION TO BASIC: TRAMIEL TORTURE – PART 5

C64IntroBASIC2Part 2 of the course I’m writing about

In his latest “debunk”, TMR has claimed that he hasn’t even looked at the program listing of the C64 BASIC V2 game “Wasp Shooter”, so this means that he can’t or won’t comment on it. It was the ONLY example of how to write an arcade game in this whole course, even though it was limited to character graphics. I think this is like a language course which only deals with one social situation, then tells you to work out for yourself how to deal with other social situations from that one conversation! Now for the rest of “An Introduction to BASIC”.

Before I go any further, I should point out that I started learning Commodore BASIC V2 at about the same time as starting to learn BBC BASIC, so this helped me realise that something was wrong. If I’d lived in the USA, read “The Compute! Gazette”, “The Transactor” and avoided reading about other computers, then I might never have found out there was anything wrong with Commodore BASIC V2 on the C64. I think this is what may have happened to lots of C64 owners in the USA.

Unit 24 tells the reader more about the logic operators AND OR and NOT, evaluating conditions, CBM ASCII codes, ON…GOTO, ON…GOSUB, END, DEF to define a formula, as well as storing and retrieving data on cassette or disk using PRINT#, INPUT#, and GET# . This unit goes on to tease the reader by showing a method of saving screens of character graphics onto tape or disk, but of course this method only works with screens made up of characters and there’s no information at all about using hires graphics in this entire course! A program to teach Morse Code is vaguely described, but not a single line of such a program is listed. This is followed by a problem to design a computer dating program, based on 9 pieces of data, including two hobbies, to determine if people are compatible or not.

Unit 25 is about designing programs, “tramline grammar”, probability, and adventure or maze games. There’s hardly any mention of program design, then there’s an explanation of “tramline grammar” as a method of constructing phrases and sentences. Probability comes in as a way of helping to choose the next word in the phrase or sentence. This is followed by an adventure or maze game which starts with the message “Your mission is to rescue GEORGE the space pioneer from the clutches of the evil GRAFFS, who inhabit the planet of ARCNODE. You are approaching the planet in your spaceship. Do you a) land or b) wait and observe?” The adventure has only 9 locations. The player is always asked to select a or b in answer to a question, instead of a compass heading, and it seems impossible to rescue George. This section warns readers that such a program can easily grow to take up all the available RAM unless it’s planned using a flowchart.

Unit 26 has a sprite demo program which is designed to make the reader think that using sprites on the C64 is easy, but reading this program reveals that it contains about 29 POKE commands! Of course Atari BASIC also requires POKE commands to use sprites, but it can redefine characters with just a few POKE commands, use POSITION x,y:PRINT to position them and, LOCATE x,y,c to check which characters are where. Other computers can do similar things with their user defined graphics or UDGs, while I don’t think MSX BASIC or Commodore BASIC V7 require any POKE commands at all to use their sprites!

Unit 26 is followed by an “Afterword”, congratulating the reader for making it this far and making the unbelievably false, TOTALLY misleading statement “the version of BASIC you’ll find on different machines is generally a little different and usually inferior to Commodore BASIC”!! Of course, no mention is made of which different computers have a BASIC “inferior” to Commodore BASIC, which is just an antique 1977 version of Microsoft BASIC with its own, very complicated Commodore filing commands added on. This “Afterword” and it seems the whole course, was written by someone signing himself “Andrew Colin Glasgow, 1983”, so obviously he should have been well aware of Sinclair BASIC, BBC BASIC, Applesoft BASIC, Oric BASIC, Dragon/Tandy BASIC, and Atari BASIC before making such a sweeping statement, but obviously ALL of these BASICs, except Sinclair BASIC and Atari BASIC, use a syntax the same as, or very similar to, Microsoft BASIC and ALL of them have commands for COLOUR, GRAPHICS and SOUND!!!!

Finally, in the APPENDIX of all places, there are some programs that actually play music! The tunes are a monophonic version of “In Dublin’s Fair City”, and a three note polyphonic version of a tune called “The Arrival of The Queen of Sheba”, by classical composer Handel. It says that no book had so far been written explaining how to use the C64 SID chip in detail, but advises the reader to consult the crappy, clear as mud, Commodore 64 Programmer’s Reference Guide! After the program to play “In Dublin’s Fair City”, which seems to be only about 1-2K long with only 33 lines of BASIC including DATA statements giving the frequency of the notes and their length, to make matters even worse, the author claims he has had to invent his own unique music notation to save RAM! The notation is very confusing, because it seems to use most, if not all, of the letters of the alphabet, as well as some other symbols. He points out that it’s not the same as the “VIC Super Expander” sound commands, although this was for the VIC-20, not the C64, which would mean nothing to most readers of this course, because Gail Wellington of Commodore said in a video I posted about The Earl’s Court computer show and MSX on the ITV series Database that most of their customers were new computer owners, not upgraders. He doesn’t even mention that the “VIC Super Expander” is a better version of BASIC, which Commodore refused to build in to the VIC-20 or Commodore 64 either. After this, the author claims that it’s not possible to use all three channels of sound on the C64 in BASIC and get them to keep time with each other while playing music. He claims that this requires Machine Code and also insists on using his own unique music notation! The program to play this tune somehow manages to use hexadecimal as well as decimal numbers in different lines of DATA statements, as well as the author’s own custom music notation, making it as confusing as possible! I have never seen this notation used in listings printed anywhere else. This program was the one I told the Commodore 64 Group Leader at my computer club I was going to adapt to play a tune of my own and he replied “I admire your dedication”. The SID synthesiser chip was the main reason I bought the Commodore 64. I tried to adapt this program to play some three channel polyphonic music of my own, but I failed miserably, due to the deliberately confusing music notation and Machine Code. After this, I was stuck programming only monophonic music on my C64! This made me realise that there had been no point me getting a Commodore 64 in the first place and I wished I’d gone for an Acorn Electron with BBC BASIC instead, because at about £200 that was cheap enough for my miserly Dad, although the BBC Micro was far too expensive at £399.

That’s all for now! Look forward to the final instalment in this series about the very misleading and disappointing course “An Introduction to BASIC”, coming next week!!

Posted September 30, 2014 by C64hater in Uncategorized

AN INTRODUCTION TO BASIC: TRAMIEL TORTURE – PART 4   Leave a comment

AN INTRODUCTION TO BASIC: TRAMIEL TORTURE – PART 4

C64IntroBASIC2The course this post is about

Unit 21 is all about strings, using the commands LEN to get the length of strings, extracting parts of strings with MID$, LEFT$, and RIGHT$, converting strings to numbers with VAL, and numbers to strings with STR$. This unit contains lots of flowcharts. There’s also a program to extract surnames from full names, but I soon realised in 1984 that this program didn’t work on Dutch names such as Jan van den Heuvel, where the surname is van den Heuvel and even my Commodore 64 group leader couldn’t see a solution to that. I doubt it would work on the surname van Dyke, which is a version of van Dijk or van Dyk, either. Hungarian names usually have the surname first, so it wouldn’t work with them either. Later on, there’s a program based on a comedy sketch by Ronnie Barker, which replaces every occurrence of the letter e with the letter o in any sentence which the user inputs. Following this, there’s a program which produces anagrams or permutations of words. This may be useful for cracking codes or passwords. Later still, the author lies to the reader by saying that because the Commodore 64 can display 40 column text, that this was “as good as any other home computer and better than most”, although 40 column text was more or less standard, while the BBC Micro and Acorn Electron could display 80 column text, which I saw in shops could even be read using a TV screen.

Unit 22 is about searching and sorting, including arrays, the bubble sort, and the quick sort. There’s a program which compares prices at supermarkets, then recommends which one supermarket to go to for the lowest total price for all the items the user wants. The unit ends with a look at the concepts behind “The Game of Life”, with the problem of writing a version of this program, possibly after loading a partial program from cassette.

Unit 23 starts off with “A closer look at the Commodore 64” saying that it’s OK just to think of it as a machine that plays games that come on cassettes or plug in cartridges! What a thing to say, even though this is near the end of a programming course! It also says it’s OK not to want to know about programming! It goes on to say we’re about to delve deeper into the Commodore 64, namely by finding out more about those dreaded PEEK and POKE commands! The reader is warned that this knowledge can’t be transferred onto other computers, because on any other computers using POKE and PEEK to the same locations will have different effects. The reader is further warned that using PEEK and POKE could make the keyboard stop responding, display rubbish on the screen, or disable any BASIC commands, even LIST and RUN, but that no matter what goes wrong, users could regain control by turning the C64 off for 30 seconds, then turning it on again. This is followed by sections called “Bits Bytes and Addresses”, then “The Structure of the 64”, explaining what components make up the C64 itself, as well as a storage device such as a data recorder or disk drive. This is accompanied by a diagram of the system, as well as a diagram of the Commodore VIC-20 memory map, calling it “a machine with a one layer store”, showing how this is much simpler than the messy C64 memory map, with some locations that could be either RAM or ROM, etc. I think that most “home computers” of this era had what this unit calls “a one layer store”, as shown in INPUT magazine, to keep things simpler for their programmers. Only 48K RAM was really needed for 8 bit computers, as proven by all the software written for the Sinclair Spectrum 48K and Atari computers fitted with 48K. We then get an explanation of the C64 screen RAM, colour RAM, character bit patterns, and character codes. This is followed by a program called MONDRIAN, which uses these principles to drawn a pattern similar to artwork done by the Dutch artist Piet Mondrian (1872-1944), because this would be far too difficult to achieve in hires graphics in Commodore BASIC V2, although it would be fairly easy on the Sinclair Spectrum using PLOT and DRAW, the BBC Micro and Acorn Electron using MODE n, PLOT x,y and DRAW x,y, Atari 8 bit computers using GRAPHICS n, PLOT x,y and DRAWTO x,y, Dragon or Tandy using SCREEN n, PMODE n1,n2, PSET x,y, and LINE (x1,y2)-(x2,y2),colour, or MSX using SCREEN 2 or SCREEN 3, PSET x,y, and LINE (x1,y2)-(x2,y2),colour. This is followed by a section about the two character sets on the C64, switching between them with the C= and SHIFT keys, and defining your own characters such as the Russian Я reverse R character called yat. I was soon able to use this knowledge to define a German character set. This is one of the facilities where surprisingly Commodore BASIC V2 was no worse off than most other computers of the time, although it was easier in BBC BASIC and Amstrad’s Locomotive BASIC on the Amstrad CPC computers had the dedicated command SYMBOL ascii code,bit pattern list. This is followed up by a program to define the four Russian characters Я , З , Ы , and К , making up the word ЯЗЫК, pronounced yazuik, meaning language or tongue. Back in 1984, just changing the bit patterns in the DATA statements gave me the German characters Ä , Ö , Ü , and ß .

FINALLY, Unit 23 shows the reader a short game to load from tape, also listed in this unit, called “Wasp Shooter”! This is made up of about 136 lines of Commodore BASIC V2 with line numbers running from 1-5100. It’s probably the most advanced program in the whole course!! In this game, the player has to try and kill all the wasps before their fly spray runs out, using keyboard controls without any joystick option, because using a joystick in Commodore BASIC V2, obviously requires PEEK and POKE commands. The game is all in character graphics, though. This game contains about 37 POKE commands and it seems only one PEEK command. I think a lot of the POKE commands are just printing characters on the screen but this is still at the speed of BASIC so there’s no need. This could be done just by using PRINT AT y,x on the Spectrum, PRINT TAB(x,y) in BBC BASIC, POSITION x,y:PRINT in Atari BASIC, or LOCATE x,y:PRINT in MSX BASIC. I think the PEEK command detects whether or not there’s a bee at a certain position, but the amazing Sinclair Spectrum could do this with PRINT POINT(0,0) , colour=POINT(x,y) in BBC BASIC, or LOCATE x,y,c in Atari BASIC. After this, the reader is set a problem of trying to write their own game using the same principles, with suggestions that it could be based around shooting aliens from outer space, searching a maze with a monster chasing you, or catching randomly thrown balls. As for me, I felt lost in a whirlpool of POKE commands and certainly didn’t feel that just the one example given here prepared me to write my own, simple, character graphics based game. If there had been more than one example or even more than one unit in this course about writing this kind of game I don’t know if that would have helped much either, because Commodore BASIC V2 is crap!

That’s all for now. Another instalment in this series about “An Introduction to BASIC” will follow very soon!

Posted September 24, 2014 by C64hater in Uncategorized

AN INTRODUCTION TO BASIC: TRAMIEL TORTURE – PART 3   Leave a comment

AN INTRODUCTION TO BASIC: TRAMIEL TORTURE – PART 3

C64IntroBASIC2Part 2 of “An Introduction to BASIC”

This post is part 3 in the series, but is about the book “An Introduction to BASIC – Part 2”. I won’t bother to write a separate article to de debunk any posts by TMR on the blog http://www.c64crapdebunk.wordpress.com , but I will say that as a former Amstrad CPC user who never owned a Sinclair Spectrum, I was confused by this when I wrote that Spectrum users could select colours with the command PEN n. On the Amstrad CPC the command INK n1,n2 assigned the actual colour n2 to the logical colour n1. The Amstrad used a palette of 16, 4, or 2 colours from a total choice of 27 colours. I also need to point out that back in 1984 I was paying great attention to each unit in “An Introduction to BASIC”, because I was keen to learn programming in general, but especially how to program music on my Commodore 64. I realised that any or all of the C64 BASIC commands may also be involved with playing music. The video posted by TMR shows Commodore BASIC V2 programs playing 3 note polyphonic music, but these programs contain more POKE commands than I care to count!

The whole course “An Introduction to BASIC” seems to be written by Andrew Colin, based in Glasgow. As the first book was written in 1982 when the Commodore 64 came out, as well as him mentioning the “VIC Super Expander”, I assume he learnt how to program on the Commodore VIC-20 or even the Commodore PET. Only a few of the 26 units making up this course are anything to do with C64 specific features, such as the screen memory, colour memory, the SID chip, and the VIC-II chip with its sprites.

Part 2 of the course “An Introduction to BASIC” is made up of 11 units, numbered 16 to 26, plus an Appendix. It takes until Unit 25 before the course gets on to programming a simple text only, adventure game, while the final Unit 26 is about sprites. Playing music isn’t dealt with until the Appendix! There are no programs which make use of hires graphics at all!!

Unit 16 is about using DATA, READ, and RESTORE to calculate paying wages in cash according to the notes and coins in circulation in Britain at the time from half a penny up to £20, then asks the user to modify the program so that it works for the notes and coins in circulation in the USA, where it claims the highest denomination was $50 instead of using any higher denominations, not even $100. It advises readers that DATA statements must be separated by a comma so that no piece of data can contain a comma, unless it’s enclosed in quotes. It goes on to deal with making a calendar and formatting dates. After this follows one of the most useful programs in the book, showing readers how to write a quiz, which is accompanied by a flowchart showing how the program works. The DATA statements could be replaced by any questions and answers. I used this to write my own quiz programs to memorise vocabulary from any language I chose, but of course I couldn’t have any music or graphics to accompany any quizzes I programmed on the Commodore 64.

Unit 17 has the use of colons and IF…THEN loops to deal with selling beer and whisky. There’s also an explanation of the logic operators AND, OR, and NOT. These logic operators even had to be used to set the bits of registers in the VIC-II graphics and SID sound chips, but although they’re used for this purpose in the course, there’s no explanation of what’s happening. One possible use of them which is shown is that all potential employees of a security company must be at least 18 years old and 64 inches tall, which is accompanied by a flowchart, but height was never measured just in inches, which were obsolete before this book was written in any case, so this was part of a massive conspiracy to persuade people not to use metric measurements. This is why people now talk about tablets and ereaders with the screens measured in INCHES! The syntax of using OR in BASIC is explained, compared with its use in normal English. Another example is shown of combining AND with OR to check whether applicants are old enough to to get a licence to ride a motorcycle, a car, or a bus. After this, the operator NOT is demonstrated. Commodore BASIC V2 requires these operators to be used a lot more than numerous other versions of BASIC, due to the lack of the command ELSE, although the Sinclair Spectrum lacks the command ELSE as well. This kind of programming was demonstrated showing how it could be applied to games by Fred Harris in the series “Me and My Micro”, on the Sinclair Spectrum, as well as the Acorn Electron in BBC BASIC. He said something like getting through a maze was a bit like buying fish and chips. You couldn’t buy any unless you were in the right place AND the fish and chip shop was open. Of course, this program also used the amazing PRINT AT y,x command on the Sinclair Spectrum and the equally amazing PRINT TAB (x,y) command in BBC BASIC on the Acorn Electron.

Unit 18 introduces subroutines and describes how they work. It explains that you need to have subroutines for anything more than fairly short programs. Of course, Commodore BASIC V2 lacks the DEF PROC, END PROC, and PROC commands for procedures found in the vastly superior BBC BASIC and similar commands in the excellent SuperBASIC on the ill fated Sinclair QL. Similar commands exist in Simons’ BASIC. Subroutines are described as better than GOTO commands, because the program remembers what line number it was at when a GOSUB command was given and can return to the next instruction. It mentions that the languages PASCAL and ADA have different, more complicated ways of doing this, but doesn’t say anything about procedures. After this, it shows a simple routine to move a “monster”, made up of nothing more than a space character coloured red, horizontally across the screen. Of course, moving it up and down the screen would be a lot more complicated, due to the lack of any PRINT TAB command which can specify a vertical parameter, or a LOCATE x,y command. After this, the unit ends by telling the reader to load a program which draws a crude picture of a house, made up of graphics characters.

Unit 19 tells the reader more about developing and refining subroutines for various uses and how to plan them out. After this follows a subroutine just to make a pip sound. This is only necessary as the subroutine contains a total of seven POKE commands. This is obviously because Commodore BASIC V2 is crap! After this, the reader is told to load a subroutine which enables characters to be displayed at four times their normal size and to try to write a program which uses this subroutine.

Unit 20 explains arrays and their uses, such as remembering a list of pupils in a class at school. It introduces the use of a flag, such as ZZZZ to indicate that a list of surnames has ended. A problem is set, asking the reader to write a program that uses a list of DATA statements containing surnames and phone numbers.

That’s all for now about “An Introduction to BASIC – Part 2”, because my article about it is so long. This means you can look forward to the next installment in this exciting series very soon!

Posted September 22, 2014 by C64hater in Uncategorized

AN INTRODUCTION TO BASIC: TRAMIEL TORTURE – PART 2   Leave a comment

AN INTRODUCTION TO BASIC: TRAMIEL TORTURE – PART 2

C64IntroBASIC1The Commodore 64 BASIC course in question

Before continuing with this series, I need to remind you all of the following very important and influential facts. I was told by Commodore by their C64 startup screen, their BASIC course I’m writing about here, as well as the BBC computer literacy campaign that the way to learn how to program computers was in BASIC. Machine Code definitely wasn’t a language for beginners and that you were supposed to learn how to do things in BASIC before learning how to do them in Machine Code. Unfortunately, this approach wasn’t possible on the Commodore 64 with its plethora of PEEK and POKE commands, which were needed to use the colour, graphics, and sound facilities, unless only coloured text was enough. I now know that older computers such as the Commodore KIM1 couldn’t even support BASIC due to lack of enough RAM for this language, so had to be programmed in Machine Code, but were little more than programmable calculators, much less complicated than the Commodore 64 with its VIC-II graphics and SID sound chips.

Re reading the Commodore 64 course “An Introduction to BASIC – Part 1” tells me that Part 1 is made up of 15 units or chapters, with the first program being “TESTCARD”, which somehow enables the user to set up their TV properly. It also includes full details of how to set up and plug in the C64. This particular course or this version of it was published by Commodore UK, because most mentions of money are prefixed with the Pound sign £ and one clue to when it was written is given by a chart showing support or votes cast for various political parties, including the SDP (Social Democratic Party).

Experiment 2.3 on page 13 tells the reader how to create a screen full of graphics characters to keep them interested. This is actually be the only type of graphics covered in Part 1, because hires graphics of 160×200 or 320×200 pixels requires a user of Commodore BASIC V2 to PEEK and POKE themselves and the C64 half to death!

Unit 3 introduces coloured text using the CTRL key and the C= key in combination with the numbered keys, as well as changing the screen background and border colours with the first two dreaded POKE commands to locations 53280 and 53281, followed by any number from 0-15. At this stage, lucky Sinclair Spectrum users would have learnt the commands BORDER n and PAPER n:CLS, lucky Atari users would have learnt about SETCOLOR n,n,n while lucky Dragon and Tandy users would have learnt CLSn, and lucky MSX users would have learnt COLOR n,n,n. After this, the book tries to keep readers interested by showing them how they can create pictures of national flags, just by using graphics characters in various colours, as well as inverse or “reverse field” video as they put it. The unit admits that the Union Jack flag is “formidably difficult to draw”, but fails to point out that this is because Commodore BASIC V2 readers studying this course will be more or less stuck with character graphics, while users of other computers could draw it using hires graphics commands, such as DRAW, DRAWTO, LINE, PLOT, PSET, and PAINT.

Units 4 and 5 seem to be no more than just short explanations about using the RETURN key, PRINT commands, keeping scores of a football match, variables and how to assign them, as well as creating programs, instead of just typing direct commands, creating loops and building up strings.

Unit 6 starts off with some advice aimed at disk users only on how to organise their files. After this the reader learns about a program to generate random nonsensical sentences, as well as how to list parts of the program, using the REM command to write comments and how to edit programs. It then goes on to explain in which lines of DATA to put particular types of words for the program to generate sentences that make any kind of sense. After this the reader is told how to SAVE programs to tape or disk and what precautions to take while doing this.

Unit 7 is about IF…THEN and STOP. Of course, I was keen to get through all this, which I thought would lead to me composing some music, then using it in my own programs. It goes on to demonstrate currency conversion and there’s an exercise where the reader is supposed to write a program to print a pattern of asterisks. There’s also an anachronistic program designed to convert between Celsius and Fahrenheit. This is pointless, because Fahrenheit was obsolete even in 1982 when this book was published, so no one should have been encouraged to use it. Unfortunately, lots of other authors of books about C programming, Java, Javascript, etc later made the same mistake. This program should have been replaced by a program to print phrases such as “The Celsius System”, “0 degrees is freezing”, “10 degrees is cold”, “17 degrees is neither hot nor cold”, “20 degrees is fine”, “25 degrees is warm”, “30 degrees is hot”, “35 degrees is a heatwave”, “40 degrees is when people are dropping like flies”, “100 degrees is the boiling point of water”. After this there could have been a multiple choice quiz about the effects of each of these temperatures.

Unit 8 starts with an exercise in tracing errors in Commodore BASIC V2 programs. I think this shows the need for a special command to help do this, such as TRON, TRAP, or some automatic syntax error detection, as with Atari BASIC and Commodore BASIC 3.5. After this, there’s another anachronistic program to convert between Gallons and Litres, although Gallons were already obsolete when this book was written.

Unit 9 starts by showing people how to use the C64 quotes mode with all the tedium of embedding control codes for coloured text into PRINT statements, while Sinclair Spectrum users could just use PEN n, Atari users could use COLOR n, and MSX users could also use COLOR n. We’re also introduced to using the dreaded cursor control codes, while Sinclair Spectrum users could just use PRINT AT y,x , BBC BASIC users could use PRINT TAB(x,y), Atari users could use POSITION x,y:PRINT and MSX users could use LOCATE x,y:PRINT. This is followed by an explanation of how to time things or tell the time using TI$. Unit 9 ends with a short program to draw the French flag using character graphics, including two POKE commands for screen and border colours, and lots of embedded control codes in PRINT commands. The reader is then encouraged to write a program to draw another flag, but also warned to avoid any flags with diagonal lines!

Unit 10 really doesn’t teach the reader anything much at all. It starts by telling people that it’s a good idea to ask a user for an exchange rate before using the earlier currency conversion program, then shows how to do that with PRINT and INPUT commands. Of course, this wouldn’t be necessary with currencies that had fixed exchange rates, which were possibly pegged to another currency. It also points out the difference between numbers and strings. After this, the reader is encouraged to write a very discriminatory program that assumes the user is a married man, then prints out his full name and his wife’s full name! There’s still no explanation of how to program sound or hires graphics, though.

Unit 11 starts by saying that so far the only commands which can be used within programs this course has taught are PRINT, LET (optional in Commodore BASIC V2 and most other BASICs), GOTO, IF, INPUT, STOP, and POKE. This is followed by a program which tries to encourage people to not only get married, but also tells them exactly how old their partner should be, according to some archaic code! There’s also the first flowchart in the book, based around this program and an explanation of the shapes used in flowcharts. I get the impression that almost the whole of the course thus far is just an edited version of a course previously published for the Commodore PET. After this, there’s a section on error checking, which points out that if the user types any answer except “MALE”, such as “M” or “BOY”, the program assumes they’re female and tells them to look for a male partner, which it describes as “idiotic”. It also explains the concept of checking for minimum and maximum ages as well as showing how to set them. Finally, the user is encouraged to create a flowchart and write a program to calculate house taxes or rates for a fictitious country called Ruritania, based on the features each house was made up of. This country was mentioned in various stories as in central or eastern Europe, German speaking and the scene for the story “The Prisoner of Zenda”.

Unit 12 tells us more about FOR…NEXT loops, as well as keeping scores of sporting events and working out the prices of buying lots of postage stamps of different values in bulk. By this stage, I think the suspense of when I was going to be able to program any hires graphics or sound was killing me!

Unit 13 finally gets on to the subject of using the C64’s SID sound chip! There’s a program called “SOUND DEMO”, which the user can load from tape, that produces various sound effects, including a heartbeat, a pip, and a raspberry. Users were told they could copy the relevant program lines for these sounds into their own programs and reuse them. There’s also a chart listing the parameters to create some more sound effects, such as a harp, a ship’s siren, an explosion, a jet passing, and a trumpet. Unfortunately, none of these sounds, with the possible exception of a trumpet, were any use to me in making electronic music sounding anything like Electro Funk, Rap/Hip Hop, Japanese Technopop, Depeche Mode, or a mixture of all of these, but it looked like a start. This article introduces us to a whole series of dreaded 5 digit locations to POKE with any number from 0 to 255, including calculations instead of just numbers, as well as making use of the AND command. I think this may have been when I started to realise why anyone would want to buy a special language for programming music, such as “Synthy”, as reviewed in “Your 64” magazine Issue No. 1. Of course, music like this has been created on the C64, but I doubt if it was in Commodore BASIC V2, and I don’t know how this was done.

If Commodore had made cars it was like they thought “Here’s our fantastic new car which can do things that most other cars can’t do. We haven’t provided the controls drivers need to make our new car do all these things, we’ve reused the controls we first used five years ago, but if they’re clever enough, they’ll work out how to use these new facilities. If not, then there’s no need to worry, because we’ll provide this as an optional extra, and some OTHER company is also bound to bring out an up to date replacement set of controls which enable drivers to use the new facilities on OUR car”, but they never bothered to tell potential buyers of their new car about these limitations.

Returning to the subject of making music, you can hear a Depeche Mode compilation created with the C64, but probably not in Commodore BASIC V2, on http://www.youtube.com/watch?v=SoAYge8Jzd4

Unit 14 takes a break from POKE commands to start talking about balancing a bank account. After this, it moves on to simulating tossing a coin, then lists 8 POKE commands which can be added to this program to produce sound effects. Unit 14 ends with a problem about working out a type of sales tax on clocks according to a certain formula, depending on the price of the clocks themselves.

Unit 15 claims to consist of routines which could be useful in games, the very thing most would be Commodore 64 programmers were probably interested in producing to make some money! First of all, there’s a program to time the user’s reaction, another one to simulate throwing dice, and a problem given to be solved is to write a program to simulate any game of chance, such as “craps, pontoon, etc”, preferably with graphics characters for dice, suits of cards, etc. There’s a footnote that Appendix B contains a listing for a “craps” program. I think this is quite a suitable choice to program because Commodore BASIC V2 is crap!

The Appendix congratulates the reader for having got to the end and goes on to talk about mathematical functions. There are also program listings of solutions to the problems set in each of the units.

After all of this programming, limited to programming text based applications, drawing character graphics screens of national flags and just a handful of sound effects, it was time for me to progress to “An Introduction to BASIC – Part 2”, where I was doomed to find out just how crappy Commodore BASIC V2 is and how I’d bought a pig in a POKE!

That’s all for now! Look forward to the next instalment in this series, whch will be about Part 2 of the course “An Introduction to BASIC” by Commodore.

Posted September 19, 2014 by C64hater in Uncategorized

AN INTRODUCTION TO BASIC: TRAMIEL TORTURE – PART 1   2 comments

AN INTRODUCTION TO BASIC: TRAMIEL TORTURE – PART 1

C64IntroBASIC1The packaging for Book 1 in this torture course

I got a Commodore 64 without the accompanying user manual, because my Dad was such a miser, trying to save as much money as possible. He totally rejected my request for a BBC Micro at £399, because there were other computers available for under £200 and he didn’t know anything much about computers because he hadn’t read any books about them. As the package he insisted on buying didn’t contain any instructions on how to use it, he bought me a course called “An Introduction to BASIC”, which was published by Commodore. It was made up of two books with accompanying cassettes.

This article is only Part 1, written entirely from my memories of this disgusting, obscene Commodore BASIC V2 programming course, but the following articles will be based on me re reading downloaded copies of it.

When we got home from this disastrous shopping trip, I managed to plug my Commodore 64 into an large old B&W TV, turn it on and load some programs from this course, and perhaps also from another tape I’d bought. I used it with this TV for a large part of the time, although I also had a broken down portable B&W TV and was sometimes allowed to plug it into our main large colour TV. I remember that the first or one of the first programs I loaded was some kind of demonstration of graphics and sound, so I was really keen to know how to program something like that myself. I set to work on studying “An Introduction to BASIC”, so I could find out how to do this, as well as compose and play my own music.

One of the early programs I loaded from tape or typed in from the book was about buying bottles of drink. I later managed to edit this program so the user could also buy glasses of drink, instead of just bottles. This was the first program I wrote! It gave me a sense of achievement and made me wonder what I’d be able to do by the time I’d finished this course. Little did I know that the policies of Jack Tramiel (who had left Commodore a few months earlier, just after showing new Commodore computers with the more advanced BASIC 3.5) were set to prevent me from ever learning to program anything much on the Commodore 64 except text based programs, because he was even more miserly than my Dad!

Some of the propaganda in “An Introduction to BASIC” said that the Commodore 64 used Microsoft BASIC, which Commodore thought was better than other versions of BASIC because it used colons to separate commands on the same line, while some other BASICs used backslashes. This is total crap, because I’ve never ever seen a BASIC which used backslashes to separate commands on the same line, while the Sinclair ZX81 could only have one command per line, Atari BASIC and Sinclair Spectrum BASIC also used colons to separate commands on the same line, but both of them used a non Microsoft BASIC, while a certain magazine had already described the BASIC on the C64 as something like a subset of Microsoft BASIC with its own filing commands. Of course, while I was studying this course, lucky Dragon, Tandy, and Spectravideo owners, as well as MSX users in Japan only at that point were having a whale of a time programming in current or at least recent versions of Microsoft BASIC.

I learnt from this course how to use commands such as LOAD, SAVE, PRINT, INPUT, READ, DATA, GOTO, GOSUB, IF…THEN, NOT, RETURN, RESTORE, GET, and PRINT TAB(n). As these commands were the ones which just popped into my head, they must be the most important ones. I also learnt the disgusting, filthy PEEK and POKE commands, which were never intended by Microsoft to be used to control all colour, graphics, and sound facilities of any computer, but my reward at the end of studying all of this was a few programs right at the end of Book 2 dealing with the all important colour, graphics, and sound which I so desperately wanted to use! I felt cheated and betrayed. The more articles in the computer press I read about why this was, the angrier I got.

During my time struggling with this totally f*cked up version of BASIC, my Dad with his I know best attitude, although he knew next to nothing about computers, made stupid, pathetic comments such as “You’re trying to run before you can even crawl!” and “Let me know when you get onto the maths”, but obviously if I’d had an Atari computer, or even the cheap Dragon which the conman in the shop had tried to sell us, then I COULD have run before I could even crawl, although my programs might have fallen over or crashed spectacularly in a sea of amazing multicolour graphics and a cacophony of sounds.

That’s all for now. Look forward to the next instalment in this series about “An Introduction to BASIC”!

Posted September 18, 2014 by C64hater in Uncategorized

DEBUNKING “PIPE DREAM PROJECTS – PART 2”   Leave a comment

DEBUNKING “PIPE DREAM PROJECTS – PART 2”

GWBASIC1The GW BASIC for C64 startup screen

I’m sorry for not making any posts recently. Unfortunately, I got bogged down with debunking TMR’s debunks of my earlier posts and wondered how to make a particularly scathing de debunk.

To keep it short and sweet, I did an article about a version of GW BASIC for the Commodore 64. This version of GW BASIC wasn’t available for the C64 when I owned one and was struggling to the verge of a nervous breakdown to work out how program that computer, but my point was that it could and SHOULD have been available for the C64 as very similar versions of BASIC were available for other computers before I got my C64 in 1984.

Microsoft had versions of their BASIC available for various computers, including computers using the 6502 or compatible processors. They released a BASIC for Atari 8 bit computers called “Atari Microsoft BASIC”, which was available on cartridge as well as disk.

You can bet that Microsoft were eagerly awaiting a phone call from Commodore and could have ported their 6502 BASIC onto the Commodore 64 before it went on sale to the general public, but Jack Tramiel was too mean to pay them a royalty for each C64 sold with this BASIC!

Some 8 bit computers which had a BASIC similar to GW BASIC were the Tandy Colour Computer/Color Computer or “Coco”, the Dragon 32, Dragon 64, Spectravideo 318, Spectravideo 328, and of course MSX.

MSX BASIC start screen

The friendly MSX BASIC V1.0 startup screen

I will never forget the long hours of therapeutic sessions I spent typing and modifying short programs INCLUDING GRAPHICS onto MSX computers using their GW/Tandy like BASIC at John Lewis department store in Oxford Street, London! I think I’d have preferred a BBC Micro, but my Dad said it was out of the question at £399, so I investigated the MSX computers costing between £200 and £300.

The MSX BASIC commands included the amazing SCREEN (n) for selecting any of the text or graphics modes, LINE (x1,y1)-(x2,y2),[colour],[b for box or bf for filled box] , CIRCLE(x,y),diameter,[colour], commands for defining and positioning sprites, and even interrupt commands such as ON INTERVAL GOSUB, ON SPRITE, ON STICK, ON STRIG, instead of the Commodore 64 obscure IRQs which I never understood because they involved PEEKing and POKEing myself half to death!

I eventually decided against having an MSX as my new and only computer, because the sound chip they used was the General Instruments AY-3-8910 instead of the AY-3-8912 or another superior chip. According to my extensive investigations into MSX BASIC, as well as MSX games music, probably written in Z80 Assembler, the 8910 chip could play three notes at a time, but all three notes had to have the same sound, although any of them could be mixed with noise to produce sound effects, including percussion. This meant it wasn’t much good for playing electronic music, because two channels or instruments would sound the same, although there could also be some distorted percussion on the other channel, so this played a big factor in me buying an Amstrad CPC664 instead, with its slightly more capable 8912 chip, which had three channels of sound that could all sound different to each other when playing simultaneously.

John Lewis department store also saved some people from the fate of buying a Commodore 64 by pointing out that it only had 38K RAM which they could use in BASIC programs. Some more memory was available to Machine Code programmers, but they knew that hardly anyone would program in Machine Code, although everyone was being encouraged to program in BASIC by the BBC campaign, and the manuals that came with almost all computers themselves.

Of course, everyone should be encouraged to PROGRAM computers instead of being brainwashed into avoiding programming them. This is the attitude behind the current Raspberry Pi computer, which has a version of BBC BASIC called Brandy BASIC, as well as a version of Sinclair Spectrum BASIC available for it. You can also choose which case to have and what kind of keyboard to use, a bit like the original Spectrum. Users are encouraged to program in the language Python, which doesn’t mean “OMG, not another language to learn!”, but is quite familiar, like an interpreted and simplified C with some BASIC syntax, which can be run under an interpreter and compiled only if or when you want to. IMHO it’s streets ahead of Visual BASIC, which is where Microsoft lost the plot of their earlier excellent work with BASIC.

The Raspberry Pi also has some retro gaming emulator packages available for it, such as Retropie and Chameleon Pi, but of course you can also actually program these emulators in BASIC. These packages both include a menu system giving access to emulators for computers including the Amiga, Apple ][, classic Apple MacIntosh, Amstrad CPC, Atari 8 bit, Commodore 128, Oric 1, Oric Atmos, MSX and Sinclair ZX Spectrum, also the cheap and nasty Atari ST (a MacIntosh/Amiga knockoff) as specified by Jack Tramiel, as well as the Commodore 64, and Commodore VIC-20, but at least you don’t have to try and program the last two! These emulators also include several games consoles, but I’m not concerned with these here, because this blog is about PROGRAMMING! I think the Raspberry Pi has now sold about 4,000,000 units, so that makes it as successful as various 8 bit computers and more successful than some.

In the near future you can look forward to some posts about two very stressful BASIC programming books published by Commodore which I read in 1984 and how really disappointed I was to find out that, after reading them and doing all the programming exercises, I still couldn’t program music or graphics on my Commodore 64. This was a form of torture!

Jack Tramiel is dead now, but I think his sons Leonard Tramiel and Sam Tramiel should be boiled in oil for their conspiracy in the C64 plot to get unsuspecting consumers to buy a computer without a built in language which supported its hardware! Hanging, the electric chair, or lethal injection are too good for them. Usually I’m against the death penalty, due to lack of conclusive evidence, but I think that these two have confessed various times and even bragged in public about their crimes. Some examples of this are that Sam Tramiel is quoted on http://en.wikipedia.org/wiki/Commodore_64 as saying “When I was at Commodore we were building 400,000 C64s a month for a couple of years.”, which obviously means that they mass produced C64s in advance before luring some more mugs or suckers into their con or racket. Both Sam and Leonard Tramiel also failed to take out display advertising with a slogan saying something like “Don’t buy my Dad Jack Tramiel’s Commodore 64, buy a computer not made by Commodore instead”. They didn’t volunteer their endorsements to other companies such as “The incredible Atari 800 with the unique Atari BASIC supporting its hardware, as recommended by Leonard Tramiel, son of Jack (Commodore) Tramiel”, or “The Sinclair ZX Spectrum 48K – ‘With all its BASIC commands printed on the keyboard, you can see how easy it is to program, unlike the Commodore 64 thought up by my Dad’ says Sam Tramiel”. If I’d got an Atari 8 bit computer instead, then the very first program I typed in could have drawn a lightning bolt complete with sound effect! How amazing this would’ve been.

I refuse to stoop so low and get bogged down by de debunking any debunk of this post by TMR, but I will be making more posts about GW BASIC for the C64, Tandy/Dragon BASIC, and MSX BASIC whenever I feel like it where his debunks may or may not be mentioned!

Posted September 9, 2014 by C64hater in Uncategorized