From 9308d0de624d3ca0cfece365c1878ae6c38239aa Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Thu, 5 Jul 2018 23:16:41 -0400 Subject: [PATCH] split: one tree moving --- split_screen/calc_freq.c | 2 +- split_screen/credits.s | 163 ++++++++++++++++++++++++++++++----- split_screen/tfv_sprites.inc | 11 ++- 3 files changed, 149 insertions(+), 27 deletions(-) diff --git a/split_screen/calc_freq.c b/split_screen/calc_freq.c index e053a884..0ab90e46 100644 --- a/split_screen/calc_freq.c +++ b/split_screen/calc_freq.c @@ -9,7 +9,7 @@ int main(int argc, char **argv) { // desired=5196; // desired=4547; // desired=9685; - desired=2331; + desired=1673; printf("You want %d cycles\n",desired); diff --git a/split_screen/credits.s b/split_screen/credits.s index 09f00e4f..06865743 100644 --- a/split_screen/credits.s +++ b/split_screen/credits.s @@ -3,6 +3,9 @@ H2 = $2C ; V2 = $2D ; TEMPY = $FB + FRAME = $60 + TREE1X = $61 + TREE2X = $62 HGR = $F3E2 HPLOT0 = $F457 @@ -16,6 +19,14 @@ jsr TEXT jsr HOME + + ; Init vars + lda #28 + sta TREE1X + lda #37 + sta TREE2X + + lda #0 sta DISP_PAGE lda #0 @@ -276,27 +287,59 @@ loop6: ; vertical blank - ; want 4550-3 = 4547 cycles + ; want 4550 cycles ; Try X=13 Y=64 cycles=4545 R2 -; lda #0 ; 2 -; ldy #64 ; 2 -loopE: -; ldx #13 ; 2 -loopF: -; dex ; 2 -; bne loopF ; 2nt/3 -; dey ; 2 -; bne loopE ; 2nt/3 - - - - ;========================================================================= ; DRAW SPRITES ; do this during blanking interval +; color_equals(4); + ; for(i=28;i<48;i++) { + ; basic_hlin(0,39,i); + ; } + + ;================ + ; Draw Small Tree + + lda #>small_tree ; 2 + sta INH ; 3 + lda #4) { + ; grsim_put_sprite_page(PAGE0, + ; bird_rider_stand_right, + ; 17,30); + ; } + ; else { + ; grsim_put_sprite_page(PAGE0, + ; bird_rider_walk_right, + ; 17,30); + ; } + + + lda #>bird_rider_stand_right ; 2 sta INH ; 3 lda #