second: finish hooking up timeouts

in theory the demo will run now, such as it is
This commit is contained in:
Vince Weaver 2023-11-01 01:28:10 -04:00
parent 670608af34
commit 97e9b308c0
11 changed files with 126 additions and 55 deletions

View File

@ -89,18 +89,7 @@ gorilla_done:
.include "../hgr_clear_screen.s"
.include "../hgr_copy_fast.s"
; wait A * 1/50s
wait_irq:
; lda #50
sta IRQ_COUNTDOWN
wait_irq_loop:
lda IRQ_COUNTDOWN
bne wait_irq_loop
rts
.include "../irq_wait.s"
.include "../irq_wait.s"
gorilla_data:
.incbin "graphics/mntscrl3.hgr.zx02"

View File

@ -6,6 +6,7 @@
.include "../zp.inc"
.include "../hardware.inc"
.include "../qload.inc"
.include "../music.inc"
mod7_table = $1c00
div7_table = $1d00
@ -17,6 +18,15 @@ leaves_start:
; initializations
;=====================
; debug
; force right location in music
lda #30
sta current_pattern_smc+1
jsr pt3_set_pattern
;===================
; Load graphics
;===================
@ -53,7 +63,15 @@ ship_sprite_loop:
bit PAGE1
jsr wait_until_keypress
; jsr wait_until_keypress
leaves_loop:
lda #34
jsr wait_for_pattern
bcc leaves_loop
leaves_done:
rts
@ -66,17 +84,7 @@ leaves_done:
.include "../hgr_clear_screen.s"
.include "../hgr_copy_fast.s"
; wait A * 1/50s
wait_irq:
; lda #50
sta IRQ_COUNTDOWN
wait_irq_loop:
lda IRQ_COUNTDOWN
bne wait_irq_loop
rts
leaves_data:
.incbin "graphics/final3.hgr.zx02"
.include "../irq_wait.s"

View File

@ -4,14 +4,23 @@
.include "../zp.inc"
.include "../hardware.inc"
;.include "qload.inc"
;.include "music.inc"
.include "../qload.inc"
.include "../music.inc"
lens_start:
;=====================
; initializations
;=====================
; debug
; force right location in music
lda #34
sta current_pattern_smc+1
jsr pt3_set_pattern
bit SET_GR
bit HIRES
bit FULLGR
@ -28,14 +37,9 @@ lens_end:
rts
.align $100
.include "../wait_keypress.s"
.include "../zx02_optim.s"
.include "../irq_wait.s"
.include "roto.s"
.include "roto.s"

View File

@ -1,6 +1,8 @@
; do a (hopefully fast) roto-zoom
do_rotozoom:
;================================
; Clear screen and setup graphics
;================================
@ -61,7 +63,12 @@ load_background:
jsr page_flip
jsr gr_copy_to_current
jsr wait_until_keypress
; wait
; TODO: draw lens
lda #15
jsr wait_seconds
;=================================
@ -81,11 +88,15 @@ main_loop:
jsr page_flip
; wait for end
lda #47
jsr wait_for_pattern
bcc no_keypress
lda KEYPRESS ; 4
bpl no_keypress
bit KEYRESET ; clear the keyboard buffer
rts
no_keypress:
clc
@ -169,7 +180,7 @@ scaleaddh: .byte $00
.include "rotozoom.s"
.include "../gr_pageflip.s"
.include "../gr_fast_clear.s"
;.include "../gr_fast_clear.s"
.include "../gr_copy.s"
.include "../gr_offsets.s"

View File

@ -6,6 +6,7 @@
.include "../zp.inc"
.include "../hardware.inc"
.include "../qload.inc"
.include "../music.inc"
mod7_table = $1c00
div7_table = $1d00
@ -32,6 +33,14 @@ Table2 = $74D0 ; 40 bytes
; =============================================================================
plasma_debut:
; debug
lda #47
sta current_pattern_smc+1
jsr pt3_set_pattern
bit SET_GR
bit HIRES
bit FULLGR
@ -357,8 +366,10 @@ was_page1:
done_pageflip:
sta PAGE ; 3
lda KEYPRESS
bpl wasnt_keypress
lda #52
jsr wait_for_pattern
bcc wasnt_keypress
jmp done_plasma
@ -463,6 +474,7 @@ hires_colors_odd_lookup_l1:
.include "../hgr_clear_screen.s"
.include "../irq_wait.s"
;.include "hgr_table.s"

View File

@ -4,13 +4,20 @@
.include "../hardware.inc"
.include "../zp.inc"
.include "../music.inc"
; =============================================================================
; ROUTINE MAIN
; =============================================================================
plasma_main:
; debug
lda #52
sta current_pattern_smc+1
jsr pt3_set_pattern
bit PAGE2 ; set page 2
; bit SET_TEXT ; set text
@ -136,8 +143,9 @@ bp3:
jsr display_normal ; display normal
jsr VBLANK
lda KEYPRESS
bpl keep_making_plasma
lda #60
jsr wait_for_pattern
bcc keep_making_plasma
jmp done_plasmacube
@ -268,7 +276,6 @@ VBLANK:
rts
done_plasmacube:
bit KEYRESET
rts
@ -504,6 +511,7 @@ mask_src_table:
.include "../wait_keypress.s"
.include "../zx02_optim.s"
.include "../irq_wait.s"
mask1_data:
.incbin "graphics/cube2_mask1.gr.zx02"

View File

@ -17,12 +17,19 @@
.include "../zp.inc"
.include "../hardware.inc"
.include "../qload.inc"
.include "../music.inc"
spheres_start:
dots_start:
;=====================
; initializations
;=====================
; debug
lda #60
sta current_pattern_smc+1
jsr pt3_set_pattern
;===================
; Load graphics
;===================
@ -109,14 +116,13 @@ dot_good:
bpl move_dot_loop
lda KEYPRESS
bmi dots_done
lda #68
jsr wait_for_pattern
bcs dots_done
jmp dots_loop
dots_done:
bit KEYRESET
rts
@ -135,6 +141,8 @@ dots_done:
; .include "../hgr_clear_screen.s"
; .include "../hgr_copy_fast.s"
.include "../irq_wait.s"
wide_points_x:
.byte 8,11,17,25,30,28,20,13

View File

@ -6,6 +6,7 @@
.include "../zp.inc"
.include "../hardware.inc"
.include "../qload.inc"
.include "../music.inc"
mod7_table = $1c00
div7_table = $1d00
@ -17,6 +18,12 @@ spheres_start:
; initializations
;=====================
; debug
lda #68
sta current_pattern_smc+1
jsr pt3_set_pattern
;===================
; Load graphics
;===================
@ -56,7 +63,10 @@ load_loop:
bit PAGE1
jsr wait_until_keypress
spheres_loop:
lda #72
jsr wait_for_pattern
bcc spheres_loop
spheres_done:
rts
@ -67,6 +77,7 @@ spheres_done:
; .include "../hgr_table.s"
.include "../hgr_clear_screen.s"
.include "../hgr_copy_fast.s"
.include "../irq_wait.s"
spheres_data:
.incbin "graphics/spheres.hgr.zx02"

View File

@ -6,12 +6,19 @@
.include "../zp.inc"
.include "../hardware.inc"
.include "../qload.inc"
.include "../music.inc"
ocean_start:
;=====================
; initializations
;=====================
; debug
lda #72
sta current_pattern_smc+1
jsr pt3_set_pattern
;===================
; Load graphics
;===================
@ -69,8 +76,12 @@ ocean_loop:
sta COUNT
no_count_oflo:
lda KEYPRESS
bmi done_ocean
lda #76
jsr wait_for_pattern
bcs done_ocean
; lda KEYPRESS
; bmi done_ocean
jmp ocean_loop
done_ocean:
@ -79,6 +90,8 @@ done_ocean:
.include "../wait_keypress.s"
.include "../zx02_optim.s"
.include "../irq_wait.s"
frame_data_l:
.byte <frame02_data,<frame03_data,<frame04_data,<frame05_data
.byte <frame06_data,<frame07_data

View File

@ -8,6 +8,7 @@
.include "../zp.inc"
.include "../hardware.inc"
.include "../qload.inc"
.include "../music.inc"
mod7_table = $1c00
div7_table = $1d00
@ -56,19 +57,24 @@ ship_sprite_loop:
bit PAGE1
jsr wait_until_keypress
; jsr wait_until_keypress
polar_loop:
lda #76
jsr wait_for_pattern
bcc polar_loop
polar_done:
rts
.align $100
;.align $100
.include "../wait_keypress.s"
.include "../zx02_optim.s"
; .include "../hgr_table.s"
.include "../hgr_clear_screen.s"
.include "../hgr_copy_fast.s"
.include "../irq_wait.s"
; wait A * 1/50s

View File

@ -390,6 +390,7 @@ load_program_loop2:
;=============================
sei ; disable music
jsr clear_ay_both ; stop from making noise
bit PAGE1
bit TEXTGR