2017-03-19 03:00:43 +00:00
|
|
|
.code
|
|
|
|
.psc02
|
|
|
|
.include "iic+.defs"
|
2017-12-11 02:01:37 +00:00
|
|
|
.org $fb3c ; ~165 bytes free here
|
|
|
|
.proc dispatch
|
|
|
|
cmp #$a9 ; reset patch
|
|
|
|
bne :+
|
|
|
|
jmp reset5x
|
|
|
|
: cmp #$ea ; boot patch
|
|
|
|
bne :+
|
|
|
|
jmp boot5x
|
|
|
|
: cmp #$0c
|
|
|
|
beq oldbelle1
|
|
|
|
; jump to monitor
|
|
|
|
lda #>(monitor-1) ; monitor entry on stack as return address
|
|
|
|
pha
|
|
|
|
lda #<(monitor-1)
|
|
|
|
pha
|
|
|
|
jmp swrts2 ; switch bank and rts to monitor
|
|
|
|
.endproc
|
|
|
|
|
2017-03-17 03:07:36 +00:00
|
|
|
; "classic air raid beep"
|
2017-12-11 02:01:37 +00:00
|
|
|
.proc oldbell
|
|
|
|
ldy #$c0
|
|
|
|
obell2: lda #$0c
|
|
|
|
dowait: jsr oldwait ; old wait for correct sound, we also enter here
|
|
|
|
lda $c030
|
|
|
|
dey
|
|
|
|
bne obell2
|
|
|
|
jmp swrts2
|
|
|
|
.endproc
|
|
|
|
; We jump into the old bell routine mid-way because it's possible for
|
|
|
|
; someone to want to call the bell routine with a different duration
|
|
|
|
; by putting a custom value in Y and calling fbe4 (BELL2)
|
|
|
|
oldbelle1 := oldbell::dowait
|
|
|
|
|
2017-03-17 03:07:36 +00:00
|
|
|
; old wait - no ACIA access to enforce delay at
|
2017-12-11 02:01:37 +00:00
|
|
|
; accelerated speeds, speaker delay takes care of it
|
2017-03-17 03:07:36 +00:00
|
|
|
; when we do the old beep
|
2017-12-11 02:01:37 +00:00
|
|
|
.proc oldwait
|
|
|
|
sec
|
|
|
|
owait2: pha
|
|
|
|
owait3: sbc #$01
|
|
|
|
bne owait3
|
|
|
|
pla
|
|
|
|
sbc #$01
|
|
|
|
bne owait2
|
|
|
|
rts
|
|
|
|
.endproc
|
|
|
|
|
|
|
|
.assert * <= $fc00, error, "ROM 5X dispatch overruns $fc00"
|