Changes

Jump to: navigation, search

6502 Assembly Language Math Lab

416 bytes added, 11:49, 20 January 2020
Techniques
**** These values will need to include a fractional component for angles other than 45 degrees. This can be handled by using two bytes for each element of the X,Y position and for the deltaX and deltaY values, where one byte represents the integer portion and one byte represents the fractional portion (fixed-point representation).
** Detect when the object has collided with the edge of the screen or other objects, and reverse the sign of the deltaX or deltaY value (or both). For example, when bouncing off the top of the display, set <code>deltaX = -deltaX</code>
 
* Keyboard
** A random byte is available at memory location $FE.
* Drawing a Line** To draw a line between two arbitrary points (X<sub>1</sub>,Y<sub>1</sub>)(X<sub>2</sub>,Y<sub>2</sub) where X<sub>2</sub>-X<sub>1</sub> > Y<sub>2</sub>-Y<sub>1</sub> and all coordinates are positive, calculate the rise/run, then set Y=Y<sub>1</sub> and iterate for X=X<sub>1</sub>:X<sub>2</sub> incrementing Y by the rise/run each step.** Use fixed-point math for the rise/run (aka deltaY) value.
== Lab 2 ==

Navigation menu