From efb5821ab69e577634bd224a414b04de133c6049 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Sun, 7 Oct 2018 16:29:40 -0400 Subject: [PATCH] space_bars: more work on timing split --- space_bars/game.s | 48 +++++++----- space_bars/screen_split.s | 150 +++++++++++++++++++++++++++++++++++++- 2 files changed, 180 insertions(+), 18 deletions(-) diff --git a/space_bars/game.s b/space_bars/game.s index ee2d185f..9604922a 100644 --- a/space_bars/game.s +++ b/space_bars/game.s @@ -214,7 +214,7 @@ sbloopD:dex ; 2 sb_mixed: nop ;kill 6 cycles (room for rts) ; 2 nop ; 2 - ldy #144 ; 2 + ldy #126 ; 2 sb_mixed_loop: nop @@ -231,16 +231,27 @@ sb_mixed_loop: ; in vblank - ; delay 144*65 = 9360 - ; Try X=37 Y=49 cycles=9360 +sb_all_gr: + ; 18 lines of this -; ldy #49 ; 2 -;sbloopE:ldx #37 ; 2 -;sbloopF:dex ; 2 -; bne sbloopF ; 2nt/3 -; dey ; 2 -; bne sbloopE ; 2nt/3 + ; 18 * 65 = 1170 + ; -4 + ; -5 + ; ========= + ; 1161 + + bit LORES ; 4 + + + ; Try X=22 Y=10 cycles=1161 + + ldy #10 ; 2 +sbloopE:ldx #22 ; 2 +sbloopF:dex ; 2 + bne sbloopF ; 2nt/3 + dey ; 2 + bne sbloopE ; 2nt/3 @@ -249,17 +260,14 @@ sb_mixed_loop: ;====================================================== ; do_nothing should be 4550 - ; - 5 from above ; -10 keypress ; =========== - ; 4535 + ; 4540 - ; Try X=40 Y=22 cycles=4533 R2 + ; Try X=9 Y=89 cycles=4540 - nop - - ldy #22 ; 2 -sbloop1:ldx #40 ; 2 + ldy #89 ; 2 +sbloop1:ldx #9 ; 2 sbloop2:dex ; 2 bne sbloop2 ; 2nt/3 dey ; 2 @@ -277,9 +285,15 @@ sb_start_over: rts ; 6 + + + +.align $100 +.include "screen_split.s" + + ;.include "deater.inc" background_hgr: .incbin "SB_BACKGROUNDC.BIN.lz4",11 background_hgr_end: -.include "screen_split.s" diff --git a/space_bars/screen_split.s b/space_bars/screen_split.s index 6a27769c..a338cade 100644 --- a/space_bars/screen_split.s +++ b/space_bars/screen_split.s @@ -14,9 +14,10 @@ ; 32 NnBBBBNnNnNnNnNnNnNnNnNnNnNnNnNnNnbbbbNnRrrrrr ; 36 BBBBNnNnNnNnNnNnNnNnNnNnNnNnNnNnNnNnbbbbRrrrrr +; add 23 each time? - + ; 23 bytes in size? split_4: nop nop @@ -59,6 +60,153 @@ split_8: nop rts +split_12: + nop + nop + nop + nop + nop + nop + bit LORES + nop + nop + nop + nop + bit HIRES + nop + nop + nop + nop + nop + nop + rts + +split_16: + nop + nop + nop + nop + nop + bit LORES + nop + nop + nop + nop + nop + nop + bit HIRES + nop + nop + nop + nop + nop + rts + +split_20: + nop + nop + nop + nop + bit LORES + nop + nop + nop + nop + nop + nop + nop + nop + bit HIRES + nop + nop + nop + nop + rts + +split_24: + nop + nop + nop + bit LORES + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + bit HIRES + nop + nop + nop + rts + +split_28: + nop + nop + bit LORES + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + bit HIRES + nop + nop + rts + +split_32: + nop + bit LORES + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + bit HIRES + nop + rts + +split_36: + bit LORES + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + bit HIRES + rts + ; 6 4 25+16+8+16 NNNNNNNN