lotus

previous page: 15.012 Is there some cable or card which lets a II user connect two joysticks?
  
page up: Apple II Csa2 FAQs
  
next page: 15.014 My II+ keyboard acts like the CTRL key is always pressed when it isn't. (Press 'G' get beep....press 'M' get CR, etc..) Is there a way to fix this problem?

15.013 How do I write programs for the Apple Graphics Tablet?




Description

This article is from the Apple II Csa2 FAQ, by Jeff Hurlburt with numerous contributions by others.

15.013 How do I write programs for the Apple Graphics Tablet?

         The Apple Graphics Tablet I know of is rather large and heavy; its pen is
attached to it with a (too short) cable; it makes funny sounds that change when
the pen is moved in/out the reach of of the tablet.

     A long time ago I patched a few programs to make use of this tablet. To
make it clear in the first place - I don't have these patched versions
available anymore :-(. But I found a listing from which I can tell you this:

     To detect the interface card, I looped over all slots to check in its
firmware for

$B0 at location $Cx01 and
$20 at location $Cx09

x being the slot number. I never found this 'signature' in any other firmware.

     To check for the pen position one has to poll the tablet (again x being
the slot number):

LDA $CFFF ; switch off all extension ROMS

LDA $Cx00 ; switch on the extension ROM of the tablet

LDA #$Cx

STA $07F8 ; initialize some hidden text screen data area for the tablet
firmware

JSR $CBB9 ; call well known location ;-) in tablet firmware

     When the pen is in reach of the tablet (up or down) this routine will
return immediately. Else it will block - fortunately, the routine checks the
keyboard strobe ($C010) too and will also return if a key is pressed, even if
the pen remains out of tablet's reach.

     After the routine has returned one can get the information:

$0280 contains the state of the pen (up or down), I don't recall which bit it
is nor if one can distinguish between 'pen up' and 'pen out of reach but key
pressed'

$0281, $0282 contains the absolute X position of the pen

$0283, $0284 contains the absolute Y position of the pen

     As far as I can remember the values have about 12 bit resolution (!).
Usually I needed screen coordinates (280 x 192), so I dropped the 4 least
significant bits and did some additional adjustment. Unfortunately, I don't
recall what coordinates will be there in the 'out of reach but key pressed'
case.

By:  Oliver Schmidt
    

 

Continue to:













TOP
previous page: 15.012 Is there some cable or card which lets a II user connect two joysticks?
  
page up: Apple II Csa2 FAQs
  
next page: 15.014 My II+ keyboard acts like the CTRL key is always pressed when it isn't. (Press 'G' get beep....press 'M' get CR, etc..) Is there a way to fix this problem?