mirror of
https://github.com/a2-4am/4cade.git
synced 2025-02-17 07:31:19 +00:00
shave some bytes
This commit is contained in:
parent
fc34a70810
commit
ee89815f11
@ -9,7 +9,7 @@
|
||||
; D000..E611 - persistent data structures (per-game cheat categories,
|
||||
; gGlobalPrefsStore, gGamesListStore)
|
||||
; ...unused...
|
||||
; ECA6..FFF9 - main program code
|
||||
; ECBB..FFF9 - main program code
|
||||
; FFFA..FFFF - NMI, reset, IRQ vectors
|
||||
;
|
||||
; LC RAM BANK 2
|
||||
|
@ -85,7 +85,7 @@ PlayGame
|
||||
jsr GetGameToLaunch
|
||||
; A/Y = address of game filename
|
||||
+STAY SAVE
|
||||
+STAY @pfile ; assume we're loading a game-specific prelaunch file
|
||||
+STAY @pfile
|
||||
|
||||
jsr ClearScreens ; avoid seeing code load into the HGR page
|
||||
; (clobbers $106, must do now before loading prelaunch code)
|
||||
|
@ -42,8 +42,7 @@ DHGRSingle
|
||||
!word kRootDirectory
|
||||
+ !word $FDFD ; SMC
|
||||
jsr LoadDHGRTransition ; load transition effect code at $6000
|
||||
+LDADDR $6000
|
||||
jsr ExecuteTransitionAndWait
|
||||
jsr ExecuteTransitionAt6000AndWait
|
||||
; switch back to HGR mode with initial blank screen on exit
|
||||
; /!\ execution falls through here to BlankHGR
|
||||
;------------------------------------------------------------------------------
|
||||
@ -142,8 +141,7 @@ DHGRTitleCallback
|
||||
!word kDHGRTitleDirectory
|
||||
+ !word $FDFD
|
||||
|
||||
+LDADDR $6000
|
||||
jmp ExecuteTransitionAndWait
|
||||
jmp ExecuteTransitionAt6000AndWait
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; DHGRActionCallback [private]
|
||||
@ -175,5 +173,4 @@ DHGRActionCallback
|
||||
!word kDHGRActionDirectory
|
||||
+ !word $FDFD
|
||||
|
||||
+LDADDR $6000
|
||||
; /!\ execution falls through to ui.wait/ExecuteTransitionAndWait
|
||||
; /!\ execution falls through to ui.wait/ExecuteTransitionAt6000AndWait
|
||||
|
@ -24,8 +24,7 @@ GRSingle
|
||||
@fname !word $FDFD ; SMC
|
||||
!word $6000
|
||||
jsr .LoadGRTransition ; load transition effect code at $6400
|
||||
+LDADDR $6400
|
||||
jsr ExecuteTransitionAndWait
|
||||
jsr ExecuteTransitionAt6400AndWait
|
||||
jmp BlankHGR ; switch back to HGR mode with initial blank screen on exit
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
@ -97,5 +96,4 @@ GRRTS rts
|
||||
+ !word $FDFD ; SMC
|
||||
!word $6000
|
||||
|
||||
+LDADDR $6400
|
||||
jmp ExecuteTransitionAndWait
|
||||
jmp ExecuteTransitionAt6400AndWait
|
||||
|
@ -30,7 +30,7 @@ HGRSingle
|
||||
@fname !word $FDFD ; SMC
|
||||
!word $4000
|
||||
jsr LoadHGRTransition ; load transition effect code at $6000
|
||||
jmp .transition
|
||||
jmp ExecuteTransitionAt6000AndWait
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; LoadHGRTransition [private]
|
||||
@ -99,7 +99,7 @@ HGRTitleCallback
|
||||
+ !word $FDFD ; SMC
|
||||
!word $4000
|
||||
|
||||
jmp .transition
|
||||
jmp ExecuteTransitionAt6000AndWait
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; HGRActionCallback [private]
|
||||
@ -158,9 +158,7 @@ HGRActionCallback
|
||||
lda #3 ; solid vertical bar character
|
||||
jsr @drawline
|
||||
|
||||
.transition
|
||||
+LDADDR $6000
|
||||
jmp ExecuteTransitionAndWait
|
||||
jmp ExecuteTransitionAt6000AndWait
|
||||
@resetline
|
||||
ldy #40
|
||||
- sta gPathname,y
|
||||
|
@ -30,8 +30,7 @@ SHRSingle
|
||||
+ !word $FDFD ; SMC
|
||||
!word $2000
|
||||
jsr LoadSHRTransition
|
||||
+LDADDR $A000
|
||||
jsr ExecuteTransitionAndWait
|
||||
jsr ExecuteTransitionAtA000AndWait
|
||||
jmp BlankHGR
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
@ -81,8 +80,7 @@ SHRArtworkCallback
|
||||
@sfname !word $FDFD
|
||||
!word $2000
|
||||
|
||||
+LDADDR $A000
|
||||
jmp ExecuteTransitionAndWait
|
||||
jmp ExecuteTransitionAtA000AndWait
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; .BlankSHR [private]
|
||||
|
@ -226,7 +226,7 @@ DrawUI
|
||||
CheckCheats
|
||||
ldy #kCheatsEnabled
|
||||
ldx gGameToLaunch
|
||||
inx
|
||||
cpx #$FF
|
||||
beq +
|
||||
ldy gCheatsAvailable,x
|
||||
+
|
||||
|
@ -7,6 +7,15 @@
|
||||
; - WaitForKeyFor30Seconds
|
||||
; - CoverFade
|
||||
|
||||
ExecuteTransitionAt6000AndWait
|
||||
ldy #$60
|
||||
+HIDE_NEXT_2_BYTES
|
||||
ExecuteTransitionAt6400AndWait
|
||||
ldy #$64
|
||||
+HIDE_NEXT_2_BYTES
|
||||
ExecuteTransitionAtA000AndWait
|
||||
ldy #$A0
|
||||
|
||||
; /!\ execution falls through here from ui.attract.dhgr/DHGRActionCallback
|
||||
;------------------------------------------------------------------------------
|
||||
; ExecuteTransitionAndWait
|
||||
@ -17,6 +26,7 @@
|
||||
; out: all flags and registers clobbered
|
||||
;------------------------------------------------------------------------------
|
||||
ExecuteTransitionAndWait
|
||||
lda #0
|
||||
+STAY @j+1
|
||||
@j jsr $FDFD ; SMC call transition effect code
|
||||
ldx #$20 ; picture is showing so now we wait
|
||||
|
Loading…
x
Reference in New Issue
Block a user