mirror of
https://github.com/a2-4am/4cade.git
synced 2025-01-11 07:30:02 +00:00
shave some bytes
This commit is contained in:
parent
6c4b3873d0
commit
e1ce947144
@ -9,7 +9,7 @@
|
||||
; D000..E611 - persistent data structures (per-game cheat categories,
|
||||
; gGlobalPrefsStore, gGamesListStore)
|
||||
; ...unused...
|
||||
; EC07..FFF9 - main program code
|
||||
; EC0C..FFF9 - main program code
|
||||
; FFFA..FFFF - NMI, reset, IRQ vectors
|
||||
;
|
||||
; LC RAM BANK 2
|
||||
|
@ -393,7 +393,8 @@ okvs_update
|
||||
; X = numeric index of record
|
||||
; A/Y = address of key or value (depends on which entry point you call)
|
||||
; all registers are clobbered
|
||||
; all flags clobbered
|
||||
; Z=1
|
||||
; all other flags clobbered
|
||||
; PARAM clobbered
|
||||
; PTR clobbered
|
||||
;------------------------------------------------------------------------------
|
||||
|
@ -7,6 +7,8 @@
|
||||
; - DHGRTitleSlideshow
|
||||
; - DHGRActionSlideshow
|
||||
; - DHGRSingle
|
||||
; - BlankHGR
|
||||
; - HGRMode
|
||||
;
|
||||
|
||||
DHGRTitleSlideshow
|
||||
@ -18,7 +20,8 @@ DHGRTitleSlideshow
|
||||
jsr okvs_iter ; cycle through all listed DHGR files
|
||||
!word gSlideshowStore
|
||||
!word DHGRTitleCallback ; address of callback (called on each file)
|
||||
jmp BlankHGR ; switch back to HGR mode with initial blank screen on exit
|
||||
beq BlankHGR ; switch back to HGR mode with initial blank screen on exit
|
||||
; (always branches)
|
||||
|
||||
DHGRActionSlideshow
|
||||
bit MachineStatus ; only run DHGR slideshow if we have 128K
|
||||
@ -28,7 +31,8 @@ DHGRActionSlideshow
|
||||
jsr okvs_iter ; cycle through all listed DHGR files
|
||||
!word gSlideshowStore
|
||||
!word DHGRActionCallback ; address of callback (called on each file)
|
||||
jmp BlankHGR ; switch back to HGR mode with initial blank screen on exit
|
||||
beq BlankHGR ; switch back to HGR mode with initial blank screen on exit
|
||||
; (always branches)
|
||||
|
||||
DHGRSingle
|
||||
bit MachineStatus ; only show DHGR screenshots if we have 128K
|
||||
@ -41,7 +45,33 @@ DHGRSingle
|
||||
jsr LoadDHGRTransition ; load transition effect code at $6000
|
||||
+LDADDR $6000
|
||||
jsr ExecuteTransitionAndWait
|
||||
jmp BlankHGR ; switch back to HGR mode with initial blank screen on exit
|
||||
; switch back to HGR mode with initial blank screen on exit
|
||||
; /!\ execution falls through here to BlankHGR
|
||||
;------------------------------------------------------------------------------
|
||||
; BlankHGR
|
||||
; clear and show HGR page 1 without flickering
|
||||
;
|
||||
; in: none
|
||||
; out: text page clobbered (but screen holes preserved)
|
||||
; $2000..$3FFF cleared
|
||||
;------------------------------------------------------------------------------
|
||||
BlankHGR
|
||||
jsr Home
|
||||
jsr ClearHGR1 ; clear hi-res screen 1
|
||||
bit PAGE1 ; show hi-res screen 1 (now blank)
|
||||
; /!\ execution falls through here to HGRMode
|
||||
;------------------------------------------------------------------------------
|
||||
; HGRMode
|
||||
; twiddles softswitches to set HGR mode (does not set page 1 or 2)
|
||||
;
|
||||
; in: none
|
||||
; out: all registers preserved
|
||||
;------------------------------------------------------------------------------
|
||||
HGRMode
|
||||
bit $C057
|
||||
bit $C052
|
||||
bit $C050
|
||||
rts
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; LoadDHGRTransition [private]
|
||||
|
@ -5,7 +5,6 @@
|
||||
;
|
||||
; Public functions
|
||||
; - Home
|
||||
; - BlankHGR
|
||||
; - BlankDHGR
|
||||
; - IsSearchKey
|
||||
; - IsUpDownOrRightArrow
|
||||
@ -67,32 +66,6 @@ BlankDHGR
|
||||
bit PAGE1
|
||||
jmp HGRMode
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; BlankHGR
|
||||
; clear and show HGR page 1 without flickering
|
||||
;
|
||||
; in: none
|
||||
; out: text page clobbered (but screen holes preserved)
|
||||
; $2000..$3FFF cleared
|
||||
;------------------------------------------------------------------------------
|
||||
BlankHGR
|
||||
jsr Home
|
||||
jsr ClearHGR1 ; clear hi-res screen 1
|
||||
bit PAGE1 ; show hi-res screen 1 (now blank)
|
||||
; /!\execution falls through here to HGRMode
|
||||
;------------------------------------------------------------------------------
|
||||
; HGRMode
|
||||
; twiddles softswitches to set HGR mode (does not set page 1 or 2)
|
||||
;
|
||||
; in: none
|
||||
; out: all registers preserved
|
||||
;------------------------------------------------------------------------------
|
||||
HGRMode
|
||||
bit $C057
|
||||
bit $C052
|
||||
bit $C050
|
||||
rts
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; IsSearchKey
|
||||
; test whether accumulator contains a key that might trigger a new textrank
|
||||
|
Loading…
x
Reference in New Issue
Block a user