Archive for August 2013

THE VIC-20: BETTER OR WORSE THAN THE COMMODORE 64?   2 comments

THE VIC-20: BETTER OR WORSE THAN THE COMMODORE 64?

VIC-20FRIENDLY
Commodore LIES by claiming that their first computer to offer built in colour, graphics, and sound was somehow FRIENDLY, although it had no built in BASIC language commands to control these facilities!!

I decided to do this post because TMR of the rival blog http://www.c64crapdebunk.wordpress.com has recently confessed to owning and programming a VIC-20 before he ever got a Commodore 64. This gave him an unfair advantage when later getting a Commodore 64, compared with people unlucky enough to get a Commodore 64 as their first computer. David Simons, the programmer of the C64 extended BASIC interpreter Simons’ BASIC, also owned a VIC-20.

As for me, I’m firmly on the side of high level languages, as opposed to low level languages, and the higher level the better! I like the languages LOGO, LISP, and advanced dialects of BASIC. I don’t like Microsoft Visual BASIC, because it hardly seems to have anything of BASIC left in it. I’m not too keen on C or Assembly Language, either. I hate Commodore BASIC V2 as on the Commodore 64 and Commodore VIC-20. Commodore had no right to lumber unsuspecting buyers with this crap without warning them and getting their consent. This was like rape! For more details about this, watch the Star Trek: Enterprise trailer for the episode “Fusion” on http://www.youtube.com/watch?v=5lxBbJK4lCA . I should explain further that in this episode, during the 22nd Century the Enterprise NX-01, commanded by Capt Johnathan Archer, meets some unusual Vulcans whose philosophy involves not suppressing their emotions, as well as eating meat, and practising a technique called the mind meld, which has been abandoned by other Vulcans in this time period. One of the Vulcans mind melds with T’Pol and forces her to experience some kind of feelings and fantasy that she doesn’t like, then she ends up in sick bay, so obviously this is a kind of rape. The Commodore 64 caused me a whole load of stress and anguish, although I had no warning this would happen when I bought it. For more information read the episode summary on http://www.startrek.com/database_article/fusion .

In 1980 Commodore decided to build a computer that would display colour text, some form of colour graphics, and even some sound which went beyond just a beep, unlike their original PET 2000/4000/8000 range of computers. They called this computer the VIC-20, although it was known as the VC-20 in Germany because VIC in German pronunciation sounds like “fick”, meaning what the built in Commodore BASIC V2 language could do to your brain, so they shortened it to VC which the packaging said stood for Volkscomputer, meaning people’s computer, based on Volkswagen meaning people’s car, but it could just have easily stood for “Vergewaltigt von Commodore”, meaning “Raped by Commodore”. It was called the VIC-1001 in Japan and I’m sure people living in the year 1001AD would have loved it, if they’d discovered how to generate electricity! Perhaps they’d already found out by chance how to make batteries from lemons, copper, and zinc, who knows? The VIC-20 was released in 1981. Jack Tramiel’s famous quote about this project was “The Japanese are coming, so let’s be the Japanese!” I think this is an insult to the Japanese, because also in 1981, or possibly as early as 1979, in Japan, NEC released the PC-8001 computer. Not much has been known about this computer outside Japan until recent years, but I think various models with improved graphics and sound may have been released, often called the NEC PC-8801/88XX or just NEC PC-88. A short video of an NEC PC-8001 computer running N-BASIC V1.1, Copyright by Microsoft 1979, can be viewed on http://www.youtube.com/watch?v=B5CrIacVgwc , while a video of some of its games running under an emulator is on http://www.youtube.com/watch?v=BCVfUVsvIyU . This seems like a proto MSX computer, with 5 pre programmed function keys, and it draws a line across the screen using the command PSET in a FOR…NEXT loop! There is no equivalent command in Commodore BASIC V2 on the VIC-20 or the Commodore 64. Of course, there’s no command to program the function keys in Commodore BASIC V2 either! It may have been possible to detect a keyboard code or a PETSCII code that these keys had been pressed, but other computers such as the NEC PC-8001 could be used or even reprogrammed by the user to input whole BASIC commands by pressing one of these keys! I think this was by using the command KEY n,text. I wonder how Microsoft thought up the name, or even the idea that users of their computers should be able to program their own function keys? ROTFL!!

The VIC-20 came with only 5K of RAM and only 3.5K RAM free to BASIC. It was a simpler system to understand than the Commodore 64, although the dialect of BASIC was the same.

When Commodore released the VIC-20 in 1981 they thought it was important to sell this computer for under $300 in the USA, so they started selling it for $299. Little did their unsuspecting victims know that for $399 they could have bought a far more advanced Tandy Color Computer, including the graphics command SET and the command SOUND!

The Commodore PET 2000/4000/8000 range of computers came without colour, graphics, or any sound apart from a beep. Commodore later produced a graphics card for them. As the VIC-20 had colour, graphics, and sound already built in, potential buyers may have thought or even probably assumed that it came with a version of BASIC which allowed them to use these facilities. Unfortunately, it didn’t! Commodore produced a cartridge called the VIC Super Expander, which added commands for colour, graphics, and sound, as well as some more RAM. This was the very beginning of Commodore BASIC 3.5, as on the Commodore 16 and Commodore Plus 4, called the Commodore 116 and Commodore 264 in some markets. Unfortunately, there were other RAM expansions available which didn’t contain these extra commands! This meant it was no good just producing software which required more than 3.5K or 5K, assuming that these commands would be available.

VIC-20Boot
The totally pathetic 20 column VIC-20 startup screen

The VIC-20 had only a 20 or 22 column text display, compared with other computers which could display 32, 40 or even 80 column text. This made the VIC-20 look PATHETIC compared with these other computers! It had no sprites/player missile graphics/movable object blocks either, although the Atari computers, and Texas Instruments TI99/4A already had them.

The VIC-20, according to different sources, either did or didn’t have a bitmapped graphics screen, but a CHARACTER mapped graphics screen! The VIC-20 Programmers’ Reference Guide describes on pages 88-92 some way of plotting a sine wave and a circle. There’s also some crap about there being a way to use a bitmapped screen without a RAM expansion and another way to use it WITH a RAM expansion! There was a method which required users and programmers to use built in graphics characters or user defined graphics to generate something like high resolution graphics on the screen. This was, according to one source, how the VIC-20 Super Expander BASIC seemed capable of drawing some high resolution graphics using its own redefined graphics characters. Of course, instead of all this crap, Commodore could just have installed the ROM it used in the Super Expander cartridge onto the VIC-20 motherboard, or agreed to pay Microsoft or some other company $3 or even as much as $10 per VIC-20 sold for a new version of BASIC!

