dos33fsprogs/demos/second/part01_intropan/intro.s

393 lines
5.4 KiB
ArmAsm
Raw Normal View History

2023-10-05 19:02:28 +00:00
; Intro
;
; by deater (Vince Weaver) <vince@deater.net>
.include "../zp.inc"
.include "../hardware.inc"
.include "../qload.inc"
2023-11-01 04:36:34 +00:00
.include "../music.inc"
2023-10-05 19:02:28 +00:00
2023-10-29 05:06:06 +00:00
mod7_table = $1c00
div7_table = $1d00
hposn_low = $1e00
hposn_high = $1f00
2023-10-06 05:01:02 +00:00
2023-10-05 19:02:28 +00:00
intro_start:
;=====================
; initializations
;=====================
;===================
; Load graphics
;===================
bit SET_GR
bit HIRES
bit FULLGR
bit PAGE1
2023-10-06 05:01:02 +00:00
lda #0
jsr hgr_page1_clearscreen
2023-11-01 00:27:19 +00:00
;=========================
; wait 15s doing nothing
;=========================
2023-10-06 05:01:02 +00:00
2023-11-01 00:27:19 +00:00
lda #15
jsr wait_seconds
2023-10-29 05:55:20 +00:00
2023-11-01 00:27:19 +00:00
; pre-load vmw message
lda #<vmw_data
2023-10-29 05:55:20 +00:00
sta zx_src_l+1
2023-11-01 00:27:19 +00:00
lda #>vmw_data
sta zx_src_h+1
lda #$40
jsr zx02_full_decomp
;========================
; vmw message for 5s
;========================
bit PAGE2
lda #5
jsr wait_seconds
; switch back, wait 2 seconds
2023-10-29 05:55:20 +00:00
2023-11-01 00:27:19 +00:00
bit PAGE1
lda #2
jsr wait_seconds
; preload demosplash message
lda #<demosplash_data
sta zx_src_l+1
2023-10-29 05:55:20 +00:00
lda #>demosplash_data
sta zx_src_h+1
2023-11-01 00:27:19 +00:00
lda #$40
jsr zx02_full_decomp
2023-10-29 05:55:20 +00:00
2023-11-01 00:27:19 +00:00
;===================
; demosplash for 5s
;===================
2023-10-29 05:55:20 +00:00
2023-11-01 00:27:19 +00:00
bit PAGE2
lda #5
jsr wait_seconds
2023-10-29 05:55:20 +00:00
2023-11-01 00:27:19 +00:00
; switch back, wait 2 seconds
2023-10-29 05:55:20 +00:00
2023-11-01 00:27:19 +00:00
bit PAGE1
lda #2
jsr wait_seconds
2023-10-29 05:55:20 +00:00
2023-11-01 00:27:19 +00:00
; pre-load mockingboard
2023-10-29 05:55:20 +00:00
lda #<mockingboard_data
sta zx_src_l+1
lda #>mockingboard_data
sta zx_src_h+1
2023-11-01 00:27:19 +00:00
lda #$40
2023-10-29 05:55:20 +00:00
jsr zx02_full_decomp
2023-11-01 00:27:19 +00:00
;=======================
; mockingboard for 5s
;=======================
2023-10-29 05:55:20 +00:00
2023-11-01 00:27:19 +00:00
bit PAGE2
lda #5
jsr wait_seconds
bit PAGE1
2023-10-29 05:55:20 +00:00
;======================================
;======================================
; Pan
;======================================
;======================================
; do we have room to do page flipping?
2023-10-29 05:55:20 +00:00
;===========================================
; load left logo to $2000 and right to $4000
2023-10-06 05:01:02 +00:00
2023-10-05 20:11:26 +00:00
; left logo
lda #<intro_left_data
sta zx_src_l+1
lda #>intro_left_data
sta zx_src_h+1
lda #$20
jsr zx02_full_decomp
; right logo
lda #<intro_right_data
sta zx_src_l+1
lda #>intro_right_data
sta zx_src_h+1
lda #$40
2023-10-05 20:11:26 +00:00
jsr zx02_full_decomp
2023-10-30 18:39:29 +00:00
;==============================
; do the pan
2023-10-30 18:39:29 +00:00
;==============================
2023-10-30 18:39:29 +00:00
jsr horiz_pan
; wait a bit
lda #5
jsr wait_seconds
;============================
; load sprites at $6000
;============================
lda #<sprite_data
sta zx_src_l+1
lda #>sprite_data
sta zx_src_h+1
lda #$60
jsr zx02_full_decomp
;============================
; draw sprites
;============================
; currently we're viewing PAGE1
lda #$20
sta DRAW_PAGE ; draw PAGE2
ldx #0
stx BOARD_COUNT
draw_sprites_loop:
; right logo
lda #<intro_right_data
sta zx_src_l+1
lda #>intro_right_data
sta zx_src_h+1
lda #$20
clc
adc DRAW_PAGE
jsr zx02_full_decomp
ldx BOARD_COUNT
lda board_desty,X
sta HGR_DEST
lda board_y_start,X
sta HGR_Y1
lda #0
sta HGR_X1
lda #40
sta HGR_X2
lda board_y_end,X
sta HGR_Y2
jsr hgr_partial
bit PAGE2
jsr hgr_page_flip
; jsr wait_until_keypress
lda #10
jsr wait_ticks
inc BOARD_COUNT
lda BOARD_COUNT
2023-11-04 00:23:14 +00:00
cmp #5
bne draw_sprites_loop
2023-11-04 00:23:14 +00:00
; load empty screen
lda #<intro_right_data
sta zx_src_l+1
lda #>intro_right_data
sta zx_src_h+1
lda #$20
jsr zx02_full_decomp
; load empty screen
lda #<intro_right_data
sta zx_src_l+1
lda #>intro_right_data
sta zx_src_h+1
lda #$40
jsr zx02_full_decomp
; wait a bit
lda #5
jsr wait_seconds
;============================
; draw explosion
;============================
2023-10-05 20:11:26 +00:00
2023-11-04 00:23:14 +00:00
; draw orange square
bit PAGE1
ldx #87
orange_loop:
lda hposn_low,X
sta OUTL
lda hposn_high,X
sta OUTH
lda #$D5
ldy #19
sta (OUTL),Y
iny
lda #$AA
sta (OUTL),Y
inx
cpx #105
bne orange_loop
2023-10-05 20:11:26 +00:00
lda #1
jsr wait_seconds
2023-11-04 00:23:14 +00:00
; draw white explosion
lda #96
sta HGR_Y1
lda #96
sta HGR_Y2
lda #0
sta HGR_X1
lda #39
sta HGR_X2
ldx #40
explosion_loop:
stx SAVEX
ldx HGR_Y1
lda hposn_low,X
sta OUTL
lda hposn_high,X
sta OUTH
ldx HGR_Y2
lda hposn_low,X
sta INL
lda hposn_high,X
sta INH
lda #$ff
ldy HGR_X1
explosion_inner_loop:
sta (OUTL),Y
sta (INL),Y
iny
cpy HGR_X2
bcc explosion_inner_loop
ldx SAVEX
txa
and #$3
bne no_shrink
inc HGR_X1
dec HGR_X2
no_shrink:
dec HGR_Y1
dec HGR_Y1
inc HGR_Y2
inc HGR_Y2
lda #15
jsr wait_ticks
dex
dex
bne explosion_loop
lda #$FF
jsr hgr_page1_clearscreen
jsr hgr_page2_clearscreen
lda #1
jsr wait_seconds
2023-10-05 20:11:26 +00:00
;============================
; draw fc logo
;============================
2023-10-05 20:11:26 +00:00
2023-10-05 19:02:28 +00:00
lda #<fc_sr_logo_data
sta zx_src_l+1
lda #>fc_sr_logo_data
sta zx_src_h+1
lda #$20
jsr zx02_full_decomp
2023-11-01 01:57:26 +00:00
; return, handle waiting on other side
2023-10-05 19:02:28 +00:00
2023-10-29 05:06:06 +00:00
done_intro:
rts
2023-10-05 19:02:28 +00:00
2023-11-01 00:27:19 +00:00
;.align $100
2023-10-05 19:02:28 +00:00
.include "../wait_keypress.s"
; .include "../zx02_optim.s"
2023-10-06 05:01:02 +00:00
.include "../hgr_table.s"
.include "../hgr_clear_screen.s"
2023-10-30 18:39:29 +00:00
.include "horiz_scroll.s"
.include "hgr_partial.s"
.include "../hgr_page_flip.s"
2023-10-05 19:02:28 +00:00
2023-11-01 00:27:19 +00:00
.include "../irq_wait.s"
2023-10-29 05:55:20 +00:00
demosplash_data:
.incbin "graphics/demosplash.hgr.zx02"
mockingboard_data:
.incbin "graphics/mockingboard.hgr.zx02"
2023-10-05 20:11:26 +00:00
intro_left_data:
.incbin "graphics/igl.hgr.zx02"
intro_right_data:
.incbin "graphics/igr.hgr.zx02"
2023-10-05 19:02:28 +00:00
fc_sr_logo_data:
.incbin "graphics/fc_sr_logo.hgr.zx02"
2023-11-01 00:27:19 +00:00
vmw_data:
.incbin "graphics/vmw.hgr.zx02"
sprite_data:
.incbin "graphics/ship_sprites.hgr.zx02"
board_desty:
2023-11-04 00:23:14 +00:00
.byte 17,17,71,33,84
board_y_start:
2023-11-04 00:23:14 +00:00
.byte 0,38,93,110,177
board_y_end:
2023-11-04 00:23:14 +00:00
.byte 36,92,108,176,191