The author’s misconceptions of the C128

Debunking Debunking the “debunk” of How to program in various dialects of BASIC

If this carries on the title might end up longer than the post!

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!

The author is still trying to force his deluded worldview onto others without even a shred of proof; your correspondent started learning programming in BASIC and then assembly language on the VIC 20 he owned for two years before getting the 800XL.

Your correspondent also found the Atari 8-bit harder to learn assembly language on during the 1980s, partly because there were no programming tools available locally (Atari 8-bit software distribution was variable in the United Kingdom, some areas did well with specialist dealers keeping a good stock of titles whilst others like the area your correspondent lived in had close to nothing) and partly because a cassette-based Atari 800XL would take hideous amounts of time to load or save the source code for a moderately-sized project.

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.

This is the kind of advice given by programming books which looks good on paper but anybody who actually programs knows that it doesn’t work in practise. Your correspondent  doesn’t believe any of the people he knows who either developed 8-bit software back in the day or are doing so now used or use flowcharts unless they were perhaps for blocking out the odd subroutine.

There are also development diaries in the computer magazines of the day which don’t mention flowcharts, Ken Williams is quoted in Steven Levy’s book Hackers as saying his programmers at Online Systems didn’t use them either and in a couple of decades of helping other people with their code, your correspondent can’t remember ever seeing a flowchart on those occasions when the programmer in question actually kept paper-based notes to begin with.

Your correspondent notes that the author hasn’t actually written anything substantial yet…

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.

As was already explained, the listings were there to demonstrate a point; the fact that the C64’s BASIC would also handle it differently is only relevant in that context because it’s different to the other formats. The point could just as easily be illustrated with examples of string or array handling.

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.

Machine code programs can be written without a disk drive and will also run on any other computer of the same model, in some cases more reliably than BASIC programs. And there was at least one cassette-based compiler available before the author sold his C64 in 1985. And a program compiled on a disk-based C64 can then be run on a tape-based one without issues.

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

This demonstrates your correspondent’s point; a series of articles was required to translate these commands from machine to machine because there was no standard between them.

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.

The loop had a problem that meant it would fail on any dialect of BASIC; to actually fix the problem requires knowledge of the C64 but seeing what the problem is to begin with is one of the fundamentals of BASIC.

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”.

There are some links between the Atari 8-bit and Amiga, but this isn’t one of them; how HAM works is irrelevant to the Atari 8-bit because there’s no equivalent and trying to jam it into the discussion like that just makes the author look ignorant.

What is actually happening is that there are two colour registers available to the mode in question but the hue value for one is ignored and the value assigned to the other gets used instead; this happens regardless of if the registers are set from machine code or using the BASIC SETCOLOR command.

Various people have said that the 4Mhz Z80 as used in the excellent Sinclair Spectrum allowed for faster graphics execution.

“Faster graphics execution” is far too general a term which doesn’t really mean anything; are we talking faster movement, faster refresh speeds, what exactly? Regardless of that the answer is no, just having a 4MHz processor doesn’t automatically equate to that because the machines being discussed and the range of things they’re capable of is far more complex than just their processors. “Various people” is also a little vague, without knowing if these people have any experience it’ll be impossible to know if their claims are valid. The Spectrum isn’t clocked at 4MHz as well, it’s 3.5MHz.

TMR said that 2Mhz was the maximum speed for a 6502, but actually it was an 8510 in the C128.

The C128’s CPU is an 8502 which your correspondent referred to in the previous post as as a “6502 variant” – the second word is after the set of brackets talking about maximum speeds, the author wasn’t paying attention and missed it.

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!

There are more than 16 and all are available from BASIC or indeed direct mode without typing a program at all; your correspondent is aware of them from one of the C128 manuals so Commodore’s specs do indeed mention this so the author will need to provide his sources.

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.

What the author thinks their intentions are is pretty much irrelevant of course, but Commodore’s engineers put the Z80 in control of the bus when the machine powered up so they were indeed using it for more than just CP/M. And, since the operation of the machine isn’t going to look or sound different if the Z80 is in charge, some of the dedicated C128 programs may well be using it; your correspondent can’t be sure either way but that’s certainly true of the author as well.

“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!”

According to the author’s previous accounts of the incident, the group leader didn’t say that reversing direction on collision would be difficult. He was asked by the author about objects bouncing and offered an opinion on that. For those who don’t understand the distinction, try bouncing two snooker balls off each other because they won’t merely reverse their directions at the point of impact. We only have the author’s version of events to begin with and, since they’re not consistent between tellings, it’s becoming very questionable as to what was actually said to or by the group leader.

This entry was posted in Debunking and tagged , , , . Bookmark the permalink.