mirror of
https://github.com/a2-4am/4cade.git
synced 2025-08-07 18:25:24 +00:00
hide games in attract mode that can't be played due to memory or joystick requirements
This commit is contained in:
@@ -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" |
|
||||
|
@@ -1 +1 @@
|
||||
#
|
||||
#
|
@@ -1 +1 @@
|
||||
#
|
||||
#
|
@@ -1 +1 @@
|
||||
#
|
||||
#
|
@@ -1 +1 @@
|
||||
#
|
||||
#
|
@@ -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)
|
||||
|
@@ -1 +1 @@
|
||||
#
|
||||
#
|
@@ -1 +1 @@
|
||||
#
|
||||
#
|
@@ -1 +1 @@
|
||||
#
|
||||
#
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user