\ \\\\\\\\\\\\\\\\\\\\\\ DRIVE MOTORS CONTROL FUNCTIONS \\\\\\\\\\\\\\\\\\\\\ \ Requires RTXEB patches (rtxeb_patches.fs) loaded first HEX \ All numerical values are in hexidecimal format VARIABLE DRIVE_MOTOR_STATES \ Shadow storage for RTX2001A ASIC bus port 0x18 0 DRIVE_MOTOR_STATES ! \ Initialize the drive motor states to zero \ The stack value expected when the defining word is invoked is the proper \ motor bit settings to achieve the desired drive motor operation : CONTROL-DRIVE-MOTORS ( bit_set_value -- ) CREATE , \ Save the motor bit set value DOES> ( -- ) @ \ Load the motor bit set value DUP 0018 G! \ Make a copy and write it to ASIC bus port 0x18 DRIVE_MOTOR_STATES \ Load address of shadow storage ! \ Save to the shadow storage ; 0000 CONTROL-DRIVE-MOTORS STOP 000F CONTROL-DRIVE-MOTORS BRAKE 000A CONTROL-DRIVE-MOTORS FORWARD 0005 CONTROL-DRIVE-MOTORS REVERSE 0006 CONTROL-DRIVE-MOTORS SPIN-LEFT 0009 CONTROL-DRIVE-MOTORS SPIN-RIGHT 0008 CONTROL-DRIVE-MOTORS FORWARD-PIVOT-RIGHT 0004 CONTROL-DRIVE-MOTORS REVERSE-PIVOT-LEFT 0002 CONTROL-DRIVE-MOTORS FORWARD-PIVOT-LEFT 0001 CONTROL-DRIVE-MOTORS REVERSE-PIVOT-RIGHT \ \\\\\\\\\\\\\\\\ END OF DRIVE MOTORS CONTROL FUNCTIONS \\\\\\\\\\\\\\\\\\\\\