CBDOS fixes

This commit is contained in:
FeralChild64 committed 2021-02-14 13:51:20 +01:00
1 parent 578be0bcc8
commit 8fdeda81de
3 files changed
+15 -9

No files matched your search

+3 -3
View File
@@ -18,7 +18,7 @@ dev_sd_cmd_OPEN_EOI:
; XXX add support for second card ; XXX add support for second card
lda SD_CMDFN_BUF lda SD_CMDFN_BUF
cmp '$' cmp #'$'
beq dev_sd_cmd_OPEN_dir beq dev_sd_cmd_OPEN_dir
; XXX implement for file names ; XXX implement for file names
@@ -38,9 +38,9 @@ dev_sd_cmd_OPEN_dir:
; Provide pointer and length of the header ; Provide pointer and length of the header
lda #$20 lda #$20
sta SD_ACPTR_PTR+0 sta SD_ACPTR_LEN+0
lda #$00 lda #$00
sta SD_ACPTR_PTR+1 sta SD_ACPTR_LEN+1
lda #<dir_hdr_sd lda #<dir_hdr_sd
sta SD_ACPTR_PTR+0 sta SD_ACPTR_PTR+0
+2
View File
@@ -5,6 +5,8 @@
; Definitions for calling MEGA65 segment KERNAL_0 routines from DOS_1 ; Definitions for calling MEGA65 segment KERNAL_0 routines from DOS_1
; ;
;; #ALIAS# MONITOR = KERNAL_0.MONITOR
;; #ALIAS# kernalstatus_EOI = KERNAL_0.kernalstatus_EOI ;; #ALIAS# kernalstatus_EOI = KERNAL_0.kernalstatus_EOI
;; #ALIAS# kernalstatus_DEVICE_NOT_FOUND = KERNAL_0.kernalstatus_DEVICE_NOT_FOUND ;; #ALIAS# kernalstatus_DEVICE_NOT_FOUND = KERNAL_0.kernalstatus_DEVICE_NOT_FOUND
+10 -6
View File
@@ -21,6 +21,7 @@ msg_CIOUT:
; Receiving command or file name ; Receiving command or file name
ldx IDX2_LISTENER ldx IDX2_LISTENER
lda REG_A
jmp (msg_CIOUT_cmdfn_vectab, X) jmp (msg_CIOUT_cmdfn_vectab, X)
@1: @1:
; XXX handle cases of transferring data ; XXX handle cases of transferring data
@@ -42,13 +43,14 @@ msg_CIOUT_fail:
msg_CIOUT_cmdfn_SD: ; get next byte of status - SD card msg_CIOUT_cmdfn_SD: ; get next byte of status - SD card
ldx SD_CMDFN_IDX ldx SD_CMDFN_IDX
sta SD_CMDFN_IDX,x sta SD_CMDFN_BUF,x
inx inx
bpl @1 bpl @1
ldx #$7F ldx #$7F
@1: @1:
sta SD_CMDFN_IDX
lda #$00 lda #$00
sta SD_CMDFN_IDX,x sta SD_CMDFN_BUF,x
plp plp
+bcs dev_sd_cmd_OPEN_EOI ; if EOI - execute command +bcs dev_sd_cmd_OPEN_EOI ; if EOI - execute command
jmp dos_EXIT jmp dos_EXIT
@@ -56,13 +58,14 @@ msg_CIOUT_cmdfn_SD: ; get next byte of status - SD card
msg_CIOUT_cmdfn_FD: ; get next byte of status - floppy msg_CIOUT_cmdfn_FD: ; get next byte of status - floppy
ldx FD_CMDFN_IDX ldx FD_CMDFN_IDX
sta FD_CMDFN_IDX,x sta FD_CMDFN_BUF,x
inx inx
bpl @1 bpl @1
ldx #$7F ldx #$7F
@1: @1:
sta FD_CMDFN_IDX
lda #$00 lda #$00
sta FD_CMDFN_IDX,x sta FD_CMDFN_BUF,x
plp plp
+bcs dev_fd_cmd_OPEN_EOI ; if EOI - execute command +bcs dev_fd_cmd_OPEN_EOI ; if EOI - execute command
jmp dos_EXIT jmp dos_EXIT
@@ -70,13 +73,14 @@ msg_CIOUT_cmdfn_FD: ; get next byte of status - floppy
msg_CIOUT_cmdfn_RD: ; get next byte of status - ram disk msg_CIOUT_cmdfn_RD: ; get next byte of status - ram disk
ldx RD_CMDFN_IDX ldx RD_CMDFN_IDX
sta RD_CMDFN_IDX,x sta RD_CMDFN_BUF,x
inx inx
bpl @1 bpl @1
ldx #$7F ldx #$7F
@1: @1:
sta RD_CMDFN_IDX
lda #$00 lda #$00
sta RD_CMDFN_IDX,x sta RD_CMDFN_BUF,x
plp plp
+bcs dev_rd_cmd_OPEN_EOI ; if EOI - execute command +bcs dev_rd_cmd_OPEN_EOI ; if EOI - execute command
jmp dos_EXIT jmp dos_EXIT