From 5a438ee57e9fc84b3fdfb017295a540414c7bf56 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Fri, 21 Dec 2018 11:49:44 -0500 Subject: [PATCH] xmas2018: more ball scroll work --- xmas_2018/ball.s | 76 ++++++++++++++++++++++++++++++++++++++------ xmas_2018/xmas2018.s | 4 +-- 2 files changed, 69 insertions(+), 11 deletions(-) diff --git a/xmas_2018/ball.s b/xmas_2018/ball.s index c652d7e6..6bcb7738 100644 --- a/xmas_2018/ball.s +++ b/xmas_2018/ball.s @@ -196,22 +196,20 @@ done_framing: do_something_else: ; -1 - jsr do_reflection ; 6+36 + jsr do_reflection ; 6+126 ; 1842 (+1 incoming) ; -3 jmp - ; -42 do_reflection + ; -132 do_reflection ;=================== - ; 1797 + ; 1707 - ; Try X=10 Y=32 cycles=1793 R4 - - nop + ; Try X=84 Y=4 cycles=1705 R2 nop - ldy #32 ; 2 -baloopQ:ldx #10 ; 2 + ldy #4 ; 2 +baloopQ:ldx #84 ; 2 baloopR:dex ; 2 bne baloopR ; 2nt/3 dey ; 2 @@ -250,9 +248,12 @@ ball_done: ;====================================== -; 30 + 6 = 36 +; 120 + 6 = 126 do_reflection: + + ;============= + ; LORES 20x40 -> HIRES 126x156 lda $664 ; 4 ; if 0 make 0, otherwise make FF @@ -269,4 +270,61 @@ do_reflection: ;=========== ; 30 + ;============= + ; LORES 20x42 -> HIRES 126x152 + lda $6E4 ; 4 + + ; if 0 make 0, otherwise make FF + cmp #1 ; 2 + lda #$00 ; 2 + adc #$ff ; 2 + eor #$ff ; 2 + + and #$ff ; 2 + sta $5150+(126/7) ; 4 + sta $5550+(126/7) ; 4 + sta $5950+(126/7) ; 4 + sta $5d50+(126/7) ; 4 + ;=========== + ; 30 + + ;============= + ; LORES 20x44 -> HIRES 126x148 + lda $764 ; 4 + + ; if 0 make 0, otherwise make FF + cmp #1 ; 2 + lda #$00 ; 2 + adc #$ff ; 2 + eor #$ff ; 2 + + and #$ff ; 2 + sta $41d0+(126/7) ; 4 + sta $45d0+(126/7) ; 4 + sta $49d0+(126/7) ; 4 + sta $4dd0+(126/7) ; 4 + ;=========== + ; 30 + + ;============= + ; LORES 20x46 -> HIRES 126x144 + lda $7E4 ; 4 + + ; if 0 make 0, otherwise make FF + cmp #1 ; 2 + lda #$00 ; 2 + adc #$ff ; 2 + eor #$ff ; 2 + + and #$ff ; 2 + sta $4150+(126/7) ; 4 + sta $4550+(126/7) ; 4 + sta $4950+(126/7) ; 4 + sta $4d50+(126/7) ; 4 + ;=========== + ; 30 + + + + rts ; 6 diff --git a/xmas_2018/xmas2018.s b/xmas_2018/xmas2018.s index 1cc6a68b..1d9d1e7f 100644 --- a/xmas_2018/xmas2018.s +++ b/xmas_2018/xmas2018.s @@ -179,16 +179,16 @@ game_over_man: ; as they are called during cycle-counting .align $100 .include "wreath.s" - .include "ball.s" .include "gr_putsprite.s" .include "gr_offsets.s" - .include "vapor_lock.s" .include "gr_fast_clear.s" + .include "vapor_lock.s" .align $100 .include "play_music.s" .include "delay_a.s" .include "gr_scroll.s" .include "mockingboard.s" + .include "ball.s" ; Things here alignment doesn't matter