Loading...
 

Horizontal Motion

Horizontal Motion

Horizontal motion allows the programmer to move any of the 5 graphics objects relative to their current horizontal position. Each object has a 4 bit horizontal motion register (HMP0, HMP1, HMM0, HMM1, HMBL) that can be loaded with a value in the range of +7 to -8 (negative values are expressed in two’s complement from). This motion is not executed until the
HMOVE register is written to, at which time all motion registers move their respective objects. Objects can be moved repeatedly by simply executing HMOVE. Any object that is not to move must have a 0 in its motion register. The horizontal motion registers will cause horizontal motion only when commanded to do so by the horizontal move command HMOVE. With the horizontal positioning command confined to positioning objects at 15 colour clock intervals, the motion registers fills in the gaps by moving objects +7 to -8 colour clocks. Objects can not be placed at any colour clock position across the screen. All 5 motion registers can be set to zero simultaneously by writing to the horizontal motion clear register HMCLR.

There are timing constraints for the HMOVE command. The HMOVE command must immediately follow a WSYNC (Wait for SYNC) to insure the HMOVE operation occurs during horizontal blanking. This is to allow sufficient time for the motion registers to do their thing before the electron beam starts drawing the next scan line.

The Stella Programmer's Guide advise that "Also, for mysterious internal hardware considerations, the motion registers should not be modified for at least 24 machine cycles after an HMOVE command." — these days the hardware is understood (see TIA Hardware Notes.