2020-02-17 18:41:01 +00:00
|
|
|
; Vertical scroll lo-res
|
|
|
|
|
|
|
|
; by deater (Vince Weaver) <vince@deater.net>
|
|
|
|
|
|
|
|
; Zero Page
|
|
|
|
.include "zp.inc"
|
|
|
|
.include "hardware.inc"
|
|
|
|
|
2020-02-24 05:19:48 +00:00
|
|
|
;PT3_USE_ZERO_PAGE=0
|
|
|
|
|
|
|
|
;===================
|
|
|
|
; PT3 Setup
|
|
|
|
|
|
|
|
lda #0
|
|
|
|
sta DONE_PLAYING
|
|
|
|
lda #1
|
|
|
|
sta LOOP
|
|
|
|
|
|
|
|
jsr mockingboard_detect
|
|
|
|
bcc mockingboard_not_found
|
|
|
|
setup_interrupt:
|
|
|
|
jsr mockingboard_init
|
|
|
|
jsr mockingboard_setup_interrupt
|
|
|
|
jsr reset_ay_both
|
|
|
|
jsr clear_ay_both
|
|
|
|
jsr pt3_init_song
|
|
|
|
|
|
|
|
start_interrupts:
|
|
|
|
cli
|
|
|
|
|
|
|
|
mockingboard_not_found:
|
2020-02-17 18:41:01 +00:00
|
|
|
|
|
|
|
;===================
|
|
|
|
; init screen
|
|
|
|
jsr TEXT
|
|
|
|
jsr HOME
|
|
|
|
bit KEYRESET
|
|
|
|
|
|
|
|
; GR part
|
|
|
|
bit PAGE1
|
|
|
|
bit LORES ; 4
|
|
|
|
bit SET_GR ; 4
|
|
|
|
bit FULLGR ; 4
|
|
|
|
|
|
|
|
;===================
|
|
|
|
; init vars
|
|
|
|
|
|
|
|
lda #0
|
|
|
|
sta DRAW_PAGE
|
|
|
|
lda #4
|
|
|
|
sta DISP_PAGE
|
|
|
|
|
|
|
|
;=============================
|
|
|
|
; Load desire 1st
|
|
|
|
|
|
|
|
lda #<desire_rle
|
|
|
|
sta GBASL
|
|
|
|
lda #>desire_rle
|
|
|
|
sta GBASH
|
|
|
|
lda #$c
|
|
|
|
jsr load_rle_gr
|
|
|
|
|
|
|
|
jsr gr_copy_to_current ; copy to page1
|
|
|
|
|
|
|
|
jsr page_flip
|
|
|
|
|
|
|
|
jsr wait_until_keypress
|
|
|
|
|
|
|
|
|
|
|
|
;=============================
|
|
|
|
; Load desire 2nd
|
|
|
|
|
|
|
|
lda #<desire2_rle
|
|
|
|
sta GBASL
|
|
|
|
lda #>desire2_rle
|
|
|
|
sta GBASH
|
|
|
|
lda #$c
|
|
|
|
jsr load_rle_gr
|
|
|
|
|
|
|
|
jsr gr_copy_to_current ; copy to page1
|
|
|
|
|
|
|
|
jsr page_flip
|
|
|
|
|
|
|
|
jsr wait_until_keypress
|
|
|
|
|
|
|
|
;=============================
|
2020-02-24 05:19:48 +00:00
|
|
|
; Load spaceman top
|
2020-02-17 18:41:01 +00:00
|
|
|
|
|
|
|
lda #<spaceman_rle
|
|
|
|
sta GBASL
|
|
|
|
lda #>spaceman_rle
|
|
|
|
sta GBASH
|
2020-02-24 05:19:48 +00:00
|
|
|
lda #$90
|
|
|
|
jsr load_rle_large
|
|
|
|
|
|
|
|
; Load spaceman bottom
|
|
|
|
|
|
|
|
lda #<spaceman2_rle
|
|
|
|
sta GBASL
|
|
|
|
lda #>spaceman2_rle
|
|
|
|
sta GBASH
|
|
|
|
lda #$A0
|
2020-02-17 18:41:01 +00:00
|
|
|
jsr load_rle_large
|
|
|
|
|
|
|
|
|
2020-02-17 19:33:26 +00:00
|
|
|
rescroll:
|
|
|
|
|
|
|
|
lda #0
|
|
|
|
sta SCROLL_COUNT
|
|
|
|
|
2020-02-24 05:19:48 +00:00
|
|
|
lda #<$9000
|
|
|
|
sta TINL
|
|
|
|
lda #>$9000
|
|
|
|
sta TINH
|
|
|
|
|
2020-02-17 19:33:26 +00:00
|
|
|
lda #<$A000
|
2020-02-24 05:19:48 +00:00
|
|
|
sta BINL
|
2020-02-17 19:33:26 +00:00
|
|
|
lda #>$A000
|
2020-02-24 05:19:48 +00:00
|
|
|
sta BINH
|
2020-02-17 19:33:26 +00:00
|
|
|
|
|
|
|
; delay
|
|
|
|
lda #200
|
|
|
|
jsr WAIT
|
|
|
|
|
|
|
|
scroll_loop:
|
2020-02-24 05:19:48 +00:00
|
|
|
lda TINL
|
|
|
|
sta OUTL
|
|
|
|
lda TINH
|
|
|
|
sta OUTH
|
2020-02-17 19:33:26 +00:00
|
|
|
|
|
|
|
jsr gr_copy_to_current_large ; copy to page1
|
2020-02-17 18:41:01 +00:00
|
|
|
jsr page_flip
|
|
|
|
|
2020-02-24 05:19:48 +00:00
|
|
|
lda #100
|
|
|
|
jsr WAIT
|
2020-02-17 18:41:01 +00:00
|
|
|
|
2020-02-24 05:19:48 +00:00
|
|
|
lda BINL
|
2020-02-17 19:33:26 +00:00
|
|
|
sta OUTL
|
2020-02-24 05:19:48 +00:00
|
|
|
lda BINH
|
2020-02-17 19:33:26 +00:00
|
|
|
sta OUTH
|
|
|
|
|
2020-02-24 05:19:48 +00:00
|
|
|
jsr gr_copy_to_current_large ; copy to page1
|
|
|
|
jsr page_flip
|
|
|
|
|
2020-02-17 19:33:26 +00:00
|
|
|
lda #100
|
|
|
|
jsr WAIT
|
2020-02-17 18:41:01 +00:00
|
|
|
|
2020-02-24 05:19:48 +00:00
|
|
|
lda TINL ; inc to next line
|
|
|
|
clc
|
|
|
|
adc #$28
|
|
|
|
sta TINL
|
|
|
|
lda TINH
|
|
|
|
adc #$0
|
|
|
|
sta TINH
|
|
|
|
|
|
|
|
lda BINL ; inc to next line
|
|
|
|
clc
|
|
|
|
adc #$28
|
|
|
|
sta BINL
|
|
|
|
lda BINH
|
|
|
|
adc #$0
|
|
|
|
sta BINH
|
|
|
|
|
2020-02-17 19:33:26 +00:00
|
|
|
inc SCROLL_COUNT
|
|
|
|
lda SCROLL_COUNT
|
2020-02-17 18:41:01 +00:00
|
|
|
|
2020-02-24 05:19:48 +00:00
|
|
|
cmp #73
|
2020-02-17 19:33:26 +00:00
|
|
|
bne scroll_loop
|
|
|
|
|
|
|
|
jsr wait_until_keypress
|
2020-02-17 18:41:01 +00:00
|
|
|
|
2020-02-17 19:33:26 +00:00
|
|
|
jmp rescroll
|
2020-02-17 18:41:01 +00:00
|
|
|
|
|
|
|
forever:
|
|
|
|
jmp forever
|
|
|
|
|
|
|
|
|
|
|
|
wait_until_keypress:
|
|
|
|
lda KEYPRESS
|
|
|
|
bpl wait_until_keypress
|
|
|
|
bit KEYRESET
|
|
|
|
rts
|
|
|
|
|
|
|
|
.include "gr_unrle.s"
|
|
|
|
.include "gr_unrle_large.s"
|
|
|
|
.include "gr_offsets.s"
|
|
|
|
.include "gr_copy.s"
|
|
|
|
.include "gr_copy_large.s"
|
|
|
|
.include "gr_pageflip.s"
|
|
|
|
|
2020-02-24 05:19:48 +00:00
|
|
|
.include "pt3_lib_core.s"
|
|
|
|
.include "pt3_lib_init.s"
|
|
|
|
.include "pt3_lib_mockingboard_setup.s"
|
|
|
|
.include "interrupt_handler.s"
|
|
|
|
; if you're self patching, detect has to be after interrupt_handler.s
|
|
|
|
.include "pt3_lib_mockingboard_detect.s"
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-02-17 18:41:01 +00:00
|
|
|
.include "desire.inc"
|
|
|
|
.include "spaceman.inc"
|
2020-02-24 05:19:48 +00:00
|
|
|
.include "spaceman2.inc"
|
|
|
|
|
|
|
|
PT3_LOC = song
|
|
|
|
.align $100
|
|
|
|
song:
|
|
|
|
.incbin "../pt3_player/music/DF.PT3"
|