Atari-StarTrek-BASIC
An Atari game about Star Trek which claims to have been written in ATARI BASIC! More details on http://www.atarimania.com/game-atari-400-800-xl-xe-star-trek-35_5002.html Try doing this in BASIC V2 on a Commodore VIC-20 or Commodore 64!!

Commodore recruited William Shatner, alias Captain Kirk of Star Trek, to appear in TV commercials for the VIC-20. I think this was a devious ploy to make people think that the VIC-20 was somehow sci fi come true. I don’t think he realised that if he’d tried to run the Starship Enterprise with a VIC-20 his ship would probably soon have been destroyed or at least boarded by Klingons or Romulans with a more advanced computer even if it was only as powerful as an Atari 400, or a Tandy “Coco”.

Atari400
The amazing, groundbreaking Atari 400 computer

KlingonCapt1
“Prepare to be boarded, Captain Kirk!”

Obviously, being a simpler and more limited computer than the Commodore 64, there were far fewer memory locations to PEEK and POKE, so this helped prepare some people, including TMR, for the more complicated, total mind blowing crap that was the Commodore 64. Unfortunately, I don’t think any of the PEEKs or POKEs for colours, or most other things were to the same memory locations as on the Commodore 64, so there was a whole new list of memory locations to learn for people who had used the VIC-20 before they could program a Commodore 64! Some similarities were the BASIC language and the ROM “Kernal”.

BTW, while living in my first flat, I noticed that one of my neighbours had thrown out a VIC-20, by leaving it in the communal entrance, but I didn’t bother trying to salvage it, because I knew it was crap!

Posted August 29, 2013 by C64hater in Uncategorized

HUMAN LANGUAGE NOT MACHINE LANGUAGE!   Leave a comment

HUMAN LANGUAGE NOT MACHINE LANGUAGE!

Orac2
Orac, a computer from the series Blake’s Seven, which responded to commands in normal spoken human language

Many years ago, I often watched science fiction TV series, such as Star Trek (the original series), Doctor Who, Lost in Space, Blake’s Seven, etc. I still do!

In all these series, computers were featured. Watching them, I couldn’t wait until the time I finally got my hands on a computer and wondered what it would be like. I didn’t think the computer would be quite like the ones featured in these TV series, but a bit similar to them.

These computers often, or usually, responded to voice control in human language, such as a subset of English, or some other human language. There were often lots of flashing lights, but I didn’t understand what these were for. Later on, I realised that each light which was lit probably represented a 1 in binary. I think one of the most advanced computers featured was Orac in Blake’s Seven, because it was programmed entirely by voice commands and could hack into almost any computer in the Terran Federation. I think this was made possible by Ensor, the inventor of a component called the Tariel Cell, which was found in all Terran Federation computers, building some kind of secret back door into these components, leading into the whole computer. He built Orac to be capable of using this back door. Years later, Microsoft would do something similar with Windows, advertising software that was superior to software by any other companies, because it used this back door, which only Microsoft knew about. One fault with Orac was that it had some cryptic error messages telling people they hadn’t asked it the right questions. Of course, it wouldn’t tell them what the right questions were!

Of course, it’s possible for most people in all countries to learn other human or spoken languages. In lots of countries most of the population has learnt to speak one or more other languages. In spite of this, there are no countries that I know of where most of the population can program in any kind of Assembly Language, whether it’s for the 6502, 6510, 8510, Z80, 68000, Power PC, ARM, or even the possibly still most widespread Intel X86 family of processors. I think this proves my point that human language, not machine language is the answer! I am not Borg! Of course, TMR of the blog c64crapdebunk.wordpress.com and other people he hangs round with have got the attitude “I can do it! If I can do it, then ANYONE can do it!” Obviously, as Mr Spock would say, it’s totally illogical to claim that anyone can do something just because a few other people can do it.

ShrunkTARDIS
Left to right, The Monitor and companions Adric, Tegan, and Nyssa see the Doctor’s TARDIS shrunk by a three byte long bug in a Machine Code program

In classic Doctor Who there was a computer in the form of a robot dog called K9, which responded to voice control and seemed very advanced. Unfortunately, it was revealed in the classic Doctor Who story “Logopolis” (Tom Baker’s last story, where he tried to fix the TARDIS broken Chameleon Circuit which should enable it to camouflage itself) that his TARDIS, or at least the Chameleon Circuit, was an old model (usually described as a Type 40, while the Master’s TARDIS was a later model) and the instructions had to be punched in by Machine Code! Even one of his then three companions, Adric, who was wearing a star for mathematical excellence and could calculate approximate square routes for large numbers in a few seconds, said that this was so tedious! The Doctor demonstrated possible disguises for the TARDIS, such as a pyramid, which came up on a small screen on the console. Of course, the Doctor’s race the Time Lords have 12 regenerations, so 13 lives, and the Doctor claimed to be about 749 years old around that time, so he’d obviously had plenty of time to learn this type of Machine Code, but us human beings don’t have all that time! Of course, the TARDIS computer graphics from around this era were usually done on Acorn computers, such as the BBC Micro or Electron, which both had the excellent BBC BASIC, but as the story Logopolis was made in late 1980 or early 1981 before the BBC Micro was released in about December 1981, and the Acorn Atom had more limited graphics, I’m not sure what computer was used in this story. The “Machine Code” featured later in the story may actually only have been just a listing of sprite type data which described all the TARDIS measurements of the outer Police Box shell. Later on, Adric and the leader of Logopolis, called “The Monitor”, walked round the streets of Logopolis, which were made up of alcoves of mathematicians calculating the data necessary to carry out the TARDIS repair, while calling out a series of hexadecimal numbers as a way of checking the Machine Code listing for a bug which had reduced the TARDIS outer shell to a fraction of its normal size, trapping the Doctor inside. They found that three consecutive numbers were wrong. The term hexadecimal was never mentioned, but either in this story or the next, they said they were using a base 16 numbering system. The term Machine Code was only mentioned once in this story. It was all part of something called “Block Transfer Computations”, which could change physical objects and even form new objects out of thin air, as in the following story “Castrovalva”, which was Peter Davision’s first story as the Doctor.

