mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-31 18:31:48 +00:00
double: more mockingboard code
This commit is contained in:
parent
5211fd633a
commit
5d405c27cd
@ -28,6 +28,7 @@ double.o: double.s \
|
||||
zx02_optim.s copy_400.s gr_offsets.s vblank.s \
|
||||
lc_detect.s text_print.s title.s gr_fast_clear.s \
|
||||
interrupt_handler.s pt3_lib_mockingboard_patch.s \
|
||||
wait_a_bit.s wait.s \
|
||||
graphics/sworg_hgr.hgr.zx02 \
|
||||
graphics/sworg_dhgr.aux.zx02 \
|
||||
graphics/sworg_dhgr.bin.zx02 \
|
||||
|
@ -192,7 +192,48 @@ mockingboard_notfound:
|
||||
|
||||
skip_all_checks:
|
||||
|
||||
jsr wait_until_keypress
|
||||
;==================================
|
||||
; load music into the language card
|
||||
; into $D000 set 2
|
||||
;==================================
|
||||
|
||||
; switch in language card
|
||||
; read/write RAM, $d000 bank 2
|
||||
|
||||
; lda $C08b
|
||||
; lda $C08b
|
||||
|
||||
|
||||
jsr mockingboard_patch ; patch to work in slots other than 4?
|
||||
|
||||
;=======================
|
||||
; Set up 50Hz interrupt
|
||||
;========================
|
||||
|
||||
jsr mockingboard_init
|
||||
jsr mockingboard_setup_interrupt
|
||||
|
||||
|
||||
zurg:
|
||||
|
||||
;============================
|
||||
; Init the Mockingboard
|
||||
;============================
|
||||
|
||||
jsr reset_ay_both
|
||||
jsr clear_ay_both
|
||||
|
||||
;=======================
|
||||
; wait for keypress
|
||||
;=======================
|
||||
|
||||
; jsr wait_until_keypress
|
||||
|
||||
lda #25
|
||||
jsr wait_a_bit
|
||||
|
||||
|
||||
; jsr wait_until_keypress
|
||||
|
||||
;================================
|
||||
; Clear screen and setup graphics
|
||||
@ -575,3 +616,5 @@ config_string:
|
||||
.include "text_print.s"
|
||||
.include "title.s"
|
||||
.include "gr_fast_clear.s"
|
||||
.include "wait_a_bit.s"
|
||||
.include "wait.s"
|
||||
|
18
vaporlock/doubledouble/wait.s
Normal file
18
vaporlock/doubledouble/wait.s
Normal file
@ -0,0 +1,18 @@
|
||||
; copy of ROM wait
|
||||
; because we might disable ROM
|
||||
|
||||
|
||||
wait:
|
||||
sec
|
||||
wait2:
|
||||
pha
|
||||
wait3:
|
||||
sbc #$01
|
||||
bne wait3
|
||||
pla
|
||||
sbc #$01
|
||||
bne wait2
|
||||
rts
|
||||
wait_end:
|
||||
|
||||
.assert (>wait_end - >wait) < 1 , error, "wait crosses page boundary"
|
37
vaporlock/doubledouble/wait_a_bit.s
Normal file
37
vaporlock/doubledouble/wait_a_bit.s
Normal file
@ -0,0 +1,37 @@
|
||||
;====================================
|
||||
; wait for keypress or a few seconds
|
||||
;====================================
|
||||
; A is length to wait
|
||||
|
||||
wait_a_bit:
|
||||
|
||||
bit KEYRESET
|
||||
tax
|
||||
|
||||
keyloop:
|
||||
lda #200 ; delay a bit
|
||||
jsr wait
|
||||
|
||||
lda KEYBOARD
|
||||
bmi done_keyloop
|
||||
|
||||
dex
|
||||
bne keyloop
|
||||
; beq no_escape
|
||||
|
||||
done_keyloop:
|
||||
|
||||
; and #$7f
|
||||
; cmp #27
|
||||
; bne no_escape
|
||||
|
||||
; inc ESC_PRESSED
|
||||
;no_escape:
|
||||
|
||||
bit KEYRESET
|
||||
|
||||
rts
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user