can now distinguish files from directories
This commit is contained in:
1 parent
230c20a7d0
commit
1ec1359020
2 files changed
+12
-10
No files matched your search
@@ -28,7 +28,7 @@ dir_hdr_sd: ; 32 bytes - header
|
|||||||
dir_end: ; 19 bytes
|
dir_end: ; 19 bytes
|
||||||
|
|
||||||
!byte $01, $01 ; link to the next line - dummy, will be regenerated by BASIC
|
!byte $01, $01 ; link to the next line - dummy, will be regenerated by BASIC
|
||||||
!byte $00, $00 ; line number 0
|
!byte $FF, $FF ; line number 65535 (for SD2IEC compatibility)
|
||||||
!pet "blocks free."
|
!pet "blocks free."
|
||||||
!byte $00, $00, $00 ; end of the line, end of program marker
|
!byte $00, $00, $00 ; end of the line, end of program marker
|
||||||
|
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ fs_hvsr_read_dir:
|
|||||||
@rdonly:
|
@rdonly:
|
||||||
|
|
||||||
lda #'<'
|
lda #'<'
|
||||||
sta SD_DIRENT+$FF
|
sta SD_DIRENT+$FE
|
||||||
|
|
||||||
; Validate/fix characters in file name
|
; Validate/fix characters in file name
|
||||||
|
|
||||||
@@ -116,18 +116,18 @@ fs_hvsr_read_dir:
|
|||||||
dex
|
dex
|
||||||
bpl @lp1
|
bpl @lp1
|
||||||
|
|
||||||
; Determine type (file/directory), store marker offset in SD_DIRENT+$FE
|
; Determine type (file/directory), store marker offset in SD_DIRENT+$FF
|
||||||
|
|
||||||
lda SD_DIRENT+$56
|
lda SD_DIRENT+$56
|
||||||
and #$FE
|
and #$FE
|
||||||
|
beq @cklen_file ; XXX temporary workaround for XEMU
|
||||||
|
|
||||||
; XXX code below does not work
|
and #$20
|
||||||
;cmp #$20
|
bne @cklen_file ; branch on file
|
||||||
;beq @cklen_file ; branch on file
|
|
||||||
;cmp #$10
|
|
||||||
;bne fs_hvsr_read_dir ; this type is unknown
|
|
||||||
|
|
||||||
bra @cklen_file ; XXX temporary
|
lda SD_DIRENT+$56
|
||||||
|
and #$10
|
||||||
|
beq fs_hvsr_read_dir ; this type is unknown
|
||||||
|
|
||||||
@cklen_dir:
|
@cklen_dir:
|
||||||
|
|
||||||
@@ -250,7 +250,9 @@ fs_hvsr_read_dir:
|
|||||||
|
|
||||||
fs_hvsr_read_dir_blocksfree:
|
fs_hvsr_read_dir_blocksfree:
|
||||||
|
|
||||||
; Set pointer to '0 BLOCKS FREE.' line
|
; Set pointer to '65535 BLOCKS FREE.' line
|
||||||
|
|
||||||
|
; XXX determine free space
|
||||||
|
|
||||||
lda #$13
|
lda #$13
|
||||||
sta SD_ACPTR_LEN+0
|
sta SD_ACPTR_LEN+0
|
||||||
|
|||||||
Reference in new issue
Block a user