;License:MIT ;(c) 2018-9 by 4am ; ; functions for animated title screens ; ; - MaybeAnimateTitle ; ; /!\ execution falls through from ui.search.mode/FindMatchingTitle MaybeAnimateTitle jsr SwitchToBank2 jsr DisableAcceleratorAndSwitchToBank1 ; out: C clear lda #$3F ldy OffscreenPage bne + eor #$60 + sta SAVE+1 and #$60 sta @a+2 eor #$60 sta @b+2 lda #$FD sta SAVE ldy #0 lda (SAVE),y ; see if there is a hidden JMP to an cmp #$4C ; animation routine for this screen bne @exit ldx #$20 @a lda $FD00,y ; SMC @b sta $FD00,y ; SMC iny bne @a inc @a+2 inc @b+2 dex bne @a jsr GetGameToLaunch ; load the animation routine, which is ; stored in a subdirectory by filename +STAY + jsr LoadFile !word kAnimatedTitleDirectory + !word $FDFD !word 0 ldx #5 ; copy prelaunch code - lda @titleAnimPrelaunch,x sta $106,x dex bpl - jsr Launch jsr ResyncPage @exit clc ; tell caller not to refresh screen rts @titleAnimPrelaunch bit $C082 jmp (SAVE)