Difference between revisions of "84PCSE:BCALLs:47CE"
Latest revision as of 10:18, 20 October 2013
Hypothesized Official Name: IPoint
BCALL Address: 47CEh
Draw, erase, invert, test, or restore a pixel.
- DE = pixel X coordinate
- C = pixel Y coordinate (from bottom of screen)
- A = operation to perform on pixel (see below)
- (penFGColor) = RGB color to draw to LCD
- (penFGColorIndex) = Color index to store in graph buffer
- fullScrnDraw, (iy + apiFlg4) = 1 to use LCD coordinates; 0 to use graph coordinates
- plotLoc, (iy + plotFlags) = 1 to draw to LCD only; 0 to draw to LCD and graph buffer
- g_style_active, (iy + sGrFlags) = 1 to draw "fancy" dots for graphing
- If input A = 3:
- A = color index (1-15, or 0 for transparent)
- Zero flag set (Z) if pixel is either white or transparent
- (A5FCh) = input pixel operation
- (A59Eh) = input color index
- (A5BAh) = LCD X coordinate of pixel
- (A5BCh) = LCD Y coordinate of pixel
- Drawing hook is called
- If input A = 3: F, BC, DE, HL
The various pixel operations are somewhat more complicated than they are on the TI-83+/84+, since there are more than two possible states for each pixel.
The operations may be subdivided into "graph" operations (the default, when neither fullScrnDraw nor plotLoc is set) and "non-graph" operations (where one or both of those flags is set.)
A = 0 ("erase" pixel)
Non-graph: The pixel is set to white.
Graph: The pixel is set to transparent (showing the background color or image.)
A = 1 ("draw" pixel)
Non-graph: The pixel is set to (penFGColor).
A = 2 ("invert" pixel)
Non-graph: If the pixel is currently black, it is set to white (like A = 0); otherwise it is set to the current foregound color (like A = 1.)
Graph: If the pixel is currently transparent, it is set to the current foreground color (like A = 1); otherwise it is set to transparent (like A = 0.)
A = 3 ("test" pixel)
This mode operates on the graph buffer only. A is set to the pixel's color index (zero for transparent), and the zero flag is set if A is either 00h or 0Bh.
A = 4 (restore pixel from graph buffer)
The color index from the graph buffer is converted into an RGB value and drawn to the LCD. If the pixel is transparent, the current background color or image is used instead.