I didn’t expect my first computer to be as advanced as the ones in these sci fi series, but I expected it to be looking to the future, pushing things forward as much as possible. At first, I thought I was happy, but then things soon turned sour. My first program was a rewrite of a program from the Commodore course “An Introduction to BASIC”, where instead of just ordering whole bottles of wine and being asked to pay a certain price, I changed it so it allowed the user to order glasses of wine, instead of bottles. If I’d had an Atari 8 bit computer instead (even a 400 with a flat touch sensitive keyboard, or one with a replacement keyboard) then my first program could’ve been a variation on the famous Atari BASIC lightning bolt, complete with a slightly altered sound effect! How amazing that would’ve been!

Unfortunately, Commodore 64 BASIC requires programmers to memorise what seems like an almost infinite range of numbers representing memory locations, or in other words to think like a computer, or a cyborg, not like a human being! It seems that most of these begin with the digits 532. Of course, this makes it very difficult to remember the various numbers using a popular Greco/Roman memory system, because this would involve conjuring up mental images all involving lemons. Anyone with any sense would have heard about this memory system, then shifted some of the important locations into a different range of memory locations such as those beginning with 540 or 550, because this would have enabled different letter combinations to remember them, such as LRS and LLS, where 540 could stand for low rise, or lairs, while 550 could stand for lawless, low loss, etc. Of course, there were very good reasons why Jack Tramiel era Commodore didn’t do this, which were that they didn’t care, and it may have cost a bit more money, as well as getting people to buy cartridges such as the Super Expander 64 or Simons BASIC to fix their mess! The Super Expander 64 was an early version of Commodore BASIC 3.5 or 7, which followed on from the Super Expander for the VIC-20, which I think was Commodore’s first computer with colour, graphics and sound, although of course it had no commands to program these facilities, but more about the VIC-20 in a future post. Years before this, Atari had written a series of official labels standing for the memory locations which were important on their Atari 8 bit computers, such as GRACTL (player missile graphics control, 53277) and PMBASE (player missile graphics data, 54279). Programmers were recommended to use these labels in Atari BASIC as well as in 6502 Assembly Language. This is much better than trying to make up words or sentences from the letters LMNKK or LMNCK (53277) or LRNKP or LRNCP (54279)! What have “lemon cake” or “lower on cape” got to do with controlling or defining player missile graphics/sprites?

While I was reading up on the Commodore 64 in various magazines, such as Your64, Commodore Horizons, etc, I read two articles about what I thought was an amazing language called LOGO. I think the first article was “Sprite Logo Icon Style” in Your64 magazine No. 2, June 1984 page 52, which was available to view on the now closed “Commodore is Awesome” website, but now you’ll have to try and find it somewhere like http://www.issuu.com or http://www.yumpu.com . From what I read, this language, which was either part of or another version to Commodore LOGO, enabled people to do impressive things using a language that was much closer to spoken English than BASIC was. I realised that if the Commodore 64 had been supplied with this language then it would’ve been a totally different kind of computer. I was also very upset by reading this because I had no chance of using either of these languages as Commodore LOGO was DISK ONLY, while Commodore 64 Sprite LOGO was either DISK ONLY or just too expensive. Interestingly enough, on page 72 of the same magazine a software house owner called John Peel (NOT the deceased BBC DJ) says about converting his fantasy adventure game “Valhalla” from the Spectrum “Translating to the 64 was horrific. The memory map is a real mess, and we had to do all sorts of filthy things to get it to take a 35K program,” Peel said. “Our technical people hate it. In fact, so deep is their love of the Commodore 64 that in future we will be developing 64 software on a BBC micro!” WELL SAID JOHN!

BorgTransceiver
The Borg try to install a temporary neural transceiver onto Capt Katherine Janeway without asking permission. They claim “You will not be damaged”. Wanna bet?

Some years after I sold my Commodore 64, I watched the series “Star Trek: Voyager”, which often featured a cybernetic race called The Borg. In the episode “Scorpion – Part 2” Capt Katherine Janeway makes a deal with The Borg to help them defeat Species 8472 in return for safe passage across Borg Space to their own Alpha Quadrant, where the United Federation of Planets is partly located, as well as the Beta Quadrant. The Borg suddenly start to try and attach neural transceivers to some of the Voyager crew without first even asking permission, because they claim this will be a more efficient type of communication, enabling them to share their knowledge. They claim it’s only temporary and say “You will not be damaged”. I beg to differ and I think it was likely to cause a similar type of damage to trying to memorise all the Commodore 64 memory locations needed to write programs which used colour, graphics, or sound. I am NOT Borg!

So, to sum up, Commodore with the C64 were looking backwards in time, while all other computer manufacturers were looking forwards! I look forward to the day when it will be possible to program computers in a subset of English or some other human language, as well as to get these programs to run on other compatible computers as a runtime or compiled version, which doesn’t require a copy of the software that was used to produce them!

Posted August 25, 2013 by C64hater in Uncategorized

DEBUNKING THE DEBUNK OF “HOW TO PROGRAM IN VARIOUS DIALECTS OF BASIC”   Leave a comment

DEBUNKING THE DEBUNK OF “HOW TO PROGRAM IN VARIOUS DIALECTS OF BASIC”

commodore-128-basic
A book explaining how Commodore had finally fixed their crappy BASIC 3 years later, but unfortunately they failed to discontinue the Commodore 64 at the same time

Here are TMR’s quotes and what I think of them “Debunking How to program in various dialects of BASIC. Your correspondent had nothing better to do at the time (well strictly speaking he did, but procrastination comes worryingly naturally) so decided to go back and cover points from previous posts more fully. Right now he’s in the middle of finishing off a game for the Atari 8-bit and some writing work so really shouldn’t be doing this but has to make a phone call anyway so will typeset at the same time”.

I know that TMR owned an Atari 8 bit some years ago, which he started programming in BASIC. I think he found it was such a user friendly computer that it eased him into learning 6502 Assembly Language. Later, he transferred this knowledge onto the Commodore 64. I think there were a lot of other people who did this. TRAITORS!

I said “A recent post called “Can everyone really program?”, which I think is supposed to mean could everyone really learn to program”

