add action slideshows

This commit is contained in:
4am 2018-12-29 13:29:17 -05:00
parent 064c0f284c
commit f86cf267ba
8 changed files with 247 additions and 86 deletions

View File

@ -1 +1 @@
# # Mega-Attract-Mode configuration file # # Mega-Attract-Mode is split into modules. Each module can be a # short slideshow or a self-running demo (like a game's built-in # 'attract mode'). Modules are run in the order listed here, one # after the next, until interrupted by user input. The last-run # module is tracked in the global prefs file. # # Format: # key=value # # |key| must be unique within this file # # |value| must be one of # 1 for HGR slideshow (|key| is a file containing a list of HGR graphics) # 2 for DHGR slideshow (|key| is a file containing a list of DHGR graphics) # 3 for self-running demo (|key| is an executable binary file) # # Blank lines and lines beginning with '#' are ignored (like this one!) # A line beginning with '[' terminates the parsing # #SPIDER.RAID=3 FAVORITES.CONF=1 DHGR.CONF=2 EFG.CONF=1 ACTIVISION.CONF=1 CD.CONF=1 BRODERBUND.CONF=1 T.CONF=1 ATARI.CONF=1 SIERRA.CONF=1 PQR.CONF=1 DATAMOST.CONF=1 MNO.CONF=1 DATASOFT.CONF=1 S.CONF=1 MICROFUN.CONF=1 AB.CONF=1 PICCADILLY.CONF=1 HIJKL.CONF=1 SIRIUS.CONF=1 EA.CONF=1 SYNERGIST.CONF=1 SEGA.CONF=1 SYNAPSE.CONF=1 EPYX.CONF=1 PENGUIN.CONF=1 BALLY.CONF=1 DATAEAST.CONF=1 MATTEL.CONF=1 SUBLOGIC.CONF=1 TAITO.CONF=1 IDSI.CONF=1 OTHER.CONF=1 # 1 for HGR slideshow (|key| is a file containing a list of HGR graphics) STELLAR.7=3 # # 3 for self-running demo (|key| is an executable binary file) # # # # Blank lines and lines beginning with '#' are ignored (like this one!) # # A line beginning with '[' terminates the parsing # # #SPIDER.RAID=3 # FAVORITES.CONF=1 # Blank lines and lines beginning with '#' are ignored (like this one!) # Blank lines and lines beginning with '#' are ignored (like this one!) 1 for HGR slideshow (|key| is a file containing a list of HGR graphics) # Blank lines and lines beginning with '#' are ignored (like this one!) # 2 for DHGR slideshow (|key| is a file containing a list of DHGR graphics) # Blank lines and lines beginning with '#' are ignored (like this one!) # 3 for self-running demo (|key| is an executable binary file) # Blank lines and lines beginning with '#' are ignored (like this one!) # # Blank lines and lines beginning with '#' are ignored (like this one!) # Blank lines and lines beginning with '#' are ignored (like this one!) # Blank lines and lines beginning with '#' are ignored (like this one!) # A line beginning with '[' terminates the parsing # Blank lines and lines beginning with '#' are ignored (like this one!) # Blank lines and lines beginning with '#' are ignored (like this one!) #SPIDER.RAID=3 # Blank lines and lines beginning with '#' are ignored (like this one!) FAVORITES.CONF=1 # A line beginning with '[' terminates the parsing # A line beginning with '[' terminates the parsing 1 for HGR slideshow (|key| is a file containing a list of HGR graphics) # A line beginning with '[' terminates the parsing # 2 for DHGR slideshow (|key| is a file containing a list of DHGR graphics) # A line beginning with '[' terminates the parsing # 3 for self-running demo (|key| is an executable binary file) # A line beginning with '[' terminates the parsing # # A line beginning with '[' terminates the parsing # Blank lines and lines beginning with '#' are ignored (like this one!) # A line beginning with '[' terminates the parsing # A line beginning with '[' terminates the parsing # A line beginning with '[' terminates the parsing # A line beginning with '[' terminates the parsing #SPIDER.RAID=3 # A line beginning with '[' terminates the parsing FAVORITES.CONF=1 1 for HGR slideshow (|key| is a file containing a list of HGR graphics) # 2 for DHGR slideshow (|key| is a file containing a list of DHGR graphics) # 3 for self-running demo (|key| is an executable binary file) # # Blank lines and lines beginning with '#' are ignored (like this one!) # A line beginning with '[' terminates the parsing #SPIDER.RAID=3 FAVORITES.CONF=1 #SPIDER.RAID=3 #SPIDER.RAID=3 1 for HGR slideshow (|key| is a file containing a list of HGR graphics) #SPIDER.RAID=3 # 2 for DHGR slideshow (|key| is a file containing a list of DHGR graphics) #SPIDER.RAID=3 # 3 for self-running demo (|key| is an executable binary file) #SPIDER.RAID=3 # #SPIDER.RAID=3 # Blank lines and lines beginning with '#' are ignored (like this one!) #SPIDER.RAID=3 # A line beginning with '[' terminates the parsing #SPIDER.RAID=3 #SPIDER.RAID=3 #SPIDER.RAID=3 #SPIDER.RAID=3 FAVORITES.CONF=1 FAVORITES.CONF=1 FAVORITES.CONF=1 1 for HGR slideshow (|key| is a file containing a list of HGR graphics) FAVORITES.CONF=1 # 2 for DHGR slideshow (|key| is a file containing a list of DHGR graphics) FAVORITES.CONF=1 # 3 for self-running demo (|key| is an executable binary file) FAVORITES.CONF=1 # FAVORITES.CONF=1 # Blank lines and lines beginning with '#' are ignored (like this one!) [eof]
# # Mega-Attract-Mode configuration file # # Mega-Attract-Mode is split into modules. Each module can be a # short slideshow or a self-running demo (like a game's built-in # 'attract mode'). Modules are run in the order listed here, one # after the next, until interrupted by user input. The last-run # module is tracked in the global prefs file. # # Format: # key=value # # |key| must be unique within this file # # |value| must be one of # 0 for self-running demo (|key| is an executable binary file in /demo/) # 1 for title slideshow (|key| is a file containing a list of HGR graphics in /hgr/) # 2 for action slideshow (|key| is a file containing a list of HGR graphics in /action/) # 3 for DHGR title slideshow (|key| is a file containing a list of DHGR graphics in /dhgr/) # # Blank lines and lines beginning with '#' are ignored (like this one!) # A line beginning with '[' terminates the parsing # ACTIONA.CONF=2 #SPIDER.RAID=0 FAVORITES.CONF=1 DHGR.CONF=2 # 2 for DHGR slideshow (|key| is a file containing a list of DHGR graphics) EFG.CONF=1 ACTIVISION.CONF=1 CD.CONF=1 BRODERBUND.CONF=1 T.CONF=1 ATARI.CONF=1 SIERRA.CONF=1 PQR.CONF=1 DATAMOST.CONF=1 MNO.CONF=1 DATASOFT.CONF=1 S.CONF=1 MICROFUN.CONF=1 AB.CONF=1 PICCADILLY.CONF=1 HIJKL.CONF=1 SIRIUS.CONF=1 EA.CONF=1 SYNERGIST.CONF=1 SEGA.CONF=1 SYNAPSE.CONF=1 EPYX.CONF=1 PENGUIN.CONF=1 BALLY.CONF=1 DATAEAST.CONF=1 MATTEL.CONF=1 SUBLOGIC.CONF=1 TAITO.CONF=1 IDSI.CONF=1 OTHER.CONF=1 1 for HGR slideshow (|key| is a file containing a list of HGR graphics) # 3 for self-running demo (|key| is an executable binary file) DHGR.CONF=2 # DHGR.CONF=2 # Blank lines and lines beginning with '#' are ignored (like this one!) DHGR.CONF=2 # A line beginning with '[' terminates the parsing DHGR.CONF=2 DHGR.CONF=2 #SPIDER.RAID=3 DHGR.CONF=2 FAVORITES.CONF=1 EFG.CONF=1 EFG.CONF=1 1 for HGR slideshow (|key| is a file containing a list of HGR graphics) EFG.CONF=1 # 2 for DHGR slideshow (|key| is a file containing a list of DHGR graphics) EFG.CONF=1 # 3 for self-running demo (|key| is an executable binary file) EFG.CONF=1 # EFG.CONF=1 # Blank lines and lines beginning with '#' are ignored (like this one!) EFG.CONF=1 # A line beginning with '[' terminates the parsing EFG.CONF=1 EFG.CONF=1 #SPIDER.RAID=3 EFG.CONF=1 FAVORITES.CONF=1 ACTIVISION.CONF=1 ACTIVISION.CONF=1 1 for HGR slideshow (|key| is a file containing a list of HGR graphics) ACTIVISION.CONF=1 # 2 for DHGR slideshow (|key| is a file containing a list of DHGR graphics) ACTIVISION.CONF=1 # 3 for self-running demo (|key| is an executable binary file) ACTIVISION.CONF=1 # ACTIVISION.CONF=1 # Blank lines and lines beginning with '#' are ignored (like this one!) ACTIVISION.CONF=1 # A line beginning with '[' terminates the parsing ACTIVISION.CONF=1 ACTIVISION.CONF=1 #SPIDER.RAID=3 ACTIVISION.CONF=1 FAVORITES.CONF=1 CD.CONF=1 CD.CONF=1 1 for HGR slideshow (|key| is a file containing a list of HGR graphics) CD.CONF=1 # 2 for DHGR slideshow (|key| is a file containing a list of DHGR graphics) CD.CONF=1 # 3 for self-running demo (|key| is an executable binary file) CD.CONF=1 # CD.CONF=1 # Blank lines and lines beginning with '#' are ignored (like this one!) CD.CONF=1 # A line beginning with '[' terminates the parsing CD.CONF=1 CD.CONF=1 #SPIDER.RAID=3 CD.CONF=1 FAVORITES.CONF=1 BRODERBUND.CONF=1 BRODERBUND.CONF=1 1 for HGR slideshow (|key| is a file containing a list of HGR graphics) BRODERBUND.CONF=1 # 2 for DHGR slideshow (|key| is a file containing a list of DHGR graphics) BRODERBUND.CONF=1 # 3 for self-running demo (|key| is an executable binary file) BRODERBUND.CONF=1 # BRODERBUND.CONF=1 # Blank lines and lines beginning with '#' are ignored (like this one!) BRODERBUND.CONF=1 # A line beginning with '[' terminates the parsing BRODERBUND.CONF=1 BRODERBUND.CONF=1 #SPIDER.RAID=3 BRODERBUND.CONF=1 FAVORITES.CONF=1 T.CONF=1 T.CONF=1 1 for HGR slideshow (|key| is a file containing a list of HGR graphics) T.CONF=1 # 2 for DHGR slideshow (|key| is a file containing a list of DHGR graphics) T.CONF=1 # 3 for self-running demo (|key| is an executable binary file) T.CONF=1 # 1 for HGR slideshow (|key| is a file containing a list of HGR graphics) # Blank lines and lines beginning with '#' are ignored (like this one!) # Blank lines and lines beginning with '#' are ignored (like this one!) SNEAKERS=0 WAVY.NAVY=0 [eof]

