mirror of
https://github.com/a2-4am/pitch-dark.git
synced 2025-08-15 02:27:19 +00:00
comments
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
;license:MIT
|
;license:MIT
|
||||||
;(c) 2018 by 4am
|
;(c) 2018 by 4am
|
||||||
;
|
;
|
||||||
; load and launch the On Beyond Z-Machine! interpreter
|
; glue code to load, set up, and launch the On Beyond Z-Machine! interpreter
|
||||||
;
|
;
|
||||||
; Public functions
|
; Public functions
|
||||||
; - ClearInterpreterOptions
|
; - ClearInterpreterOptions
|
||||||
|
@@ -1,3 +1,9 @@
|
|||||||
|
;license:MIT
|
||||||
|
;(c) 2018 by 4am
|
||||||
|
;
|
||||||
|
; common assembler macros
|
||||||
|
;
|
||||||
|
|
||||||
PARAM = $00
|
PARAM = $00
|
||||||
|
|
||||||
!macro PARAMS_ON_STACK .bytes {
|
!macro PARAMS_ON_STACK .bytes {
|
||||||
|
@@ -1,3 +1,11 @@
|
|||||||
|
;license:MIT
|
||||||
|
;(c) 2018 by 4am
|
||||||
|
;
|
||||||
|
; Common functions across parsers
|
||||||
|
;
|
||||||
|
; Public functions:
|
||||||
|
; - ParseKeyValueText
|
||||||
|
;
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; ParseKeyValueText
|
; ParseKeyValueText
|
||||||
; parse buffer with KEY=VALUE lines of text into an okvs
|
; parse buffer with KEY=VALUE lines of text into an okvs
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
;license:MIT
|
;license:MIT
|
||||||
;(c) 2018 by 4am
|
;(c) 2018 by 4am
|
||||||
;
|
;
|
||||||
; Parser for game list
|
; Parser for game list file
|
||||||
;
|
;
|
||||||
; Public functions
|
; Public functions
|
||||||
; - LoadGameList
|
; - LoadGameList
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
;license:MIT
|
;license:MIT
|
||||||
;(c) 2018 by 4am
|
;(c) 2018 by 4am
|
||||||
;
|
;
|
||||||
; Global preferences
|
; Parser for global preferences file
|
||||||
;
|
;
|
||||||
; Public functions
|
; Public functions
|
||||||
; - LoadGlobalPreferences
|
; - LoadGlobalPreferences
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
;license:MIT
|
;license:MIT
|
||||||
;(c) 2018 by 4am
|
;(c) 2018 by 4am
|
||||||
;
|
;
|
||||||
|
; It is Pitch Dark. You are likely to be eaten by a GUI.
|
||||||
|
;
|
||||||
; Public entry points
|
; Public entry points
|
||||||
; - MainScreen
|
; - MainScreen
|
||||||
|
|
||||||
|
@@ -1,13 +1,14 @@
|
|||||||
;license:MIT
|
;license:MIT
|
||||||
;(c) 2017-8 by 4am
|
;(c) 2017-8 by 4am
|
||||||
;
|
;
|
||||||
; ProDOS and file routines
|
; ProDOS - file and other MLI routines
|
||||||
;
|
;
|
||||||
; Public functions
|
; Public functions
|
||||||
; - LoadFile
|
; - LoadFile
|
||||||
; - LoadDHRFile
|
; - LoadDHRFile
|
||||||
; - SaveFile
|
; - SaveFile
|
||||||
; - SetPrefix
|
; - SetPrefix
|
||||||
|
; - GetFileInfo
|
||||||
; - QuitToProDOS
|
; - QuitToProDOS
|
||||||
;
|
;
|
||||||
|
|
||||||
@@ -248,6 +249,8 @@ GetFileInfo
|
|||||||
jmp _getfileinfo
|
jmp _getfileinfo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
;------------------------------------------------------------------------------
|
||||||
|
|
||||||
;-------------------------------
|
;-------------------------------
|
||||||
; open file via ProDOS MLI
|
; open file via ProDOS MLI
|
||||||
;
|
;
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
;license:MIT
|
;license:MIT
|
||||||
;(c) 2018 by 4am
|
;(c) 2018 by 4am
|
||||||
;
|
;
|
||||||
; Functions to build a ProDOS pathname from length-prefixed strings
|
; ProDOS - functions for constructing and passing around ProDOS pathnames
|
||||||
;
|
;
|
||||||
; Public functions
|
; Public functions
|
||||||
; - ResetPath
|
; - ResetPath
|
||||||
@@ -77,38 +77,3 @@ SetStartupPath
|
|||||||
bpl -
|
bpl -
|
||||||
rts
|
rts
|
||||||
}
|
}
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
|
||||||
; CreateNullTerminatedString
|
|
||||||
; Copy a length-prefixed string to kNullTerminatedBuffer and null-terminate it.
|
|
||||||
; Destination string is left-padded with a single space because reasons.
|
|
||||||
; Maximum length is 127 bytes.
|
|
||||||
;
|
|
||||||
; in: A/Y contains address of length-prefixed string to copy
|
|
||||||
; X contains length of null-terminated string -- if > length of source,
|
|
||||||
; remaining buffer will be padded with spaces (#$A0)
|
|
||||||
; out: X preserved
|
|
||||||
; all other registers and flags clobbered
|
|
||||||
; $00/$01 clobbered
|
|
||||||
;------------------------------------------------------------------------------
|
|
||||||
!zone {
|
|
||||||
CreateNullTerminatedString
|
|
||||||
+STAY $00
|
|
||||||
|
|
||||||
phx
|
|
||||||
lda #$A0
|
|
||||||
- dex
|
|
||||||
sta kNullTerminatedBuffer,x
|
|
||||||
bpl -
|
|
||||||
plx
|
|
||||||
lda #$00
|
|
||||||
sta kNullTerminatedBuffer,x
|
|
||||||
|
|
||||||
lda ($00)
|
|
||||||
tay
|
|
||||||
- lda ($00),y
|
|
||||||
sta kNullTerminatedBuffer,y
|
|
||||||
dey
|
|
||||||
bne -
|
|
||||||
rts
|
|
||||||
}
|
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
; Public functions
|
; Public functions
|
||||||
; - DisconnectRAM32
|
; - DisconnectRAM32
|
||||||
;
|
;
|
||||||
; TODO reconnect on exit
|
; does not reconnect /RAM on exit, which is rude
|
||||||
;
|
;
|
||||||
MLI = $BF00 ; ProDOS MLI entry point
|
MLI = $BF00 ; ProDOS MLI entry point
|
||||||
NODEV = $BF10 ; means 'no device connected'
|
NODEV = $BF10 ; means 'no device connected'
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
; - PrintAt
|
; - PrintAt
|
||||||
; - SimulateClick
|
; - SimulateClick
|
||||||
; - GetCheckedRadioButton
|
; - GetCheckedRadioButton
|
||||||
|
; - CreateNullTerminatedString
|
||||||
;
|
;
|
||||||
; Public constants
|
; Public constants
|
||||||
; - kStringOK
|
; - kStringOK
|
||||||
@@ -197,3 +198,38 @@ GetCheckedRadioButton
|
|||||||
clc
|
clc
|
||||||
rts
|
rts
|
||||||
}
|
}
|
||||||
|
|
||||||
|
;------------------------------------------------------------------------------
|
||||||
|
; CreateNullTerminatedString
|
||||||
|
; Copy a length-prefixed string to kNullTerminatedBuffer and null-terminate it.
|
||||||
|
; Destination string is left-padded with a single space because reasons.
|
||||||
|
; Maximum length is 127 bytes.
|
||||||
|
;
|
||||||
|
; in: A/Y contains address of length-prefixed string to copy
|
||||||
|
; X contains length of null-terminated string -- if > length of source,
|
||||||
|
; remaining buffer will be padded with spaces (#$A0)
|
||||||
|
; out: X preserved
|
||||||
|
; all other registers and flags clobbered
|
||||||
|
; $00/$01 clobbered
|
||||||
|
;------------------------------------------------------------------------------
|
||||||
|
!zone {
|
||||||
|
CreateNullTerminatedString
|
||||||
|
+STAY $00
|
||||||
|
|
||||||
|
phx
|
||||||
|
lda #$A0
|
||||||
|
- dex
|
||||||
|
sta kNullTerminatedBuffer,x
|
||||||
|
bpl -
|
||||||
|
plx
|
||||||
|
lda #$00
|
||||||
|
sta kNullTerminatedBuffer,x
|
||||||
|
|
||||||
|
lda ($00)
|
||||||
|
tay
|
||||||
|
- lda ($00),y
|
||||||
|
sta kNullTerminatedBuffer,y
|
||||||
|
dey
|
||||||
|
bne -
|
||||||
|
rts
|
||||||
|
}
|
||||||
|
@@ -14,8 +14,7 @@ SPEAKER = $C030
|
|||||||
; SoftBell
|
; SoftBell
|
||||||
;
|
;
|
||||||
; in: none
|
; in: none
|
||||||
; out: all registers preserved
|
; out: all registers and flags preserved
|
||||||
; all flags clobbered
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
SoftBell
|
SoftBell
|
||||||
php
|
php
|
||||||
|
@@ -157,8 +157,8 @@ VersionsDialog
|
|||||||
lda #ID_VERSIONS_FRAME
|
lda #ID_VERSIONS_FRAME
|
||||||
jsr WeeGUI
|
jsr WeeGUI
|
||||||
|
|
||||||
lda #1 ; WeeGUI radio button labels are limited to 15 characters, so we have
|
lda #1 ; WeeGUI radio buttons are limited to 15 characters, so we have just the
|
||||||
sta .vtab ; just the hotkeys (1-9) in the radio button label then print the
|
sta .vtab ; hotkeys (1-9) 'in' the radio button then print the labels separately
|
||||||
jsr okvs_iter_values
|
jsr okvs_iter_values
|
||||||
!word gVersionsStore
|
!word gVersionsStore
|
||||||
!word PrintVersionLabelCallback
|
!word PrintVersionLabelCallback
|
||||||
|
Reference in New Issue
Block a user