mirror of
https://github.com/a2-4am/4cade.git
synced 2025-08-09 16:25:02 +00:00
shave some bytes
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
;
|
;
|
||||||
; LC RAM BANK 1
|
; LC RAM BANK 1
|
||||||
; D000..E7D2 - persistent data structures (gGlobalPrefsStore, gGamesListStore)
|
; D000..E7D2 - persistent data structures (gGlobalPrefsStore, gGamesListStore)
|
||||||
; E9D5..FFEE - main program code
|
; E9ED..FFEE - main program code
|
||||||
; FFEF..FFF9 - API functions and global constants available for main program
|
; FFEF..FFF9 - API functions and global constants available for main program
|
||||||
; code, prelaunchers, transition effects, &c.
|
; code, prelaunchers, transition effects, &c.
|
||||||
; (LoadFileDirect, Wait/UnwaitForVBL, MockingboardStuff, MachineStatus)
|
; (LoadFileDirect, Wait/UnwaitForVBL, MockingboardStuff, MachineStatus)
|
||||||
|
@@ -41,28 +41,12 @@ SHRSlideshow
|
|||||||
; graphics mode reset to display hi-res screen, which is blank
|
; graphics mode reset to display hi-res screen, which is blank
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
SHRSingle
|
SHRSingle
|
||||||
+ST16 @sfname
|
+ST16 IndexedSHRFilename
|
||||||
lda MachineStatus ; only show SHR on IIgs or if we have a VidHD card
|
lda MachineStatus ; only show SHR on IIgs or if we have a VidHD card
|
||||||
and #SUPPORTS_SHR
|
and #SUPPORTS_SHR
|
||||||
beq SHRRTS
|
beq SHRRTS
|
||||||
jsr BlankSHR
|
jsr BlankSHR
|
||||||
|
jsr LoadIndexedSHRFile
|
||||||
jsr LoadFile ; load index file into $2000
|
|
||||||
!word kRootDirectory
|
|
||||||
!word kSHRArtworkIndexFile
|
|
||||||
- !word $2000
|
|
||||||
|
|
||||||
jsr okvs_find
|
|
||||||
!word -
|
|
||||||
@sfname !word $FDFD ; SMC
|
|
||||||
+ST16 @indexRecordPtr
|
|
||||||
|
|
||||||
jsr LoadIndexedFile ; load compressed SHR artwork at $1FF8/main (not aux)
|
|
||||||
!word kSHRArtworkDataFile
|
|
||||||
!word $1FF8
|
|
||||||
@indexRecordPtr
|
|
||||||
!word $FDFD ; SMC
|
|
||||||
|
|
||||||
jsr DecompressSHR
|
jsr DecompressSHR
|
||||||
jsr LoadSHRTransition
|
jsr LoadSHRTransition
|
||||||
jsr ExecuteTransitionAtA000AndWait
|
jsr ExecuteTransitionAtA000AndWait
|
||||||
@@ -100,7 +84,7 @@ SHRArtworkCallback
|
|||||||
bit KBD
|
bit KBD
|
||||||
bmi SHRRTS
|
bmi SHRRTS
|
||||||
|
|
||||||
+ST16 @sfname
|
+ST16 IndexedSHRFilename
|
||||||
|
|
||||||
jsr FindGame
|
jsr FindGame
|
||||||
; if game is not found (C will be set here), it means it can't be played on
|
; if game is not found (C will be set here), it means it can't be played on
|
||||||
@@ -112,7 +96,13 @@ SHRArtworkCallback
|
|||||||
+ST16 gGameToLaunch ; while it's visible (we'll launch it)
|
+ST16 gGameToLaunch ; while it's visible (we'll launch it)
|
||||||
|
|
||||||
jsr BlankSHR
|
jsr BlankSHR
|
||||||
|
jsr LoadIndexedSHRFile
|
||||||
|
jsr DecompressSHR
|
||||||
|
jmp ExecuteTransitionAtA000AndWait
|
||||||
|
|
||||||
|
LoadIndexedSHRFile
|
||||||
|
; in: caller has populated IndexedSHRFilename
|
||||||
|
; out: all flags & registers clobbered
|
||||||
jsr LoadFile ; load index file into $2000
|
jsr LoadFile ; load index file into $2000
|
||||||
!word kRootDirectory
|
!word kRootDirectory
|
||||||
!word kSHRArtworkIndexFile
|
!word kSHRArtworkIndexFile
|
||||||
@@ -120,7 +110,8 @@ SHRArtworkCallback
|
|||||||
|
|
||||||
jsr okvs_find
|
jsr okvs_find
|
||||||
!word -
|
!word -
|
||||||
@sfname !word $FDFD ; SMC
|
IndexedSHRFilename
|
||||||
|
!word $FDFD ; SMC
|
||||||
+ST16 @indexRecordPtr
|
+ST16 @indexRecordPtr
|
||||||
|
|
||||||
jsr LoadIndexedFile ; load compressed SHR artwork at $1FF8/main (not aux)
|
jsr LoadIndexedFile ; load compressed SHR artwork at $1FF8/main (not aux)
|
||||||
@@ -128,9 +119,7 @@ SHRArtworkCallback
|
|||||||
!word $1FF8
|
!word $1FF8
|
||||||
@indexRecordPtr
|
@indexRecordPtr
|
||||||
!word $FDFD ; SMC
|
!word $FDFD ; SMC
|
||||||
|
rts
|
||||||
jsr DecompressSHR
|
|
||||||
jmp ExecuteTransitionAtA000AndWait
|
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; BlankSHR [private]
|
; BlankSHR [private]
|
||||||
|
Reference in New Issue
Block a user