further RAM disk and floppy code integration

This commit is contained in:
FeralChild64 committed 2021-06-17 21:50:24 +02:00
1 parent 2acf32fb68
commit 924d87d271
4 files changed
+28 -20

No files matched your search

+2 -2
View File
@@ -7,8 +7,8 @@
dos_cmd_OPEN_vectab:
!word unit_sd_cmd_OPEN
!word unit_fd_cmd_OPEN
!word unit_rd_cmd_OPEN
!word unit_disk_cmd_OPEN
!word unit_disk_cmd_OPEN
dos_cmd_CLOSE_vectab:
+8 -7
View File
@@ -72,9 +72,7 @@ msg_CIOUT_cmdfn_F0: ; get next byte of status - floppy
stx F0_CMDFN_IDX
lda #$A0
sta F0_CMDFN_BUF,x
plp
+bcs unit_fd_cmd_OPEN_EOI ; if EOI - execute command
jmp dos_EXIT_CLC
bra msg_CIOUT_cmdfn_FX
msg_CIOUT_cmdfn_F1: ; get next byte of status - floppy
@@ -87,9 +85,7 @@ msg_CIOUT_cmdfn_F1: ; get next byte of status - floppy
stx F1_CMDFN_IDX
lda #$A0
sta F1_CMDFN_BUF,x
plp
+bcs unit_fd_cmd_OPEN_EOI ; if EOI - execute command
jmp dos_EXIT_CLC
bra msg_CIOUT_cmdfn_FX
msg_CIOUT_cmdfn_RD: ; get next byte of status - ram disk
@@ -102,8 +98,13 @@ msg_CIOUT_cmdfn_RD: ; get next byte of status - ram disk
stx RD_CMDFN_IDX
lda #$A0
sta RD_CMDFN_BUF,x
; FALLTROUGH
msg_CIOUT_cmdfn_FX: ; common pard for floppy and RAM disk
plp
+bcs unit_rd_cmd_OPEN_EOI ; if EOI - execute command
+bcs unit_disk_cmd_OPEN_EOI ; if EOI - execute command
jmp dos_EXIT_CLC
msg_CIOUT_cmdfn_vectab:
+18 -5
View File
@@ -6,14 +6,15 @@
; XXX add support for both floppies
unit_fd_cmd_OPEN:
unit_disk_cmd_OPEN:
lda #$01 ; mode: receive command or file name
sta F0_MODE
ldx PAR_FSINSTANCE
sta XX_MODE, x
jmp dos_EXIT_CLC
unit_fd_cmd_OPEN_EOI:
unit_disk_cmd_OPEN_EOI:
; XXX this dispatcher is temporary
@@ -26,16 +27,28 @@ unit_fd_cmd_OPEN_EOI:
dey
bpl @lp1
; XXX add support for second floppy
ldx PAR_FSINSTANCE
cmp #$02
beq @f1
bcs @rd
lda F0_CMDFN_BUF
+skip_2_bytes_trash_nvz
@f1:
lda F1_CMDFN_BUF
+skip_2_bytes_trash_nvz
@rd:
lda RD_CMDFN_BUF
cmp #'$'
beq unit_fd_cmd_OPEN_dir
beq unit_fd_cmd_OPEN_dir ; XXX add support for second floppy and RAM disk
; FALLTROUGH
unit_fd_cmd_OPEN_file:
; XXX add support for second floppy and RAM disk
; Copy the filter from command XXX this should be moved to common part and deduplicated with directory opening
ldy #$00
@@ -6,12 +6,6 @@
; XXX to be unified with floppy code
unit_rd_cmd_OPEN:
; XXX provide implementation
jmp dos_EXIT_SEC
unit_rd_cmd_OPEN_EOI:
; XXX provide implementation