pitch-dark/src/constants.a

49 lines
2.0 KiB
Plaintext

;license:MIT
;(c) 2018 by 4am
;
; YE OLDE GRAND UNIFIED MEMORY MAP
;
; 0800..1BFF - game description file (read)
; 1C00..1FFF - ProDOS 1K file buffer
; 2000..3FFF - DHGR artwork (read)
; ONBEYOND.SYSTEM (read + execute)
; ZINFO.SYSTEM (read + execute)
; global preferences file (read + write)
; 3F00..3FFF - gPathname
; kNullTerminatedBuffer
; gKey/gVal
; 4000.~5BFF - WeeGUI (approximate)
;~5C00.~73FF - program code (approximate)
;~7400...... - program data (approximate)
;
kPitchDarkBinaryAddress = $3F24
kGameInfoBuffer = $0800 ; used by LoadGameInfo
kProDOSFileBuffer = $1C00 ; 1K buffer for ProDOS MLI calls
kSystemAddress = $2000 ; used by LaunchInterpreter
kGlobalPrefsBuffer = $2000 ; used by LoadGlobalPreferences/SaveGlobalPreferences
kCreditsBuffer = $2000 ; used by CreditsDialog
gPathname = $3F00 ; used by ResetPath/AddToPath
kNullTerminatedBuffer = $3F00 ; used by paintInfoView
gKeyLen = $3F00 ; used by ParseKeyValueText
gKey = $3F01
gValLen = $3F80
gVal = $3F81
WGInit = $4000 ; WeeGUI file load address and initialization function
NODEV = $BF10 ; means 'no device connected'
RAM32 = $BF26 ; S3,D2 /RAM device
DEVCNT = $BF31 ; ProDOS device count
DEVLST = $BF32 ; ProDOS device list
SPEAKER = $C030 ; used by SoftBell
WAIT = $FCA8
MAGICRTS = $FF58 ; used to set overflow bit
; zero page
PARAM = $00 ; used by PARAMS_ON_STACK macro, so basically everywhere
PTR = $02
SRC = $04
DEST = $06
ZPTR = $06 ; used by glue.zinfo because it's unused by okvs_append
SAVE = $08