[comp.sys.atari.st.tech] Alpha Cursor & Line A ???

ant@mks.com (Anthony Howe) (10/30/90)

Q: How do you turn off and on the alpha cursor using Line A exclusively.

I've tried bumping V_HID_CT with no real success. It stops the flashing but
left the image there. I've tried setting V_PERIOD (the flash rate) to 0 with
no luck. I've tried saving V_CUR_AD and then setting it to an empty non-screen
location for its exclusive use. I just can't seem to figure out the BIOS does
when I send an ESC f or ESC e sequence.

-ant
-- 
            __                               "So many pedestrians
 _  . .-|- / _\ .  . |_  _.    _  _  .  .     So little time." 
(_\ |\| |  |(_/ |\/| |\ _\  o (_ (_) |\/|   		bumber sticker 
Mortice Kern Systems Inc. 35 King St. N., Waterloo, Ontario, Canada, N2L 6W9

darekm@microsoft.UUCP (Darek MIHOCKA) (11/01/90)

In article <1990Oct29.163151.579@mks.com> ant@mks.com (Anthony Howe) writes:
>
>Q: How do you turn off and on the alpha cursor using Line A exclusively.
>
>I've tried bumping V_HID_CT with no real success. It stops the flashing but
>left the image there. I've tried setting V_PERIOD (the flash rate) to 0 with
>no luck. I've tried saving V_CUR_AD and then setting it to an empty non-screen
>location for its exclusive use. I just can't seem to figure out the BIOS does
>when I send an ESC f or ESC e sequence.
>
What BIOS is does is not only bump up the V_HID_CT, but also checks the
phase of the cursor to see if at the moment it is on and visible. If so, it
goes and XORs the current location of the cursor to remove it. The way you
check the phase is to use the "RESERVED" memory location at line A offset
-6 ($FFFA for you assembler guys) and look at bits 0 and 1 and 2. These bits
tell you things like if the cursor is flashing, if it is enabled, and if it
is currently on the screen. Lemme check some source code here...

bit 0 is the cursor flashing flag
bit 1 is the cursor phase (i.e. if it is currently on the screen)
bit 2 is the cursor enabled flag. This should be 0 on TOS 1.2 and higher
 and use the V_HID_CT to tell if it is enabled or not. TOS 1.0 used both
 this bit and V_HID_CT which was redundant.

These are UNDOCUMENTED variables. Offset -6 is listed as RESERVED in the
SALAD document, and the only reason I know this is because I had to figure
this out and kludge into it for Quick ST. I can only guarantee this to work
on TOS 1.0, 1.2, 1.4, and 1.6 since that's what I've tested on. And TOS 3.0,
but that won't ever exist. <grin>

The way to blank out the cursor then is to check V_CUR_AD to get the
cursor address, read some other Line A variables to get the character 
height and number of bit planes, and just EOR #$FF the whole character.

- Darek

----------------------------------------------------------------------------
  Darek Mihocka                            All views expressed are my own.
  Branch Always Software, 14150 NE 20th St. Suite 302, Bellevue, WA  98007
----------------------------------------------------------------------------