started work on ram disk

This commit is contained in:
FeralChild64 committed 2021-03-25 22:51:44 +01:00
1 parent 5ae7f19f83
commit 935cbc3ded
3 files changed
+51 -2

No files matched your search

+2 -2
View File
@@ -69,7 +69,7 @@
;; #CONFIG# KEYCMD_F10 "\5FL"
;; #CONFIG# KEYCMD_F11 "@29$"
;; #CONFIG# KEYCMD_F12 "\5FHF"
;; #CONFIG# KEYCMD_F13 "JOYCRSR 2"
;; #CONFIG# KEYCMD_F13 "@30$"
;; #CONFIG# KEYCMD_F14 "BOOTCPM"
@@ -92,7 +92,7 @@
;; #CONFIG# UNIT_SDCARD 28
;; #CONFIG# UNIT_FLOPPY 29
;; #CONFIG# UNIT_RAMDISK 0 ; do not change, ram disk is not implemented yet
;; #CONFIG# UNIT_RAMDISK 30
; --- Debug options
@@ -0,0 +1,9 @@
;
; File name for the initial RAM disk
;
ramdisk_filename:
!pet "ramdisk.dnp"
!byte $00
+40
View File
@@ -23,6 +23,46 @@ unit_rd_init:
sta RD_STATUS_BUF,x
bne @1
; End of initialization, now try to load the initial RAM disk; first set file name
ldx #<ramdisk_filename
ldy #>ramdisk_filename
lda #$2E ; dos_setname
sta HTRAP00
+nop
; Try to find the file
jsr fs_vfs_direntmem_prepare
ldy #>FS_HVSR_DIRENT ; XXX is it needed?
lda #$30 ; dos_findfirst
sta HTRAP00
+nop
bcc @error_not_found ; branch if file not found XXX why it can't find the file?
; XXX load the file
lda #$20 ; dos_closefile
sta HTRAP00
+nop
jsr fs_vfs_direntmem_restore
; End of initialization
rts
@error_not_found:
; XXX set information about file not found
jmp fs_vfs_direntmem_restore