Classic Computer Magazine Archive CREATIVE COMPUTING VOL. 11, NO. 8 / AUGUST 1985 / PAGE 98

A quick quo vadis; the C128 revisited, animated graphics, whither RGB, autoboot camp. (Commodore's port) John J. Anderson.

Commodore has made at least two significant strides since the last time we met here at the Port. First the Commodore 128 achieved general release, and then the finally completed Amiga machine made a limited debut (full review to appear next month). Commodore has taken the wraps off its next generation of machines. These are the computers through which it will attempt to capture its share of tomorrow's micro market.

Amiga--Great Byte Hope

The outlook for a bright Commodore tomorrow rests with the remarkable Amiga machine. Whether or not it is too late for the Amiga to reawaken a slumbering (or perhaps even hypnotized) market remains to be seen. It is a fine machine, nonetheless in desperate search of a lucrative niche. It will certainly find one among upscale enthusiasts and hobbyists. This group, as we have seen, does not a market make. Commodore will have to find a bigger role for the Amiga machine, if it is to pull itself out of its current quagmire and back into the profit column. This, unfortunately, means doing business where IBM waits with the micro equivalent of chains and tire irons. Oh Blue, you dog.

Without a doubt, the Amiga is a machine that will be supported by Creative Computing. We can only hope that the marketplace also supports it. If that happens, the Amiga--and Commodore--have very bright futures indeed.

The C128: A Closer Look

Since I first reviewed the Commodore 128, I have logged many more hours with it, getting to know it on a more intimate level. It is quite a decent machine, certainly the friendliest of its lineage, but indubitably a Commodore through and through. Sometimes, frankly, its Commodality is a bit exasperating. One occasionally gets the queazy feeling that the machine is in actuality a Vic 20 wearing lipstick and designer jeans.

For example, I cheerily reported last month that formatting disks on the new machine was simplicity itself: simply type HEADER "DISK NAME" and the drive lays down its format. Not quite so, it turns out--at least on the system with which we were supplied. You must use the format

HEADER "DISK NAME", I < indentifier >, D < drive# >, U < device# > where < identifier > is the disk id tag, < drive # > is the drive number, and < device # > is the device number. so with a single disk system, you might type HEADER "DISK1", I00, D0, U8 to format a disk. Not quite as simple as outlined in Commodorehs preliminary documentation. In fact, formating this way is not much easier than doing it on a Commodore 64.

In other areas, however, Basic on the C128 far outshines that of its little brother. Listing 1 shows graphic use of the BOX command, Listing 2 the CIRCLE command, and Listing 3 the WINDOW command. Listing 4 shows the WINDOW command in 80-column format, and Listing 5 shows character-based animated graphics in the 80-column mode. The REMarks of each help make them self-exlanatory.

Format for the BOX command is as follows: BOX < color register >, < topleft row >, < topleft column >, < bottom right row >, < bottomright column >, < rotation >, < fill toggle >

By cycling the value of the color register and the rotation angle of the plot, Program 1 creates a multicolor animated plot. You can double the width of the plotted lines by sticking the command WIDTH 1 in someplace. To return to the default, type WIDTH 0. You'll find that a WIDTH command carries through even between programs and RUN/STOP-RESTORES, so type WIDTH 0 RETURN in the direct mode to deselect double width. If you want to plot solid rectangles, change the fill toggle from a 0 to a 1. Unfortunately, fills have a way of taking a lot of time.

Format for the CIRCLe command is along these lines: CIRCLE < color register >, < center row >, < center column >, < x radius >, < y radius >

You can tack arc angles, rotation, and increments onto the CIRCLE command to draw curves, triangles, and polygons. But these are optional and unnecessary in the example shown here. Program 2 draws shrinking concentric circles in multicolors.

You'll note that the color changes are not totally "clean" (if you are sharp, you may have spotted this phenomenon even in Program 1), but rather spill over the edges of the plot, giving it a severe case of the jaggies. This is a holdover glitch in multicolor mode as it existed in the C64, and it remains embedded in the heart of the C128. The thing to do is work around it as best you can. It is another reminder that when it comes to Commodore, it's all in the family.

The WINDOW command is quite straightforward: WINDOW < topleft column >, < topleft row >, < bottomright column >, < bottomright row >, < clear toggle >

Using this command, Program 3 sets up four windows in four different colors. Note that windows may overlap each other. Program 4 shows you the same idea in 80 columns, where its use can be even more effective.

As I mentioned in my review last month, graphics are not supported in 80-column mode. Program 5 manages to get some running there, using a technique I first outlined in my book Commodore 64 Sight and Sound--that is, to loop through multicolor character graphics that have been designed to create a swirling pattern on the screen. Note that the program is a one-liner in terms of its business end.

It also runs the NTSC 40-column mode, creating an entirely different pattern as it scrolls.

More on RGB

The 80-column RGB mode of the C128 is quite serviceable. The question is whether it will ever see much real application outside of the CP/M operating system, where it can run existing CP/M programs in a full 80-columns. The answer is doubtful, I would guess. Because a decent RGB monitor still costs much more than the C128 itself, it is quite likely that the C128 will default to its 40-column NTSC mode as the display of choice. Also, the 80-column mode is entirely unsupported from Basic 7.0. Listing 5 shows that character-based color graphics are possible, but this is about the extent of control from the 80-column mode, except from machine language (horrors!).

If, however, Commodore introduces a C128 80-column graphics cartridge or the like, the RGB mode of the C128 may indeed have a future. Its resolution is as sharp as that of the IBM PC, and by my reckoning offers the lowest-priced high-quality of RGB output of any microcomputer. It would be a shame if this fine capability of the C128 were to end up ignored in favor of a graphics mode no better than that of the C64, with things like severe bleeding between incompatible colors and yucky jaggies in the multicolor mode.

Autoboot Still Moot

One of the most significant features available on the new C128 is the capability to set an autorun file. Unbelievably, the C128 is the first Commodore computer to allow disk file autoboots. Insert a disk, turn on your computer, and bingo! You're up and running the program of your choice. However, setting an autoboot file on the C128 is also not quite as simple as it was initially reported to me, and as I reported to you. I was told that the BOOT command was used to effect this, and that is not the case. Unfortunately, there is no easy way to set the boot file from Basic. The autoboot information must be written to track 1, sector 0 of the disk in question. Bytes 0, 1, and 2 must set to CBM, and the next three bytes set with address low, high, and bank identifiers. Byte 6 gets the number of the disk block containing the code to which you wish to point. Then there is blank space for the disk name. This must terminate with a 0. Then comes the filename, which also terminates with a 0. This information is sufficient to autoload the program, but not to autorun it. The easiest way to autorun after loading is to pack the keyboard buffer with the characters "RUN RETURN", as I did in C64 MiniDOS 3.0. This requires some assembly code and a JMP instruction.

Soon, I hope to provide some Basic code that allows the setting of autoboot files without a lot of headaches. And as I said last month, I haven't given up on the idea of setting C64 autoruns using a hybridization of C128 features. Stay tuned.