From fa744089a037a54d9e9c66b830934f985dee79cb Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Thu, 5 Jul 2018 15:56:59 -0400 Subject: [PATCH] split: vapor lock achieved --- split_screen/calc_freq.c | 3 ++- split_screen/credits.s | 34 ++++++++++++++++++++++++++++++++-- 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/split_screen/calc_freq.c b/split_screen/calc_freq.c index e732b781..dda81dbe 100644 --- a/split_screen/calc_freq.c +++ b/split_screen/calc_freq.c @@ -7,7 +7,8 @@ int main(int argc, char **argv) { // desired=3116; // desired=4152; // desired=5196; - desired=4547; +// desired=4547; + desired=9685; printf("You want %d cycles\n",desired); diff --git a/split_screen/credits.s b/split_screen/credits.s index 813f9314..c41e2652 100644 --- a/split_screen/credits.s +++ b/split_screen/credits.s @@ -126,9 +126,39 @@ line_loop: ; Have an Apple Split by Bob Bishop ; Softalk, October 1982 -vapor_lock_loop: - + ; Challenges: each scan line scans 40 bytes. + ; The blanking happens at the *beginning* + ; So 65 bytes are scanned, starting at adress of the line - 25 +vapor_lock_loop: + LDA #$44 +zloop: + LDX #$04 +qloop: + CMP $C051 + BNE zloop + DEX + BNE qloop + + ; found first line of low-res green, need to kill time + ; until we can enter at top of screen + ; so we want roughly 5200+4550 - 65 (for the scanline we missed) + + ; want 9685 + ; Try X=34 Y=55 cycles=9681 + + lda #0 ; 2 + lda #0 ; 2 + + ldy #55 ; 2 +loopA: + ldx #34 ; 2 +loopB: + dex ; 2 + bne loopB ; 2nt/3 + + dey ; 2 + bne loopA ; 2nt/3 ;===================================================== ;=====================================================