add mega-attract filters and hotkey for SHR-only slideshow

This commit is contained in:
4am 2022-06-05 21:53:41 -04:00
parent 7a59ebb830
commit 21547db0f7
5 changed files with 57 additions and 1 deletions

View File

@ -123,6 +123,17 @@ ResetVector ; 6 bytes, copied to $100
; add new files above here
!source "src/hw.vbl.a"
!source "src/ui.wait.a"
gMegaAttractModeFilter ; module types to include in mega-attract mode
!byte %11111111
; |||||||+- bit 0 include self-running demos
; ||||||+-- bit 1 include HGR title slideshows
; |||||+--- bit 2 include HGR action slideshows
; ||||+---- bit 3 include DHGR title slideshows
; |||+----- bit 4 include DHGR action slideshows
; ||+------ bit 5 include SHR box art slideshows
; |+------- bit 6 include GR action slideshows
; +-------- bit 7 include DGR action slideshows
gSearchStore
!word $6000
gSlideshowStore

View File

@ -199,6 +199,16 @@ HAS_VIDHD = %00010000
SUPPORTS_SHR = %00110000
CHEATS_ENABLED = %00001000
; AND masks for gMegaAttractModeFilter
ATTRACT_DEMO = %00000001
ATTRACT_HGR_TITLE = %00000010
ATTRACT_HGR_ACTION = %00000100
ATTRACT_DHGR_TITLE = %00001000
ATTRACT_DHGR_ACTION = %00010000
ATTRACT_SHR = %00100000
ATTRACT_GR = %01000000
ATTRACT_DGR = %10000000
PRELAUNCH_STANDARD_SIZE = 61 ; LoadStandardPrelaunch, eventually to be determined at build-time
; shared symbols for prelaunch and effects to call ProRWTS2 functions

View File

@ -8,6 +8,16 @@
; - MiniAttractMode
; - RunAttractModule
kAttractModeFilters
!byte ATTRACT_DEMO
!byte ATTRACT_HGR_TITLE
!byte ATTRACT_HGR_ACTION
!byte ATTRACT_DHGR_TITLE
!byte ATTRACT_DHGR_ACTION
!byte ATTRACT_SHR
!byte ATTRACT_GR
!byte ATTRACT_DGR
;------------------------------------------------------------------------------
; MegaAttractMode
; main entry point for Mega Attract Mode, which endlessly cycles through
@ -47,6 +57,16 @@ MegaAttractMode
ldy #1
lda (PTR),y
tax ; X = module type
and #$F0
cmp #$30
bne +
txa
and #$0F
tay
lda gMegaAttractModeFilter ; do we want to display this module type
and kAttractModeFilters, y
beq MegaAttractMode
+
+LD16 @mname ; A/Y = address of module name
jsr RunAttractModule
lda KBD

View File

@ -8,6 +8,15 @@
; - SHRSingle
;
AllSHRSlideshow
clc
lda MachineStatus ; only show SHR on IIgs or if we have a VidHD card
and #SUPPORTS_SHR
beq SHRRTS
lda #ATTRACT_SHR
sta gMegaAttractModeFilter
jmp MegaAttractMode
;------------------------------------------------------------------------------
; SHRSlideshow
; execute a slideshow of super hi-res artwork

View File

@ -21,6 +21,7 @@ kInputCheat = 8
kInputError = 9
kInputJoystick = 10
kInputQuit = 11
kInputSHR = 12
InputDispatchTableLo
!byte <OnSearch
@ -35,6 +36,7 @@ InputDispatchTableLo
!byte <OnError
!byte <Joystick
!byte <OnQuit
!byte <AllSHRSlideshow
InputDispatchTableHi
!byte >OnSearch
!byte >OnClear
@ -48,8 +50,9 @@ InputDispatchTableHi
!byte >OnError
!byte >Joystick
!byte >OnQuit
!byte >AllSHRSlideshow
kNumInputKeys = 12
kNumInputKeys = 13
; number of entries in next 2 tables (each)
InputKeys
!byte $83 ; Ctrl-C = toggle cheat mode
@ -66,6 +69,7 @@ InputKeys
; or switch to mega attract mode
!byte $90 ; Ctrl-P = launch joystick calibration program
!byte $91 ; Ctrl-Q = quit
!byte $80 ; Ctrl-@ = SHR-only slideshow
InputKeyDispatch
!byte kInputCheat
!byte kInputCredits
@ -79,6 +83,7 @@ InputKeyDispatch
!byte kInputClear
!byte kInputJoystick
!byte kInputQuit
!byte kInputSHR
.noKeyMatch
jsr IsSearchKey
@ -112,6 +117,7 @@ SearchMode
txs
stx gGameToLaunch ; $FFFF = no game selected
stx gGameToLaunch+1
stx gMegaAttractModeFilter ; $FF = all module types
jsr ReloadSearchIndex
jsr Home ; clear screen (switches to text mode)
stx OffscreenPage ; don't show text page 2 by accident