TMR replied “It was more about how not everyone is actually capable of programming; some people simply don’t have the correct mindset so, even if they learn some BASIC or a similar high level language, they still won’t be able to apply that knowledge in any practical way. The language in the post title is a little mangled because it was posted at stupid o’clock after several hours of “proper” writing, but your correspondent still finds the idea of the author trying to correct someone else’s English amusing. The topic of this post is probably similarly skewed for the reasons discussed above”.

I think that all that’s needed is a bit of organisation applied to programming. All but the most simple and very short programs should start with a flowchart before writing any code. I don’t keep office hours, so this is why my post was made “at stupid o’ clock”.

I pointed out “Each of these programs selects the colour purple to draw on a graphics screen, then draws a 50 pixel long line from the top left hand corner of the screen down and to the right. Unfortunately, no equivalent program has been listed for the Commodore 64! I demand that TMR writes the equivalent program in Commodore 64 BASIC V2 and posts it ASAP!!”

Of course, after this TMR totally failed or refused to post a program in Commodore BASIC V2 which opens a graphics screen and draws a 50 pixel line from the top left hand corner down and to the right. This is because (without a short Machine Code routine and a SYS call, which are banned in this challenge to him and other C64 apologists), such a program would be so mind numbingly complicated, due to all the PEEKs and POKEs and various REMs added to explain each line of the program would very probably have had most people who read it thinking “WTF?!” or some not so modern, more classic, possibly still current, expression used in about 1977 when Commodore BASIC V2 dates from, such as “You what?!”, “Cor blimey”, “F*kin’ ‘ell!”, “Cor, lummy O’Reilly!” or even “Zounds!” Don’t forget that the built in BASIC on any “home computer” was of vital importance, because that was the only language users could write programs in which could run on other users’ computers of the same model, because a compiler required a very expensive disk drive and there was no suitable compiler available at the time Commodore released the C64 or even in April 1985 when I sold it.

TMR further waffled on “And in doing so the author has embarrassingly demonstrated that he failed to understand what he was reading; to reiterate for the hard of thinking, the point was that, although the three BASIC dialects have the same commands, there is no consistency between them so learning one teaches a would-be programmer nothing useful about programming”.

MSXUserMar85
MSX User magazine March 1985, which started an amazing series of articles about translating between different dialects of BASIC

Obviously, you can’t start a sentence with And! BASIC was created in 1964 by Professors Kemeny & Kurtz. At that time, computers couldn’t display colour, had no graphics, and any sound was just coincidental, although some people managed to use these sounds to play simple music. It was only some years later that commands for colour, graphics, and sound were added, but by various groups of people working for different companies. This is why those commands are different for one make of computer compared to another, as well as different models of computer from the same company. I heard that there was later an attempt by Professors Kemeny and Kurtz to create a new standard extended BASIC. I think this was called “Real BASIC” or “True BASIC”. After reading some library books, I started to learn about how to program in BBC BASIC. After this, I learnt about various dialects of BASIC used on computers I didn’t own from a series in how to convert BASIC listings from various BASIC dialects to MSX BASIC. I should explain that MSX BASIC is very similar to GW-BASIC, supplied with PCs even up to Windows 98 (where it was hidden in the Windows 95 directory), and “Microsoft Extended BASIC” on Tandy, Dragon, etc, as well as backwards compatible with AmigaBASIC up to a point, but the sprite commands are totally different. MSX BASIC V1.0 didn’t have PROCedures, long variable names, REPEAT…UNTIL, or WHILE…WEND loops, but DID have the ELSE command, easily programmable function keys, a full set of commands for sprites, and interrupts from BASIC. This BASIC conversion series appeared in “MSX User” magazine, published here in Britain. It was really fascinating stuff, although I didn’t even own an MSX computer at the time! The series was published so that MSX users finding it hard to get software could get more programs by typing in listings designed for other computers, such as (in alphabetical order) Amstrad CPC, BBC/Electron, Oric, Sinclair ZX Spectrum, Tandy/Dragon, but make the necessary changes to convert them to MSX BASIC. You can read Part 1 of this amazing course on http://www.scribd.com/doc/65289376/MSX-User-Vol-1-No-4-Mar-1985 , then type 40 into the page number box at the top of the screen. BTW, it doesn’t attempt to deal with the crappy Commodore 64 BASIC, apart from mentioning that the Commodore 64 has a 40 column text display. Unfortunately, I can’t find any other parts of this very informative course archived online at the moment. I was originally interested in MSX as an alternative, user friendly, way out of Commodore 64 hell. It had the latest BASIC from Microsoft, which they called Microsoft BASIC V4.5 or MSX BASIC V1.0. An MSX was nearly my second computer, after lots of interesting programming sessions at John Lewis and Selfridges department stores in Oxford Street, London while my Commodore 64 sat gathering dust at home. I eventually got a Yamaha CX5M Music Computer which was MSX, mainly to write and play music on, with its built in non MSX standard Yamaha DX type sound synthesis module, but this was after MSX had failed to make an impact in the UK. The concepts in this BASIC conversion course included the following. In general, computer graphics screens use a system of “cartesian coordinates”, meaning that each pixel or dot on the screen has a coordinate given in X (horizontal) and Y (vertical) coordinates. Due to different resolutions on different computers, as well as different resolutions in different display modes on the same computer. The BBC Micro and Acorn Electron coordinates were the same for ALL their graphics display modes, but used a wider range of numbers than necessary, possibly to allow for future upgrades. Their X coordinates were 0-1279, while their Y coordinates were 0-511, although the highest resolution was 640×256. This meant that in practice each coordinate referred to 2 or more actual pixels, but this system made it easy to convert graphics from one graphics display mode to any other, unlike with Amstrad CPC or Atari 8 bit computers. Another point was that some computers had their graphics origin point (i.e. coordinates 0,0) at the TOP left of the screen, while others had it at the BOTTOM left of the screen. This meant that Y coordinates such as 4 on one computer with a vertical resolution of 192 pixels would be 187 on another computer which had the same vertical resolution. On all “home computer” BASIC dialects that I’ve read about, the only commands for drawing lines are, surprisingly enough, DRAW, LINE, or DRAWTO. The exact syntax for the coordinates following these commands varies, because they may or may not use brackets or dashes and may have one, or two sets of X and Y coordinates, but that’s certainly light years ahead of Commodore BASIC V2! As the version of BBC BASIC implemented on the BBC Micro series, as well as on the Acorn Electron used X coordinates from 0-1279, while MSX BASIC V1.0 for the original MSX standard (before MSX2) used X coordinates from 0-255, this meant that to convert BBC screen X coordinates to MSX screen X coordinates just required the BBC screen X coordinate to be devided by 5. In a similar way, to convert a BBC Y coordinate to an MSX Y coordinate required the BBC Y coordinate to be devided by 2.66 and that’s all! Obviously, a lot easier to deal with than the mind blowing calculations required to plot BBC BASIC graphics in Commodore BASIC V2. After reading this course, MSX users would be equipped to get hold of a set of the entire series of the excellent magazine INPUT, then convert whatever programs they wanted into MSX BASIC. I usually found that any errors producing bugs in printed listings in any non Commodore specialist computer magazine could be corrected, so long as I had enough understanding of how the relevant BASIC dialect worked. Obviously, this wasn’t possible with Commodore BASIC V2!

