started work on ram disk
This commit is contained in:
1 parent
5ae7f19f83
commit
935cbc3ded
3 files changed
+51
-2
No files matched your search
@@ -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
|
||||
@@ -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
|
||||
Reference in new issue
Block a user