space_bars: working on splitting screen

This commit is contained in:
Vince Weaver 2018-10-07 15:41:27 -04:00
parent 7862e051a1
commit 7740856c39
2 changed files with 113 additions and 10 deletions

View File

@ -211,17 +211,36 @@ sbloopD:dex ; 2
sb_mixed:
nop ;kill 6 cycles (room for rts) ; 2
nop ; 2
ldy #144 ; 2
sb_mixed_loop:
nop
nop
nop
nop
jsr split_4 ; 6+46
dey ; 2
bne sb_mixed_loop ; 3
; -1
; so need delay 5
; in vblank
; delay 144*65 = 9360
; Try X=37 Y=49 cycles=9360
ldy #49 ; 2
sbloopE:ldx #37 ; 2
sbloopF:dex ; 2
bne sbloopF ; 2nt/3
dey ; 2
bne sbloopE ; 2nt/3
; ldy #49 ; 2
;sbloopE:ldx #37 ; 2
;sbloopF:dex ; 2
; bne sbloopF ; 2nt/3
; dey ; 2
; bne sbloopE ; 2nt/3
@ -230,14 +249,17 @@ sbloopF:dex ; 2
;======================================================
; do_nothing should be 4550
; - 5 from above
; -10 keypress
; ===========
; 4540
; 4535
; Try X=9 Y=89 cycles=4540
; Try X=40 Y=22 cycles=4533 R2
ldy #89 ; 2
sbloop1:ldx #9 ; 2
nop
ldy #22 ; 2
sbloop1:ldx #40 ; 2
sbloop2:dex ; 2
bne sbloop2 ; 2nt/3
dey ; 2
@ -260,3 +282,4 @@ background_hgr:
.incbin "SB_BACKGROUNDC.BIN.lz4",11
background_hgr_end:
.include "screen_split.s"

80
space_bars/screen_split.s Normal file
View File

@ -0,0 +1,80 @@
; how quickly can we call this?
; jump table, assuming size to split is in Y?
; Autogenerate? As we want both HGR/TXT and HGR/GR versions?
; 4 NnNnNnNnNnNnNnNnBBBBbbbbNnNnNnNnNnNnNnNnRrrrrr
; 8 NnNnNnNnNnNnNnBBBBNnNnbbbbNnNnNnNnNnNnNnRrrrrr
; 12 NnNnNnNnNnNnBBBBNnNnNnNnbbbbNnNnNnNnNnNnRrrrrr
; 16 NnNnNnNnNnBBBBNnNnNnNnNnNnbbbbNnNnNnNnNnRrrrrr
; 20 NnNnNnNnBBBBNnNnNnNnNnNnNnNnbbbbNnNnNnNnRrrrrr
; 24 NnNnNnBBBBNnNnNnNnNnNnNnNnNnNnbbbbNnNnNnRrrrrr
; 28 NnNnBBBBNnNnNnNnNnNnNnNnNnNnNnNnbbbbNnNnRrrrrr
; 32 NnBBBBNnNnNnNnNnNnNnNnNnNnNnNnNnNnbbbbNnRrrrrr
; 36 BBBBNnNnNnNnNnNnNnNnNnNnNnNnNnNnNnNnbbbbRrrrrr
split_4:
nop
nop
nop
nop
nop
nop
nop
nop
bit LORES
bit HIRES
nop
nop
nop
nop
nop
nop
nop
nop
rts
split_8:
nop
nop
nop
nop
nop
nop
nop
bit LORES
nop
nop
bit HIRES
nop
nop
nop
nop
nop
nop
nop
rts
; 6 4 25+16+8+16 NNNNNNNN
; 7 6 25+15+10+15 LNNNNNN
; 8 8 25+14+12+14 NNNNNNN
; 9 10 25+13+14+13 LNNNNN
; 10 12 25+12+16+12
; 11 14 25+11+18+11
; 12 16 25+10+20+10
; 13 18 25+09+22+09
; 14 20 25+08+24+08
; 15 22 25+07+26+07
; 16 24 25+06+28+06
; 17 26 25+05+30+05
; 18 28 25+04+32+04
; 19 30 25+03+34+03
; 20 32 25+02+36+02
; 21 34 25+01+38+01