From e488b87d800e253667ea1a46f0003dfeab01ae3c Mon Sep 17 00:00:00 2001 From: 4am Date: Mon, 8 Jul 2019 15:03:25 -0400 Subject: [PATCH] hide games in attract mode that can't be played due to memory or joystick requirements --- bin/generate-mini-attract-mode.sh | 8 ----- res/attract.conf | 2 +- res/attract/CAPTN.GOODNIGHT | 2 +- res/attract/FS1 | 2 +- res/attract/HERO | 2 +- res/demo/{SPCARTOON.1 => SPCARTOON.1.} | Bin res/demo/{SPCARTOON.2 => SPCARTOON.2.} | Bin res/demo/{SPCARTOON.3 => SPCARTOON.3.} | Bin res/demo/{SPCARTOON.4 => SPCARTOON.4.} | Bin res/demo/{SPCARTOON.5 => SPCARTOON.5.} | Bin res/demo/{SPCARTOON.6 => SPCARTOON.6.} | Bin res/demo/_FileInformation.txt | 12 +++---- res/ss/ACTIONCAPT.CONF | 2 +- res/ss/ACTIONHIJ1.CONF | 2 +- res/ss/ACTIONHIJ2.CONF | 2 +- src/glue.launch.a | 33 +++++++++++++++++++ src/ui.attract.dhgr.a | 16 ++++++--- src/ui.attract.hgr.a | 43 +++++++++++++++---------- src/ui.attract.mode.a | 5 +++ 19 files changed, 89 insertions(+), 42 deletions(-) rename res/demo/{SPCARTOON.1 => SPCARTOON.1.} (100%) rename res/demo/{SPCARTOON.2 => SPCARTOON.2.} (100%) rename res/demo/{SPCARTOON.3 => SPCARTOON.3.} (100%) rename res/demo/{SPCARTOON.4 => SPCARTOON.4.} (100%) rename res/demo/{SPCARTOON.5 => SPCARTOON.5.} (100%) rename res/demo/{SPCARTOON.6 => SPCARTOON.6.} (100%) diff --git a/bin/generate-mini-attract-mode.sh b/bin/generate-mini-attract-mode.sh index 0b6c874e5..8961d3ad2 100755 --- a/bin/generate-mini-attract-mode.sh +++ b/bin/generate-mini-attract-mode.sh @@ -43,14 +43,6 @@ cat res/games.conf | sort | uniq >> /tmp/g - if [ "$game" == "CAPTN.GOODNIGHT" ]; then - cat res/ss/ACTIONCAPT.CONF | - tr "\r" "\n" | - grep "^CAPT" | - sed -e "s/^/ACTION.HGR\//g" | - sed -e "s/$/=7/g" >> /tmp/g - fi - # add self-running demo, if any cat res/attract.conf | tr "\r" "\n" | diff --git a/res/attract.conf b/res/attract.conf index b41fa1371..beaee0fe5 100644 --- a/res/attract.conf +++ b/res/attract.conf @@ -1 +1 @@ -# # Mega-Attract-Mode configuration file # # Mega-Attract-Mode is split into modules. Each module can be a short # slideshow, a self-running demo (like a game's built-in 'attract mode'), or # even just a single screenshot. 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. # # The same format is used by the per-game attract mode configuration files. # # Format: # key=value # # |key| must be unique within this file # # |value| must be one of # 0 = self-running demo (|key| is an executable binary file in /DEMO/) # 1 = HGR title slideshow (|key| is a file in /SS/ containing files in /TITLE.HGR/) # 2 = HGR action slideshow (|key| is a file in /SS/ containing files in /ACTION.HGR/) # 3 = DHGR title slideshow (|key| is a file in /SS/ containing files in /TITLE.DHGR/) # 4 = DHGR action slideshow (|key| is a file in /SS/ containing files in /ACTION.DHGR/) # 5 = SHR box art slideshow (|key| is a file in /SS/ containing files in /ARTWORK.SHR/) # 7 = single HGR file (|key| is arbitrary path from program root directory) # 8 = single DHGR file (|key| is arbitrary path from program root directory) # 9 = single SHR file (|key| is arbitrary path from program root directory) # # Blank lines and lines beginning with '#' are ignored (like this one!) # A line beginning with '[' terminates the parsing # # set 1 FAVORITES1.CONF=1 ACTIONCD1.CONF=2 JUNGLE.HUNT=0 DHGR1.CONF=3 ACTIONPOP.CONF=2 SAMMY.LIGHTFOOT=0 OTHER4.CONF=1 SHR1.CONF=5 # set 2 FAVORITES4.CONF=1 PITFALL.II=0 SYNERGIST.CONF=1 SPCARTOON.1=0 ACTIONMNO1.CONF=2 CONAN=0 DHGR2.CONF=3 ACTIONCLR1.CONF=2 ATARI.CONF=1 SNEAKERS=0 SHR2.CONF=5 # set 3 IDSI.CONF=1 HARD.HAT.MACK=0 BALLY.CONF=1 MR.DO.CONF=2 BURGERTIME=0 DHGR3.CONF=3 ACTIONS3.CONF=2 GUMBALL=0 S3.CONF=1 STARGATE=0 SHR3.CONF=5 # set 4 FAVORITES3.CONF=1 BOUNCING.KMNGAS=0 BRODERBUND.CONF=1 ACTIONCLR2.CONF=2 LADY.TUT=0 DHGR4.CONF=3 ACTIONAB1.CONF=2 CD2.CONF=1 SPYS.DEMISE=0 SHR4.CONF=5 # set 5 T1.CONF=1 MR.COOL=0 SIRIUS.CONF=1 SPCARTOON.2=0 ACTIONCLR3.CONF=2 CIDER.SPIDER=0 ACTDHGR1.CONF=4 ACTIONAB2.CONF=2 # 1 SPARE.CHANGE=0 SHR5.CONF=5 # set 6 MATTEL.CONF=1 THUNDERBOMBS=0 FAVORITES2.CONF=1 ACTIONBURG.CONF=2 VINDICATOR=0 ACTDHGR2.CONF=4 ACTIONEFG2.CONF=2 S1.CONF=1 LODE.RUNNER=0 SHR6.CONF=5 # set 7 EFG2.CONF=1 REPTON=0 DATAMOST.CONF=1 ACTIONCLR4.CONF=2 AGENT.USA=0 ACTDHGR3.CONF=4 ACTIONMNO3.CONF=2 MNO.CONF=1 AQUATRON=0 SHR7.CONF=5 # set 8 SIERRA.CONF=1 POOYAN=0 CD1.CONF=1 SPCARTOON.3=0 ACTIONPQR1.CONF=2 ALIEN.DOWNPOUR=0 ACTDHGR4.CONF=4 ACTIONT1.CONF=2 BOLO=0 T2.CONF=1 BUZZARD.BAIT=0 SHR8.CONF=5 # set 9 MICROFUN.CONF=1 GAMMA.GOBLINS=0 OTHER2.CONF=1 ACTIONCLR5.CONF=2 CEILING.ZERO=0 ACTDHGR5.CONF=4 ACTIONPQR2.CONF=2 P2.CONF=1 ROBOTRON=0 SHR9.CONF=5 # set 10 SYNAPSE.CONF=1 WARP.DESTROYER=0 PICCADILLY.CONF=1 ACTIONT3.CONF=2 WAVY.NAVY=0 ACTDHGR6.CONF=4 ACTIONT2.CONF=2 CD3.CONF=1 TRACK.AND.FIELD=0 SHR10.CONF=5 # set 11 DATAEAST.CONF=1 PEST.PATROL=0 EA.CONF=1 SPCARTOON.4=0 ACTIONMNO2.CONF=2 CHOPLIFTER=0 ACTDHGR7.CONF=4 ACTIONEFG1.CONF=2 HIJKL2.CONF=1 GOONIES=0 SHR11.CONF=5 # set 12 SEGA.CONF=1 LOST.TOMB=0 HIJKL.CONF=1 ACTIONEFG3.CONF=2 KARATEKA=0 ACTDHGR8.CONF=4 ACTIONS2.CONF=2 S2.CONF=1 SNAKE.BYTE=0 SHR12.CONF=5 # set 13 ACTIVISION.CONF=1 DINO.EGGS=0 TAITO.CONF=1 ACTIONHIJ2.CONF=2 ALIEN.RAIN=0 ACTDHGR9.CONF=4 ACTIONCD2.CONF=2 GEBELLI.CONF=1 SERPENTINE=0 SHR13.CONF=5 # set 14 PENGUIN.CONF=1 PACMAN=0 DATASOFT.CONF=1 SPCARTOON.5=0 ACTIONAB3.CONF=2 FLIP.OUT=0 ACTDHGR10.CONF=4 ACTIONHIJ1.CONF=2 QR.CONF=1 PLASMANIA=0 SHR14.CONF=5 # set 15 SUBLOGIC.CONF=1 HIGH.RISE=0 EFG1.CONF=1 ACTIONS1.CONF=2 ORILEYS.MINE=0 ACTDHGR11.CONF=4 ACTIONCD3.CONF=2 OTHER1.CONF=1 SPY.HUNTER=0 SHR15.CONF=5 # set 16 EPYX.CONF=1 NIBBLER=0 AB.CONF=1 ACTIONPQR3.CONF=2 ALIEN.AMBUSH=0 ACTDHGR12.CONF=4 ACTIONCAPT.CONF=2 TUBEWAY=0 SHR16.CONF=5 # set 17 P1.CONF=1 PIEMAN=0 OTHER3.CONF=1 SPCARTOON.6=0 ACTIONHIJ3.CONF=2 CHAMP.LODERUN=0 ACTDHGR13.CONF=4 # 2 FIREBIRD=0 # 5 [eof] \ No newline at end of file +# # Mega-Attract-Mode configuration file # # Mega-Attract-Mode is split into modules. Each module can be a short # slideshow, a self-running demo (like a game's built-in 'attract mode'), or # even just a single screenshot. 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. # # The same format is used by the per-game attract mode configuration files. # # Format: # key=value # # |key| must be unique within this file # # |value| must be one of # 0 = self-running demo (|key| is an executable binary file in /DEMO/) # 1 = HGR title slideshow (|key| is a file in /SS/ containing files in /TITLE.HGR/) # 2 = HGR action slideshow (|key| is a file in /SS/ containing files in /ACTION.HGR/) # 3 = DHGR title slideshow (|key| is a file in /SS/ containing files in /TITLE.DHGR/) # 4 = DHGR action slideshow (|key| is a file in /SS/ containing files in /ACTION.DHGR/) # 5 = SHR box art slideshow (|key| is a file in /SS/ containing files in /ARTWORK.SHR/) # 7 = single HGR file (|key| is arbitrary path from program root directory) # 8 = single DHGR file (|key| is arbitrary path from program root directory) # 9 = single SHR file (|key| is arbitrary path from program root directory) # # Blank lines and lines beginning with '#' are ignored (like this one!) # A line beginning with '[' terminates the parsing # # set 1 SPCARTOON.1.=0 FAVORITES1.CONF=1 ACTIONHIJ1.CONF=2 JUNGLE.HUNT=0 DHGR1.CONF=3 ACTIONPOP.CONF=2 SAMMY.LIGHTFOOT=0 OTHER4.CONF=1 SHR1.CONF=5 # set 2 FAVORITES4.CONF=1 PITFALL.II=0 SYNERGIST.CONF=1 SPCARTOON.1.=0 ACTIONMNO1.CONF=2 CONAN=0 DHGR2.CONF=3 ACTIONCLR1.CONF=2 ATARI.CONF=1 SNEAKERS=0 SHR2.CONF=5 # set 3 IDSI.CONF=1 HARD.HAT.MACK=0 BALLY.CONF=1 MR.DO.CONF=2 BURGERTIME=0 DHGR3.CONF=3 ACTIONS3.CONF=2 GUMBALL=0 S3.CONF=1 STARGATE=0 SHR3.CONF=5 # set 4 FAVORITES3.CONF=1 BOUNCING.KMNGAS=0 BRODERBUND.CONF=1 ACTIONCLR2.CONF=2 LADY.TUT=0 DHGR4.CONF=3 ACTIONAB1.CONF=2 CD2.CONF=1 SPYS.DEMISE=0 SHR4.CONF=5 # set 5 T1.CONF=1 MR.COOL=0 SIRIUS.CONF=1 SPCARTOON.2.=0 ACTIONCLR3.CONF=2 CIDER.SPIDER=0 ACTDHGR1.CONF=4 ACTIONAB2.CONF=2 # 1 SPARE.CHANGE=0 SHR5.CONF=5 # set 6 MATTEL.CONF=1 THUNDERBOMBS=0 FAVORITES2.CONF=1 ACTIONBURG.CONF=2 VINDICATOR=0 ACTDHGR2.CONF=4 ACTIONEFG2.CONF=2 S1.CONF=1 LODE.RUNNER=0 SHR6.CONF=5 # set 7 EFG2.CONF=1 REPTON=0 DATAMOST.CONF=1 ACTIONCLR4.CONF=2 AGENT.USA=0 ACTDHGR3.CONF=4 ACTIONMNO3.CONF=2 MNO.CONF=1 AQUATRON=0 SHR7.CONF=5 # set 8 SIERRA.CONF=1 POOYAN=0 CD1.CONF=1 SPCARTOON.3.=0 ACTIONPQR1.CONF=2 ALIEN.DOWNPOUR=0 ACTDHGR4.CONF=4 ACTIONT1.CONF=2 BOLO=0 T2.CONF=1 BUZZARD.BAIT=0 SHR8.CONF=5 # set 9 MICROFUN.CONF=1 GAMMA.GOBLINS=0 OTHER2.CONF=1 ACTIONCLR5.CONF=2 CEILING.ZERO=0 ACTDHGR5.CONF=4 ACTIONPQR2.CONF=2 P2.CONF=1 ROBOTRON=0 SHR9.CONF=5 # set 10 SYNAPSE.CONF=1 WARP.DESTROYER=0 PICCADILLY.CONF=1 ACTIONT3.CONF=2 WAVY.NAVY=0 ACTDHGR6.CONF=4 ACTIONT2.CONF=2 CD3.CONF=1 TRACK.AND.FIELD=0 SHR10.CONF=5 # set 11 DATAEAST.CONF=1 PEST.PATROL=0 EA.CONF=1 SPCARTOON.4.=0 ACTIONMNO2.CONF=2 CHOPLIFTER=0 ACTDHGR7.CONF=4 ACTIONEFG1.CONF=2 HIJKL2.CONF=1 GOONIES=0 SHR11.CONF=5 # set 12 SEGA.CONF=1 LOST.TOMB=0 HIJKL.CONF=1 ACTIONEFG3.CONF=2 KARATEKA=0 ACTDHGR8.CONF=4 ACTIONS2.CONF=2 S2.CONF=1 SNAKE.BYTE=0 SHR12.CONF=5 # set 13 ACTIVISION.CONF=1 DINO.EGGS=0 TAITO.CONF=1 ACTIONHIJ2.CONF=2 ALIEN.RAIN=0 ACTDHGR9.CONF=4 ACTIONCD2.CONF=2 GEBELLI.CONF=1 SERPENTINE=0 SHR13.CONF=5 # set 14 PENGUIN.CONF=1 PACMAN=0 DATASOFT.CONF=1 SPCARTOON.5.=0 ACTIONAB3.CONF=2 FLIP.OUT=0 ACTDHGR10.CONF=4 ACTIONCD1.CONF=2 QR.CONF=1 PLASMANIA=0 SHR14.CONF=5 # set 15 SUBLOGIC.CONF=1 HIGH.RISE=0 EFG1.CONF=1 ACTIONS1.CONF=2 ORILEYS.MINE=0 ACTDHGR11.CONF=4 ACTIONCD3.CONF=2 OTHER1.CONF=1 SPY.HUNTER=0 SHR15.CONF=5 # set 16 EPYX.CONF=1 NIBBLER=0 AB.CONF=1 ACTIONPQR3.CONF=2 ALIEN.AMBUSH=0 ACTDHGR12.CONF=4 ACTIONCAPT.CONF=2 TUBEWAY=0 SHR16.CONF=5 # set 17 P1.CONF=1 PIEMAN=0 OTHER3.CONF=1 SPCARTOON.6.=0 ACTIONHIJ3.CONF=2 CHAMP.LODERUN=0 ACTDHGR13.CONF=4 # 2 FIREBIRD=0 # 5 [eof] \ No newline at end of file diff --git a/res/attract/CAPTN.GOODNIGHT b/res/attract/CAPTN.GOODNIGHT index ae41b2629..93ce935d0 100644 --- a/res/attract/CAPTN.GOODNIGHT +++ b/res/attract/CAPTN.GOODNIGHT @@ -1 +1 @@ -# # Attract mode for Captain Goodnight # ARTWORK.SHR/CAPTN.GOODNIGHT=9 ACTION.HGR/CAPTN.GOODNIGHT=7 ACTION.HGR/CAPTN.GOODNIGH1=7 ACTION.HGR/CAPTN.GOODNIGH2=7 ACTION.HGR/CAPTN.GOODNIGH3=7 ACTION.HGR/CAPTN.GOODNIGH4=7 ACTION.HGR/CAPTN.GOODNIGH5=7 ACTION.HGR/CAPTN.GOODNIGH6=7 ACTION.HGR/CAPTN.GOODNIGH7=7 ACTION.HGR/CAPTN.GOODNIGH8=7 ACTION.HGR/CAPTN.GOODNIGH9=7 [eof] \ No newline at end of file +# # Attract mode for Captain Goodnight # ARTWORK.SHR/CAPTN.GOODNIGHT=9 ACTION.HGR/CAPTN.GOODNIGH1=7 ACTION.HGR/CAPTN.GOODNIGH2=7 ACTION.HGR/CAPTN.GOODNIGH3=7 ACTION.HGR/CAPTN.GOODNIGH4=7 ACTION.HGR/CAPTN.GOODNIGH5=7 ACTION.HGR/CAPTN.GOODNIGH6=7 ACTION.HGR/CAPTN.GOODNIGH7=7 ACTION.HGR/CAPTN.GOODNIGH8=7 ACTION.HGR/CAPTN.GOODNIGH9=7 ACTION.HGR/CAPTN.GOODNIGHT=7 [eof] \ No newline at end of file diff --git a/res/attract/FS1 b/res/attract/FS1 index 6470c21e2..facf46774 100644 --- a/res/attract/FS1 +++ b/res/attract/FS1 @@ -1 +1 @@ -# # Attract mode for Flight Simulator I # [eof] \ No newline at end of file +# # Attract mode for Flight Simulator I # ACTION.HGR/FS1=7 [eof] \ No newline at end of file diff --git a/res/attract/HERO b/res/attract/HERO index 5a70e53c9..e62352871 100644 --- a/res/attract/HERO +++ b/res/attract/HERO @@ -1 +1 @@ -# # Attract mode for H.E.R.O. # ARTWORK.SHR/HERO=9 ACTION.HGR/HERO=7 [eof] \ No newline at end of file +# # Attract mode for H E R O # ARTWORK.SHR/HERO=9 ACTION.HGR/HERO=7 [eof] \ No newline at end of file diff --git a/res/demo/SPCARTOON.1 b/res/demo/SPCARTOON.1. similarity index 100% rename from res/demo/SPCARTOON.1 rename to res/demo/SPCARTOON.1. diff --git a/res/demo/SPCARTOON.2 b/res/demo/SPCARTOON.2. similarity index 100% rename from res/demo/SPCARTOON.2 rename to res/demo/SPCARTOON.2. diff --git a/res/demo/SPCARTOON.3 b/res/demo/SPCARTOON.3. similarity index 100% rename from res/demo/SPCARTOON.3 rename to res/demo/SPCARTOON.3. diff --git a/res/demo/SPCARTOON.4 b/res/demo/SPCARTOON.4. similarity index 100% rename from res/demo/SPCARTOON.4 rename to res/demo/SPCARTOON.4. diff --git a/res/demo/SPCARTOON.5 b/res/demo/SPCARTOON.5. similarity index 100% rename from res/demo/SPCARTOON.5 rename to res/demo/SPCARTOON.5. diff --git a/res/demo/SPCARTOON.6 b/res/demo/SPCARTOON.6. similarity index 100% rename from res/demo/SPCARTOON.6 rename to res/demo/SPCARTOON.6. diff --git a/res/demo/_FileInformation.txt b/res/demo/_FileInformation.txt index b10ed3e9b..1f41d71b1 100644 --- a/res/demo/_FileInformation.txt +++ b/res/demo/_FileInformation.txt @@ -124,12 +124,12 @@ SPARE.CHANGE.K=Type(F1),AuxType(9600),Access(C3) SPARE.CHANGE.L=Type(F1),AuxType(9600),Access(C3) SPARE.CHANGE.S=Type(F1),AuxType(9600),Access(C3) SPARE.CHANGE.Z=Type(F1),AuxType(B400),Access(C3) -SPCARTOON.1=Type(06),AuxType(02D0),Access(C3) -SPCARTOON.2=Type(06),AuxType(02D0),Access(C3) -SPCARTOON.3=Type(06),AuxType(02D0),Access(C3) -SPCARTOON.4=Type(06),AuxType(02D0),Access(C3) -SPCARTOON.5=Type(06),AuxType(02D0),Access(C3) -SPCARTOON.6=Type(06),AuxType(02D0),Access(C3) +SPCARTOON.1.=Type(06),AuxType(02D0),Access(C3) +SPCARTOON.2.=Type(06),AuxType(02D0),Access(C3) +SPCARTOON.3.=Type(06),AuxType(02D0),Access(C3) +SPCARTOON.4.=Type(06),AuxType(02D0),Access(C3) +SPCARTOON.5.=Type(06),AuxType(02D0),Access(C3) +SPCARTOON.6.=Type(06),AuxType(02D0),Access(C3) SPIDER.RAID=Type(06),AuxType(0300),Access(C3) SPIDER.RAID.1=Type(F1),AuxType(0000),Access(C3) SPY.HUNTER=Type(06),AuxType(0B87),Access(C3) diff --git a/res/ss/ACTIONCAPT.CONF b/res/ss/ACTIONCAPT.CONF index 2224eb37e..8b79750a1 100644 --- a/res/ss/ACTIONCAPT.CONF +++ b/res/ss/ACTIONCAPT.CONF @@ -1 +1 @@ -# # Captain Goodnight action slideshow # CAPTN.GOODNIGH1 CAPTN.GOODNIGH2 CAPTN.GOODNIGH3 CAPTN.GOODNIGH4 CAPTN.GOODNIGH5 CAPTN.GOODNIGH6 CAPTN.GOODNIGH7 CAPTN.GOODNIGH8 CAPTN.GOODNIGH9 [eof] \ No newline at end of file +# # Captain Goodnight action slideshow # CAPTN.GOODNIGH1=CAPTN.GOODNIGHT CAPTN.GOODNIGH2=CAPTN.GOODNIGHT CAPTN.GOODNIGH3=CAPTN.GOODNIGHT CAPTN.GOODNIGH4=CAPTN.GOODNIGHT CAPTN.GOODNIGH5=CAPTN.GOODNIGHT CAPTN.GOODNIGH6=CAPTN.GOODNIGHT CAPTN.GOODNIGH7=CAPTN.GOODNIGHT CAPTN.GOODNIGH8=CAPTN.GOODNIGHT CAPTN.GOODNIGH9=CAPTN.GOODNIGHT [eof] \ No newline at end of file diff --git a/res/ss/ACTIONHIJ1.CONF b/res/ss/ACTIONHIJ1.CONF index 751eb8f31..2f1053d5a 100644 --- a/res/ss/ACTIONHIJ1.CONF +++ b/res/ss/ACTIONHIJ1.CONF @@ -1 +1 @@ -# # action shots slideshow of games that begin with "H","I","J","K","L" # HARD.HAT.MACK2=HARD.HAT.MACK KARATEKA JOUST2=JOUST JUMPMAN LADY.TUT JUGGLER HUNGRYBOY JUNGLE.HUNT JUGGLER2=JUGGLER INTL.GRAN.PRIX [eof] \ No newline at end of file +# # action shots slideshow of games that begin with "H","I","J","K","L" # HARD.HAT.MACK2=HARD.HAT.MACK KARATEKA JOUST2=JOUST JUMPMAN LADY.TUT JUGGLER HUNGRYBOY JUNGLE.HUNT IMPOSSIBLE.MISS INTL.GRAN.PRIX [eof] \ No newline at end of file diff --git a/res/ss/ACTIONHIJ2.CONF b/res/ss/ACTIONHIJ2.CONF index c28a416de..454493269 100644 --- a/res/ss/ACTIONHIJ2.CONF +++ b/res/ss/ACTIONHIJ2.CONF @@ -1 +1 @@ -# # action shots slideshow of games that begin with "H","I","J","K","L" # LODE001=LODE.RUNNER HARD.HAT.MACK LOST.TOMB JOUST HERO HARD.HAT.MACK3=HARD.HAT.MACK IMPOSSIBLE.MISS HIGH.RISE JUNGLE.HUNT2=JUNGLE.HUNT LOST.TOMB2=LOST.TOMB [eof] \ No newline at end of file +# # action shots slideshow of games that begin with "H","I","J","K","L" # LODE001=LODE.RUNNER HARD.HAT.MACK LOST.TOMB JOUST HERO HARD.HAT.MACK3=HARD.HAT.MACK JUGGLER2=JUGGLER HIGH.RISE JUNGLE.HUNT2=JUNGLE.HUNT LOST.TOMB2=LOST.TOMB [eof] \ No newline at end of file diff --git a/src/glue.launch.a b/src/glue.launch.a index 852081c5f..3aa253443 100644 --- a/src/glue.launch.a +++ b/src/glue.launch.a @@ -4,6 +4,7 @@ ; Functions to launch games and self-running demos ; ; Public functions +; - GetGameDisplayName ; - PlayGameFromSearch ; - PlayGameFromBrowse ; - PlayGameFromAttract @@ -17,6 +18,38 @@ !zone { +GetGameDisplayName +; in: A/Y points to game filename +; out: C clear if game exists in gGamesListStore, and +; A/Y points to game display name (but see hack notes below) +; C set if game does not exist (this can happen because slideshows +; list games that require a joystick, but the games list parser +; filters out joystick-only games if the machine doesn't have a +; joystick) + +STAY @key + jsr okvs_get + !word gGamesListStore +@key !word $FDFD ; SMC + bcc @exit + ; Hack to allow self-running demos that don't correspond to a game + ; filename. If the name ends in a '.', accept it unconditionally. + ; The filename is its own display name. Launching this fake game + ; will of course fail, so don't do that. + +LDAY @key + +STAY PARAM + ldy #0 + lda (PARAM),y + tay + lda (PARAM),y + cmp #"." + beq @forceGoodResult + sec + rts +@forceGoodResult + +LDAY @key + clc +@exit rts + PlayGameFromSearch PlayGameFromBrowse stx @gameIndex diff --git a/src/ui.attract.dhgr.a b/src/ui.attract.dhgr.a index 68ce17ba8..84525dec6 100644 --- a/src/ui.attract.dhgr.a +++ b/src/ui.attract.dhgr.a @@ -126,18 +126,22 @@ kDFXConfFile ; $2000..$5FFF/aux clobbered ;------------------------------------------------------------------------------ .DHGRTitleCallback - +STAY PTR + +STAY SAVE lda KBD bpl + - rts +@exit rts + stx gCurrentlyVisibleSlideshowIndex + +LDAY SAVE + jsr GetGameDisplayName + bcs @exit ; not found, so just skip this title + ; load DHGR screenshot at $4000/main and $4000/aux +LDADDR kDHGRTitleDirectory jsr SetPath - +LDAY PTR + +LDAY SAVE jsr AddToPath jsr LoadDHRFile +LDADDR $6000 @@ -156,7 +160,7 @@ kDFXConfFile ; $2000..$5FFF/aux clobbered ;------------------------------------------------------------------------------ .DHGRActionCallback - +STAY PTR + +STAY SAVE lda KBD bpl + @@ -164,6 +168,10 @@ kDFXConfFile + stx gCurrentlyVisibleSlideshowIndex + +LDAY SAVE + jsr GetGameDisplayName + bcs @exit ; not found, so just skip this title + ; load DHGR screenshot at $4000/main and $4000/aux +LDADDR kDHGRActionDirectory jsr SetPath diff --git a/src/ui.attract.hgr.a b/src/ui.attract.hgr.a index db66b4e1d..34b40e2c7 100644 --- a/src/ui.attract.hgr.a +++ b/src/ui.attract.hgr.a @@ -44,16 +44,23 @@ HGRSingle ; $2000..$BFFF clobbered by graphics data and transition code ;------------------------------------------------------------------------------ .HGRTitleCallback - +STAY PTR + +STAY SAVE lda KBD bpl + - rts +@exit rts + stx gCurrentlyVisibleSlideshowIndex + ; check if game exists in the catalog (it might not if it requires a + ; joystick and the machine doesn't have one, or if it requires 128K + ; but the machine only has 64K) + +LDAY SAVE + jsr GetGameDisplayName + bcs @exit ; not found, so just skip this title + ; load HGR screenshot at $4000 - +LOAD_FILE kHGRTitleDirectory, PTR + +LOAD_FILE kHGRTitleDirectory, SAVE +LDADDR $6000 jmp ExecuteTransitionAndWait @@ -71,37 +78,39 @@ HGRSingle ; $2000..$BFFF clobbered by graphics data and transition code ;------------------------------------------------------------------------------ .HGRActionCallback - +STAY PTR - +STAY @key - +STAY @key2 + +STAY SAVE + +STAY @slideshowKey lda KBD bpl + +@actionExit rts + stx gCurrentlyVisibleSlideshowIndex ; load HGR screenshot at $4000 - +LOAD_FILE kHGRActionDirectory, PTR + +LOAD_FILE kHGRActionDirectory, SAVE ; 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 + +LDAY SAVE + jsr GetGameDisplayName 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) +; 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, in which case the filename of +; the action screenshot is not the game name, but the value is) jsr okvs_get !word gSlideshowStore -@key2 !word $FDFD ; SMC - bcs @noname ; should never happen +@slideshowKey + !word $FDFD ; SMC +STAY @key3 jsr okvs_get !word gGamesListStore @key3 !word $FDFD ; SMC - bcs @noname ; should never happen + bcs @actionExit ; game still not found, bail + ; (could happen if game can't be played + ; due to memory or joystick requirements) @foundname +STAY SAVE @drawname @@ -135,7 +144,7 @@ HGRSingle +LDADDR @rightline sec jsr DrawBuffer -@noname + +LDADDR $6000 jmp ExecuteTransitionAndWait @topline diff --git a/src/ui.attract.mode.a b/src/ui.attract.mode.a index e8eaed50b..79873ff36 100644 --- a/src/ui.attract.mode.a +++ b/src/ui.attract.mode.a @@ -180,6 +180,11 @@ RunAttractModule ; All demos are strictly 48K / main memory. No demo uses the ; language card or auxiliary memory. + +LDAY @key + jsr GetGameDisplayName + bcc + ; if game doesn't exist, skip the demo + rts ++ jsr Home ; avoid seeing code load into the HGR page +LOAD_PATH kDemoDirectory ldy gPathname