rework for the initial CBDOS

This commit is contained in:
FeralChild64 committed 2021-02-03 16:05:07 +01:00
1 parent 82729bb621
commit 92d1ad0177
13 files changed
+349 -85

No files matched your search

+26 -15
View File
@@ -7,16 +7,17 @@
!addr VDOS_INIT = $4020 + 0 * 2
!addr VDOS_CHKUNIT = $4020 + 1 * 2
!addr VDOS_SETUNIT = $4020 + 2 * 2
!addr VDOS_ACPTR = $4020 + 3 * 2
!addr VDOS_CIOUT = $4020 + 4 * 2
!addr VDOS_LISTEN = $4020 + 5 * 2
!addr VDOS_SECOND = $4020 + 6 * 2
!addr VDOS_TALK = $4020 + 7 * 2
!addr VDOS_TKSA = $4020 + 8 * 2
!addr VDOS_UNTLK = $4020 + 9 * 2
!addr VDOS_UNLSN = $4020 + 10 * 2
!addr VDOS_UNITCHK = $4020 + 1 * 2
!addr VDOS_UNITSET = $4020 + 2 * 2
!addr VDOS_UNITNUM = $4020 + 3 * 2
!addr VDOS_ACPTR = $4020 + 4 * 2
!addr VDOS_CIOUT = $4020 + 5 * 2
!addr VDOS_LISTEN = $4020 + 6 * 2
!addr VDOS_SECOND = $4020 + 7 * 2
!addr VDOS_TALK = $4020 + 8 * 2
!addr VDOS_TKSA = $4020 + 9 * 2
!addr VDOS_UNTLK = $4020 + 10 * 2
!addr VDOS_UNLSN = $4020 + 11 * 2
m65dos_init:
@@ -27,24 +28,34 @@ m65dos_init:
jsr (VDOS_INIT)
bra m65dos_end_1
m65dos_chkunit: ; XXX expose to BASIC
m65dos_unitchk: ; XXX expose to BASIC
; Checks is the unit number is supported by the internal DOS
; Input: .A - unit number to check
; Output: Carry set if not supported, otherwise .A contains unit type (0 = SD card, 1 = internal floppy, 2 = RAM disk)
jsr map_DOS_1
jsr (VDOS_CHKUNIT)
jsr (VDOS_UNITCHK)
bra m65dos_end_1
m65dos_setunit: ; XXX expose to BASIC
m65dos_unitset: ; XXX expose to BASIC
; Set the unit number
; Input: .A - unit number, .X - unit type (as in m65dos_chkunit)
; Input: .X - unit number, .A - unit type (as in m65dos_chkunit)
; Output: Carry set means error
jsr map_DOS_1
jsr (VDOS_SETUNIT)
jsr (VDOS_UNITSET)
bra m65dos_end_1
m65dos_unitnum: ; XXX expose to BASIC
; Set the unit number
; Input: .A - unit type (as in m65dos_chkunit)
; Output: .A - unit number, Carry set means error
jsr map_DOS_1
jsr (VDOS_UNITNUM)
bra m65dos_end_1
m65dos_acptr:
+1 -1
View File
@@ -12,7 +12,7 @@ m65dos_detect:
; Output: Carry set if not supported, if supported IECPROTO isset to IEC_ROMDOS
pha
jsr m65dos_chkunit
jsr m65dos_unitchk
bcs @1
lda #IEC_ROMDOS
+3 -3
View File
@@ -16,8 +16,8 @@ SETFLS:
; There are 6 sane ways to implement this routine,
; I hope this one will not cause similarity to CBM code
sta LA
sty SA
stx FA
sta LA ; logical number
sty SA ; secondary address
stx FA ; unit number
rts