Kernel 0.94

This commit is contained in:
Rémy GIBERT 2020-09-20 20:35:54 +02:00
parent d3deb1b49c
commit aae9da892e
11 changed files with 85 additions and 69 deletions

Binary file not shown.

BIN
.Floppies/A2OSX.BOOTHD.woz Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -714,7 +714,7 @@ MSG.NOSIZE .AZ "Unable to get media size."
MSG.INIT .AZ "Formatting %s, Volname:%s\r\n"
MSG.LL .AZ "Low Level Format %D Blks\r\n"
MSG.LLDISK2 .AZ "\rWriting Track %02d (%02d/%02d)..."
MSG.VERIFY .AZ "Verifying Track %02d, Sector %02d, Block %05D..."
MSG.VERIFY .AZ "Verifying Track %02d/%02d, Block %05D..."
MSG.WRITECAT .AZ "Writing Catalog..."
FMT.BLANK .AZ "BLANK%H%H"
*--------------------------------------
@ -739,11 +739,11 @@ Disk2.X .DA 320 BlkCnt
.DA #0 AltBB
.BS 2
*--------------------------------------
Disk2.H .DA 376 BlkCnt
.DA #47 TrkCnt
Disk2.H .DA 384 BlkCnt
.DA #48 TrkCnt
.DA #3 Stepping
.DA #129 VolNum
* .DA #141 QTrkCnt
* .DA #144 QTrkCnt
.DA #$80 AltBB
.BS 2
*--------------------------------------

View File

@ -2,7 +2,7 @@ NEW
AUTO 3,1
*--------------------------------------
IO.D2.SeekTimeR .EQ 160 LIBBLKDEV Recalibration
IO.D2.SeekTimeF .EQ 85 LIBBLKDEV Track Formatter
IO.D2.SeekTimeF .EQ 125 LIBBLKDEV Track Formatter
IO.D2.SeekTimeB .EQ 85 LIBBLKDEV Boot Block
IO.D2.SeekTimeP .EQ 60 ProDOS.FX initial
IO.D2.SeekTimeI .EQ 20 ProDOS.FX increment -> until > 128

View File

@ -123,20 +123,22 @@ modboot ldy mods-1,x
sta dent+1 to point at disk ii routines.
lda #BB.ReadBlock get low addr (must be <$80)
*--------------------------------------
ndsk2 ldy #0 make sure y=0 again.
cmp #$f9
bcs bterr1 branch if not bootable device.
ndsk2 sta dent save low adr of device call entry.
sta dent save low adr of device call entry.
sty iobuff
ldy #0
sty iobuff y=0
sty idxl
sty idxh y=0
sty idxh
sty idxp
sty blok+1
iny
iny y=1
sty dcmd set read command.
iny
iny y=2
sty blok to read directory blocks
lda #$c 2-5 at $c00
sta iobuff+1
sta idxl+1
@ -150,10 +152,6 @@ rddir jsr goread call read block routine.
lda blok have all directory blocks been read?
cmp #6
bcc rddir loop if not.
lda sosid is it a prodos (sos) directory?
ora sosid+1
bterr1 bne booterr branch if not.
*--------------------------------------
lda #4 begin look-up with first entry past header.
* bne nxdent1 branch always
@ -302,11 +300,14 @@ BB.Seek lda BB.HdrTrk get track we're on
jsr BB.Trk2Qtrk
sta BB.TargetQTrack
.1 lda BB.CurrentQTrack
lda BB.CurrentQTrack
cmp BB.TargetQTrack
beq BB.Read
.10 jsr BB.AllPhasesOff
ldx BB.Slotn0 will do a ph0 off
ldy BB.Slotn0
.1 jsr BB.PhasesOff
bcs .2
@ -343,40 +344,49 @@ BB.Seek lda BB.HdrTrk get track we're on
.3 dec
and #6
ora BB.Slotn0
ora Slotn0
bcc .4
* move out : invert 2 phases
phx
tax
pla
.4 tay
lda IO.D2.Ph0On,x
nop
nop
lda IO.D2.Ph0On,y
jsr BB.WaitSeekTime
lda IO.D2.Ph0On,y
nop
nop
lda #IO.D2.SeekTimeB
jsr BB.Wait
lda BB.CurrentQTrack
cmp BB.TargetQTrack
bne .10
bne .1
.8 jsr BB.Wait25600usec
jsr BB.AllPhasesOff
lda #0
jsr BB.Wait
jsr BB.PhasesOff
bcs BB.Read ALWAYS
*--------------------------------------
BB.AllPhasesOff ldy #4
ldx BB.Slotn0
BB.PhasesOff bit IO.D2.Ph0Off,x
nop
nop
.1 bit IO.D2.Ph0Off,x
inx
inx
dey
bne .1
ldx IO.D2.Ph0Off,y
nop
nop
rts
*--------------------------------------
BB.WaitSeekTime lda #IO.D2.SeekTimeB
.HS 2C BIT ABS
BB.Wait25600usec
lda #0
phx (3)
BB.Wait phx (3)
.1 ldx #18 (2)
@ -408,15 +418,14 @@ BB.Trk2Qtrk.RTS rts
*--------------------------------------
BB.Read ldx BB.Slotn0
ldy #$7f allow 127 mistakes.
sty BB.RetryCnt
stz BB.RetryCnt
php
tryread plp fix stack.
rdhead sec anticipate error.
dec BB.RetryCnt if = 0 then give up!
beq BB.Trk2Qtrk.RTS branch if can't fine/read sector.
inc BB.RetryCnt if = 0 then give up!
bmi BB.Trk2Qtrk.RTS branch if can't fine/read sector.
clc indicate reading header.
rddata php carry set if reading sector.

