directory seems to be working correctly again
This commit is contained in:
1 parent
9c6e6b0372
commit
282fba5288
3 files changed
+16
-14
No files matched your search
@@ -56,18 +56,18 @@
|
|||||||
!addr PAR_FSIZE_BYTES = $801A ; 4 bytes - file size in bytes
|
!addr PAR_FSIZE_BYTES = $801A ; 4 bytes - file size in bytes
|
||||||
!addr PAR_FSIZE_BLOCKS = $801E ; 2 bytes - file size in blocks
|
!addr PAR_FSIZE_BLOCKS = $801E ; 2 bytes - file size in blocks
|
||||||
|
|
||||||
!addr PAR_FTYPE = $801F ; bits 0-5 - type, bits 6-7 - protected, closed
|
!addr PAR_FTYPE = $8020 ; bits 0-5 - type, bits 6-7 - protected, closed
|
||||||
!addr PAR_FNAME = $8020 ; 16 bytes - filename, filled with $A0
|
!addr PAR_FNAME = $8021 ; 16 bytes - filename, filled with $A0
|
||||||
!addr PAR_FPATTERN = $8030 ; 16 bytes - pattern to match, filled with $A0
|
!addr PAR_FPATTERN = $8031 ; 16 bytes - pattern to match, filled with $A0
|
||||||
|
|
||||||
; Various temporary data
|
; Various temporary data
|
||||||
|
|
||||||
!addr XX_DIR_PHASE = $8040 ; directory output phase, values deponds on device driver, but 0 = not reading
|
!addr XX_DIR_PHASE = $8041 ; directory output phase, values deponds on device driver, but 0 = not reading
|
||||||
!addr SD_DIR_PHASE = $8040 ; - SD card
|
!addr SD_DIR_PHASE = $8041 ; - SD card
|
||||||
!addr FD_DIR_PHASE = $8041 ; - floppy
|
!addr FD_DIR_PHASE = $8042 ; - floppy
|
||||||
!addr RD_DIR_PHASE = $8042 ; - ram disk
|
!addr RD_DIR_PHASE = $8043 ; - ram disk
|
||||||
|
|
||||||
; Free space: $8043-$8063
|
; Free space: $8044-$8063
|
||||||
|
|
||||||
!addr SD_ACPTR_helper = $8052 ; subroutine in RAM to read a byte
|
!addr SD_ACPTR_helper = $8052 ; subroutine in RAM to read a byte
|
||||||
!addr code_LDA_01 = $8052 ; - LDA instruction
|
!addr code_LDA_01 = $8052 ; - LDA instruction
|
||||||
|
|||||||
@@ -133,13 +133,13 @@ fs_hvsr_read_dir:
|
|||||||
@lp3_done:
|
@lp3_done:
|
||||||
|
|
||||||
lda PAR_FTYPE ; put 'damaged' mark if needed
|
lda PAR_FTYPE ; put 'damaged' mark if needed
|
||||||
bmi @damaged
|
bmi @closed
|
||||||
lda #' '
|
lda #'*'
|
||||||
+skip_2_bytes_trash_nvz
|
+skip_2_bytes_trash_nvz
|
||||||
|
|
||||||
@damaged:
|
@closed:
|
||||||
|
|
||||||
lda #'*'
|
lda #' '
|
||||||
sta XX_DIR_ENTRY, x
|
sta XX_DIR_ENTRY, x
|
||||||
inx
|
inx
|
||||||
|
|
||||||
|
|||||||
@@ -173,8 +173,10 @@ fs_hvsr_util_nextdirentry:
|
|||||||
+beq fs_hvsr_util_nextdirentry ; file extension 'DIR' does not mean this is a directory
|
+beq fs_hvsr_util_nextdirentry ; file extension 'DIR' does not mean this is a directory
|
||||||
tya
|
tya
|
||||||
|
|
||||||
asr ; convert the result to CBM-compatible value
|
clc
|
||||||
asr
|
ror
|
||||||
|
clc
|
||||||
|
ror
|
||||||
inc
|
inc
|
||||||
|
|
||||||
cmp #$06 ; mark some file types (not SEQ/PRG/USR/REL/DIR) as read-only
|
cmp #$06 ; mark some file types (not SEQ/PRG/USR/REL/DIR) as read-only
|
||||||
|
|||||||
Reference in new issue
Block a user