Difference between revisions of "84PCSE:BCALLs:44F8"
(→Comments: swapped values of textDisplayOnly) |
(fixing some names, adding some links) |
||
Line 17: | Line 17: | ||
* [[84PCSE:Flags:08#Bit_0|preClrForMode]] = 1 to erase a two-pixel border to the left of the character | * [[84PCSE:Flags:08#Bit_0|preClrForMode]] = 1 to erase a two-pixel border to the left of the character | ||
* [[84PCSE:Flags:0D#Bit_1|appTextSave]] = 1 to save the character in [[84PCSE:RAM:8560|textShadow]] (and pixel shadow, unless textDisplayOnly set) | * [[84PCSE:Flags:0D#Bit_1|appTextSave]] = 1 to save the character in [[84PCSE:RAM:8560|textShadow]] (and pixel shadow, unless textDisplayOnly set) | ||
− | * [[84PCSE:Flags:4A#Bit_3| | + | * [[84PCSE:Flags:4A#Bit_3|putmapUsePixShad2]] = 1 to use the secondary pixel shadow buffer |
* [[84PCSE:Flags:4C#Bit_5|textDisplayOnly]] = 1 to disable use of the pixel shadow buffer | * [[84PCSE:Flags:4C#Bit_5|textDisplayOnly]] = 1 to disable use of the pixel shadow buffer | ||
* LCD output mode is assumed to be row major, left to right, top to bottom (R03 = 1038h), and the window assumed to be full height (R50 = 0, R51 = 239) | * LCD output mode is assumed to be row major, left to right, top to bottom (R03 = 1038h), and the window assumed to be full height (R50 = 0, R51 = 239) | ||
Line 44: | Line 44: | ||
{| | {| | ||
|- | |- | ||
− | ! TextSave !! DisplayOnly !! | + | ! TextSave !! DisplayOnly !! UsePixShad2 !! Effect |
|- | |- | ||
| 0 || * || * || Draw to LCD only | | 0 || * || * || Draw to LCD only | ||
|- | |- | ||
− | | 1 || 1 || * || Draw to LCD and textShadow | + | | 1 || 1 || * || Draw to LCD and [[84PCSE:RAM:8560|textShadow]] |
|- | |- | ||
− | | 1 || 0 || 0 || Draw to LCD, textShadow, and pixelShadow | + | | 1 || 0 || 0 || Draw to LCD, textShadow, and [[84PCSE:RAM:Page3:8941|pixelShadow]] |
|- | |- | ||
− | | 1 || 0 || 1 || Draw to LCD, textShadow, and | + | | 1 || 0 || 1 || Draw to LCD, textShadow, and [[84PCSE:RAM:Page3:AA11|pixelShadow2]] |
|} | |} | ||
Revision as of 20:24, 2 April 2013
Synopsis
Hypothesized Official Name: PutMap
BCALL Address: 44F8h
Displays a character in the large (fixed-width) font.
Inputs
- A = character to display
- (curRow), (curCol) = row and column to display the character
- putmapDrawColor = 1 to use curFGColor/curBGColor (0 to use black/white)
- (curFGColor) = foreground color
- (curBGColor) = background color
- textInverse = 1 to swap foreground and background colors
- textEraseBelow = 1 to erase a two-pixel border below the character
- preClrForMode = 1 to erase a two-pixel border to the left of the character
- appTextSave = 1 to save the character in textShadow (and pixel shadow, unless textDisplayOnly set)
- putmapUsePixShad2 = 1 to use the secondary pixel shadow buffer
- textDisplayOnly = 1 to disable use of the pixel shadow buffer
- LCD output mode is assumed to be row major, left to right, top to bottom (R03 = 1038h), and the window assumed to be full height (R50 = 0, R51 = 239)
Outputs
- Character displayed
- preClrForMode cleared
- LCD output window reset to full width (R52 = 0, R53 = 319)
- If appTextSave set, character stored at the appropriate address in textShadow
- If appTextSave set and textDisplayOnly cleared, character bitmap drawn in the appropriate pixel shadow buffer
Destroys
- Interrupts disabled
- Font hook and localize hook are called
- curY
- curXRow
- lFont_record
- A5A0h (2 bytes)
- A5A4h (1 byte)
Comments
This routine is called by all of the other fixed-width text display routines, so the flags and variables listed above will also affect, e.g., PutS. In contrast to most text display routines, this routine does not change curRow/curCol (and does not handle $D6, the newline character, in any special way.)
PutMap will "draw" the input character in up to three places: the LCD itself, the textShadow buffer (which stores the ASCII characters drawn on screen), and the current pixel shadow buffer (which stores a 1-bit image of the current screen contents.) The effect of the flags is shown below:
TextSave | DisplayOnly | UsePixShad2 | Effect |
---|---|---|---|
0 | * | * | Draw to LCD only |
1 | 1 | * | Draw to LCD and textShadow |
1 | 0 | 0 | Draw to LCD, textShadow, and pixelShadow |
1 | 0 | 1 | Draw to LCD, textShadow, and pixelShadow2 |
Note that the putmapDrawColor flag and curFGColor/curBGColor have no effect on what is drawn in the pixel shadow - only textInverse has any effect on that. So if you draw some colored text and the screen is later scrolled, it will always be redrawn in black and white.
Clearing appTextSave, or setting textDisplayOnly, will speed up text display significantly, at the cost of making ScrollUp/ScrollDown not work correctly. For some programs, it may be better to do this, and implement scrolling yourself if need be. You will also want to do so if you intend to use the pixel shadow buffer(s) as scratch memory.
The right and top borders of the character are always drawn. If textInverse is cleared, the left border will be drawn only if preClrForMode is set, and the bottom border will be drawn only if textEraseBelow is set. If textInverse is set, all four borders will always be drawn. Note that preClrForMode is always cleared after displaying a character.