work towards SECOND/TKSA in CBDOS
This commit is contained in:
1 parent
575833d763
commit
04be4bf1d1
13 files changed
+163
-24
No files matched your search
@@ -61,7 +61,11 @@ SRCDIR_KERNAL = $(SRCDIR_COMMON) \
|
||||
src/kernal/time
|
||||
|
||||
SRCDIR_DOS_M65 = $(SRCDIR_COMMON) \
|
||||
src/dos_m65
|
||||
src/dos_m65 \
|
||||
src/dos_m65/dev_floppy \
|
||||
src/dos_m65/dev_ramdisk \
|
||||
src/dos_m65/dev_sdcard
|
||||
|
||||
|
||||
SRCDIR_MON_M65 = $(SRCDIR_COMMON) \
|
||||
src/mon_m65
|
||||
|
||||
@@ -21,5 +21,14 @@
|
||||
|
||||
; General DOS status
|
||||
|
||||
!addr IDX_LISTENER = $8008 ; listener idx * 2, >=$80 = none
|
||||
!addr IDX_TALKER = $8009 ; talker idx * 2, >=$80 = none
|
||||
!addr IDX_LISTENER = $8008 ; listener idx * 2, >=$80 = none - for calling routines via vector table
|
||||
!addr IDX_TALKER = $8009 ; talker idx * 2, >=$80 = none - for calling routines via vector table
|
||||
|
||||
; Free space: $800A-$806F
|
||||
|
||||
!addr SD_STATUS_STR = $8070 ; status string for SD card, terminated by 0
|
||||
!addr SD_STATUS_IDX = $809F ; index byte for reading status
|
||||
!addr FD_STATUS_STR = $80A0 ; status string for floppy drive, terminated by 0
|
||||
!addr FD_STATUS_IDX = $80CF ; index byte for reading status
|
||||
!addr RD_STATUS_STR = $80D0 ; status string for ram disk, terminated by 0
|
||||
!addr RD_STATUS_IDX = $80FF ; index byte for reading status
|
||||
@@ -0,0 +1,22 @@
|
||||
|
||||
;
|
||||
; Initializes DOS part of floppy controller
|
||||
;
|
||||
|
||||
|
||||
dev_fd_init:
|
||||
|
||||
; Copy status string
|
||||
|
||||
ldx #$00
|
||||
stx FD_STATUS_IDX
|
||||
dex
|
||||
@1:
|
||||
inx
|
||||
lda dos_err_init_floppy,x
|
||||
sta FD_STATUS_STR,x
|
||||
bne @1
|
||||
|
||||
; End of initialization
|
||||
|
||||
rts
|
||||
@@ -0,0 +1,22 @@
|
||||
|
||||
;
|
||||
; Initializes DOS part of ram disk
|
||||
;
|
||||
|
||||
|
||||
dev_rd_init:
|
||||
|
||||
; Copy status string
|
||||
|
||||
ldx #$00
|
||||
stx RD_STATUS_IDX
|
||||
dex
|
||||
@1:
|
||||
inx
|
||||
lda dos_err_init_ramdisk,x
|
||||
sta RD_STATUS_STR,x
|
||||
bne @1
|
||||
|
||||
; End of initialization
|
||||
|
||||
rts
|
||||
@@ -0,0 +1,22 @@
|
||||
|
||||
;
|
||||
; Initializes DOS part of SD card
|
||||
;
|
||||
|
||||
|
||||
dev_sd_init:
|
||||
|
||||
; Copy status string
|
||||
|
||||
ldx #$00
|
||||
stx SD_STATUS_IDX
|
||||
dex
|
||||
@1:
|
||||
inx
|
||||
lda dos_err_init_sdcard,x
|
||||
sta SD_STATUS_STR,x
|
||||
bne @1
|
||||
|
||||
; End of initialization
|
||||
|
||||
rts
|
||||
@@ -0,0 +1,22 @@
|
||||
|
||||
;
|
||||
; Implementation of ACPTR/CIOUT commands.
|
||||
; For detailed description see 'm65dos_bridge.s' file.
|
||||
;
|
||||
|
||||
|
||||
dos_ACPTR:
|
||||
|
||||
; XXX provide implementation
|
||||
|
||||
sec
|
||||
rts
|
||||
|
||||
|
||||
|
||||
dos_CIOUT:
|
||||
|
||||
; XXX provide implementation
|
||||
|
||||
sec
|
||||
rts
|
||||
@@ -9,15 +9,15 @@
|
||||
|
||||
dos_err_init_sdcard:
|
||||
|
||||
!pet "m65 dos sdcard", 0
|
||||
!pet "73,m65 dos sdcard,00,00", 0
|
||||
|
||||
dos_err_init_floppy:
|
||||
|
||||
!pet "m65 dos floppy", 0
|
||||
!pet "73,m65 dos floppy,00,00", 0
|
||||
|
||||
dos_err_init_ramdisk:
|
||||
|
||||
!pet "m65 dos ram disk", 0
|
||||
!pet "73,m65 dos ram disk,00,00", 0
|
||||
|
||||
|
||||
; List compiled from various manuals (CBM 1571, CBM 1581, CMD FD4000, MSD Super Disk, IDE64)
|
||||
|
||||
@@ -37,4 +37,10 @@ dos_INIT:
|
||||
sta IDX_LISTENER
|
||||
sta IDX_TALKER
|
||||
|
||||
; Initialize device handlers
|
||||
|
||||
jsr dev_sd_init
|
||||
jsr dev_fd_init
|
||||
jsr dev_rd_init
|
||||
|
||||
rts
|
||||
@@ -72,6 +72,7 @@ dos_TALK_success:
|
||||
dos_fail_TALK_LISTEN:
|
||||
|
||||
pla
|
||||
lda #K_ERR_DEVICE_NOT_FOUND
|
||||
sec
|
||||
rts
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
|
||||
;
|
||||
; Implementation of SECOND/TKSA commands.
|
||||
; For detailed description see 'm65dos_bridge.s' file.
|
||||
;
|
||||
|
||||
|
||||
dos_SECOND:
|
||||
|
||||
; XXX provide implementation
|
||||
|
||||
sec
|
||||
rts
|
||||
|
||||
|
||||
dos_TKSA:
|
||||
|
||||
pha
|
||||
and #$60
|
||||
bne dos_TKSA_OPEN
|
||||
pla
|
||||
|
||||
; XXX provide implementation
|
||||
|
||||
sec
|
||||
rts
|
||||
|
||||
|
||||
dos_TKSA_OPEN:
|
||||
|
||||
pla
|
||||
and #$1F
|
||||
cmp #$0F
|
||||
beq dos_TKSA_OPEN_cmd
|
||||
|
||||
; XXX provide implementation
|
||||
|
||||
sec
|
||||
rts
|
||||
|
||||
|
||||
dos_TKSA_OPEN_cmd:
|
||||
|
||||
; XXX provide implementation
|
||||
|
||||
sec
|
||||
rts
|
||||
@@ -1,16 +0,0 @@
|
||||
|
||||
; Dummy implementations - XXX to be replaced with real ones
|
||||
|
||||
dos_ACPTR:
|
||||
+nop
|
||||
dos_CIOUT:
|
||||
+nop
|
||||
dos_SECOND:
|
||||
+nop
|
||||
dos_TKSA:
|
||||
+nop
|
||||
|
||||
sec
|
||||
rts
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ ACPTR:
|
||||
|
||||
!ifdef CONFIG_MB_M65 {
|
||||
jsr m65dos_check
|
||||
+bcc m65dos_acptr ; branch if device is handeld by internal DOS
|
||||
+bcc m65dos_acptr ; branch if device is handeld by internal DOS
|
||||
}
|
||||
|
||||
!ifdef CONFIG_IEC {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
TKSA:
|
||||
|
||||
!ifdef CONFIG_MB_MEGA65 {
|
||||
!ifdef CONFIG_MB_M65 {
|
||||
|
||||
jsr m65dos_check
|
||||
+bcc m65dos_tksa ; branch if device is handeld by internal DOS
|
||||
|
||||
Reference in new issue
Block a user