View File

@ -120,14 +120,17 @@ D2MoveHead >PULLB MoveTo
.4 tay
lda IO.D2.Ph0On,x
nop
nop
lda IO.D2.Ph0On,y
nop
nop
lda IO.D2.Ph0On,x
nop
nop
lda #IO.D2.SeekTimeF
jsr D2.Wait100usecA
bra .1
.7 jsr D2.Wait25600usec

View File

@ -40,7 +40,7 @@ XDOS.FindFile jsr lookfile see if file exists
rts
*--------------------------------------
lookfile jsr preproot go find volume
bcs fnderr
bcs fnderr.RTS
bne lookfil0 branch if more than root
@ -77,7 +77,12 @@ phantm2 lda rootstuf-$10,y
H37C2 lda #MLI.E.INVPATH bad path (carry set)
rts
*--------------------------------------
errdir lda #MLI.E.BADDIR directory error
fnderr sec
fnderr.RTS rts
*--------------------------------------
lookfil0 stz nofree reset free entry indicator.
sec dir to be searched has header in this block.
L37C9 stz totent reset entry counter.
@ -90,17 +95,10 @@ L37C9 stz totent reset entry counter.
bcc L37E2 maybe, check hi count.
bne L37EB no, read next directory block.
cmp entcnth has the last entry been looked at?
lda entcnth has the last entry been looked at?
beq errfnf yes, give 'file not found' error
bne L37EB or branch always.
L37E2 dec entcnth should be at least one
bra L37EB branch always...
errdir lda #MLI.E.BADDIR directory error
fnderr sec
rts
L37EB sta entcntl keep a running count.
lda /gbuf reset indirect pointer
sta zpt+1
@ -119,7 +117,7 @@ L37FC ldx gbuf+3 acc has value for block# (low).
.FIN
bcc L37C9 if no error.
rts return error in acc.
*--------------------------------------
errfnf lda nofree was any free entry found?
bne fnf0
lda gbuf+2 test link

View File

@ -326,6 +326,9 @@ XDOS.UnpackGBuf jsr XDOS.Pack.Init
clc make sure CC
rts
*--------------------------------------
*XDOS.PackGBuf.Bitmap .BS 2
XDOS.PackGBuf.Bitmap .EQ sos
*--------------------------------------
XDOS.PackGBuf jsr XDOS.Pack.Init
.1 lda (zpt)
@ -384,7 +387,7 @@ XDOS.Pack.Init lda #4
sta zpt+1
ldx h_maxent
beq * DEBUG : should never happends
* beq * DEBUG : should never happends
rts
*--------------------------------------
XDOS.Pack.Next lda h_entln
@ -396,9 +399,6 @@ XDOS.Pack.Next lda h_entln
inc zpt+1
.8 rts
XDOS.PackGBuf.Bitmap .BS 2
.FIN
*--------------------------------------
XDOS.GetMark ldx fcbptr index to open fcb.

View File

@ -179,12 +179,12 @@ regrwts ldy #1
jsr XRW.PreNibble
.1 ldy #64
sty XRW.RetryCnt
lda #$fe
sta XRW.BadSeek
.1 ldy #64
sty XRW.RetryCnt
.2 jsr XRW.ReadAddr read next address field.
bcc .4 if CC, A = current track
@ -194,9 +194,11 @@ regrwts ldy #1
dec XRW.RecalibrateCnt
sec
bmi .9
.DO XRWDBG=1
jsr XRW.DEBUG
.FIN
ldy XRW.UnitIndex
lda #41
@ -205,8 +207,8 @@ regrwts ldy #1
lda #0
sta XRW.D2VolNum-1,y
.30 jsr XRW.Seek
bra .3
jsr XRW.Seek
bra .1
.4 cmp XRW.ReqTrack
beq .5
@ -223,7 +225,8 @@ regrwts ldy #1
sta XRW.D2SeekTime-1,x
.41 lda XRW.ReqTrack
bra .30
jsr XRW.Seek
bra .3
.5 lda XRW.AddrField.S is this the right sector ?
cmp XRW.ReqSector
@ -834,14 +837,16 @@ XRW.Seek ldx XRW.UnitIndex
.4 tay
lda IO.D2.Ph0On,x
nop
nop
lda IO.D2.Ph0On,y
nop
nop
lda IO.D2.Ph0On,x
nop
nop
jsr XRW.WaitSeekTime
bra .1
.7 jsr XRW.Wait25600usec
@ -849,6 +854,7 @@ XRW.Seek ldx XRW.UnitIndex
.8 bit IO.D2.Ph0Off,x
nop
nop
ldx IO.D2.Ph0Off,y
nop
nop