diff --git a/demosplash/NOTES b/demosplash/NOTES index 6779e86b..7b1c29fe 100644 --- a/demosplash/NOTES +++ b/demosplash/NOTES @@ -1,3 +1,9 @@ + +TODO: + + red underline on missing + + glitch prevention finish + + clear screen at begin on missing + Music glitching: + Demosplash gen 4 pages @@ -11,6 +17,7 @@ Music glitching: + TODO: CYCLE: Apple II intro + Remove keyboard pause diff --git a/demosplash/appleII_intro.s b/demosplash/appleII_intro.s index e58414bd..6747b67d 100644 --- a/demosplash/appleII_intro.s +++ b/demosplash/appleII_intro.s @@ -445,8 +445,6 @@ loop2: dex ; 2 rts ; 6 do_nothing_end: -.assert >do_nothing = >do_nothing_end, error, "do_nothing crosses page" - forever_string: .byte ' ','F','O','R','E','V','E','R' @@ -455,3 +453,7 @@ colors_first: .byte $00,$00,$00,$00 colors_second: .byte $00,$04,$40,$00 colors_third: .byte $40,$4C,$C4,$04 colors_fourth: .byte $C4,$CF,$FC,$4C + +.assert >do_nothing = >do_nothing_end, error, "do_nothing crosses page" + + diff --git a/demosplash/create_update_type1.s b/demosplash/create_update_type1.s index fecd018a..633ad5b3 100644 --- a/demosplash/create_update_type1.s +++ b/demosplash/create_update_type1.s @@ -2,53 +2,67 @@ ; Autogenerates code that does interleaved Page0/Page1 lores mode ; but leaving room for 14 pixels/line of per-scanline color + ; originally 183,589 + ; takes roughly 12 + 192*((49*16)+2+38) + 15 = 158,235!!!! + ; want to play sound every 15787 cycles (10.0) + + ; so every 19.2 times through loop? is 16 close enough? + + ; 11 times should update??? + UPDATE_START = $9800 DEFAULT_COLOR = $0 create_update_type1: - ldx #192 - lda #UPDATE_START - sta OUTH - lda #one_scanline - sta INH + ldx #192 ; 2 + lda #UPDATE_START ; 2 + sta OUTH ; 3 + ;=========== + ; 12 create_update_outer_loop: - ldy #0 + ldy #48 ; 2 + create_update_inner_loop: - lda (INL),Y - sta (OUTL),Y - iny - cpy #49 - bne create_update_inner_loop + lda one_scanline,Y ; 4+ + sta (OUTL),Y ; 6 + dey ; 2 + bpl create_update_inner_loop ; 3 + ;============ + ; 16 + ; -1 ; toggle PAGE0/PAGE1 - txa - and #$1 ; ror? - clc - adc #$54 - ldy #1 - sta (OUTL),Y + txa ; 2 + and #$1 ; ror? ; 2 + clc ; 2 + adc #$54 ; 2 + ldy #1 ; 2 + sta (OUTL),Y ; 6 - clc - lda #49 - adc OUTL - sta OUTL - lda OUTH - adc #0 - sta OUTH + clc ; 2 + lda #49 ; 2 + adc OUTL ; 3 + sta OUTL ; 3 + lda OUTH ; 3 + adc #0 ; 2 + sta OUTH ; 3 - dex - bne create_update_outer_loop + dex ; 2 + bne create_update_outer_loop ; 3 + ;=========== + ; 38 - ldy #0 - lda #$60 - sta (OUTL),Y + ; -1 + ldy #0 ; 2 + lda #$60 ; 2 + sta (OUTL),Y ; 6 - rts + rts ; 6 + ;============= + ; 15 BARS_START = 46 diff --git a/demosplash/demosplash.s b/demosplash/demosplash.s index ae19e0cc..50655d4d 100644 --- a/demosplash/demosplash.s +++ b/demosplash/demosplash.s @@ -50,7 +50,6 @@ zp_clear_loop: lda #1 sta LOOP - ;=========================== ; Enable graphics ;=========================== diff --git a/demosplash/missing.s b/demosplash/missing.s index d852a1f1..b62ccce0 100644 --- a/demosplash/missing.s +++ b/demosplash/missing.s @@ -6,6 +6,10 @@ missing_intro: + ; we come into this at the very end of vblank + ; we should be playing a frame of music every + ; 17030 - 1243 = 15787 cycles or so + ;=================== ; init vars @@ -15,7 +19,7 @@ missing_intro: ;============================= ; setup graphics code - jsr create_update_type1 + jsr create_update_type1 ; jsr play_frame_compressed