lotus

previous page: 009- What Operating System environments does the GS support?
  
page up: Apple II Programming FAQ
  
next page: 011- A while ago someone posted about how to read the joystick on a GS in native mode. They said that it was possible to read both paddles at once and therefore get much more accurate readings?

010- How do I write programs for the Apple Graphics Tablet?




Description

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

010- 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 of 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 pen state:

 bit 0 = 0 Pen down, bit 0 = 1 Pen up
 bit 1 = Previous pen state
 bit 4 = 0 Pen has been localized, its state and positions are valid.
 bit 4 = 1 Pen out of reach but key pressed and then X=Y=0

$0281 Low byte of X pen position
$0282 High byte of X pen position

$0283 Low byte of Y pen position
$0284 High byte of Y pen position

     X and Y have 13 bits resolution from 0 to 8191. Using my Apple
    Tablet, I get values from 300 to 6350 and the bounds are not
    reached.

--Oliver Schmidt, Guillaume Tello, Shaun Olson
    

 

Continue to:













TOP
previous page: 009- What Operating System environments does the GS support?
  
page up: Apple II Programming FAQ
  
next page: 011- A while ago someone posted about how to read the joystick on a GS in native mode. They said that it was possible to read both paddles at once and therefore get much more accurate readings?