Personal Computer News


McVid

 
Published in Personal Computer News #077

This machine code graphics utility achieves a great deal with only 1.5K, says Simon Williams.

Versatile McVid

This machine code graphics utility achieves a great deal with only 1.5K, says Simon Williams

This time last year presented few offerings for the programmer who wanted to experiment with machine code sprite routines on the BBC Micro. Since then with many new programs issued, routines of this type have become comparitively commonplace. Some have been listed in the magazines. So a new program, especially at the fairly hefty price of £14.95, has to offer different angles to justify itself.

Features

The main difference between McVid and other graphic utilities is that it is intended for the machine code programmer and not the writer of Basic games, although Basic can be used to control the routines. As such, it has to fit into the category of program that is sufficiently useful to the machine code author that he/she would rather make use of it than write routines from scratch, tailor-made to a particular application.

McVid offers routines to handle line drawing, sprites and screen scrolls to left and right. Separate sets of code are supplied for each of the BBC's graphic modes, not just Mode 2 as is often the case. Collision detection is provided in the line drawing routines, and drawings may also be scaled up and down, and rotated. The code for all these functions occupies only 1.5K plus the shape data.

Presentation

McVid is very professionally finished and comes complete with a glossy covered, ring-bound manual by author Jim Gray. As well as the individual routines for each graphic mode, both tape and disk versions include a demonstration program which has a lunar module rolling in to land on the surface of a moon, before splitting in two and disappearing back to a full colour home planet, which has been slowly passing across the screen.

The lander is a multi-coloured line image which grows and shrinks realistically on its two journeys, and the whole demonstration finishes by scrolling the scene rapidly left and right before repeating. A rather unfortunate after-image of part of the lander remains after it has blasted off, but the whole demonstration certainly shows McVid in a good light. The majority of the demo is written in Basic and is listable.

Documentation

Pica seems very fond of offering listings, since half its manual consists of a printout of the routines involved in Mode 5. Although this is well annotated, it is really not sufficient instruction in the use of the program. Description of the line drawing routines runs to only three A5 pages and that for the sprite routines to only four. Quite a lot of information is contained within this space, but it is awkward to extract, and only for the experienced.

Documentation often used to be considered a necessary annoyance by software houses, but most have now come to appreciate what a real effect it can have on sales. I feel Pica could have done a lot more to explain its product.

In Use

To use either a line drawing or sprite routines, a corresponding table of shape start addresses must be set up in memory. Page &900 is used for this and puts an overall restriction of 256 bytes on the address table. This translates to a maximum of 32 sprites or line drawings in use at any time. Page &900 is normally used for sound envelopes 5 or 16 or the speech processor buffer, so using either will overwrite the shape table.

The routines use other areas of low memory, in particular &90 to &96, part of the area in page zero reserved for the Econet system. Choosing these areas is sensible, as they are unlikely to be used on machines whose main purpose is developing games software.

Each line is described by three bytes of data, its colour and the X and Y coordinates of its finishing point. The line drawing routines assume that each line starts from the end of the previous one. This is an economical way of doing things, although it does, of course, limit the length of any individual line to 255 units. Two re-usable graph sheets are incldued in the manual to assist with shape and sprite design. The shape data bytes themselves may be stored at any convenient point in memory.

Sprites are defined in a similar way to line drawings, using the second half of page &900 to hold their address table. Each byte of the shape data holds information about the colour and position of the sprite bytes and they are, of course, configured differently depending on the graphic mode in use. These bytes require some pretty complicated setting up and I believe the package should include a sprite and line drawing definer to take the hard slog out of the procedure. Just because the package is intended for the machine code programmer doesn't mean he or she should be expected to work it all out by hand.

None of the extra facilities provided by other sprite packages - such as animation, choice of size, preset routes - are provided directly by McVid, although the structure of the package allows these features to be written by the programmer. It does require some detailed knowledge of machine code programming to do this efficiently, however.

The fast scrolling routines give true scrolls - without every column on the screen moving up a line each time it reaches either edge.

Verdict

There's no doubt that McVid provides versatile routines for handling line drawing and sprites from within machine code or Basic. To do what it does in 1.5K is quite a programming achievement, but I feel Pica is severely limiting its potential audience by not including a character/line definer and by not properly describing the routines in the accompanying manual.

Rating

Features 4/5
Documentation 2/5
Performance 4/5
Usability 2/5
Reliability 4/5
Overall Value 3/5

Simon Williams