In this post I show I used the Atari 8 bits Player/Missile graphics to produce a highlighter effect on graphics 0 screen text.
Essentially I am using players defined 8 bits wide and using double line resolution within the player/missile graphics. This equates to an 8×8 graphics 0 character cell with normal player width selected. I chose yellow as the highlight color as you might do on paper.
The only thing you need to watch out for is to ensure you don’t set the player luminance higher than the text luminance. If the player luminance is greater, you won’t be able to see the text behind it.
Using a player definition of 8 bits and combinations of player width of normal, double, and quadruple, you can highlight text at 2, 4, and 8 characters wide with a single player. With 4 players at quadruple width you can highlight 32 characters of the 40 character screen. If you want to use all 4 missiles as one player, you can achieve another 8 character highlight bringing it to the full 40 character screen width.
By placing players of different definitions (4 bits vs 8 bits wide) and player width sizes (single) next to each other you can highlight an odd number of characters.
A screenshot of the end result:
The line labels on the right denote how each line was made:
“P0 0xFF Single” is player 0 formed from a 4 byte array consisting of $FF (all bits on) at single/normal player width to achieve 2 character coverage.
“P1 0xFF Double” is player 1 formed from a 4 byte array consisting of $FF (all bits on) at double player width to achieve 4 character coverage.
“P2 0xFF Quad” is player 2 formed from a 4 byte array consisting of $FF (all bits on) at quad player width to achieve 8 character coverage.
“P3 0x0F Single” is player 3 formed from a 4 byte array consisting of $0F (4 bits off, 4 bits on) at single player width to achieve 1 character coverage.
“M0 0x03 Double” is missile 0 formed from a 4 byte array consisting of $03 (bits 2 and 1 on) at double missile width to achieve 1 character coverage.
The code is documented fairly well, and in combination with the description above, you should be able to see what is happening. If not, give me a shout. It does require the Action! Toolkit’s PMG.ACT and is coded for drive D2, change it if you need to.
; Prog..: PMHLTEXT.ACT
; Author: Ripdubski
; Desc..: Use P/M to highlight text
; Date..: 2022.06.29
; Notes.: Requires Action! Toolkit
; Player1 is 4 lines/rows of 11111111
; Player2 is 4 lines/rows of 00001111
; Missile is 4 lines/rows of 11
BYTE ARRAY aPlyr1(4)=[$FF $FF $FF $FF],
aPlyr2(4)=[$0F $0F $0F $0F],
aMiss(4)=[$03 $03 $03 $03]
; Set graphics 0, already there.
; Turn on P/M
; Double line res for 8 rows from 4 row array!
; For each player
FOR bLp=0 TO 3
; Clear data
; Set color to yellow
; Luminance of 4 is less than text(8)
; Clear needed missiles
; Draw screen text
Print("P0 0xFF Single")
Print("P1 0xFF Double")
Print("P2 0xFF Quad")
Print("P3 0x0F Single")
Print("M0 0x03 Double")
FOR bLp=4 to 14
; Create each player in diff widths
; Param 4 is the width (1=N/S,2=D,4=Q)
; Param 5 is the x position
; Param 6 is the y position
; This player uses different array definition
; Create used missiles (only 1 here)
There are many possibilities for using this technique.