Some commands and their equivalents on various computers are as follows –

Select a predefined colour

INK n (Sinclair Spectrum) GCOL mode number,colour number (BBC/Electron) PEN n (Amstrad CPC) COLOR n (MSX)
(Sometimes the colour is given as part of a command such as DRAW or LINE)

Change display mode
Not necessary on Sinclair Spectrum MODE n (n=0-7, BBC Micro or Acorn Electron) MODE n (n=0-2, Amstrad CPC) SCREEN n (n=0-3, MSX BASIC)

Plot a point

PLOT X,Y (Sinclair Spectrum) PLOT mode number,X,Y (BBC BASIC) PLOT X,Y (Amstrad CPC) PSET X,Y (MSX BASIC)

Draw a line

DRAW X,Y (Sinclair Spectrum, coordinates relative to last point)
DRAW X,Y? (BBC BASIC) DRAW X,Y (Amstrad CPC)
LINE (X1,Y1)-(X2,Y2) (MSX BASIC)

I said “As I originally posted last August, here’s a short program which just opens a C64 graphics screen, but there seems to be a bug in line 1060.

1060 FOR I=1024 TO 1023”
TMR replied “Your correspondent can see what’s needed to fix that line (somebody has made a relatively small typo, one character is incorrect) but, since this isn’t an issue with the C64’s BASIC because all BASICs will do the same thing with a mistake like that, it would be better to leave the autho to work out what is wrong for himself because he’ll never learn otherwise!”

I have no real desire to cause myself more stress by reading up on the Commodore 64 BASIC way of addressing its graphics screen memory. At a rough guess, I’d say that if only one character is wrong, then the correct version would be either 1060 FOR I=0024 TO 1023 OR 1060 FOR I=1024 to 2023.

I pointed out “Finally, I must mention that I keyed in TMR’s Atari listing above and found out that it just brought up a blank purple screen!”

TMR made the excuse “That’s partly because the listings were there to demonstrate the diversity in command implementation, not to actually be typed in and executed! Your correspondent did indeed forgot to transcribe the COLOR command in the Atari 8-bit listing when moving it from emulator to blog post however, so the listing has been updated with a note added to reflect the author’s part in the process”.

I further explained “There’s some kind of relationship between any colours displayed on screen at the same time which can affect how the other colours will look. I think it’s a bit like the Amiga’s HAM mode, and/or colours being generated by setting hue, saturation, and value, instead of RGB values”.

TMR attempted to deny the strong links, caused by their hardware designer Jay Miner, between the Atari 8 bit computers and the Amiga by saying “Goodness alone knows where the bit about the Amiga’s HAM mode came from because it’s not like that at all! The reason for the purple background colour is clearly explained in the relevant footnote”.

I pointed this out because, while changing the colours and using various GRAPHICS modes, I was shown again that the results of keying in various values in SETCOLOR were unpredictable as far as I could tell. Unfortunately, I’ve now discovered that I can’t find my copy of “Inside Atari BASIC” by Bill Carris, so I can’t give you the detailed explanation at the moment. He said at the beginning of this section of the book that programmers should remember one thing, that while Atari colour was fairly easy to understand, it wasn’t extermely easy to understand. Basically, it’s not possible to use any of the 256 colours in combination with absolutely any of the other 255 colours.

This was because it had a 6502 derivative CPU (the 8502) running at only 2Mhz compared to the Amstrad’s Z80 at 4Mhz, only a 16 colour palette compared to the Amstrad’s 27 colour palette, and it still used 51/4 inch flimsy floppy disks, compared to the Amstrad’s 3 inch disks in their hard cases.

C128D
The Commodore 128D with integral floppy 51/4 inch floppy disk drive which was the standard disk size for the Commodore 128

TMR replied “Correcting the misunderstandings and mistakes above in order; the difference between a 2MHz 6502 (which is the maximum speed, it doesn’t always run that fast) variant and a 4MHz Z80 is very close to nonexistent because the Z80 takes more cycles to execute commands, on average about twice as many. As far as colours go, over the two displays (they run simultaneously) it’s actually thirty colours in total. The C128 was designed to either use the 1571 or 1581 disk drive (both of which work with a C64 as well) with the latter taking 3.5” DS/DD disks, exactly the same as used by the Atari ST or Commodore Amiga; the Amstrad CPC’s CF2 disks were far harder to come by, had a lower capacity and cost anywhere up to four times the price”.

Various people have said that the 4Mhz Z80 as used in the excellent Sinclair Spectrum allowed for faster graphics execution. TMR said that 2Mhz was the maximum speed for a 6502, but actually it was an 8510 in the C128. Amstrad took the amazing step of incorporating a floppy disk drive in their CPC664 and CPC6128 computers. This helped to make disk drives affordable for lots of people. The whole computer systems cost little more than just the price of a disk drive before these computers appeared on the market.