View File

@ -1 +1 @@
# # transition effects for HGR slideshows # # Each Mega-Attract Module that is an HGR slideshow (see attract.conf) # will use a single transition effect for the length of the module. # Transition effects are loaded in the order listed in this file. Each line # of this file is a filename (not including comments, like this one). The # name of the next transition effect is stored in the global prefs, so this # file should not contain duplicates. # # Transition effects are binary files loaded at $6000 and called with # hi-res page 1 showing and the next HGR graphic already loaded at $4000. # A transition effect has full use of main memory, including zero page and # text page if needed. LC RAM banks 1 and 2 are reserved for the launcher. # # Important: LC RAM bank 1 will be read/write on entry and must be read/write # on exit. If you need ROM routines, you are responsible for switching to ROM # then switching back to RAM bank 1 (read/write) before returning. # STAR RADIAL RIPPLE2 CORNER.CIRCLE SUNRISE SUNSET RADIAL2 RADIAL3 RADIAL4 RADIAL5 FOURSPIRAL RIPPLE IRIS SPLIT.UD.INTRO DIAGONAL CHECKERBOARD HALF.FIZZLE BAR.DISSOLVE STAGGERWHITE.LR DIAMOND ONESQUARE TWOPASS.LR CRYSTAL HALF.MOSAIC STAGGER.LR FOURSQUARE STAGGER.UD INTERLOCK.LR BLOCK.MOSAIC FIZZLE STAGGERWHITE.UD INTERLOCK.UD BLOCK.FIZZLE SPIRAL [eof]
# # transition effects for HGR slideshows # # Each Mega-Attract Module that is an HGR slideshow (see attract.conf) # will use a single transition effect for the length of the module. # Transition effects are loaded in the order listed in this file. Each line # of this file is a filename (not including comments, like this one). The # name of the next transition effect is stored in the global prefs, so this # file should not contain duplicates. # # Transition effects are binary files loaded at $6000 and called with # hi-res page 1 showing and the next HGR graphic already loaded at $4000. # A transition effect has full use of main memory, including zero page and # text page if needed. LC RAM banks 1 and 2 are reserved for the launcher. # # Important: LC RAM bank 1 will be read/write on entry and must be read/write # on exit. If you need ROM routines, you are responsible for switching to ROM # then switching back to RAM bank 1 (read/write) before returning. # CRYSTAL STAR RADIAL RIPPLE2 CORNER.CIRCLE SUNRISE SUNSET RADIAL2 RADIAL3 RADIAL4 RADIAL5 FOURSPIRAL RIPPLE IRIS SPLIT.UD.INTRO DIAGONAL CHECKERBOARD HALF.FIZZLE BAR.DISSOLVE STAGGERWHITE.LR DIAMOND ONESQUARE TWOPASS.LR HALF.MOSAIC STAGGER.LR FOURSQUARE STAGGER.UD INTERLOCK.LR BLOCK.MOSAIC FIZZLE STAGGERWHITE.UD INTERLOCK.UD BLOCK.FIZZLE SPIRAL [eof]

