Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
software:vectors [2016/06/05 16:53] ex_writer [Object Vectors] |
software:vectors [2016/06/12 09:55] (current) ex_writer [X/Y Check Mask (VBXCHK, VBYCHK)] |
||
---|---|---|---|
Line 44: | Line 44: | ||
==== Vector Status (VBSTAT) ==== | ==== Vector Status (VBSTAT) ==== | ||
- | {{vector_status.png}} | + | {{:vector_status.png}} |
^ Bit ^ Name ^ Label ^ Description ^ | ^ Bit ^ Name ^ Label ^ Description ^ | ||
Line 59: | Line 59: | ||
==== Delta X/Y (VBDXL, VBDXH, VBDYL, VBDYH) ==== | ==== Delta X/Y (VBDXL, VBDXH, VBDYL, VBDYH) ==== | ||
- | A delta is a value indicating a direction, or [[glossary#v|vector]]. For example, placing 1 in the x-delta and 3 in the y-delta would make the pattern move down 3 pixels and right 1 pixel. Calling [[system routines:screen handler#vect|VECT]] will update the coordinates appropriately. | + | A delta is a value indicating a direction, or [[:glossary#v|vector]]. For example, placing 1 in the x-delta and 3 in the y-delta would make the pattern move down 3 pixels and right 1 pixel. Calling [[system routines:screen handler#vect|VECT]] will update the coordinates appropriately. |
The Arcade allows for fractional deltas, i.e., finer movements, by using a second byte. VBDXH and VBDYH store the whole number values of the deltas, while VBDXL and VBDYL store the fractional halves. For example, to have your pattern move 1 pixel down every //four// calls, you would enter a y-delta of 0.25, or VBDYH = 0 and VBDYL = 25. | The Arcade allows for fractional deltas, i.e., finer movements, by using a second byte. VBDXH and VBDYH store the whole number values of the deltas, while VBDXL and VBDYL store the fractional halves. For example, to have your pattern move 1 pixel down every //four// calls, you would enter a y-delta of 0.25, or VBDYH = 0 and VBDYL = 25. | ||
Line 67: | Line 67: | ||
==== X/Y Check Mask (VBXCHK, VBYCHK) ==== | ==== X/Y Check Mask (VBXCHK, VBYCHK) ==== | ||
- | The check mask byte determines whether a limit (i.e., boundary) is attained and how to respond. The limit value is set in vector write routine (e.g., [[system routines:screen handler#vect|VECT]]). | + | The check mask byte determines whether a limit (i.e., boundary) is attained and how to respond. Limit values are defined in the object's [[#limit table]] and passed to the object vectoring routines (i.e., [[system routines:screen handler#VECT]] or [[system routines:screen handler#VECTC]]). |
- | {{checks_mask.png}} | + | {{:checks_mask.png}} |
- | | LIMIT CHECK | Set to one (1) to enable limit checking. | | + | ^ Bit ^ Name ^ Label ^ Description ^ |
- | | REVERSE DELTA | Changes the sign of the delta when the limit is reached. This can be used to cause objects to 'bounce' off barriers. | | + | | 0 | Limit Check | VBCLMT | Set to one (1) to enable limit checking. | |
- | | LIMIT ATTAINED | In contrast to the bounce effect, the system will set the limit attained flag and hold the pattern at the limit position until the user changes the delta. | | + | | 1 | Reverse Delta | VBCREV | Changes the sign of the delta when the limit is reached. This can be used to cause objects to 'bounce' off barriers. | |
+ | | 3 | Limit Attained | VBCLAT | In contrast to the bounce effect, the system will set the limit attained flag and hold the pattern at the limit position until the user changes the delta. | | ||
Line 79: | Line 80: | ||
==== Old Screen Address (VBOAL, VBOAH) ==== | ==== Old Screen Address (VBOAL, VBOAH) ==== | ||
- | VBOAL and VBOAH are maintained by the user, and are only necessary if [[system routines:screen handler#vblank|VBLANK]] is used to erase your graphics. | + | VBOAL and VBOAH are maintained by the user if [[system routines:screen handler#VBLANK]] is being used to erase graphics. If so, you must take the absolute screen address calculated by [[system routines:screen handler#VWRITR]] and place it here. |
- | + | ||
- | If VBLANK is being used to erase graphics, you must take the absolute screen address calculated by [[system routines:screen handler#vwritr|VWRITR]] and place it here. | + | |
+ | ===== Limit Table ===== | ||
+ | The Limit Table is a four-byte list indicating the boundaries of a vectored pattern: | ||
+ | ^ Byte ^ Name ^ Description ^ | ||
+ | | 1 | X lower limit | The leftmost boundary the pattern may reach | | ||
+ | | 2 | X upper limit | The rightmost boundary the pattern may reach | | ||
+ | | 3 | Y lower limit | The topmost boundary the pattern may reach | | ||
+ | | 4 | Y upper limit | The bottommost edge the pattern may reach | | ||
---- | ---- | ||
**Reference:** Lance F. Squire, [[http://www.ballyalley.com/ml/ml_docs/vector%20tutorial/BallyVectorTutorial_(Ver_1.03)(Lance_Squire).pdf|Bally/Astrocade Vector Animation Tutorial]] [PDF]. | **Reference:** Lance F. Squire, [[http://www.ballyalley.com/ml/ml_docs/vector%20tutorial/BallyVectorTutorial_(Ver_1.03)(Lance_Squire).pdf|Bally/Astrocade Vector Animation Tutorial]] [PDF]. |