Difference between revisions of "83Plus:Hooks:9BA4"

From WikiTI
Jump to: navigation, search
 
(Synopsis: flag linkage)
Line 12: Line 12:
 
'''Hook Call BCALL:''' ''(Unknown)''
 
'''Hook Call BCALL:''' ''(Unknown)''
  
'''Hook Active Flag:''' 7, (iy + 35h)
+
'''Hook Active Flag:''' [[83Plus:Flags:35#Bit_7|7, (iy + 35h)]]
  
 
The graphics hook allows one to intercept calls to IPoint, ILine, and various drawing functions for the graph. You can change behavior, and if you want to, disable drawing altogether.
 
The graphics hook allows one to intercept calls to IPoint, ILine, and various drawing functions for the graph. You can change behavior, and if you want to, disable drawing altogether.

Revision as of 20:05, 1 April 2005

Synopsis

Name: Graphics Hook

Hook Pointer Block Address: 9BA4

Hook Enable BCALL: 5032

Hook Disable BCALL: 5035

Hook Call BCALL: (Unknown)

Hook Active Flag: 7, (iy + 35h)

The graphics hook allows one to intercept calls to IPoint, ILine, and various drawing functions for the graph. You can change behavior, and if you want to, disable drawing altogether.

Using the Hook

The accumulator contains what graphics B_CALL was called.

  • A = 00h: Called in response to the B_CALL IPoint. B, C, and D are the same inputs as the B_CALL. You can mess with them to change action, position, although there's a caveat, as the IPoint is not expected to change registers (which could have disasterous effects!)
    • It would appear that ILine (which calls IPoint, which is evident from this hook), is aware of this behavior. Changing D, for example (which specifies the action of IPoint), will result in the new style being applied to the rest of the pixels (unless you change this again with subsequent calls to the hook.)
    • Returning with the zero flag reset will cancel the operation.
  • A = 01h: Called in response to IPoint. B through H same as inputs to B_CALL. As before, returning w/ the zero flag reset will cancel the drawing. I would assume save caveat as above. You can figure out some of the things that are being passed:
    • Horizontal (HorizCmd): OP1 = Y Coordinate
    • Vertical (VertCmd): OP1 = X Coordinate
    • Line (LineCmd / UnLineCmd): FPST = Y2, FPS1 = X2, FPS2 = Y1, FPS3 = X1
    • Circle (CircCmd?): FPSB1 = X, FPSB2 = Y, FPSB3 = Radius

I'm using the notation FPSBn asthe entry from the bottom of the floating point stack stack, starting at 1. (there's no notation I've seen for this such of a thing before) You'll have to read these values with your own code (there aren't any predefined B_CALLs), but that's trivial.

Comments

This hook is useless.

Credits and Contributions

  • Dan Englender: He gave me extensive documentation in #tcpa. To quote him:
<Dan_E> Just that 0 = IPoint, 1 = ILine, and 2 = CLine