1
res/ss/ACTIONA.CONF Normal file
View File

@ -0,0 +1 @@
# # action shots slideshow of games that begin with "A","B" # AGENT.USA ALCAZAR ALIEN.AMBUSH ALIEN.DOWNPOUR ALIEN.MUNCHIES ALIEN.RAIN ANKH APPLE.PANIC AQUATRON ARGOS ARKANOID BATTLEZONE BCS.QUEST BEER.RUN BELLHOP BERZAP BLISTER.BALL BOLO BOUNCING.KMNGA2=BOUNCING.KMNGAS BOUNCING.KMNGAS BRAINTEASERBLVD BRUCE.LEE BUBBLE.BOBBLE BUDGETRILOGY BURGERTIME BUZZARD.BAIT CANNONBALL.BLTZ CANYON.CLIMBER CEILING.ZERO CENTIPEDE CHAMP.LODERUN CHOPLIFTER CIDER.SPIDER COMMANDO CONAN CRAZY.MAZY CRIME.WAVE CRISIS.MOUNTAIN CROSSFIRE CYBERSTRIKE DAVIDS.MAGIC DEFENDER DIG.DUG DINO.EGGS DONKEY.KONG DONKEY.KONG2=DONKEY.KONG DROL DROL2=DROL DROL3=DROL DUNG.BEETLES DUNG.BEETLES2=DUNG.BEETLES DUNG.BEETLES3=DUNG.BEETLES EPOCH FALCONS FALCONS.SCORE=FALCONS FIREBIRD FIREBIRD2=FIREBIRD FLIP.OUT FORMULA.1 FROGGER FROGGER2=FROGGER GALAXIAN GALAXIAN2=GALAXIAN GAMMA.GOBLINS GAMMA.GOBLINS2=GAMMA.GOBLINS GAMMA.GOBLINS3=GAMMA.GOBLINS GAMMA.GOBLINS4=GAMMA.GOBLINS GAMMA.GOBLINS5=GAMMA.GOBLINS GOONIES GOONIES2=GOONIES GOONIES3=GOONIES GOONIES4=GOONIES GOONIES5=GOONIES GOONIES6=GOONIES GORGON GREMLINS GUMBALL GUMBALL2=GUMBALL HARD.HAT.MACK HARD.HAT.MACK2=HARD.HAT.MACK HARD.HAT.MACK3=HARD.HAT.MACK HEAD.ON HERO HIGH.RISE IMPOSSIBLE.MISS INTL.GRAN.PRIX JOUST JOUST2=JOUST JUGGLER JUGGLER2=JUGGLER JUMPMAN JUNGLE.HUNT JUNGLE.HUNT2=JUNGLE.HUNT KARATEKA LADY.TUT LODE.RUNNER LODE.RUNNER2=LODE.RUNNER LODE.RUNNER3=LODE.RUNNER LOST.TOMB LOST.TOMB2=LOST.TOMB MARIO.BROS MARIO.BROS2=MARIO.BROS MARIO.BROS3=MARIO.BROS MINER.2049ER MINER.2049ER2=MINER.2049ER MONTEZUMA MOON.PATROL MR.DO MR.DO2=MR.DO MR.ROBOT MS.PACMAN NIBBLER NIGHT.STALKER NIGHTMARE ORBITRON ORILEYS.MINE OUTPOST PAC.MAN PAC.MAN2 PAPERBOY PEST.PATROL PEST.PATROL2=PEST.PATROL PHANTOMS.FIVE PIEMAN PITFALL.II PITFALL.II2=PITFALL.II PITSTOP.II PLASMANIA POOYAN PRINCEUNP PRINCEUNP2=PRINCEUNP RASTER.BLASTER RED.ALERT REPTON RESCUE.RAIDERS RESCUE.RAIDERS2=RESCUE.RAIDERS RESCUE.RAIDERS3=RESCUE.RAIDERS RIBBIT ROBOTRON.2084 SABOTAGE SAMMY.LIGHTFOOT SERPENTINE SHAMUS SHAMUS2 SNACK.ATTACK SNAKE.BYTE SNEAKERS SNEAKERS2=SNEAKERS SNEAKERS3=SNEAKERS SNEAKERS4=SNEAKERS SNEAKERS5=SNEAKERS SNOGGLE SPACE.EGGS SPACE.QUARKS SPACE.RAIDERS SPARE.CHANGE SPDWAY.CLASSIC SPDWAY.CLASSIC2=SPDWAY.CLASSIC SPIDER.RAID SPY.HUNTER SPY.HUNTER2=SPY.HUNTER SPYS.DEMISE STARBLASTER STARGATE STARGATE2=STARGATE STELLAR.7 SUCCESSION SUICIDE SWASHBUCKLER TAG.TEAM TAPPER TETRIS TETRIS2=TETRIS TETRIS3=TETRIS TETRIS4=TETRIS TETRIS5=TETRIS TETRIS6=TETRIS THEXDER THEXDER2=THEXDER THIEF THRESHOLD THUNDERBOMBS TOMAHAWK TRACK.AND.FIELD TUBEWAY TWERPS TWERPS2=TWERPS UP.N.DOWN VINDICATOR VINDICATOR2=VINDICATOR WARP.DESTROYER WAVY.NAVY WAVY.NAVY2=WAVY.NAVY WAVY.NAVY3=WAVY.NAVY WAVY.NAVY4=WAVY.NAVY WAVY.NAVY5=WAVY.NAVY [eof]

