From 7f38158fa47c8d94d23f391af7a43fccde19c5b0 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Mon, 29 Oct 2018 12:30:09 -0400 Subject: [PATCH] megadamo: learn that we can add asserts --- megademo/takeoff.s | 16 +++++++++++----- megademo/waterfall.s | 6 ++++-- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/megademo/takeoff.s b/megademo/takeoff.s index e050a45c..b4c62a2b 100644 --- a/megademo/takeoff.s +++ b/megademo/takeoff.s @@ -137,18 +137,24 @@ toloopB:dex ; 2 to_begin_loop: + ; 12*4 = 48 lines of HIRES = 3120 + ; -4 set HIRES + ; -1038 play_music + ; ========= + ; 2078 bit HIRES ; 4 - ; 3116 - 1038 (music) = 2078 - - jsr play_music +; jsr play_music ; 6 + 1032 ; Try X=5 Y=67 cycles=2078 ; Try X=11 Y=51 cycles=3112 R4 - ldy #67 ; 2 -toloop8:ldx #5 ; 2 + nop + nop + + ldy #51 ; 2 +toloop8:ldx #11 ; 2 toloop9:dex ; 2 bne toloop9 ; 2nt/3 dey ; 2 diff --git a/megademo/waterfall.s b/megademo/waterfall.s index 8aa5e2ff..68181fc1 100644 --- a/megademo/waterfall.s +++ b/megademo/waterfall.s @@ -366,7 +366,7 @@ adjust_xpos: jmp wf_display_loop ; 3 - +.align $100 ;========================================================= ; fast copy rows 22-36 from $C00 to $400 @@ -374,6 +374,8 @@ adjust_xpos: ; ; 7+ 8*[9*7 + 7] + 5 = 572 +.assert >gr_copy_row22 = >gr_copy_row_done, error, "gr_copy_row22 crosses page" + gr_copy_row22: ldy #8 ; 2 ldx XPOS ; 3 @@ -399,7 +401,7 @@ grcr_loop: bne grcr_loop ; 3 ; -1 rts ; 6 - +gr_copy_row_done: