Fire Engine using XIO Fill

by Vic Pushon

 

Issue 8

Mar/Apr 84

Next Article >>

<< Prev Article

 

 

 

As graphics has been my main interest, I thought that it was time I submitted a program to PAGE 6 and at the same time pass on some information and ideas to you.

This program is basically a GRAPHICS 10, XIO FILL demonstration, using DATA with over plotting for details making use of the 9 colours and variable luminence available in this mode. The program is complete with flashing lights and sound!

The FILL command is XIO 18,#6,0,0,'S:' and 765 must be POKEd with the colour register of the fill. The Atari XIO FILL is limited as you cannot use it with multi co-ordinate designs, only 3 or 4 points at a time being allowed and you must take care not to enter into or overlap a previously filled area. It can be emulated in a simple form using a loop as I have done for the headlights and grill as PLOT and DRAWTO are permitted over an XIO FILL.

Figure 1 shows various ways of using a fill. The 4 points must be defined moving anti-clockwise in direction. It will work with 3 points, i.e. with only one DRAWTO but in our program this would upset the DATA lines. If you wish to have only 3 points give the same value to both DRAWT0s in the DATA line.




Figure 1 - Various ways of using XI0 FILL. Note that a 3 point FILL will work with only one DRAWTO but do not let the PLOT point (1) and the POSITION (4) have the same value.

Each DATA line contains the following information to complete one FILL with all information in the required sequence - Colour number to POKE into register, PLOT X,Y (first point), DRAWTO X,Y, DRAWTO X,Y, POSITION X,Y, ROGUE VALUE END OF DATA detection.

This started out as a simple fill but I kept adding to it, hence the uneven line numbers.

The program:-

10-29

POKE COL. registers with
colour/brightness values

30-100

This section READs all the
DATA in a line to complete one
FILL

500 

All DATA

585

Final DATA line, you must
have 9 values plus the -4 to
detect the end of all DATA

600-615

LOOP for headlights

625-640

LOOP for the grill

650-670

PLOT and DRAW LINES

680-690

Front window pillars 

700

First SOUND LOOP with
POKE to COL. REGISTER to
vary brightness
 

706

Engine sound 

720

Second SOUND LOOP with
POKE (as 700)
 

730

Side flashers

 

AtariLister - requires Java

Vic Pushon is a Dental Technician and Atari computer enthusiast He produces the Victagraph Plot Window - an inexpensive and easy to use graphics aid for the Atari.

top