This commit is contained in:
parent
af5d128e08
commit
479b2316c9
|
@ -8,8 +8,11 @@ FORCE40COLUMNS=0
|
|||
# value=0|1
|
||||
FORCEUPPERCASE=0
|
||||
|
||||
# value=NAME|YEAR|GENRE|DIFFICULTY
|
||||
SORT=NAME
|
||||
# value=0|1
|
||||
SCRIPTTOFILE=1
|
||||
|
||||
# value=0|1
|
||||
AUTOSCRIPT=0
|
||||
|
||||
# value=game directory
|
||||
LASTPLAYED=ZORK.I
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
Copyright 1987 Infocom, Inc.
|
||||
Genre: espionage
|
||||
Difficulty: ^^^^&
|
||||
Release 9 / Serial number 871008 / Interpreter 2 Version F
|
||||
Release 9 / Serial number 871008
|
||||
|
||||
[description]
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
Copyright 1987 Infocom, Inc.
|
||||
Genre: comedy
|
||||
Difficulty: ^^^^&
|
||||
Release 116 / Licence Number 870602 / Interpreter 2 Version H
|
||||
Release 116 / Licence Number 870602
|
||||
|
||||
[description]
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
Copyright 1987 Infocom, Inc.
|
||||
Genre: comedy
|
||||
Difficulty: ^^^^^
|
||||
Release 19 / Serial number 870722 / Interpreter 2 Version H
|
||||
Release 19 / Serial number 870722
|
||||
|
||||
[description]
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
Copyright 1987 Infocom, Inc.
|
||||
Genre: mystery
|
||||
Difficulty: ^^^&&
|
||||
Release 26 / Serial Number 880127 / Interpreter 2 Version F
|
||||
Release 26 / Serial Number 880127
|
||||
|
||||
[description]
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
Copyright 1986 Infocom, Inc.
|
||||
Genre: fantasy
|
||||
Difficulty: ^^^&&
|
||||
Release 12 / Serial Number 860926 / Interpreter 2 Version H
|
||||
Release 12 / Serial Number 860926
|
||||
|
||||
[description]
|
||||
|
||||
|
|
42
src/action.a
42
src/action.a
|
@ -185,6 +185,16 @@ callback_next
|
|||
bcc +
|
||||
lda #0
|
||||
+ sta gCurrentGame
|
||||
asl
|
||||
tax
|
||||
lda GAMES,x
|
||||
sta .gameptr
|
||||
lda GAMES+1,x
|
||||
sta .gameptr+1
|
||||
jsr okvs_update
|
||||
!word gPrefsStore
|
||||
!word kLastPlayed
|
||||
.gameptr !word $FDFD ; set at runtime
|
||||
.loadNewGameInfoAndRepaint
|
||||
jsr LoadGameInfo
|
||||
jmp RepaintSomeViews
|
||||
|
@ -202,11 +212,9 @@ callback_boxart
|
|||
lda #<kArtworkRootDirectory
|
||||
ldy #>kArtworkRootDirectory
|
||||
jsr AddToPath
|
||||
lda gCurrentGame
|
||||
asl
|
||||
tax
|
||||
lda GAMES, x
|
||||
ldy GAMES+1, x
|
||||
jsr okvs_get
|
||||
!word gPrefsStore
|
||||
!word kLastPlayed
|
||||
jsr AddToPath
|
||||
|
||||
lda #0 ; set Z flag always
|
||||
|
@ -256,12 +264,11 @@ callback_clues
|
|||
jsr SetPrefix
|
||||
!word gPathname
|
||||
bcs .cluesError
|
||||
|
||||
; put just the filename at $2006
|
||||
lda gCurrentGame
|
||||
asl
|
||||
tax
|
||||
lda GAMES,x
|
||||
ldy GAMES+1,x
|
||||
jsr okvs_get
|
||||
!word gPrefsStore
|
||||
!word kLastPlayed
|
||||
jsr SetStartupPath
|
||||
; shutdown WeeGUI and transfer control to interpreter
|
||||
jsr ExitWeeGUI
|
||||
|
@ -281,15 +288,16 @@ LaunchInterpreter
|
|||
lda #<kGameRootDirectory
|
||||
ldy #>kGameRootDirectory
|
||||
jsr AddToPath
|
||||
lda gCurrentGame
|
||||
asl
|
||||
tax
|
||||
lda GAMES,x
|
||||
ldy GAMES+1,x
|
||||
|
||||
jsr okvs_get
|
||||
!word gPrefsStore
|
||||
!word kLastPlayed
|
||||
jsr AddToPath
|
||||
|
||||
jsr SetPrefix
|
||||
!word gPathname
|
||||
bcs .playError
|
||||
|
||||
; put just the filename at $2006
|
||||
ldy #0
|
||||
lda addrVersions
|
||||
|
@ -305,6 +313,7 @@ LaunchInterpreter
|
|||
bra -
|
||||
.doneBuildingFilename
|
||||
sty $2006
|
||||
|
||||
; shut down WeeGUI and transfer control to interpreter
|
||||
jsr ExitWeeGUI
|
||||
jmp kSystemAddress
|
||||
|
@ -316,7 +325,8 @@ LoadInterpreter
|
|||
lda #<.interpreterFilename
|
||||
ldy #>.interpreterFilename
|
||||
jsr AddToPath
|
||||
jsr LoadFile ; load interpreter at $2000
|
||||
|
||||
jsr LoadFile
|
||||
!word gPathname
|
||||
!word kSystemAddress
|
||||
!word $2000
|
||||
|
|
144
src/config.a
144
src/config.a
|
@ -6,155 +6,11 @@
|
|||
; Public functions
|
||||
; - LoadGameInfo
|
||||
;
|
||||
; Public constants
|
||||
; - kNumberOfGames
|
||||
; - GAMES
|
||||
;
|
||||
|
||||
!zone {
|
||||
kNumberOfGames = 34
|
||||
kTextRootDirectory
|
||||
!byte 5
|
||||
!raw "TEXT/"
|
||||
GAMES ; length of this array must = kNumberOfGames, there is no range checking
|
||||
!word .adventure
|
||||
!word .amfv
|
||||
!word .ballyhoo
|
||||
!word .beyondzork
|
||||
!word .borderzone
|
||||
!word .bureaucracy
|
||||
!word .cutthroats
|
||||
!word .deadline
|
||||
!word .enchanter
|
||||
!word .hgttg
|
||||
!word .hollywoodhijinx
|
||||
!word .infidel
|
||||
!word .leathergoddesses
|
||||
!word .lurkinghorror
|
||||
!word .minizork
|
||||
!word .moonmist
|
||||
!word .nordandbert
|
||||
!word .planetfall
|
||||
!word .plunderedhearts
|
||||
!word .seastalker
|
||||
!word .sherlock
|
||||
!word .sorcerer
|
||||
!word .spellbreaker
|
||||
!word .starcross
|
||||
!word .stationfall
|
||||
!word .suspect
|
||||
!word .suspended
|
||||
!word .trinity
|
||||
!word .wishbringer
|
||||
!word .witness
|
||||
!word .zorki
|
||||
!word .zorkii
|
||||
!word .zorkiii
|
||||
!word .ztuu
|
||||
|
||||
; length-prefixed names of each subdirectory in game directory, 1 per game
|
||||
.adventure
|
||||
!byte 9
|
||||
!raw "ADVENTURE"
|
||||
.amfv
|
||||
!byte 4
|
||||
!raw "AMFV"
|
||||
.ballyhoo
|
||||
!byte 8
|
||||
!raw "BALLYHOO"
|
||||
.beyondzork
|
||||
!byte 11
|
||||
!raw "BEYOND.ZORK"
|
||||
.borderzone
|
||||
!byte 11
|
||||
!raw "BORDER.ZONE"
|
||||
.bureaucracy
|
||||
!byte 11
|
||||
!raw "BUREAUCRACY"
|
||||
.cutthroats
|
||||
!byte 10
|
||||
!raw "CUTTHROATS"
|
||||
.deadline
|
||||
!byte 8
|
||||
!raw "DEADLINE"
|
||||
.enchanter
|
||||
!byte 9
|
||||
!raw "ENCHANTER"
|
||||
.hgttg
|
||||
!byte 5
|
||||
!raw "HGTTG"
|
||||
.hollywoodhijinx
|
||||
!byte 9
|
||||
!raw "HOLLYWOOD"
|
||||
.infidel
|
||||
!byte 7
|
||||
!raw "INFIDEL"
|
||||
.leathergoddesses
|
||||
!byte 4
|
||||
!raw "LGOP"
|
||||
.lurkinghorror
|
||||
!byte 14
|
||||
!raw "LURKING.HORROR"
|
||||
.minizork
|
||||
!byte 9
|
||||
!raw "MINI.ZORK"
|
||||
.moonmist
|
||||
!byte 8
|
||||
!raw "MOONMIST"
|
||||
.nordandbert
|
||||
!byte 13
|
||||
!raw "NORD.AND.BERT"
|
||||
.planetfall
|
||||
!byte 10
|
||||
!raw "PLANETFALL"
|
||||
.plunderedhearts
|
||||
!byte 9
|
||||
!raw "PLUNDERED"
|
||||
.seastalker
|
||||
!byte 10
|
||||
!raw "SEASTALKER"
|
||||
.sherlock
|
||||
!byte 8
|
||||
!raw "SHERLOCK"
|
||||
.sorcerer
|
||||
!byte 8
|
||||
!raw "SORCERER"
|
||||
.spellbreaker
|
||||
!byte 12
|
||||
!raw "SPELLBREAKER"
|
||||
.starcross
|
||||
!byte 9
|
||||
!raw "STARCROSS"
|
||||
.stationfall
|
||||
!byte 11
|
||||
!raw "STATIONFALL"
|
||||
.suspect
|
||||
!byte 7
|
||||
!raw "SUSPECT"
|
||||
.suspended
|
||||
!byte 9
|
||||
!raw "SUSPENDED"
|
||||
.trinity
|
||||
!byte 7
|
||||
!raw "TRINITY"
|
||||
.wishbringer
|
||||
!byte 11
|
||||
!raw "WISHBRINGER"
|
||||
.witness
|
||||
!byte 7
|
||||
!raw "WITNESS"
|
||||
.zorki
|
||||
!byte 6
|
||||
!raw "ZORK.I"
|
||||
.zorkii
|
||||
!byte 7
|
||||
!raw "ZORK.II"
|
||||
.zorkiii
|
||||
!byte 8
|
||||
!raw "ZORK.III"
|
||||
.ztuu
|
||||
!byte 4
|
||||
!raw "ZTUU"
|
||||
|
||||
sectionPointers ; array of pointers to start of each section
|
||||
addrEOF
|
||||
|
|
|
@ -0,0 +1,151 @@
|
|||
;license:MIT
|
||||
;(c) 2018 by 4am
|
||||
;
|
||||
; Game directory and filenames
|
||||
;
|
||||
; Public constants
|
||||
; - kNumberOfGames
|
||||
; - GAMES
|
||||
;
|
||||
|
||||
kNumberOfGames = 34
|
||||
|
||||
GAMES ; length of this array must = kNumberOfGames, there is no range checking
|
||||
!word .adventure
|
||||
!word .amfv
|
||||
!word .ballyhoo
|
||||
!word .beyondzork
|
||||
!word .borderzone
|
||||
!word .bureaucracy
|
||||
!word .cutthroats
|
||||
!word .deadline
|
||||
!word .enchanter
|
||||
!word .hgttg
|
||||
!word .hollywoodhijinx
|
||||
!word .infidel
|
||||
!word .leathergoddesses
|
||||
!word .lurkinghorror
|
||||
!word .minizork
|
||||
!word .moonmist
|
||||
!word .nordandbert
|
||||
!word .planetfall
|
||||
!word .plunderedhearts
|
||||
!word .seastalker
|
||||
!word .sherlock
|
||||
!word .sorcerer
|
||||
!word .spellbreaker
|
||||
!word .starcross
|
||||
!word .stationfall
|
||||
!word .suspect
|
||||
!word .suspended
|
||||
!word .trinity
|
||||
!word .wishbringer
|
||||
!word .witness
|
||||
!word .zorki
|
||||
!word .zorkii
|
||||
!word .zorkiii
|
||||
!word .ztuu
|
||||
|
||||
; length-prefixed names of each subdirectory in game directory, 1 per game
|
||||
.adventure
|
||||
!byte 9
|
||||
!raw "ADVENTURE"
|
||||
.amfv
|
||||
!byte 4
|
||||
!raw "AMFV"
|
||||
.ballyhoo
|
||||
!byte 8
|
||||
!raw "BALLYHOO"
|
||||
.beyondzork
|
||||
!byte 11
|
||||
!raw "BEYOND.ZORK"
|
||||
.borderzone
|
||||
!byte 11
|
||||
!raw "BORDER.ZONE"
|
||||
.bureaucracy
|
||||
!byte 11
|
||||
!raw "BUREAUCRACY"
|
||||
.cutthroats
|
||||
!byte 10
|
||||
!raw "CUTTHROATS"
|
||||
.deadline
|
||||
!byte 8
|
||||
!raw "DEADLINE"
|
||||
.enchanter
|
||||
!byte 9
|
||||
!raw "ENCHANTER"
|
||||
.hgttg
|
||||
!byte 5
|
||||
!raw "HGTTG"
|
||||
.hollywoodhijinx
|
||||
!byte 9
|
||||
!raw "HOLLYWOOD"
|
||||
.infidel
|
||||
!byte 7
|
||||
!raw "INFIDEL"
|
||||
.leathergoddesses
|
||||
!byte 4
|
||||
!raw "LGOP"
|
||||
.lurkinghorror
|
||||
!byte 14
|
||||
!raw "LURKING.HORROR"
|
||||
.minizork
|
||||
!byte 9
|
||||
!raw "MINI.ZORK"
|
||||
.moonmist
|
||||
!byte 8
|
||||
!raw "MOONMIST"
|
||||
.nordandbert
|
||||
!byte 13
|
||||
!raw "NORD.AND.BERT"
|
||||
.planetfall
|
||||
!byte 10
|
||||
!raw "PLANETFALL"
|
||||
.plunderedhearts
|
||||
!byte 9
|
||||
!raw "PLUNDERED"
|
||||
.seastalker
|
||||
!byte 10
|
||||
!raw "SEASTALKER"
|
||||
.sherlock
|
||||
!byte 8
|
||||
!raw "SHERLOCK"
|
||||
.sorcerer
|
||||
!byte 8
|
||||
!raw "SORCERER"
|
||||
.spellbreaker
|
||||
!byte 12
|
||||
!raw "SPELLBREAKER"
|
||||
.starcross
|
||||
!byte 9
|
||||
!raw "STARCROSS"
|
||||
.stationfall
|
||||
!byte 11
|
||||
!raw "STATIONFALL"
|
||||
.suspect
|
||||
!byte 7
|
||||
!raw "SUSPECT"
|
||||
.suspended
|
||||
!byte 9
|
||||
!raw "SUSPENDED"
|
||||
.trinity
|
||||
!byte 7
|
||||
!raw "TRINITY"
|
||||
.wishbringer
|
||||
!byte 11
|
||||
!raw "WISHBRINGER"
|
||||
.witness
|
||||
!byte 7
|
||||
!raw "WITNESS"
|
||||
.zorki
|
||||
!byte 6
|
||||
!raw "ZORK.I"
|
||||
.zorkii
|
||||
!byte 7
|
||||
!raw "ZORK.II"
|
||||
.zorkiii
|
||||
!byte 8
|
||||
!raw "ZORK.III"
|
||||
.ztuu
|
||||
!byte 4
|
||||
!raw "ZTUU"
|
|
@ -110,7 +110,6 @@ PaintAllViews
|
|||
;
|
||||
; in: WeeGUI loaded and initialized
|
||||
; CreateViews has been called
|
||||
; gCurrentGame has new game index
|
||||
; LoadGameInfo has been called to load new game description text
|
||||
; out: all registers clobbered
|
||||
; all flags clobbered
|
||||
|
|
|
@ -12,13 +12,14 @@
|
|||
!raw "LIB/WEEGUI"
|
||||
|
||||
!source "src/macros.a"
|
||||
!source "src/gamelist.a"
|
||||
!source "src/WeeGUI_MLI.s"
|
||||
!source "src/memory.a"
|
||||
!source "src/okvs.a"
|
||||
!source "src/prodos.a"
|
||||
!source "src/ramdisk.a"
|
||||
!source "src/path.a"
|
||||
!source "src/config.a"
|
||||
!source "src/gameinfoparser.a"
|
||||
!source "src/prefs.a"
|
||||
!source "src/action.a"
|
||||
!source "src/paintcommon.a"
|
||||
|
|
59
src/prefs.a
59
src/prefs.a
|
@ -19,7 +19,6 @@
|
|||
!zone {
|
||||
kDefaultGame = 30 ; Zork I
|
||||
|
||||
; global storage for parsed preference values
|
||||
gCurrentGame
|
||||
!byte 0
|
||||
|
||||
|
@ -29,9 +28,12 @@ kForce40
|
|||
kForceUpper
|
||||
!byte 14
|
||||
!raw "FORCEUPPERCASE"
|
||||
kSort
|
||||
!byte 4
|
||||
!raw "SORT"
|
||||
kScriptToFile
|
||||
!byte 12
|
||||
!raw "SCRIPTTOFILE"
|
||||
kAutoScript
|
||||
!byte 10
|
||||
!raw "AUTOSCRIPT"
|
||||
kLastPlayed
|
||||
!byte 10
|
||||
!raw "LASTPLAYED"
|
||||
|
@ -49,6 +51,19 @@ LoadGlobalPreferences
|
|||
jsr okvs_init
|
||||
!word gPrefsStore
|
||||
|
||||
lda gCurrentGame
|
||||
asl
|
||||
tax
|
||||
lda GAMES,x
|
||||
sta .gameptr
|
||||
lda GAMES+1,x
|
||||
sta .gameptr+1
|
||||
jsr okvs_append
|
||||
!word gPrefsStore
|
||||
!word kLastPlayed
|
||||
.gameptr !word $FDFD ; set at runtime
|
||||
!byte 16
|
||||
|
||||
jsr okvs_append
|
||||
!word gPrefsStore
|
||||
!word kForce40
|
||||
|
@ -63,22 +78,15 @@ LoadGlobalPreferences
|
|||
|
||||
jsr okvs_append
|
||||
!word gPrefsStore
|
||||
!word kSort
|
||||
!word .debugsortvalue
|
||||
!byte 11
|
||||
!word kScriptToFile
|
||||
!word .debug1
|
||||
!byte 0
|
||||
|
||||
jsr okvs_append
|
||||
!word gPrefsStore
|
||||
!word kLastPlayed
|
||||
!word .debuglastplayed
|
||||
!byte 16
|
||||
|
||||
jsr okvs_update
|
||||
!word gPrefsStore
|
||||
!word kSort
|
||||
!word kByDifficulty
|
||||
bcs .exit
|
||||
;jmp $ff59
|
||||
!word kAutoScript
|
||||
!word .debug0
|
||||
!byte 0
|
||||
|
||||
bra .exit
|
||||
; TODO
|
||||
|
@ -101,17 +109,8 @@ SaveGlobalPreferences
|
|||
|
||||
.debug0
|
||||
!byte 1
|
||||
!raw "0"
|
||||
|
||||
.debugsortvalue
|
||||
!byte 4
|
||||
!raw "NAME"
|
||||
|
||||
.debuglastplayed
|
||||
!byte 6
|
||||
!raw "ZORK.I"
|
||||
|
||||
kByDifficulty
|
||||
!byte 10
|
||||
!raw "DIFFICULTY"
|
||||
!byte 0
|
||||
.debug1
|
||||
!byte 1
|
||||
!byte 1
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue