more work towards CBDOS floppy support

This commit is contained in:
FeralChild64 committed 2021-03-13 00:23:37 +01:00
1 parent 062c73a809
commit 898eb1e17f
4 files changed
+24 -14

No files matched your search

+4 -4
View File
@@ -65,9 +65,9 @@
;; #CONFIG# KEYCMD_HELP "LIST"
;; #CONFIG# KEYCMD_F9 "@20$"
;; #CONFIG# KEYCMD_F9 "@28$"
;; #CONFIG# KEYCMD_F10 "\5FL"
;; #CONFIG# KEYCMD_F11 "@21$"
;; #CONFIG# KEYCMD_F11 "@29$"
;; #CONFIG# KEYCMD_F12 "\5FHF"
;; #CONFIG# KEYCMD_F13 "JOYCRSR 2"
;; #CONFIG# KEYCMD_F14 "BOOTCPM"
@@ -90,8 +90,8 @@
; --- Built-in DOS configuration
;; #CONFIG# UNIT_SDCARD 20
;; #CONFIG# UNIT_FLOPPY 21 ; work in progress
;; #CONFIG# UNIT_SDCARD 28
;; #CONFIG# UNIT_FLOPPY 29 ; work in progress
;; #CONFIG# UNIT_RAMDISK 0 ; do not change, DOS is not implemented yet
+2
View File
@@ -114,6 +114,8 @@
!addr SD_DESC = $8070 ; current file descriptor
!addr FD_DIRENT = $8071 ; directory entry to read, 0-15
!addr FD_LOADTRACK = $8072 ; current track for file loading
!addr FD_LOADSECTOR = $8073 ; current sector for file loading
; XXX Free space
@@ -84,13 +84,9 @@ fs_cbm_nextdirentry:
lda SHARED_BUF_1+0
beq @end_of_dir
lda SHARED_BUF_1+1
cmp #$FF
beq @end_of_dir
; Load the next sector
lda SHARED_BUF_1+0
sta PAR_TRACK
lda SHARED_BUF_1+1
sta PAR_SECTOR
@@ -103,13 +99,9 @@ fs_cbm_nextdirentry:
lda SHARED_BUF_1+$100+0
beq @end_of_dir
lda SHARED_BUF_1+$100+1
cmp #$FF
beq @end_of_dir
; Load the next sector
lda SHARED_BUF_1+$100+0
sta PAR_TRACK
lda SHARED_BUF_1+$100+1
sta PAR_SECTOR
+18 -2
View File
@@ -29,16 +29,32 @@ fs_cbm_read_file_open:
; XXX deduplicate code above with fs_cbm_read_dir_open
; Try to find the file
; Try to find the file, has to be PRG
@lp_find:
jsr fs_cbm_nextdirentry
+bcs dos_EXIT
; Only accept files of type 'PRG', properly closed XXX deduplicate with fs_vfs
lda PAR_FTYPE
and #%10111111
cmp #$82
bne @lp_find
; Check if file name matches the filter XXX deduplicate with fs_vfs
jsr util_dir_filter
bne @lp_find ; if does not match, try the next entry
; Found the file - load it, start from fetching initial track/sector
; XXX provide implementation
; XXX provide implementation, use FD_LOADTRACK and FD_LOADSECTOR
jmp dos_EXIT_SEC