From b2bc1fb0ce1868589a3308229d366e2da253bb66 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Sun, 7 Oct 2018 17:32:49 -0400 Subject: [PATCH] space_bars: timing works out was an .align issue --- space_bars/game.s | 37 +++++++++++++++++++++++-------------- space_bars/screen_split.s | 3 +++ space_bars/space_bars.s | 1 + 3 files changed, 27 insertions(+), 14 deletions(-) diff --git a/space_bars/game.s b/space_bars/game.s index 9604922a..7e03830b 100644 --- a/space_bars/game.s +++ b/space_bars/game.s @@ -213,22 +213,32 @@ sbloopD:dex ; 2 sb_mixed: nop ;kill 6 cycles (room for rts) ; 2 - nop ; 2 - ldy #126 ; 2 + ldx #9 ; 2 + ldy #14 ; 126 ; 2 sb_mixed_loop: - nop - nop - nop - nop + lda ss_multiples,x ; 4 + sta split_smc+1 ; 4 +split_smc: jsr split_4 ; 6+46 dey ; 2 bne sb_mixed_loop ; 3 ; -1 + nop ; 2 + ldy #14 ; 2 + dex ; 2 + bne split_smc ; 3 - ; so need delay 5 - ; in vblank + ; -1 + + ; need to kill + ; -6 from offset + ; +1 fall through + ; -9 from check + ; +1 from other fallthrough + ;================ + ; -13 @@ -237,17 +247,16 @@ sb_all_gr: ; 18 * 65 = 1170 ; -4 - ; -5 + ; -13 ; ========= - ; 1161 + ; 1153 bit LORES ; 4 + ; Try X=6 Y=32 cycles=1153 - ; Try X=22 Y=10 cycles=1161 - - ldy #10 ; 2 -sbloopE:ldx #22 ; 2 + ldy #32 ; 2 +sbloopE:ldx #6 ; 2 sbloopF:dex ; 2 bne sbloopF ; 2nt/3 dey ; 2 diff --git a/space_bars/screen_split.s b/space_bars/screen_split.s index a338cade..4d69349d 100644 --- a/space_bars/screen_split.s +++ b/space_bars/screen_split.s @@ -208,6 +208,9 @@ split_36: rts +ss_multiples: +; .byte 0,0,23,46,69,92,115,138,161,184 + .byte 184,161,138,115,92,69,46,23,0,0 ; 6 4 25+16+8+16 NNNNNNNN ; 7 6 25+15+10+15 LNNNNNN diff --git a/space_bars/space_bars.s b/space_bars/space_bars.s index 446724ff..cdf0b15a 100644 --- a/space_bars/space_bars.s +++ b/space_bars/space_bars.s @@ -143,6 +143,7 @@ gr_offsets: .include "game.s" .include "text_print.s" .include "game_over.s" +.align $100 .include "vapor_lock.s" .include "delay_a.s" .include "lz4_decode.s"