Commodore User


Advanced Commodore 64 Graphics And Sound

 
Published in Commodore User #23

Advanced Commodore 64 Graphics And Sound

Nick Hampshire is an old hand at writing books on the Commodore 64, having 'revealed' virtually every part of the machine worth looking at. Advanced Commodore 64 Graphics And Sound deals mainly with how to introduce extended graphics commands to the C64's puny Basic. That's not to say the sound element has been ignored, some highly ambitious projects have been included.

As I said, the bulk of the book is taken up with listings of machine-code routines which add another twenty-seven commands to the C64's Basic. These take up over 9K of memory, a fair sized chunk, but of course you don't have to type them all in, you can skip any you don't think are going to be incredibly useful.

If the thought of typing in that much assembly code daunts you, the programs are available on disk for a mere tenner. The initial assembly listings are for patching the new routines into the C64's Basic, naming and tokenising them, it's therefore essential that these are entered.

Next come the actual routines themselves. These range from screen management routines which configure the various graphics modes, set up colours and define windows, through to two and three dimensional plotting routines, some of which are very powerful indeed.

All of these routines are in CBM assembler format. This means they contain the usual directives such as BYT and WOR so you shouldn't have too much difficulty converting if you're using a non-standard assembler.

Although the extended graphics section takes up over half the book there's quite a bit more of interest. A chapter on the theory of high-resolution graphics display contains some interesting programs for plotting and moving 2D shapes as well as how to design and plot realistic 3D images. Finally, on the graphics side, some hints and techniques are provided on how to incorporate graphics into games.

Although there is only one chapter on sound in the whole book, it's not the case that the subject has been given scant attention. There are two projects.

The first shows you how to design an interface and software to connect a keyboard to your C64. This task I am assured can be undertaken by anyone with a small amount of electronics experience, which eludes me, but it looks like fun.

If you don't have a soldering iron, the second section might appeal more. This deals with how to incorporate music into games using interrupt-driven routines.

Unlike many so-called advanced books around at the moment, Nick Hampshire's actually does contain some complicated techniques and I wouldn't therefore recommend it to the beginner. So don't bother with it unless you feel at least reasonably confident with machine-code. If you do, then it's well worth a look.

Definitely one for the advanced programmer.

Ken McMahon