View File

@ -31,3 +31,4 @@ MATTEL.CONF=Type(04),AuxType(4000),Access(C3)
SUBLOGIC.CONF=Type(04),AuxType(4000),Access(C3)
TAITO.CONF=Type(04),AuxType(4000),Access(C3)
IDSI.CONF=Type(04),AuxType(4000),Access(C3)
ACTIONA.CONF=Type(04),AuxType(4000),Access(C3)

View File

@ -14,11 +14,15 @@ kPathSeparator
!byte 1
!raw "/"
kHGRScreenshotDirectory
kHGRTitleDirectory
!byte 3
!raw "HGR"
kDHGRScreenshotDirectory
kHGRActionDirectory
!byte 6
!raw "ACTION"
kDHGRTitleDirectory
!byte 4
!raw "DHGR"

View File

@ -11,12 +11,25 @@
; - gFXIndex ; [byte] numeric index of HGR transition effect
; - gDFXIndex ; [byte] numeric index of DHGR transition effect
;------------------------------------------------------------------------------
; AttractMode
; main entry point for Mega Attract Mode, which cycles through modules listed
; in ATTRACT.CONF to provide pretty visual effects and snippets of self-running
; self-terminating game demos
;
; in: gGlobalPrefsStore must be initialized
; out: exits to caller (note that some attract mode modules never return but
; instead call |Reenter|, in which case this routine technically never
; returns)
; if this routine returns, everything is clobbered (zero page, main
; memory, unused portions of the stack page, all registers, all flags)
;------------------------------------------------------------------------------
AttractMode
jsr LoadFile ; load attract-mode configuration into $8000
jsr LoadFile ; load attract-mode configuration file at $8000
!word kAttractModeConfFile
jsr ParseKeyValueList ; parse attract-mode configuration into $6000
jsr ParseKeyValueList ; parse attract-mode configuration into OKVS data structure at $6000
!word gAttractModeStore
!word ldrlo2 ; (ldrlo2) points to last load address
!word ldrlo2 ; (ldrlo2) points to last load address, so $8000
!byte 0
jsr okvs_get ; get next attract-mode module from prefs
@ -63,7 +76,7 @@ gAttractIndex
jsr okvs_get
!word gAttractModeStore
@key !word $FDFD
@key !word $FDFD ; SMC
+STAY PTR
jsr @RunNextAttractModule
@ -75,17 +88,16 @@ gAttractIndex
ldy #1
lda (PTR),y
and #$0F
cmp #$03
bne @Slideshow
; Self-running demos are loaded into main memory and executed.
; Each binary has been patched to quit on any key and jump back
; to the |Reenter| entry point.
; All demos are strictly 48K / main memory. No demo uses the
; language card or auxiliary memory.
; Self-running demos are loaded into main memory and executed.
; Each binary has been patched to quit on any key and jump back
; to the |Reenter| entry point.
; All demos are strictly 48K / main memory. No demo uses the
; language card or auxiliary memory.
jsr Home ; clear text screen and switch to it during loading
; to avoid seeing executable code load into the HGR page
+LOAD_PATH kDemoDirectory
ldy gPathname
iny
@ -109,14 +121,14 @@ gAttractIndex
dex
bpl -
ldx #(end_promote-promote-1)
- lda promote,x ; copy tiny ProDOS to main memory
- lda promote,x ; copy ProDOS shim to main memory
sta $bf00,x
dex
bpl -
jmp $106 ; jump to pre-launch code
@Slideshow ; HGR or DHGR slideshow
pha ; save module type (1=HGR, 2=DHGR)
pha ; save module type (1=HGR title, 2=HGR action, 3=DHGR title)
+LOAD_FILE kAttractModeSlideshowDirectory, @key
@ -127,36 +139,54 @@ gAttractIndex
pla ; restore module type
cmp #$01
beq @HGRSlideshow
beq @HGRTitleSlideshow
cmp #$02
beq @HGRActionSlideshow
@DHGRSlideshow
@DHGRTitleSlideshow
bit MachineStatus ; only run DHGR slideshow if we have 128K
bvc @exit
jsr LoadDHGRTransition ; load transition effect code at $6000
jsr BlankDHGR ; switch to DHGR mode with initial blank screen
jsr okvs_iter ; cycle through all listed DHGR files
!word gSlideshowStore
!word DHGRLoad ; address of callback (called on each file)
jmp BlankHGR ; switch back to HGR mode with initial blank screen
!word DHGRTitleCallback ; address of callback (called on each file)
jmp BlankHGR ; switch back to HGR mode with initial blank screen on exit
@HGRSlideshow
jsr LoadTransition ; load transition effect code at $6000
@HGRTitleSlideshow
jsr LoadHGRTransition ; load transition effect code at $6000
jsr okvs_iter ; cycle through all listed HGR files
!word gSlideshowStore
!word HGRLoad ; address of callback (called on each file)
@exit rts
!word HGRTitleCallback ; address of callback (called on each file)
@exit rts ; exit with last picture still visible
@HGRActionSlideshow
jsr LoadHGRTransition ; load transition effect code at $6000
jsr okvs_iter ; cycle through all listed HGR files
!word gSlideshowStore
!word HGRActionCallback ; address of callback (called on each file)
rts ; exit with last picture still visible
kAttractModeConfFile
!byte @kAttractModeConfFile_e-@kAttractModeConfFile_b
@kAttractModeConfFile_b
!byte @kAttractModeConfFile_e-*-1
!text "ATTRACT.CONF"
@kAttractModeConfFile_e
;------------------------------------------------------------------------------
; internal functions
HGRLoad
; in: A/Y contains address of filename
;------------------------------------------------------------------------------
; HGRTitleCallback
; callback called by okvs_iter on gSlideshowStore
; to load and display a single HGR title screenshot
; in: A/Y contains address of filename (name only, path is always /HGR/)
; X contains 0-based index of the current record in gSlideshowStore
; out: all registers and flags clobbered
; $0800..$1EFF preserved (this contains the gSlideshowStore OKVS data)
; $2000..$BFFF clobbered by graphics data and transition code
;------------------------------------------------------------------------------
HGRTitleCallback
ldx $C000
bpl +
rts
@ -164,15 +194,107 @@ HGRLoad
+STAY PTR
; load HGR screenshot at $4000
+LOAD_FILE kHGRScreenshotDirectory, PTR
+LOAD_FILE kHGRTitleDirectory, PTR
; jsr LoadTransition ; uncomment this line to load a new transition on every picture
jsr $6000 ; call transition effect code to display picture
jmp WaitOnScreenshot
jmp ExecuteTransition ; call transition effect code to display picture
DHGRLoad
; in: A/Y contains address of filename
;------------------------------------------------------------------------------
; HGRActionCallback
; callback called by okvs_iter on gSlideshowStore
; to load and display a single HGR action screenshot
; in: A/Y contains address of filename (name only, path is always /ACTION/)
; X contains 0-based index of the current record in gSlideshowStore
; gGamesListStore must be initialized
; out: all registers and flags clobbered
; $0800..$1EFF preserved (this contains the gSlideshowStore OKVS data)
; $2000..$BFFF clobbered by graphics data and transition code
;------------------------------------------------------------------------------
HGRActionCallback
ldx $C000
bpl +
rts
+
+STAY PTR
+STAY @key
+STAY @key2
; load HGR screenshot at $4000
+LOAD_FILE kHGRActionDirectory, PTR
; try to get the human-readable name of this game from gGamesListStore
; and display it in the bottom-left corner
jsr okvs_get
!word gGamesListStore
@key !word $FDFD ; SMC
bcc @foundname
; if the key is not found, try getting the value of the current record
; from gSlideshowStore and using that instead
; (some games have multiple action screenshots)
jsr okvs_get
!word gSlideshowStore
@key2 !word $FDFD ; SMC
bcs @noname ; should never happen
+STAY @key3
jsr okvs_get
!word gGamesListStore
@key3 !word $FDFD ; SMC
bcs @noname ; should never happen
@foundname
+STAY PTR
ldx #0
stx HTAB
ldx #22
stx VTAB
ldy #0
lda (PTR),y
tax
+LDADDR @topline
sec
jsr DrawBuffer
ldx #3
+LDADDR @toprightcorner
sec
jsr DrawBuffer
inc VTAB
ldx #0
stx HTAB
inx
+LDADDR @rightline
sec
jsr DrawBuffer
+LDAY PTR
sec
jsr DrawString
ldx #2
+LDADDR @rightline
sec
jsr DrawBuffer
@noname
jmp ExecuteTransition
@topline
!byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
!byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
@toprightcorner
!byte 0,0,7
@rightline
!text " "
!byte 3
;------------------------------------------------------------------------------
; DHGRTitleCallback
; callback called by okvs_iter on gSlideshowStore
; to load and display a single DHGR title screenshot
; in: A/Y contains address of filename (name only, path is always /DHGR/)
; X contains 0-based index of the current record in gSlideshowStore
; gGamesListStore must be initialized
; out: all registers and flags clobbered
; $0800..$1EFF preserved (this contains the gSlideshowStore OKVS data)
; $2000..$BFFF clobbered by graphics data and transition code
; $2000..$5FFF/aux clobbered
;------------------------------------------------------------------------------
DHGRTitleCallback
ldx $C000
bpl +
rts
@ -180,7 +302,7 @@ DHGRLoad
; load DHGR screenshot at $4000/main and $4000/aux
+STAY PTR
jsr ResetPath
+LDADDR kDHGRScreenshotDirectory
+LDADDR kDHGRTitleDirectory
jsr AddToPath
+LDADDR kPathSeparator
jsr AddToPath
@ -188,12 +310,12 @@ DHGRLoad
jsr AddToPath
jsr LoadDHRFile
!word gPathname
; execution falls through here
ExecuteTransition
jsr $6000 ; call transition effect code to display picture
; note: execution falls through here
WaitOnScreenshot
ldx #$20
ldx #$20 ; picture is already showing so just wait
- lda #0
jsr WaitForKeyWithTimeout
bmi +
@ -201,7 +323,17 @@ WaitOnScreenshot
bpl -
+ rts
LoadTransition
;------------------------------------------------------------------------------
; LoadHGRTransition
; looks up name of next HGR transition effect in FX.CONF and loads that file
; at $6000
; in: gFXStore has been initialized
; gGlobalPrefsStore has been initialized
; out: all registers and flags clobbered
; $6000..$BFFF contains transition effect code
;------------------------------------------------------------------------------
LoadHGRTransition
jsr LoadFile ; load HGR transition effects list into $8000
!word kFXConfFile
jsr ParseKeyValueList ; parse HGR transition effects list into $6000
@ -259,6 +391,16 @@ kFXConfFile
!text "FX.CONF"
@kFXConfFile_e
;------------------------------------------------------------------------------
; LoadDHGRTransition
; looks up name of next DHGR transition effect in DFX.CONF and loads that file
; at $6000
; in: gDFXStore has been initialized
; gGlobalPrefsStore has been initialized
; out: all registers and flags clobbered
; $6000..$BFFF/main contains transition effect code
;------------------------------------------------------------------------------
LoadDHGRTransition
jsr LoadFile ; load DHGR transition effects list into $8000
!word kDFXConfFile
@ -317,6 +459,14 @@ kDFXConfFile
!text "DFX.CONF"
@kDFXConfFile_e
;------------------------------------------------------------------------------
; 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
@ -325,6 +475,15 @@ BlankHGR
lda $c052
lda $c050
rts
;------------------------------------------------------------------------------
; BlankDHGR
; clear and show DHGR page 1 without flickering
;
; in: none
; out: text page clobbered (but screen holes preserved)
; $2000..$3FFF/main and /aux cleared
;------------------------------------------------------------------------------
BlankDHGR
jsr Home
jsr ClearHGR1 ; clear hi-res screen 1
@ -338,8 +497,20 @@ BlankDHGR
sta $c050
sta $c05e
rts
;------------------------------------------------------------------------------
; ClearHGR1
; clear $2000..$3FFF in current memory bank (main or auxmem)
;
; in: none
; out: $2000..$3FFF cleared
; A = 0
; X = 0
; Y = 0
; Z = 1
;------------------------------------------------------------------------------
ClearHGR1
ldx #$20 ; clear hi-res screen 1
ldx #$20
stx @a+2
lda #0
tay
@ -350,6 +521,14 @@ ClearHGR1
dex
bne @a
rts
;------------------------------------------------------------------------------
; Home
; clear and display text screen
;
; in: none
; out: $0100..$011F clobbered
;------------------------------------------------------------------------------
Home
ldx #(@end-@start-1)
- lda @start,x
@ -368,13 +547,28 @@ Home
rts
@end
;------------------------------------------------------------------------------
; Prelaunch
; code to set up machine for running a self-running, self-terminating game demo
; DO NOT CALL DIRECTLY
; must be run from main memory
; contains multiple entry points
;
; in: none
; out: exits via JMP (ldrlo2), which is expected to exit via JMP |Prelaunch|
; (not here, but wherever it was copied to in main memory) or by
; manually enabling LC RAM bank 1 then JMP |Reenter|
;------------------------------------------------------------------------------
Prelaunch ; this runs from main memory
lda $C088 ; entry point used by some self-running demos
; entry point used by some self-running demos
lda $C088
jmp Reenter
+READ_ROM_NO_WRITE ; entry point to launch game (called above)
jsr $FE89 ; initialize machine like a cold boot
jsr $FE93 ; (many games assume a 'clean slate')
jsr $FE84
; entry point to launch game
+READ_ROM_NO_WRITE
jsr $FE89 ; initialize machine like a cold boot (many
jsr $FE93 ; games assume a 'clean slate' and rely on
jsr $FE84 ; zero page values set by these ROM routines)
sta $C000
sta $C002
sta $C004

View File

@ -67,7 +67,7 @@ OnInputChanged
+STAY @key
; load game title page at $4000 (page 2, not currently visible)
+LOAD_FILE kHGRScreenshotDirectory, @key
+LOAD_FILE kHGRTitleDirectory, @key
jsr okvs_get
!word gGamesListStore

View File

@ -43,45 +43,6 @@ cover128_e
bcs @noname
+STAY PTR
ldx #0
stx HTAB
ldx #22
stx VTAB
ldy #0
lda (PTR),y
tax
+LDADDR @topline
jsr DrawBuffer
ldx #3
+LDADDR @toprightcorner
jsr DrawBuffer
inc VTAB
ldx #0
stx HTAB
inx
+LDADDR @rightline
jsr DrawBuffer
+LDAY PTR
jsr DrawString
ldx #2
+LDADDR @rightline
jsr DrawBuffer
dec VTAB
ldx #0
stx HTAB
@noname
rts
@topline
!byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
!byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
@toprightcorner
!byte 0,0,7
@rightline
!text " "
!byte 3