home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Set of Apple II Hard Drive Images
/
eric.hdv
/
ANNMIDI
/
INT0DRVR.SC0.txt
< prev
next >
Wrap
Text File
|
2020-08-13
|
4KB
|
171 lines
;INT0DRVR.SC0
;
;-------------------
;MAINLINE CODE
;-------------------
AUXSETUP RTS
DOAUXMV RTS
DOXFER RTS
;
PLAYMAIN LDA #$00
STA AUXPLAY
JMP PLAYIT1
PLAYAUX LDA #$01
STA AUXPLAY
JMP PLAYIT1
;
;=============================
PLAYIT1 JSR STOPCLK ;MKBCLOCK: STOP CLOCK
JSR ZEROCNT ;MKBCLOCK: ZERO COUNTER
LDA #$00
STA VDELTALO ;ZERO DELTA
STA VDELTAML
STA VDELTAMH
STA VDELTAHI
STA VALARMLO ;ZERO ALARM
STA VALARMML
STA VALARMMH
STA VALARMHI
STA VALARMFL ;ZERO ALARM FLAG
JSR STARTCLK ;MKBCLOCK: START CLOCK
;
LDA PLAYSTRT ;INITIALIZE PTR TO BEGINNING OF AREA
STA PLAYPTR
LDA PLAYSTRT+1
STA PLAYPTR+1
LDA KARALOOK ;12/17/95-KARALOOK LOGIC
BEQ PLAYLOOP
LDA #$8D
JSR COUT
JSR KARASCAN
PLAYLOOP LDA AUXPLAY
BEQ MAINPLAY
LDA PLAYPTR ;IF PLAYING AUX, MOVE ONE BYTE TO INBYTE
STA $3C
STA $3E
LDA PLAYPTR+1
STA $3D
STA $3F
LDA #>INBYTE
STA $42
LDA #<INBYTE
STA $43
CLC
JSR AUXMOVE
JMP GOTINBYT
MAINPLAY LDY #$00 ;READ 1 BYTE
LDA (PLAYPTR),Y
STA INBYTE
GOTINBYT JSR PRCSBYTE
LDA ENDOFTRK
BEQ PLAYLOO1
RTS
PLAYLOO1 JSR CHKKBD
LDA ENDOFTRK
BEQ INCPTR
RTS
INCPTR INC PLAYPTR
BNE INCPTR2
INC PLAYPTR+1
INCPTR2 LDA PLAYPTR
CMP PLAYSTOP
BNE PLAYLOOP
LDA PLAYPTR+1
CMP PLAYSTOP+1
BNE PLAYLOOP
RTS
;-------
; CHKKBD - MAY SET ENDOFTRK
;-------
CHKKBD LDA $C000
BPL NOKEY1
LDA $C010
AND #$7F
CMP #$20
BNE CHKESC
LDA #$01
STA ENDOFTRK
NOKEY1 RTS
CHKESC CMP #$1B
BNE CHKFLAT
WAITKEY LDA #$00
STA PAUSEFLG
WAITKEY1 LDA $C000
BPL WAITKEY1
LDA $C010
AND #$7F
CMP #$1B
BNE ESCDONE
INC PAUSEFLG
ESCDONE RTS
CHKFLAT CMP #$46 ;'F'-CHANGE UCS<->LCF
BNE TESTTMPO
LDA DISPMODE
EOR #$01
STA DISPMODE
RTS
TESTTMPO CMP #$54 ;'T'-TEMPO CHGS
BNE CHKDRUM
LDA DOTMPOCG
EOR #$01
STA DOTMPOCG
RTS
CHKDRUM CMP #$44 ;'D'-MASK DRUMS
BNE CHKLEFT
DEC MASKDRUM
LDA MASKDRUM
CMP #$FE
BNE DRUMDONE
LDA #$01
STA MASKDRUM
DRUMDONE RTS
CHKLEFT CMP #$08
BNE CHKRIGHT
DEC SPEED
LDA SPEED
BMI LEFTBAD
BEQ LEFTBAD
CMP #$03
BCC LEFTBAD
JSR STARTCLK
DEC SPEEDINC
JSR SPEEDDEC
JSR METRPOKE
LDA PRNTSPED
BEQ LEFTDONE
LDA #$A0
JSR COUT
LDA SPEED
JSR PRINTHEX
LDA #$A0
JSR COUT
LEFTDONE RTS
LEFTBAD INC SPEED
RTS
CHKRIGHT CMP #$15
BNE NOKEY
INC SPEED
LDA SPEED
BMI RIGHTBAD
BEQ RIGHTBAD
JSR STARTCLK
INC SPEEDINC
JSR SPEEDDEC
JSR METRPOKE
LDA PRNTSPED
BEQ NOKEY
LDA #$A0
JSR COUT
LDA SPEED
JSR PRINTHEX
LDA #$A0
JSR COUT
NOKEY RTS
RIGHTBAD DEC SPEED
RTS
;
;=========
; PRCSBYTE - MAY SET ENDOFTRK
;=========
CHN INT0DRVR.SC1