I only care that the official Commodore specs said it had 16 colours. I don’t care how many more colours some people managed to squeeze out of it with PEEKs and POKEs or Assembly Language! The 51/4 inch disks were the standard for the Commodore 128, especially as the model C128D even had a disk drive of this size built in! The page on http://en.wikipedia.org/wiki/Commodore_128 gives the specs and even points out that the Commodore 64 CP/M cartridge would only work with early Commodore 64s made in 1982! This obviously shows that a change was made, making some software incompatible, but there was no change to the BASIC ROM, which may as well have been upgraded to something like Commodore BASIC 3.5 at the same time as the other change was made, because the idea of maintaining compatibility with very early Commodore 64 models had already gone out of the window! While using the WinVICE V2.2 Commodore multi model emulator in C128 mode I was surprised to find that the old C64 POKEs 53280 (border colour) AND 53281 (screen background colour) also worked in C128 BASIC. I suppose this was all part of maintaining compatibility with C64 software. I read later in the book pictured at the top of this post that lots of memory locations had changed on the C128, though. Unfortunately, not much software was ever produced for the C128, which meant it was forced to fall back on C64 software. A lot of software started being labelled as C64/C128. Basically, the C128 offered a user friendly programming environment with Commodore BASIC 7, but the underlying hardware was Commodore 64 compatible. What this meant was that if or when programmers could somehow learn on this computer how to write in 6502/6510/8510 Assembly Language, or if they could somehow write a program in a high level language and compile it into 6502 or 6510 Machine Code, then unless that program required more than 64K RAM it was similar to a Commodore 64 program, or could be fairly easily converted into a Commodore 64 program which would then run on a Commodore 128 AS WELL AS a Commodore 64.

I didn’t really care about its Z80 CPU running at 4Mhz for CP/M use only, but I don’t remember hearing that it had 16 colours in 640×200 mode.

The Z80 isn’t just for CP/M and can quite happily be used all the time. And yes, the 80 column mode (it’s actually larger than 640×200, that’s just the default size) is sixteen colours, has optional character or bitmap modes, hardware smooth and coarse scrolling and it’s own dedicated block of RAM – really, a C128 is either a C144 or C192 depending on the model.

I have never heard of the C128 Z80 being used for anything other than CP/M, which was all that Commodore intended it to be used for.

I hope at some stage in the future to post a listing where two Doctor Who TARDIS shaped sprites collide, then bounce off each other and head in opposite directions. Remember that the Commodore group leader of a computer club I went to said “Oh that would be VERY difficult!”, which was when I totally lost faith in the Commodore 64.

Your correspondent awaits this programmatic delight to see if the author really wanted to make two sprites actually bounce (as in rebound in a fairly realistic way) or just do something simple like make them reverse direction on collision.

I plan to just make them reverse direction on collision. This was what my Commodore 64 group leader at the computer club said would be “VERY difficult!”, so that was the end of it for me, when I totally lost faith in the Commodore 64, but this is the ROOTS of gaming! After I do this, then I’ll work on how to drive one of the sprites under joystick or keyboard control.

Posted August 23, 2013 by C64hater in Uncategorized

HOW TO PROGRAM IN VARIOUS DIALECTS OF BASIC   Leave a comment

HOW TO PROGRAM IN VARIOUS DIALECTS OF BASIC

AtariMyPattern

A graphics art pattern easily generated in Atari BASIC

Some recent posts on the blog http://www.c64crapdebunk.wordpress.com  have had their own subjects instead of being in direct response to my postings here!

Firstly, I should say that I have owned an Amstrad CPC and now own an Atari 8 bit, as well as several other types of computer, but have never owned a Spectrum. I think I may have missed out by never owning a Spectrum, but have been trying to do a bit of Sinclair Spectrum BASIC on emulators. Unfortunately, I’ve never learnt how the keyboard works and it’s more difficult to key in the commands without a marked keyboard to remind you where they are. I think I may buy a Spectrum soon to get the full experience.

A recent post called “Can everyone really program?”, which I think is supposed to mean could everyone really learn to program, listed the following three short programs for the Sinclair Spectrum, Amstrad CPC, and Atari 8 bit computers.

Sinclair Spectrum
10 INK 3
20 PLOT 0,175
30 DRAW 50,-50

Amstrad CPC
10 MODE 1
20 INK 1,4
30 PLOT 0,399,1
40 DRAW 100,299

Atari 8-bit
10 GRAPHICS 24
20 SETCOLOR 1,4,12
30 SETCOLOR 2,4,2
40 PLOT 0,0
50 DRAWTO 50,50

Each of these programs selects the colour purple to draw on a graphics screen, then draws a 50 pixel long line from the top left hand corner of the screen down and to the right. Unfortunately, no equivalent program has been listed for the Commodore 64! I demand that TMR writes the equivalent program in Commodore 64 BASIC V2 and posts it ASAP!! Of course, as anyone reading this blog will know, that will require a whole load of PEEKs and POKEs just to open a graphics screen, even before getting on to plotting any points or drawing a line.

As I originally posted last August, here’s a short program which just opens a C64 graphics screen, but there seems to be a bug in line 1060.

1000 POKE 53265,PEEK(53265) AND 239

1010 POKE 53265,PEEK(53265) OR 32

1020 POKE 53272,(PEEK(53272) AND 200) OR 8

1030 FOR I=8192 TO 16191

1040 POKE I,0

1050 NEXT I

1060 FOR I=1024 TO 1023

1070 POKE I,1

1080 NEXT I

1090 POKE 53265,PEEK(53265) OR 16

1100 RETURN

Of course, I must point out to TMR that a program such as printing a slash character on the text screen, followed by further slashes on each line going down, each one position to the right of the previous character isn’t allowed. Why not try drawing a circle while you’re at it? I look forward to seeing these two programs!

Finally, I must mention that I keyed in TMR’s Atari listing above and found out that it just brought up a blank purple screen! This was after I added the line 60 GOTO 60 , because without this line the program would immediately end and return to the default screen GRAPHICS 0. I thought, as explained in the book Inside Atari BASIC by Bill Carris, that it may be because Atari colours are a bit difficult to understand. There’s some kind of relationship between any colours displayed on screen at the same time which can affect how the other colours will look. I think it’s a bit like the Amiga’s HAM mode, and/or colours being generated by setting hue, saturation, and value, instead of RGB values. This could be why the screen looked blank. I later realised that I could get his program working just by inserting the following line 35 COLOR 1 . Perhaps TMR was testing me. Please remember to specify which colour you want to draw with in Atari BASIC before actually plotting or drawing. Some other dialects of BASIC don’t require this, though.

I’ll leave you with a little program I wrote which produced the picture at the top of this post. I’d love to see a version of this in Commodore BASIC V2! I wonder how long it would take TMR to write it?

