Rise_Run_Len ($F603)
Rise_Run_X ($F5FF)
Rise_Run_Y ($F601)
This routine takes an angle value which is relative to the x- or y-axis, and calculates the rise and run for that angle, relative to a passed-in scalar velocity value. A large scalar value will cause an object to move quickly, while a small scalar value will cause an object to move more slowly.
Keep in mind that most games store x & y coordinates as 2 bytes each, with the upper byte being the actual coordinate, and the lower byte being that which is usually added to the rise/run value; when the lower byte overflows into the hi byte, then the object will 'move'. The rise/run values returned here are meant to be added to the low byte -- NOT the hi byte!!
ENTRY:
DP = $C8
A-reg = the scalar velocity value (except Rise_Run_Len)
B-reg = the Vectrex angle value
EXIT:
A-reg = the rise value
B-reg = the run value
All other registers are saved.