mirror of
https://github.com/a2-4am/pitch-dark.git
synced 2024-11-15 11:09:11 +00:00
add hints, break preferences (for now)
This commit is contained in:
parent
4fac041c61
commit
2c433a92af
3
Makefile
3
Makefile
@ -38,8 +38,9 @@ dsk: md asm
|
||||
cp res/WEEGUI build/
|
||||
cp res/_FileInformation.txt build/
|
||||
$(CADIUS) ADDFILE build/"$(DISK)" "/PITCH.DARK/" "build/GRUE.SYSTEM"
|
||||
$(CADIUS) ADDFILE build/"$(DISK)" "/PITCH.DARK/" "build/PITCH.DARK"
|
||||
$(CADIUS) ADDFILE build/"$(DISK)" "/PITCH.DARK/" "build/ONBEYOND.SYSTEM"
|
||||
$(CADIUS) ADDFILE build/"$(DISK)" "/PITCH.DARK/" "build/PITCH.DARK"
|
||||
$(CADIUS) ADDFILE build/"$(DISK)" "/PITCH.DARK/" "res/PITCH.DARK.CONF"
|
||||
$(CADIUS) CREATEFOLDER build/"$(DISK)" "/PITCH.DARK/LIB/"
|
||||
$(CADIUS) ADDFILE build/"$(DISK)" "/PITCH.DARK/LIB/" "build/WEEGUI"
|
||||
$(CADIUS) ADDFILE build/"$(DISK)" "/PITCH.DARK/LIB/" "build/ONBEYONDZ3"
|
||||
|
Binary file not shown.
@ -1,5 +1,6 @@
|
||||
GRUE.SYSTEM=Type(FF),AuxType(2000),Access(C3)
|
||||
PITCH.DARK=Type(06),AuxType(6000),Access(C3)
|
||||
PITCH.DARK.CONF=Type(04),AuxType(0000),Access(C3)
|
||||
ONBEYOND.SYSTEM=Type(FF),AuxType(2000),Access(C3)
|
||||
ONBEYONDZ3=Type(06),AuxType(3000),Access(C3)
|
||||
ONBEYONDZ4=Type(06),AuxType(3000),Access(C3)
|
||||
|
@ -1,5 +1,6 @@
|
||||
# Pitch Dark preferences file
|
||||
# do not edit by hand
|
||||
# Do not edit by hand
|
||||
# Or do -- I'm a comment, not a cop
|
||||
|
||||
# value=0|1
|
||||
FORCE40COLUMNS=0
|
||||
|
BIN
res/prizm/amfv.z5#F58005
Normal file
BIN
res/prizm/amfv.z5#F58005
Normal file
Binary file not shown.
BIN
res/prizm/ballyhoo.z5#F58005
Normal file
BIN
res/prizm/ballyhoo.z5#F58005
Normal file
Binary file not shown.
BIN
res/prizm/border.zone.z5#F58005
Normal file
BIN
res/prizm/border.zone.z5#F58005
Normal file
Binary file not shown.
BIN
res/prizm/bureaucracy.z5#F58005
Normal file
BIN
res/prizm/bureaucracy.z5#F58005
Normal file
Binary file not shown.
BIN
res/prizm/cutthroats.z5#F58005
Normal file
BIN
res/prizm/cutthroats.z5#F58005
Normal file
Binary file not shown.
BIN
res/prizm/deadline.z5#F58005
Normal file
BIN
res/prizm/deadline.z5#F58005
Normal file
Binary file not shown.
BIN
res/prizm/enchanter.z5#F58005
Normal file
BIN
res/prizm/enchanter.z5#F58005
Normal file
Binary file not shown.
BIN
res/prizm/hgttg.z5#F58005
Normal file
BIN
res/prizm/hgttg.z5#F58005
Normal file
Binary file not shown.
BIN
res/prizm/hollywood.z5#F58005
Normal file
BIN
res/prizm/hollywood.z5#F58005
Normal file
Binary file not shown.
BIN
res/prizm/infidel.z5#F58005
Normal file
BIN
res/prizm/infidel.z5#F58005
Normal file
Binary file not shown.
BIN
res/prizm/lgop.z5#F58005
Normal file
BIN
res/prizm/lgop.z5#F58005
Normal file
Binary file not shown.
BIN
res/prizm/lurking.horror.z5#F58005
Normal file
BIN
res/prizm/lurking.horror.z5#F58005
Normal file
Binary file not shown.
BIN
res/prizm/moonmist.z5#F58005
Normal file
BIN
res/prizm/moonmist.z5#F58005
Normal file
Binary file not shown.
BIN
res/prizm/nord.and.bert.z5#F58005
Normal file
BIN
res/prizm/nord.and.bert.z5#F58005
Normal file
Binary file not shown.
BIN
res/prizm/planetfall.z5#F58005
Normal file
BIN
res/prizm/planetfall.z5#F58005
Normal file
Binary file not shown.
BIN
res/prizm/plundered.z5#F58005
Normal file
BIN
res/prizm/plundered.z5#F58005
Normal file
Binary file not shown.
17
res/prizm/readme.txt
Normal file
17
res/prizm/readme.txt
Normal file
@ -0,0 +1,17 @@
|
||||
Source: http://infodoc.plover.net/hints/
|
||||
|
||||
These help files were put together by Digby McWiggle and Steven Marsh as part of their PRIZM project, whose website is now defunct. They are a compilation of all the Invisiclues available for each of the games in one handy cross-platform file.
|
||||
|
||||
Small patches were applied to each file to remove the warning that your screen is too small and you should make it wider if possible. Since this is not possible on the Apple II (and 80 columns is still too small), the subroutine responsible for this warning has been changed to immediately return without printing anything or waiting for a key. Here is the command I used, which finds the byte sequence "10 00 21 12 0d 01 00 0d 02 01" and replaces the first byte with B0, the "return true" opcode.
|
||||
|
||||
for f in *.z5; do
|
||||
xxd -p -c 256 "$f" | \
|
||||
tr -d '\n' | \
|
||||
sed "s/100021120d01000d0201/B00021120d01000d0201/g" | \
|
||||
xxd -r -p \
|
||||
> ../patched/"$f"
|
||||
done
|
||||
|
||||
-4am
|
||||
|
||||
last modified: 2018-03-12
|
BIN
res/prizm/seastalker.z5#F58005
Normal file
BIN
res/prizm/seastalker.z5#F58005
Normal file
Binary file not shown.
BIN
res/prizm/sherlock.z5#F58005
Normal file
BIN
res/prizm/sherlock.z5#F58005
Normal file
Binary file not shown.
BIN
res/prizm/sorcerer.z5#F58005
Normal file
BIN
res/prizm/sorcerer.z5#F58005
Normal file
Binary file not shown.
BIN
res/prizm/spellbreaker.z5#F58005
Normal file
BIN
res/prizm/spellbreaker.z5#F58005
Normal file
Binary file not shown.
BIN
res/prizm/starcross.z5#F58005
Normal file
BIN
res/prizm/starcross.z5#F58005
Normal file
Binary file not shown.
BIN
res/prizm/stationfall.z5#F58005
Normal file
BIN
res/prizm/stationfall.z5#F58005
Normal file
Binary file not shown.
BIN
res/prizm/suspect.z5#F58005
Normal file
BIN
res/prizm/suspect.z5#F58005
Normal file
Binary file not shown.
BIN
res/prizm/suspended.z5#F58005
Normal file
BIN
res/prizm/suspended.z5#F58005
Normal file
Binary file not shown.
BIN
res/prizm/trinity.z5#F58005
Normal file
BIN
res/prizm/trinity.z5#F58005
Normal file
Binary file not shown.
BIN
res/prizm/wishbringer.z5#F58005
Normal file
BIN
res/prizm/wishbringer.z5#F58005
Normal file
Binary file not shown.
BIN
res/prizm/witness.z5#F58005
Normal file
BIN
res/prizm/witness.z5#F58005
Normal file
Binary file not shown.
BIN
res/prizm/zork.i.z5#F58005
Normal file
BIN
res/prizm/zork.i.z5#F58005
Normal file
Binary file not shown.
BIN
res/prizm/zork.ii.z5#F58005
Normal file
BIN
res/prizm/zork.ii.z5#F58005
Normal file
Binary file not shown.
BIN
res/prizm/zork.iii.z5#F58005
Normal file
BIN
res/prizm/zork.iii.z5#F58005
Normal file
Binary file not shown.
BIN
res/prizm/ztuu.z5#F58005
Normal file
BIN
res/prizm/ztuu.z5#F58005
Normal file
Binary file not shown.
74
src/action.a
74
src/action.a
@ -14,6 +14,12 @@
|
||||
kGameRootDirectory ; length-prefixed pathname of where game subdirectories are stored
|
||||
!byte 2
|
||||
!raw "Z/"
|
||||
kHintsRootDirectory ; length-prefixed pathname of where game subdirectories are stored
|
||||
!byte 5
|
||||
!raw "PRIZM/"
|
||||
kHintsSuffix
|
||||
!byte 3
|
||||
!raw ".Z5"
|
||||
kArtworkRootDirectory ; length-prefixed pathname of DHGR box art
|
||||
!byte 8
|
||||
!raw "ARTWORK/"
|
||||
@ -42,8 +48,6 @@ ID_SCROLLDOWN = $82
|
||||
!byte $8A,ID_SCROLLDOWN ; down arrow
|
||||
.endkeys
|
||||
|
||||
BELL = $FF3A
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; HandleKey
|
||||
; handle keypress to activate various UI elements
|
||||
@ -58,15 +62,12 @@ HandleKey
|
||||
dex
|
||||
dex
|
||||
bpl -
|
||||
rts
|
||||
jmp SoftBell
|
||||
.foundKey
|
||||
lda .keys+1,x
|
||||
bpl .activateView
|
||||
cmp #ID_SCROLLUP
|
||||
beq .handleScrollUp
|
||||
cmp #ID_SCROLLDOWN
|
||||
beq .handleScrollDown
|
||||
rts
|
||||
.handleScrollUp
|
||||
lda #$01
|
||||
!byte $2C ; hide next LDA
|
||||
@ -117,8 +118,7 @@ callback_next
|
||||
|
||||
callback_versions
|
||||
rts
|
||||
callback_clues
|
||||
rts
|
||||
|
||||
callback_options
|
||||
jmp OptionsDialog
|
||||
|
||||
@ -166,22 +166,45 @@ callback_boxart
|
||||
sta $C051
|
||||
rts
|
||||
.nope
|
||||
jmp BELL
|
||||
jmp SoftBell
|
||||
}
|
||||
|
||||
!zone {
|
||||
callback_clues
|
||||
jsr SaveGlobalPreferences
|
||||
jsr LoadInterpreter
|
||||
bcs .nope
|
||||
; change prefix to folder of file we want the interpreter to open
|
||||
jsr ResetPath
|
||||
lda #<kHintsRootDirectory
|
||||
ldy #>kHintsRootDirectory
|
||||
jsr AddToPath
|
||||
jsr SetPrefix
|
||||
!word gPathname
|
||||
; put just the filename at $2006
|
||||
jsr ResetPath
|
||||
lda gCurrentGame
|
||||
asl
|
||||
tax
|
||||
lda GAMES,x
|
||||
ldy GAMES+1,x
|
||||
jsr AddToPath ; hints filename = game filename + hints suffix
|
||||
lda #<kHintsSuffix
|
||||
ldy #>kHintsSuffix
|
||||
jsr AddToPath
|
||||
lda #<gPathname
|
||||
ldy #>gPathname
|
||||
jsr SetStartupPath
|
||||
; shutdown WeeGUI and transfer control to interpreter
|
||||
jsr ExitWeeGUI
|
||||
jmp $2000
|
||||
.nope sec
|
||||
rts
|
||||
|
||||
callback_play
|
||||
LaunchInterpreter
|
||||
jsr SaveGlobalPreferences
|
||||
jsr ResetPath
|
||||
lda #<.interpreterFilename
|
||||
ldy #>.interpreterFilename
|
||||
jsr AddToPath
|
||||
jsr LoadFile ; load interpreter at $2000
|
||||
!word gPathname
|
||||
!word $2000
|
||||
!word $2000
|
||||
!word kProDOSFileBuffer
|
||||
jsr LoadInterpreter
|
||||
bcs .nope
|
||||
; change prefix to folder of file we want the interpreter to open
|
||||
jsr ResetPath
|
||||
@ -196,7 +219,7 @@ LaunchInterpreter
|
||||
jsr AddToPath
|
||||
jsr SetPrefix
|
||||
!word gPathname
|
||||
; put .z3 filename at $2006
|
||||
; put just the filename at $2006
|
||||
ldy #0
|
||||
lda addrVersions
|
||||
sta $00
|
||||
@ -211,9 +234,20 @@ LaunchInterpreter
|
||||
bra -
|
||||
.doneBuildingFilename
|
||||
sty $2006
|
||||
; shut down WeeGUI and transfer control to interpreter
|
||||
jsr ExitWeeGUI
|
||||
jmp $2000
|
||||
.nope sec
|
||||
|
||||
LoadInterpreter
|
||||
jsr ResetPath
|
||||
lda #<.interpreterFilename
|
||||
ldy #>.interpreterFilename
|
||||
jsr AddToPath
|
||||
jsr LoadFile ; load interpreter at $2000
|
||||
!word gPathname
|
||||
!word $2000
|
||||
!word $2000
|
||||
!word kProDOSFileBuffer
|
||||
rts
|
||||
.interpreterFilename
|
||||
!byte 15
|
||||
|
@ -16,8 +16,6 @@
|
||||
|
||||
!zone {
|
||||
kNumberOfGames = 33
|
||||
gCurrentGame
|
||||
!byte $FD ; set at runtime
|
||||
kTextRootDirectory
|
||||
!byte 5
|
||||
!raw "TEXT/"
|
||||
|
@ -144,7 +144,7 @@ HandleOptionsKey
|
||||
dex
|
||||
dex
|
||||
bpl -
|
||||
rts
|
||||
jmp SoftBell
|
||||
.foundKey
|
||||
lda .keys+1,x
|
||||
ldx #WGSelectView
|
||||
|
27
src/path.a
27
src/path.a
@ -6,6 +6,7 @@
|
||||
; Public functions
|
||||
; - ResetPath
|
||||
; - AddToPath
|
||||
; - SetStartupPath
|
||||
;
|
||||
; Public variables
|
||||
; - gPathname
|
||||
@ -32,6 +33,7 @@ ResetPath
|
||||
; $00/$01 clobbered
|
||||
; gPathname updated with concatenated length-prefixed string
|
||||
;------------------------------------------------------------------------------
|
||||
!zone {
|
||||
AddToPath
|
||||
sta $00
|
||||
sty $01
|
||||
@ -48,6 +50,31 @@ AddToPath
|
||||
bcc -
|
||||
stx gPathname
|
||||
rts
|
||||
}
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; SetStartupPath
|
||||
; copy a length-prefixed string to $2006 (to pass it as the startup file when
|
||||
; launching a .system file)
|
||||
;
|
||||
; in: A contains low byte of address of length-prefixed string to append
|
||||
; Y contains high byte of address of length-prefixed string to append
|
||||
; out: all registers and flags clobbered
|
||||
; $00/$01 clobbered
|
||||
;------------------------------------------------------------------------------
|
||||
!zone {
|
||||
SetStartupPath
|
||||
sta $00
|
||||
sty $01
|
||||
lda ($00)
|
||||
tay
|
||||
- lda ($00),y
|
||||
and #$7F
|
||||
sta $2006,y
|
||||
dey
|
||||
bpl -
|
||||
rts
|
||||
}
|
||||
|
||||
gPathname
|
||||
!fill 65 ; enough zeroes for any ProDOS pathname
|
||||
|
@ -16,8 +16,8 @@
|
||||
!source "src/prodos.a"
|
||||
!source "src/ramdisk.a"
|
||||
!source "src/path.a"
|
||||
!source "src/prefs.a"
|
||||
!source "src/config.a"
|
||||
!source "src/prefs.a"
|
||||
!source "src/action.a"
|
||||
!source "src/paintcommon.a"
|
||||
!source "src/paint.a"
|
||||
@ -69,3 +69,24 @@ ExitWeeGUI
|
||||
jsr WeeGUI
|
||||
ldx #WGExit ; clean up WeeGUI
|
||||
jmp WeeGUI
|
||||
|
||||
WAIT = $FCA8
|
||||
SPEAKER = $C030
|
||||
|
||||
SoftBell
|
||||
php
|
||||
phx
|
||||
pha
|
||||
ldx #32
|
||||
- lda #2
|
||||
jsr WAIT
|
||||
bit SPEAKER
|
||||
lda #33
|
||||
jsr WAIT
|
||||
bit SPEAKER
|
||||
dex
|
||||
bne -
|
||||
pla
|
||||
plx
|
||||
plp
|
||||
rts
|
||||
|
81
src/prefs.a
81
src/prefs.a
@ -5,12 +5,30 @@
|
||||
;
|
||||
; Public functions
|
||||
; - LoadGlobalPreferences
|
||||
;
|
||||
; Public variables
|
||||
; - gForce40 byte 0=false, 1=true
|
||||
; - gForceUpper byte 0=false, 1=true
|
||||
; - gSort byte 0=name, 1=year, 2=genre, 3=difficulty
|
||||
; - gCurrentGame byte 0..kNumberOfGames-1
|
||||
; - gVersions[] array of fixed length records, each 16 bytes
|
||||
|
||||
!zone {
|
||||
TRUE = 1
|
||||
FALSE = 0
|
||||
kDefaultGame = 29 ; Zork I
|
||||
kPrefsRecord = $0800
|
||||
kPrefsLength = 1
|
||||
kPrefsCurrentGame = kPrefsRecord + 0
|
||||
|
||||
; global storage for parsed preference values
|
||||
gForce40
|
||||
!byte 0
|
||||
gForceUpper
|
||||
!byte 0
|
||||
gSort
|
||||
!byte 0
|
||||
gCurrentGame
|
||||
!byte 0
|
||||
gVersions
|
||||
!fill kNumberOfGames*16,0
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; LoadGlobalPreferences
|
||||
@ -19,35 +37,50 @@ kPrefsCurrentGame = kPrefsRecord + 0
|
||||
; out: all registers and flags clobbered
|
||||
;------------------------------------------------------------------------------
|
||||
LoadGlobalPreferences
|
||||
jsr LoadFile ; load prefs file at $0800
|
||||
!word .globalPrefsFilename
|
||||
!word kPrefsRecord
|
||||
!word kPrefsLength
|
||||
!word kProDOSFileBuffer
|
||||
bcs .useDefaults
|
||||
lda kPrefsCurrentGame
|
||||
cmp #kNumberOfGames
|
||||
bcs .useDefaults
|
||||
sta gCurrentGame
|
||||
rts
|
||||
.useDefaults
|
||||
; set defaults first in case prefs file is missing or incomplete
|
||||
lda #FALSE
|
||||
sta gForce40
|
||||
lda #FALSE
|
||||
sta gForceUpper
|
||||
lda #0
|
||||
sta gSort
|
||||
lda #kDefaultGame
|
||||
sta gCurrentGame
|
||||
|
||||
bra .exit
|
||||
; TODO
|
||||
jsr LoadFile ; load prefs file at $2000
|
||||
!word .globalPrefsFilename
|
||||
!word $2000
|
||||
!word $2000
|
||||
!word kProDOSFileBuffer
|
||||
bcs .exit
|
||||
.exit
|
||||
rts
|
||||
|
||||
SaveGlobalPreferences
|
||||
lda gCurrentGame
|
||||
sta kPrefsCurrentGame
|
||||
jsr SaveFile
|
||||
!word .globalPrefsFilename
|
||||
!byte $06
|
||||
!word $0000
|
||||
!word kPrefsRecord
|
||||
!word kPrefsLength
|
||||
!word kProDOSFileBuffer
|
||||
; TODO
|
||||
rts
|
||||
|
||||
.globalPrefsFilename
|
||||
!byte 15
|
||||
!raw "PITCH.DARK.CONF"
|
||||
|
||||
.globalPrefsKeys
|
||||
!word .force40
|
||||
!word .forceupper
|
||||
!word .sort
|
||||
!word .lastplayed
|
||||
.force40
|
||||
!byte 14
|
||||
!raw "FORCE40COLUMNS"
|
||||
.forceupper
|
||||
!byte 14
|
||||
!raw "FORCEUPPERCASE"
|
||||
.sort
|
||||
!byte 4
|
||||
!raw "SORT"
|
||||
.lastplayed
|
||||
!byte 10
|
||||
!raw "LASTPLAYED"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user