From bedaba77c1ad18450bce95d085b113f29b523817 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Tue, 31 Oct 2023 20:27:19 -0400 Subject: [PATCH] second: start making it autoplay --- demos/second/gr_plot.s | 6 +- demos/second/irq_wait.s | 25 ++++++ .../second/part01_intropan/graphics/Makefile | 14 +++- demos/second/part01_intropan/graphics/vmw.png | Bin 0 -> 817 bytes demos/second/part01_intropan/intro.s | 72 ++++++++++++++---- demos/second/part04_chess_shapes/circles.s | 8 +- demos/second/start.s | 5 ++ 7 files changed, 109 insertions(+), 21 deletions(-) create mode 100644 demos/second/irq_wait.s create mode 100644 demos/second/part01_intropan/graphics/vmw.png diff --git a/demos/second/gr_plot.s b/demos/second/gr_plot.s index 002a545a..9df328e7 100644 --- a/demos/second/gr_plot.s +++ b/demos/second/gr_plot.s @@ -17,12 +17,12 @@ plot: bcc plot_even ; 2nt/3 plot_odd: - ldx #$f0 ; 2 + ldy #$f0 ; 2 bcs plot_c_done ; 2nt/3 plot_even: - ldx #$0f ; 2 + ldy #$0f ; 2 plot_c_done: - stx MASK ; 3 + sty MASK ; 3 asl ; shift back (now even) ; 2 tay ; 2 diff --git a/demos/second/irq_wait.s b/demos/second/irq_wait.s new file mode 100644 index 00000000..23bb1f22 --- /dev/null +++ b/demos/second/irq_wait.s @@ -0,0 +1,25 @@ + ; wait A * 1 50Hz tick +wait_ticks: + sta IRQ_COUNTDOWN +wait_tick_loop: + lda IRQ_COUNTDOWN + bne wait_tick_loop +wait_tick_done: + rts + + +wait_seconds: + tax + +wait_seconds_loop: + lda #50 ; wait 1s + jsr wait_ticks + + lda KEYPRESS + bmi wait_seconds_done + + dex + bpl wait_seconds_loop +wait_seconds_done: + bit KEYRESET + rts diff --git a/demos/second/part01_intropan/graphics/Makefile b/demos/second/part01_intropan/graphics/Makefile index 660351df..5b781011 100644 --- a/demos/second/part01_intropan/graphics/Makefile +++ b/demos/second/part01_intropan/graphics/Makefile @@ -5,7 +5,8 @@ PNG_TO_HGR = ../../../../utils/hgr-utils/png2hgr PNG2GR = ../../../../utils/gr-utils/png2gr all: igl.hgr.zx02 igr.hgr.zx02 fc_sr_logo.hgr.zx02 \ - demosplash.hgr.zx02 mockingboard.hgr.zx02 + demosplash.hgr.zx02 mockingboard.hgr.zx02 \ + vmw.hgr.zx02 #### @@ -51,9 +52,18 @@ igr.hgr: igr.png #### +vmw.hgr.zx02: vmw.hgr + $(ZX02) vmw.hgr vmw.hgr.zx02 + +vmw.hgr: vmw.png + $(PNG_TO_HGR) vmw.png > vmw.hgr + + +#### + #### clean: - rm -f *~ + rm -f *~ *.zx02 diff --git a/demos/second/part01_intropan/graphics/vmw.png b/demos/second/part01_intropan/graphics/vmw.png new file mode 100644 index 0000000000000000000000000000000000000000..8b15c447eafe1b4f3c19da0acd9c8f7fdc888494 GIT binary patch literal 817 zcmV-11J3-3P)EX>4Tx04R}tkv&MmKpe$iQ>9WW4hAgZkfC<6i;6hbDionYs1;guFdzMbCJjl7 zi=*ILaPVWX>fqw6tAnc`2!4RLx;QDiNQwVT3N2zhIPS;0dyl(!0N1K1n$?#CG~G6{ z>6DN!tO}u5gb~FEc*G^eGUh}v1K;s=j{sZm5-iLA+@E7mEm{f?5QvkCVcNtS#50?= z!FZpTS1OW9d`>)J(glehnJ#<$#<=V<$1-^{mz^i(iG^|x%RQ`AOpSP&IHqbk<#TzD zRmNM4wOT{z+>^a9Qq)(LnND*IX)Iz1A_T~2po$u7Bxu!1v5=+xl#hSZ^^4?^$yJ3y zjs?`AL2~_IfAG6ot28y~B}Gy||BK^%j02%vpxtzw?_n&jRlk{d+ ziyZ+&+rY(jSCjXE%N-#4WJspuNA(Ki)<;aecQ=JnRu$LRx*qpmVHz`-F9 zFH`oq&$|bDd;9lHr@tS%uX4j@<$mD+000tDOjJbx000}y0pv9P|NsBZTLBxI{*j+U z82|tP32;bRa{vGsOaK5FbOE2JKp+4B00(qQO+^Ri3jqKM2W)bx#{d8T8FWQhbVF}# zZDnqB07G(RVRU6=Aa`kWXdp*PO;A^X4i^9b0RBltK~#9!?buFllGXsTt?>nT&Q%Cv#s(w(v-nVVF8EH)Q}>tU9vdmLu%H0v0q^())fbTbQ@uIkzKkcTnEPyZ_+QgHw-w8*0e_T-Et@ z8_dy;bI&GpR7&!RAf>CM?BcbImZCSR-=*_3np+NP%kHgQIx?l(K0HkB3sb6GSu^Pc va9vCN@6R?C5C8xG0000000000z@PF39wj>YBZmt700000NkvXXu0mjf;X7-L literal 0 HcmV?d00001 diff --git a/demos/second/part01_intropan/intro.s b/demos/second/part01_intropan/intro.s index 28e7b871..a15d393b 100644 --- a/demos/second/part01_intropan/intro.s +++ b/demos/second/part01_intropan/intro.s @@ -29,36 +29,77 @@ intro_start: lda #0 jsr hgr_page1_clearscreen + ;========================= + ; wait 15s doing nothing + ;========================= - ; demosplash + lda #15 + jsr wait_seconds + + ; pre-load vmw message + + 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 + + bit PAGE1 + lda #2 + jsr wait_seconds + + ; preload demosplash message lda #demosplash_data sta zx_src_h+1 - - lda #$20 - + lda #$40 jsr zx02_full_decomp - jsr wait_until_keypress + ;=================== + ; demosplash for 5s + ;=================== + bit PAGE2 + lda #5 + jsr wait_seconds - ; mockingboard + ; switch back, wait 2 seconds + + bit PAGE1 + lda #2 + jsr wait_seconds + + ; pre-load mockingboard lda #mockingboard_data sta zx_src_h+1 - - lda #$20 - + lda #$40 jsr zx02_full_decomp - jsr wait_until_keypress + ;======================= + ; mockingboard for 5s + ;======================= + bit PAGE2 + lda #5 + jsr wait_seconds + + bit PAGE1 ;====================================== ;====================================== @@ -139,13 +180,15 @@ intro_start: done_intro: rts -.align $100 +;.align $100 .include "../wait_keypress.s" .include "../zx02_optim.s" .include "../hgr_table.s" .include "../hgr_clear_screen.s" .include "horiz_scroll.s" + .include "../irq_wait.s" + demosplash_data: .incbin "graphics/demosplash.hgr.zx02" mockingboard_data: @@ -157,4 +200,5 @@ intro_right_data: .incbin "graphics/igr.hgr.zx02" fc_sr_logo_data: .incbin "graphics/fc_sr_logo.hgr.zx02" - +vmw_data: + .incbin "graphics/vmw.hgr.zx02" diff --git a/demos/second/part04_chess_shapes/circles.s b/demos/second/part04_chess_shapes/circles.s index a7c8c050..44547816 100644 --- a/demos/second/part04_chess_shapes/circles.s +++ b/demos/second/part04_chess_shapes/circles.s @@ -13,6 +13,7 @@ zooming_circles: ;=================== ; init screen + bit LORES bit FULLGR bit PAGE1 @@ -61,15 +62,18 @@ xloop: ldy X2 ; Y==X2 ; 2 txa ; A==Y1 ; 1 - jsr plot_compat ; (X2,Y1) ; 3 + jsr plot_compat ; (X2,Y1) ; 3 + ldy X2 lda Y2 ; A==Y2 ; 2 - jsr plot_compat ; (X2,Y2) ; 3 + jsr plot_compat ; (X2,Y2) ; 3 ldy TEMPY ; Y==X1 ; 2 txa ; A==Y1 ; 1 jsr plot_compat ; (X1,Y1) ; 3 + ldy TEMPY lda Y2 ; A==Y2 ; 2 jsr plot_compat ; (X1,Y2) ; 3 + ldy TEMPY inc X2 ; 2 diff --git a/demos/second/start.s b/demos/second/start.s index 6415b925..b55bc397 100644 --- a/demos/second/start.s +++ b/demos/second/start.s @@ -298,6 +298,7 @@ load_program_loop: sei + jsr clear_ay_both ; stop from making noise ;============================= ; want to load 10..12 @@ -341,6 +342,10 @@ load_program_loop2: ;========================== ;========================== + ; restart music + + cli + ;======================= ; run SPHERES ;============================================