fix animated titles

This commit is contained in:
4am 2024-06-10 12:30:14 -04:00
parent a67f80d3d3
commit c95ddcae8b
4 changed files with 20 additions and 5 deletions

View File

@ -61,6 +61,8 @@ Reenter
sta $bf00,x
dex
bpl -
lda #<PrelaunchInit ; reset prelaunch vector (animated titles change it)
sta iPrelaunchInit+1
ldx #5
- lda ResetVector,x ; copy reentry wrapper to bottom of stack
sta $100,x ; (used as reset vector because //e always
@ -159,6 +161,7 @@ gGlobalPrefsStore
; be set to $55 as part of the 64K memory test,
; which is apparently one of the acceptable values)
+DEFINE_INDIRECT_VECTOR iPrelaunchInit, PrelaunchInit
+DEFINE_INDIRECT_VECTOR iSetupPrecomputed3Bit, SetupPrecomputed3Bit
+DEFINE_INDIRECT_VECTOR iRippleCoordinates3Bit, RippleCoordinates3Bit
+DEFINE_INDIRECT_VECTOR iReverseCoordinates3Bit, ReverseCoordinates3Bit

View File

@ -135,7 +135,7 @@ WCOUNT = $0C ; word
HTAB = $24 ; byte
VTAB = $25 ; byte
RNDSEED = $4E ; word
PrelaunchInit= $EB
PrelaunchInit= $EA
; textrank
BestMatchIndex = $E5 ; word
tmpx = $E7 ; byte
@ -329,6 +329,7 @@ iRippleCoordinates2Bit = iReverseCoordinates2Bit-3
iReverseCoordinates3Bit = iRippleCoordinates2Bit-3
iRippleCoordinates3Bit = iReverseCoordinates3Bit-3
iSetupPrecomputed3Bit = iRippleCoordinates3Bit-3
iPrelaunchInit = iSetupPrecomputed3Bit-3
MockingboardStuff = $FFF8 ; bit 7 = 1 if SC-01 speech chip present (Speech I)
; bit 6 = 1 if SSI-263 speech chip present (Mockingboard "B"-"D")

View File

@ -48,7 +48,7 @@ LaunchInternal
sta CLR80VID
sta PRIMARYCHARSET
bit CLEARKBD
jmp PrelaunchInit
jmp iPrelaunchInit
PrelaunchInitInternal
!pseudopc PrelaunchInit {
@ -58,8 +58,9 @@ PrelaunchInitInternal
jsr ROM_NORMAL ; rely on zero page values set by these
jsr ROM_TEXT ; ROM routines, e.g. Wavy Navy prints text
jsr ROM_HOME ; via $FDED and expects it to work.
AnimationPrelaunchInit
sei
bvc $106 ; unconditional jump to game-specific pre-launch code
jmp $106
!if * != $100 {
!serious "adjust PrelaunchInit to ",PrelaunchInit+$100-*
}

View File

@ -41,8 +41,15 @@ MaybeAnimateTitle
; file -- this area part of a 'screen
; hole' and is not displayed on screen)
bne @exit ; if not, we're done here
iny
lda (DEST), y
sta @titleAnimJmp
iny
lda (DEST), y
sta @titleAnimJmp+1
txa
jsr CopyHGR
jsr HGRMode
; load the animation routine, which is stored in a subdirectory by filename
jsr GetGameToLaunch
@ -58,8 +65,10 @@ MaybeAnimateTitle
dex
bpl -
bit $c050 ; turn on graphics mode (Home set text mode)
lda #<AnimationPrelaunchInit
sta iPrelaunchInit+1 ; |Reenter| will restore this
jsr Launch ; execute the animation
jsr HGRMode
jsr ReloadSearchIndex
jsr ResyncPage ; we don't know which HGR page is showing
@ -72,4 +81,5 @@ MaybeAnimateTitle
@titleAnimPrelaunch ; this is executed from $106/main by |Launch|
bit $C082
jmp (DEST)
@titleAnimJmp=*+1
jmp $FDFD ; SMC