10 GRAPHICS 23

20 SETCOLOR 1,5,9

30 SETCOLOR 2,10,11

40 FOR X=150 TO 0 STEP -4

50 COLOR 1:PLOT 0,0

60 DRAWTO X,80

70 NEXT X

80 GOTO 80

STOP PRESS!!

I decided to do some studying up on the Commodore 128 with its Commodore BASIC V7. This was Commodore’s SECOND attempt to fix the crappy BASIC V2 that Jack Tramiel had left the company with. Jack Tramiel left Commodore in 1984 and the Commodore 128 was released in 1985. At the time, of the Commodore 128 I was using my Amstrad CPC664, and when I used to see the Commodore 128 in shops I thought to myself “Too little, too late! I’m well out of it!” This was because it had a 6502 derivative CPU (the 8502) running at only 2Mhz compared to the Amstrad’s Z80 at 4Mhz, only a 16 colour palette compared to the Amstrad’s 27 colour palette, and it still used 51/4 inch flimsy floppy disks, compared to the Amstrad’s 3 inch disks in their hard cases. I didn’t really care about its Z80 CPU running at 4Mhz for CP/M use only, but I don’t remember hearing that it had 16 colours in 640×200 mode. Anyway, here’s a rough Commodore BASIC 7 equivalent to my Atari 8 bit listing above and not a PEEK or POKE in sight!

Commodore 128 BASIC 7

10 REM **** GRAPHICS PATTERN ****
20 GRAPHIC 3,1:COLOR 0,1:COLOR 4,1
30 FOR X=100 TO 0 STEP -4
40 DRAW 3,0,0 TO X,200
50 NEXT X
60 FOR T=1 TO 4000:NEXT T
70 GRAPHIC 0

Some changes I had to make in this program compared with the Atari BASIC program were to count a delay loop in line 60, then give the GRAPHIC 0 command to return to the original text screen I’d started on. This is because Commodore didn’t write this BASIC to do this, unlike various other BASICs and I was left several times thinking this program and others similar to it had crashed!

I plan to study some more Atari BASIC, as well as Commodore BASIC 7 and I hope at some stage in the future to post a listing where two Doctor Who TARDIS shaped sprites collide, then bounce off each other and head in opposite directions. Remember that the Commodore group leader of a computer club I went to said “Oh that would be VERY difficult!”, which was when I totally lost faith in the Commodore 64.

Posted August 17, 2013 by C64hater in Uncategorized

JACK TRAMIEL DOES IT AGAIN!   Leave a comment

JACK TRAMIEL DOES IT AGAIN!

TramielWanted

WANTED FOR MURDER OF ATARI: JACK TRAMIEL $2,500 REWARD

Even though Jack Tramiel is now dead, he’s still causing more problems for me, but this time they’re not connected with the Commodore 64!

In 2012 I bought an Atari 65XE 8 bit computer, complete with Atari XC12 cassette based data recorder. I knew this was a compatible system to the Atari 800XL (which was nearly my first computer), but that it had been given a makeover after Jack Tramiel took over Atari in 1984, then brought out the Atari ST and XE lines in 1985. His price war while with Commodore had pushed Atari to the verge of bankruptcy. He left Commodore because he could no longer have it all his own way. Part of the sale agreement with Warner Bros was that he must continue to support the Atari 8 bit computers. This was why he continued to produce them, but revamped into new models called the 65XE (64K) and 130XE (128K). There was also a model 800XE sold only in “Eastern Europe”, although it’s not clear to me exactly which parts of Europe this was. The “Iron Curtain” didn’t break down until 1989-1990 and before that there were a lot of import restrictions, as well as people in those countries making unlicensed clones of western computers. I don’t think it was possible to clone Atari 8 bit computers, because they used custom chips.

I didn’t think the Atari 65XE would give me any problems, because it was 800XL compatible, but put into a redesigned case which was the same style as the Atari ST, but I was WRONG! At this point, I should mention that months later I also bought an Atari 800XL computer, which is an iconic design, totally different looking from the Atari 65XE and has been called a “tank”, meaning solid and sturdy.

Over a period of several months, I had accumulated various programs I’d typed in, either made up by myself, or from listings, and I wanted to transfer these onto a new floppy disk drive emulator unit called the SIO2SD Micro, although I knew I could use it to store and load ATR disk image files. This device stores a whole load of ATR files, which are Atari floppy disk images, onto SD cards. Even a 512Mb SD card can store a massive amount of these disk images.

Unfortunately, I found out that I wasn’t allowed to load a BASIC program from tape, then unplug the XC12 data recorder and plug in the SIO2SD Micro device with the computer still turned on, because this would probably cause damage to the computer or the SIO2SD Micro device. Of course, this device is a modern gadget not even thought of during the time the Atari XE computer range was in production. However, back in those days the equivalent action would have been to load a program from cassette, then try to transfer it to disk. The XC12 cassette data recorder only has one connector, which is a plug on the end of a built in lead, but its predecessor, the Atari 1010 data recorder had another connector, which allowed it, as well as another device, such as a disk drive to be connected at the same time! I wonder how much money this saved Jack Tramiel per XC12 sold? I should mention, that the Tramiel Atari disk drive the XF551 AS WELL AS the Warner Bros Atari 1050 disk drive both have ports that allow a cassette data recorder to be daisy chained to them. The Atari 1010 data recorder probably allows even more devices to be daisy chained, which I’m sure was for a good reason. This means I’ve had to transfer programs by loading them, writing them down by hand, then typing them in again and saving them onto the SIO2SD Micro device!

Atari1010

The Atari 1010 data cassette recorder with its TWO SIO sockets, allowing daisy chaining, instead of just plugging it directly into an Atari computer

Another problem with the Atari 65XE compared with the 800XL is quality of construction. One morning, I turned on the 65XE and found the keyboard was totally dead! None of the keys were working at all. I managed to repair it myself after finding advice online, although I could never get the Select key to work again. Months later, the space bar on the 65XE stopped working, making it impossible to type in BASIC programs. I then put the Atari 65XE to one side and stopped using it until I could be bothered to attempt another repair job. Meanwhile, the older 800XL which has a quite different keyboard with a better feel, is still working!

So, to sum up Warner Bros 2 Jack Tramiel 0.

