Amos Professional Manual  Contents  Index

AMAL


Note that these values can be accessed from your program using the DEEK function. Note also that this AMAL option overrides any previous CHANNEL assignments.

Controlling update timings
Although most AMAL programs are performed incredibly quickly, all Objects that are manipulated must be drawn on screen individually, and updated at regular intervals. Tim amount of time needed for this updating procedure can vary during the course of a program, and so it is unpredictable. This can generate jerky movement patterns for certain Objects. Fortunately, This problem can be solved very easily.

UPDATE EVERY
instruction: control update intervals
Update Every number

The UPDATE EVERY command slows down the updating process, so that even the largest Object can be re-drawn during a single screen update. The animation system is regulated by this process, once again providing smooth movement. After the UPDATE EVERY command, simply specify the number of vertical blank periods between each screen update, in 50ths of a second. Begin your timing changes with a value of two, and increase the value by one unit at a time until the animation becomes smooth.

One useful effect of using UPDATE EVERY is to reserve more time for AMOS Professional to execute the main program. In fact, with careful use of this instruction, it is possible to speed up programs by as much as one third, and still maintain excellent animation.

Assigning Objects to Channels
Up to 64 different AMAL programs can be executed simultaneously, and each program must be assigned to a specific animation "channel". The first 16 channels can be performed using interrupts, but if more than 16 animations are needed, interrupts must be turned off using the SYNCHRO OFF command, which is explained below. As a default, the 16 interrupt channels are assigned to the relevant Sprite numbers.

CHANNEL
instruction: assign an Object to an AMAL channel
Channel number To Sprite number
Channel number To Bob number

The CHANNEL command assigns an animation channel to a particular screen-related Object. There is no restriction to a single channel, and any single Object can be animated with several channels, if necessary.

Animating Sprites
As a default, channels 0 to 7 are allocated to the equivalent hardware Sprite number, and channels 8 to 15 are reserved for the equivalent computed Sprite numbers.

Back    Next
07.06.12