Caple C871i Bedienungsanleitung Seite 221

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 572
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 220
Apple II Computer Info
loop2 iny ; increment pdl1 counter
lda pdl1 ; is high bit = 0?
bmi loop2 ; no, keep checking
plb ; yes, restore data bank
plp ; and processor status register
rts ; return to caller (could be RTL)
Notice that the actual counting loops are only 9 cycles long. This gives the
best possible resolution. You will need your counters to be 16 bits wide as
the results will easily overflow the capacity of an 8 bit counter. Using
memory locations as counters will only serve to slow the counting loop down.
If X and Y contain valid data before entry, you will need to save them off to
the stack and pull them back in after interpreting the joystick results.
I have used this exact method to read the analog inputs on my Science Toolkit
box which connects to the joystick port. The results have been extremely
accurate (much more than would be needed for a game which reads the joystick).
----------------------------------------------------------------------------
ProLine: tgeer@pro-gumbo Internet: [email protected]
UUCP: crash!pro-gumbo!tgeer Fidonet: [email protected]
----------------------------------------------------------------------------
"My wife is a bargain hunter - I just carry the ammunition."
###################################################### E N D O F F I L E
### joystck.read
###################################################### E N D O F F I L E
Apple II Computer Technical Information : Apple II Family Hardware Info
ftp://ground.ecn.uiowa.edu/2/apple2/miscinfo/hardware : May 2001 : 221 of 572
Seitenansicht 220
1 2 ... 216 217 218 219 220 221 222 223 224 225 226 ... 571 572

Kommentare zu diesen Handbüchern

Keine Kommentare