AtaroidFire3

My Atari 800XL complete with SIO2SD Micro floppy drive emulator and displaying the effect from the game Ataroid when you miss the ball, with so many colours the Commodore 64 is totally outclassed

Posted August 15, 2013 by C64hater in Uncategorized

HAPPY ANNIVERSARY TO THIS BLOG!   Leave a comment

HAPPY ANNIVERSARY TO THE BLOG COMMODORE 64 CRAP!

NO ONE SHOULD HAVE TO LEARN ASSEMBLY LANGUAGE/MACHINE CODE TO PROGRAM ANY COMPUTER!!!!

burning-c64

A Commodore 64 being sorted out

It’s hard to believe that this blog celebrates its first anniversary on Monday, August 5, 2013! I hope various people out there have been enjoying it and will be celebrating on that day. Suggestions on how you could celebrate are chopping up a Commoodore 64 with an axe, melting a Commodore 64 on a bonfire or in a kiln, or blowing a Commodore 64 out by running a high voltage through it. Another, more subtle and devious, idea would be to fit a different ROM to a Commodore 64, which contains a BASIC with commands for colour, graphics, and sound, or in other words A REPAIR JOB! This could be a Commodore 128 ROM, although they may not be compatible.

Apart from the upcoming celebration, my plans for the near future are to finally get on with some BASIC programming examples in various dialects of BASIC, such as Atari BASIC, Sinclair Spectrum BASIC, and possibly even Commodore BASIC 7, as used on the Commmodore 128.

The Commodore 128, when used in 128 mode was roughly the computer the Commodore 64 should have been, except it had twice as much RAM. The chips it used were either the same as or compatible with the Commodore 64, to make it compatible with Commodore 64 software. Unfortunately, this was three years later, so that meant it was behind with the times. It had only 16 colours, although its predecessors the Commodore 16 and Commodore Plus 4 had 121 colours. At the same time, the Atari 8 bit computers had already had 256 colours for a few years, and other computers such as MSX2 had 512 colours, while the Elan Enterprise had 256 colours. It also came out in the same year as the Atari ST range, which had 512 colours, although it some ways ST graphics capabilities were considered inferior to the Atari 8 bit range. The original Amiga model also came out in 1985, with 4,096 colours.

Don’t forget NO ONE SHOULD HAVE TO LEARN ASSEMBLY LANGUAGE/MACHINE CODE TO PROGRAM ANY COMPUTER!!!! Computers should be programmed in languages as much like human languages as possible. The quickest and easiest way to learn Assembly Language/Machine Code is to have a cybernetic implant which contains the relevant knowledge inserted into your brain. This would be similar to Lieutenant Commander Data or The Borg in Star Trek: The Next Generation. In Star Trek: The Next Generation, as well as DS9 and Voyager, we see computers responding to voice control in human languages. One exception to this is the Season 1 ST:TNG episode “11001001” (i.e. the binary number for decimal 201) , but obviously this is an EIGHT BIT number, so this episode isn’t really believeable at all, because it’s set in the 24th Century, where they should have gone way past even 128 bit computers.

The good news is that, although I don’t own a Commodore 64, I’ve managed to track one down for sale online which I hope I can get my hands on before the anniversary, or at least before the anniversary ends, so I can set fire to it or chop it up. Unfortunately, I don’t know how to repair it. Of course it will still be August 5 somewhere in the World for another 12 hours after it ends here, so I may have to count that as still the anniversary.

Posted August 2, 2013 by C64hater in Uncategorized

DEBUNKING THE DEBUNK OF “SCHOOLBOY IN FOUR HOUR DETENTION SHOCK!”   Leave a comment

DEBUNKING THE DEBUNK OF “SCHOOLBOY IN FOUR HOUR DETENTION SHOCK!”

main_school_building_comp

A school building, but not a school I’ve ever been to


I should point out a few things here.


1. My article makes a point about news censorship. Newspapers and magazines often fail to cover relevant down to earth stories like this when they happen. I have read and seen stories about schools in print, as well as on TV, though.


2. The teacher who kept the three pupils behind, in my story, as well as the teacher who kept me behind in real life wasn’t actually in the classroom at the time.  He just went off and left them and me in the classroom to get on with it. His instructions were not to go home until completing the problems set. As I knew I couldn’t do the maths problems, I had to get his agreement that I could leave by a certain time. In my story, schoolboy Steve Green didn’t know what he was letting himself in for with the Commodore 64. Therefore, he was stuck there indefinitely, because he hadn’t obtained permission from the teacher to leave. In my case, as well as in the story, the teacher left and went to a staff meeting, or just went home, so he wasn’t wasting his time as well at all. He was well out of it!

3. Of course, back in 1984 the Commodore 1541 cost more than the actual Commodore 64 computer itself, so whatever software was available on disk was irrelevant to most Commodore 64 owners, because they couldn’t use it. Apart from this it seems that TMR agrees with my statements that it’s impossible to compile programs into Machine Code from a cassette based data recorder.

4. In my story, I said that the pupils had to DRAW a geometric shape on the screen. I didn’t say anything about pathetic simulations of drawing by using Commodore 64 graphics characters, as used in a famous contest in Italy between the Commodore 64 and the mighty Sinclair Spectrum, with its easily accessible hires graphics as described on   http://www.alfonsomartone.itb.it/fztsmo.html

5.There was no point me studying 6502 Machine Code/Assembly Language programming to use on the Commodore 64, because I couldn’t even get the hang of BASIC on that so called computer. Later on, I studied Z80 Assembly Language/Machine Code after I decided to buy an Amstrad CPC computer, which was Z80 based. I inputted various short programs, which were listed in an Amstrad CPC magazine, but they only taught the fundamentals and didn’t do anything interesting. Later on, I got a book called “The Ins and Outs of the Amstrad”, which listed all the ROM function calls, but was a cheaper alternative to the Concise Firmware Manual. Using this, I was even able to draw lines on the screen! Unfortunately, I got very upset and depressed when my Amstrad CPC664 not only became last year’s model after just 4 months, but was even discontinued, although the CPC464 was still sold. I did a lot more on the Amstrad CPC664 than I could ever have done on the Commodore 64, though.

6. When I wrote “computer literacy”, I meant this to include computer programming.

I hope that clears up all these points.

Posted August 1, 2013 by C64hater in Uncategorized