Atari: add support for BW-DOS. Initially contributed by Daniel Serpell.

This commit is contained in:
Christian Groessler
2018-09-27 17:37:59 +02:00
parent fe7845b5f0
commit 6dc7309e50
6 changed files with 38 additions and 12 deletions

View File

@@ -35,9 +35,20 @@ detect: lda DOS
cmp (DOSVEC),y
beq done
lda #OSADOS
bne set
spdos: lda DOS+3 ; 'B' in BW-DOS
cmp #'B'
bne spdos_real
lda DOS+4 ; 'W' in BW-DOS
cmp #'W'
bne spdos_real
lda #BWDOS
.byte $2C ; BIT <abs>
spdos: lda #SPARTADOS
spdos_real:
lda #SPARTADOS
.byte $2C ; BIT <abs>
mydos: lda #MYDOS
@@ -47,7 +58,7 @@ rdos: lda #REALDOS
.byte $2C ; BIT <abs>
xdos: lda #XDOS
sta __dos_type
set: sta __dos_type
done: rts
; ------------------------------------------------------------------------

View File

@@ -195,6 +195,8 @@ chk_supp:
lda __dos_type
cmp #SPARTADOS
beq :+
cmp #BWDOS
beq :+
cmp #REALDOS
bne ns1
: txa

View File

@@ -67,6 +67,8 @@ ucok1:
beq :+
cmp #REALDOS
beq :+
cmp #BWDOS
beq :+
lda #CHDIR_MYDOS
.byte $2C ; BIT <abs>
: lda #CHDIR_SPDOS

View File

@@ -77,7 +77,16 @@ cont: ldx #0 ; channel 0
sdcheck:lda DOS
cmp #'S'
bne sdcrts0 ; not SpartaDOS, assume RAM is not used
lda DOS+1 ; SD version
; check for BW-DOS, which always reports itself as SpartaDOS, but doesn't use memory under the ROM
lda DOS+3 ; 'B' in BW-DOS
cmp #'B'
bne sdnobw
lda DOS+4 ; 'W' in BW-DOS
cmp #'W'
beq sdcrts0 ; BW-DOS does not use RAM below ROM
sdnobw: lda DOS+1 ; SD version
cmp #$40 ; SD-X has $40 or higher
bcc sdcrts1 ; older versions (except maybe 1.x) always use the RAM under the ROM
ldy #31 ; offset for OSRMFLG