correct filetype, support DiversiDOS

This commit is contained in:
Peter Ferrie 2016-10-28 09:55:05 -07:00
parent 19665e2cfc
commit 134dff2663

View File

@ -28,6 +28,8 @@
!addr GETPARM = $3DC !addr GETPARM = $3DC
!addr KBD = $C000 !addr KBD = $C000
!addr STROBE = $C010 !addr STROBE = $C010
!addr ROMIN = $C081
!addr LCBANK2 = $C083
!addr GBASCALC = $F847 !addr GBASCALC = $F847
!addr BASCALC = $FBC1 !addr BASCALC = $FBC1
!addr SCROLL = $FC70 !addr SCROLL = $FC70
@ -72,7 +74,7 @@
NAMELEN = 30 NAMELEN = 30
CREATEFILE = 0 CREATEFILE = 0
OPENEXISTING = 1 OPENEXISTING = 1
SPECIAL = 16 SPECIAL = 8
CMDOPEN = 1 CMDOPEN = 1
CMDCLOSE = 2 CMDCLOSE = 2
CMDREAD = 3 CMDREAD = 3
@ -88,7 +90,18 @@ Install
ldy #0 ldy #0
sty DOSBUFL sty DOSBUFL
lda DOSBASE lda DOSBASE
sta DOSBUFH
;check for DiversiDOS
cmp #$BF
bne +
lda LCBANK2
lda LCBANK2
lda #$DD
;back to regular DOS
+ sta DOSBUFH
!byte $2C ;mask LDY !byte $2C ;mask LDY
- ldy #NEXTFILE - ldy #NEXTFILE
lda (DOSBUFL), y lda (DOSBUFL), y
@ -155,6 +168,8 @@ Install
inc ReadWriteCmd ;lda WRITECMD / sta ReadWriteCmd inc ReadWriteCmd ;lda WRITECMD / sta ReadWriteCmd
lda ROMIN
;display the welcome message, now that we're finally done ;display the welcome message, now that we're finally done
ldy #0 ldy #0
@ -388,6 +403,8 @@ ImportScreen
bmi EditorMode bmi EditorMode
OpenReadFile OpenReadFile
lda LCBANK2
lda LCBANK2 ;support DiversiDOS
jsr GETIOB jsr GETIOB
sty OPSRCL sty OPSRCL
sta OPSRCH sta OPSRCH
@ -427,6 +444,7 @@ CloseMLI_b
!byte CMDCLOSE !byte CMDCLOSE
CloseMLI_e CloseMLI_e
OpenRet OpenRet
lda ROMIN
rts rts
OpenCommon OpenCommon