From 7bb8695de93532c0943b8dd2665c95f67db8d57d Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Thu, 7 Nov 2019 12:06:13 -0500 Subject: [PATCH] ds: plays first frame. urgh --- demosplash/demosplash.s | 8 ++++---- demosplash/pt3_lib_play_frame.s | 14 +++++++------- demosplash/zp.inc | 2 ++ 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/demosplash/demosplash.s b/demosplash/demosplash.s index 26623105..7c320cc5 100644 --- a/demosplash/demosplash.s +++ b/demosplash/demosplash.s @@ -21,8 +21,8 @@ demosplash2019: ;==================================== ; turn on language card ; enable read/write, use 1st 4k bank -; lda $C08B -; lda $C08B + lda $C08B + lda $C08B ;==================================== ; generate 4 patterns worth of music @@ -49,7 +49,7 @@ frame_decode_loop: bne frame_decode_loop ; add 11 to all of the output pointers -.if 0 + clc lda r0_wrsmc+2 adc #$b @@ -94,7 +94,7 @@ frame_decode_loop: lda r12_wrsmc+2 adc #$b sta r12_wrsmc+2 -.endif + inc FRAME_PAGE lda FRAME_PAGE diff --git a/demosplash/pt3_lib_play_frame.s b/demosplash/pt3_lib_play_frame.s index cd75df39..4c34c1ff 100644 --- a/demosplash/pt3_lib_play_frame.s +++ b/demosplash/pt3_lib_play_frame.s @@ -31,7 +31,7 @@ r0_smc: ; Register 2: B fine ldx #2 ; 2 r2_smc: - lda $9200,Y ; 4+ + lda $D200,Y ; 4+ jsr play_mb_write ; 6+60 ;====== ; 72 @@ -39,7 +39,7 @@ r2_smc: ; Register 1: A coarse ldx #1 ; 2 r1_smc: - lda $9100,Y ; 4+ + lda $D100,Y ; 4+ pha ; 3 lsr ; 2 lsr ; 2 @@ -67,7 +67,7 @@ r4_smc: ; Register 5: C coarse ldx #5 ; 2 r5_smc: - lda $9400,Y ; 4+ + lda $D400,Y ; 4+ pha ; 3 and #$f ; 2 jsr play_mb_write ; 6+60 @@ -134,10 +134,10 @@ r8_smc: pla ; 4 and #$e0 ; 2 lsr ; 2 - sta AY_REGISTERS ; 3 + sta AY_WRITE_TEMP ; 3 lsr ; 2 and #$10 ; 2 - sta AY_REGISTERS+1 ; 3 + sta AY_WRITE_TEMP2 ; 3 ;==== ; 18 @@ -147,7 +147,7 @@ r9_smc: lda $D800,Y ; 4+ pha ; 3 and #$f ; 2 - ora AY_REGISTERS ; 3 + ora AY_WRITE_TEMP ; 3 and #$1f ; 2 jsr play_mb_write ; 6+60 ;======= @@ -160,7 +160,7 @@ r9_smc: lsr ; 2 lsr ; 2 lsr ; 2 - ora AY_REGISTERS+1 ; 3 + ora AY_WRITE_TEMP2 ; 3 and #$1f ; 2 jsr play_mb_write ; 6+60 ;====== diff --git a/demosplash/zp.inc b/demosplash/zp.inc index c0dbfb07..9f86f847 100644 --- a/demosplash/zp.inc +++ b/demosplash/zp.inc @@ -60,6 +60,8 @@ WASTE_CYCLES = $C6 FOREVER_OFFSET = $C7 FRAME_OFFSET = $C8 FRAME_PAGE = $C9 +AY_WRITE_TEMP = $CA +AY_WRITE_TEMP2 = $CB FRAMEL = $60 FRAMEH = $61