2018-09-13 13:53:04 +00:00
|
|
|
;license:MIT
|
2021-10-12 23:37:45 +00:00
|
|
|
;(c) 2018-2021 by 4am
|
2018-09-13 13:53:04 +00:00
|
|
|
;
|
|
|
|
; ProDOS - functions for constructing and passing around ProDOS pathnames
|
|
|
|
;
|
|
|
|
; Public functions
|
2019-06-22 19:50:24 +00:00
|
|
|
; - SetPath
|
2018-09-13 13:53:04 +00:00
|
|
|
; - AddToPath
|
|
|
|
;
|
|
|
|
|
2019-10-10 04:26:18 +00:00
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
; SetPath/AddToPath
|
|
|
|
; append a length-prefixed string to gPathname
|
|
|
|
; SetPath will reset the path first
|
|
|
|
;
|
|
|
|
; 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
|
|
|
|
; $02/$03 (PTR/PTR+1) clobbered
|
|
|
|
; gPathname updated with concatenated length-prefixed string
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
SetPath
|
|
|
|
kRootDirectory=*+1
|
|
|
|
ldx #0
|
|
|
|
stx gPathname
|
|
|
|
; execution falls through here
|
2022-05-04 04:07:34 +00:00
|
|
|
|
2019-10-10 04:26:18 +00:00
|
|
|
AddToPath
|
2020-03-24 20:30:14 +00:00
|
|
|
+ST16 PTR
|
2019-10-10 04:26:18 +00:00
|
|
|
ldy #0
|
|
|
|
lda (PTR),y ; length of this segment
|
|
|
|
beq @done
|
|
|
|
tay
|
|
|
|
iny
|
|
|
|
sty @max
|
|
|
|
ldx gPathname ; current pathname length
|
|
|
|
ldy #$01
|
|
|
|
- lda (PTR),y
|
|
|
|
sta gPathname+1,x
|
|
|
|
inx
|
|
|
|
iny
|
|
|
|
@max = *+1
|
|
|
|
cpy #$D1 ; SMC
|
|
|
|
bcc -
|
|
|
|
stx gPathname
|
|
|
|
@done
|
|
|
|
rts
|
|
|
|
|
2021-11-13 21:18:58 +00:00
|
|
|
kSearchIndexRecord
|
|
|
|
!byte 0
|
|
|
|
!be24 0 ; SMC in 4cade.init
|
|
|
|
!le16 0 ; SMC in 4cade.init
|
|
|
|
|
|
|
|
kSearchCacheRecord
|
|
|
|
!byte 0
|
|
|
|
!be24 0 ; SMC in 4cade.init
|
|
|
|
!le16 0 ; SMC in 4cade.init
|
|
|
|
|
|
|
|
kPrelaunchIndexRecord
|
|
|
|
!source "src/index/prelaunch.idx.a"
|
|
|
|
|
2022-10-01 00:04:02 +00:00
|
|
|
kDemoIndexRecord
|
|
|
|
!source "src/index/demo.idx.a"
|
|
|
|
|
2021-11-13 21:18:58 +00:00
|
|
|
kAttractModeIndexRecord
|
|
|
|
!source "src/index/attract.idx.a"
|
|
|
|
|
2022-05-04 02:36:49 +00:00
|
|
|
kMiniAttractIndexLo
|
|
|
|
!byte <kMiniAttractIndexRecord0
|
|
|
|
!byte <kMiniAttractIndexRecord1
|
|
|
|
kMiniAttractIndexHi
|
|
|
|
!byte >kMiniAttractIndexRecord0
|
|
|
|
!byte >kMiniAttractIndexRecord1
|
|
|
|
kMiniAttractIndexRecord0
|
|
|
|
!source "src/index/miniattract0.idx.a"
|
|
|
|
kMiniAttractIndexRecord1
|
|
|
|
!source "src/index/miniattract1.idx.a"
|
2021-11-13 21:18:58 +00:00
|
|
|
|
|
|
|
kAttractModeSlideshowIndexRecord
|
|
|
|
!source "src/index/slideshow.idx.a"
|
|
|
|
|
|
|
|
kFXIndexRecord
|
|
|
|
!source "src/index/fx.idx.a"
|
|
|
|
|
|
|
|
kDFXIndexRecord
|
|
|
|
!source "src/index/dfx.idx.a"
|
|
|
|
|
2021-12-03 03:22:28 +00:00
|
|
|
kSFXIndexRecord
|
|
|
|
!source "src/index/sfx.idx.a"
|
|
|
|
|
2024-05-31 06:22:38 +00:00
|
|
|
kFXCodeIndexRecord
|
|
|
|
!source "src/index/fxcode.idx.a"
|
|
|
|
|
2024-05-25 17:07:22 +00:00
|
|
|
kFXDataIndexRecord
|
|
|
|
!source "src/index/fxdata.idx.a"
|
|
|
|
|
2021-11-13 21:18:58 +00:00
|
|
|
kGameHelpIndexRecord
|
|
|
|
!source "src/index/gamehelp.idx.a"
|
|
|
|
|
2021-11-16 01:25:32 +00:00
|
|
|
kHGRTitleIndexRecord
|
|
|
|
!source "src/index/title.idx.a"
|
|
|
|
|
|
|
|
kDHGRTitleIndexRecord
|
|
|
|
!source "src/index/dtitle.idx.a"
|
|
|
|
|
2021-11-13 21:18:58 +00:00
|
|
|
kSHRArtworkIndexRecord
|
|
|
|
!source "src/index/artwork.idx.a"
|
|
|
|
|
|
|
|
kDHGRActionIndexRecord
|
|
|
|
!source "src/index/dhgr.idx.a"
|
|
|
|
|
|
|
|
kGRActionIndexRecord
|
|
|
|
!source "src/index/gr.idx.a"
|
|
|
|
|
2021-12-11 02:50:10 +00:00
|
|
|
kDGRActionIndexRecord
|
|
|
|
!source "src/index/dgr.idx.a"
|
|
|
|
|
2021-11-13 22:11:26 +00:00
|
|
|
kHGRActionIndexLo
|
|
|
|
!byte <kHGRActionIndexRecord0
|
|
|
|
!byte <kHGRActionIndexRecord1
|
|
|
|
!byte <kHGRActionIndexRecord2
|
|
|
|
!byte <kHGRActionIndexRecord3
|
|
|
|
!byte <kHGRActionIndexRecord4
|
|
|
|
!byte <kHGRActionIndexRecord5
|
|
|
|
!byte <kHGRActionIndexRecord6
|
|
|
|
kHGRActionIndexHi
|
|
|
|
!byte >kHGRActionIndexRecord0
|
|
|
|
!byte >kHGRActionIndexRecord1
|
|
|
|
!byte >kHGRActionIndexRecord2
|
|
|
|
!byte >kHGRActionIndexRecord3
|
|
|
|
!byte >kHGRActionIndexRecord4
|
|
|
|
!byte >kHGRActionIndexRecord5
|
|
|
|
!byte >kHGRActionIndexRecord6
|
|
|
|
kHGRActionIndexRecord0
|
|
|
|
!source "src/index/hgr0.idx.a"
|
|
|
|
kHGRActionIndexRecord1
|
|
|
|
!source "src/index/hgr1.idx.a"
|
|
|
|
kHGRActionIndexRecord2
|
|
|
|
!source "src/index/hgr2.idx.a"
|
|
|
|
kHGRActionIndexRecord3
|
|
|
|
!source "src/index/hgr3.idx.a"
|
|
|
|
kHGRActionIndexRecord4
|
|
|
|
!source "src/index/hgr4.idx.a"
|
|
|
|
kHGRActionIndexRecord5
|
|
|
|
!source "src/index/hgr5.idx.a"
|
|
|
|
kHGRActionIndexRecord6
|
|
|
|
!source "src/index/hgr6.idx.a"
|
|
|
|
|
2021-11-17 03:02:28 +00:00
|
|
|
kCreditsRecord
|
|
|
|
!source "src/index/credits.idx.a"
|
|
|
|
|
|
|
|
kHelpTextRecord
|
|
|
|
!source "src/index/helptext.idx.a"
|
|
|
|
|
2021-11-17 05:25:17 +00:00
|
|
|
kDecrunchRecord
|
|
|
|
!source "src/index/decrunch.idx.a"
|
|
|
|
|
|
|
|
kJoystickRecord
|
|
|
|
!source "src/index/joystick.idx.a"
|
|
|
|
|
2022-09-06 00:38:43 +00:00
|
|
|
kXSingleRecord
|
|
|
|
!source "src/index/xsingle.idx.a"
|
|
|
|
|
2021-10-24 05:14:25 +00:00
|
|
|
kTotalDataFile
|
2024-05-26 17:41:21 +00:00
|
|
|
+PSTRING "TOTAL.DATA"
|
2021-10-24 05:14:25 +00:00
|
|
|
|
2019-09-28 12:35:48 +00:00
|
|
|
kAnimatedTitleDirectory
|
2024-05-26 17:41:21 +00:00
|
|
|
+PSTRING "TITLE.ANIMATED/"
|
2019-09-28 12:35:48 +00:00
|
|
|
|
2019-01-08 19:10:26 +00:00
|
|
|
kGameDirectory
|
2024-05-26 17:41:21 +00:00
|
|
|
+PSTRING "X/"
|
2019-10-09 04:25:10 +00:00
|
|
|
kGameDirectoryLen = 3 ; we need this elsewhere
|
2019-01-08 19:10:26 +00:00
|
|
|
|
2018-10-29 23:23:43 +00:00
|
|
|
kFXDirectory
|
2024-05-26 17:41:21 +00:00
|
|
|
+PSTRING "FX/"
|
2018-10-29 23:23:43 +00:00
|
|
|
|
2019-09-21 22:11:52 +00:00
|
|
|
kGlobalPrefsFilename
|
2024-05-26 17:41:21 +00:00
|
|
|
+PSTRING "PREFS.CONF"
|
2019-09-21 22:11:52 +00:00
|
|
|
|
2021-11-17 19:21:41 +00:00
|
|
|
kStandardPrelaunchRecord
|
|
|
|
!source "src/index/standard.prelaunch.a"
|
2019-09-21 22:11:52 +00:00
|
|
|
|
2021-11-17 19:21:41 +00:00
|
|
|
kCoverFadeRecord
|
|
|
|
!source "src/index/coverfade.idx.a"
|
2019-09-21 22:11:52 +00:00
|
|
|
|
2024-05-28 13:34:29 +00:00
|
|
|
; following three records must end up on the same page
|
|
|
|
; after relocation to LC RAM
|
2021-11-17 02:44:30 +00:00
|
|
|
kHelpBackgroundRecord
|
|
|
|
!source "src/index/res.help.idx.a"
|
|
|
|
|
|
|
|
kTitleRecord
|
|
|
|
!source "src/index/res.title.idx.a"
|
|
|
|
|
|
|
|
kCoverRecord
|
|
|
|
!source "src/index/res.cover.idx.a"
|
2024-05-28 13:34:29 +00:00
|
|
|
|
|
|
|
!if (RELBASE != $2000) and (>kCoverRecord != >kHelpBackgroundRecord) {
|
|
|
|
!serious "cover records are not all on the same page: ", kHelpBackgroundRecord, ", ", kTitleRecord, ", ", kCoverRecord
|
|
|
|
}
|
|
|
|
|
|
|
|
kGRFizzleRecord
|
|
|
|
!source "src/index/gr.fizzle.idx.a"
|
|
|
|
|
|
|
|
kDGRFizzleRecord
|
|
|
|
!source "src/index/dgr.fizzle.idx.a"
|