home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Set of Apple II Hard Drive Images
/
eric.hdv
/
SOURCE
/
JOYCTL.BK3.txt
< prev
next >
Wrap
Text File
|
2020-08-13
|
2KB
|
74 lines
; JOYCTL - JOYSTICK MIDI CONTROLLER
;
;-------------------------------------------
PHASE10 LDA JOYY
CMP PREVY
BEQ GOTO12
CMP PREV2Y
BEQ GOTO12
PHA
LDA PREVY
STA PREV2Y
PLA
STA PREVY
; ;X CHANGED. PUT MIDI MESSAGE ON QUEUE
ASL A ;MULTIPLY BY 2 TO GET RANGE OF 0-110
CLC
ADC #10 ;ADD 10 TO GET RANGE OF 10-120
STA TEMP
LDX YINVERT ;IF INVERTING, SUBTRACT IT FROM 130
BEQ NOYINV
LDA #130
SEC
SBC TEMP
NOYINV LDY YBYTE
STA YMSG0,Y ;STICK INTO MIDI MESSAGE
LDA YMSG0
;;; STA (QHEAD) ; *65C02*
DFB $92
DFB QHEAD
INC QHEAD
LDA YMSG1
;;; STA (QHEAD) ; *65C02*
DFB $92
DFB QHEAD
INC QHEAD
LDA YMSG2
;;; STA (QHEAD) ; *65C02*
DFB $92
DFB QHEAD
INC QHEAD
;
GOTO12 LDA #12
STA PHASE
JMP CHKMIDI
;
;-------------------------------------------
PHASE12 LDA QHEAD
CMP QTAIL
BNE DOQUEUE
LDA #0
STA PHASE
JMP CHKMIDI
DOQUEUE LDA #14
STA PHASE
JMP CHKMIDI
;-------------------------------------------
;;;PHASE14 LDA (QTAIL) ; *65C02*
PHASE14 DFB $B2
DFB QTAIL
STA $C0A9
INC QTAIL
LDA #16
STA PHASE
JMP CHKMIDI
;-------------------------------------------
PHASE16 LDA $C0A8
AND #$02
BNE TDREDONE
JMP CHKMIDI
TDREDONE LDA #12
STA PHASE
JMP CHKMIDI
;-------------------------------------------