mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-25 20:33:13 +00:00
Kernel 0.94
This commit is contained in:
parent
d3deb1b49c
commit
aae9da892e
Binary file not shown.
BIN
.Floppies/A2OSX.BOOTHD.woz
Normal file
BIN
.Floppies/A2OSX.BOOTHD.woz
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -714,7 +714,7 @@ MSG.NOSIZE .AZ "Unable to get media size."
|
|||||||
MSG.INIT .AZ "Formatting %s, Volname:%s\r\n"
|
MSG.INIT .AZ "Formatting %s, Volname:%s\r\n"
|
||||||
MSG.LL .AZ "Low Level Format %D Blks\r\n"
|
MSG.LL .AZ "Low Level Format %D Blks\r\n"
|
||||||
MSG.LLDISK2 .AZ "\rWriting Track %02d (%02d/%02d)..."
|
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..."
|
MSG.WRITECAT .AZ "Writing Catalog..."
|
||||||
FMT.BLANK .AZ "BLANK%H%H"
|
FMT.BLANK .AZ "BLANK%H%H"
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
@ -739,11 +739,11 @@ Disk2.X .DA 320 BlkCnt
|
|||||||
.DA #0 AltBB
|
.DA #0 AltBB
|
||||||
.BS 2
|
.BS 2
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
Disk2.H .DA 376 BlkCnt
|
Disk2.H .DA 384 BlkCnt
|
||||||
.DA #47 TrkCnt
|
.DA #48 TrkCnt
|
||||||
.DA #3 Stepping
|
.DA #3 Stepping
|
||||||
.DA #129 VolNum
|
.DA #129 VolNum
|
||||||
* .DA #141 QTrkCnt
|
* .DA #144 QTrkCnt
|
||||||
.DA #$80 AltBB
|
.DA #$80 AltBB
|
||||||
.BS 2
|
.BS 2
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
@ -2,7 +2,7 @@ NEW
|
|||||||
AUTO 3,1
|
AUTO 3,1
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
IO.D2.SeekTimeR .EQ 160 LIBBLKDEV Recalibration
|
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.SeekTimeB .EQ 85 LIBBLKDEV Boot Block
|
||||||
IO.D2.SeekTimeP .EQ 60 ProDOS.FX initial
|
IO.D2.SeekTimeP .EQ 60 ProDOS.FX initial
|
||||||
IO.D2.SeekTimeI .EQ 20 ProDOS.FX increment -> until > 128
|
IO.D2.SeekTimeI .EQ 20 ProDOS.FX increment -> until > 128
|
||||||
|
@ -123,20 +123,22 @@ modboot ldy mods-1,x
|
|||||||
sta dent+1 to point at disk ii routines.
|
sta dent+1 to point at disk ii routines.
|
||||||
lda #BB.ReadBlock get low addr (must be <$80)
|
lda #BB.ReadBlock get low addr (must be <$80)
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
ndsk2 ldy #0 make sure y=0 again.
|
ndsk2 sta dent save low adr of device call entry.
|
||||||
cmp #$f9
|
|
||||||
bcs bterr1 branch if not bootable device.
|
|
||||||
|
|
||||||
sta dent save low adr of device call entry.
|
ldy #0
|
||||||
sty iobuff
|
|
||||||
|
sty iobuff y=0
|
||||||
sty idxl
|
sty idxl
|
||||||
sty idxh y=0
|
sty idxh
|
||||||
sty idxp
|
sty idxp
|
||||||
sty blok+1
|
sty blok+1
|
||||||
iny
|
|
||||||
|
iny y=1
|
||||||
sty dcmd set read command.
|
sty dcmd set read command.
|
||||||
iny
|
|
||||||
|
iny y=2
|
||||||
sty blok to read directory blocks
|
sty blok to read directory blocks
|
||||||
|
|
||||||
lda #$c 2-5 at $c00
|
lda #$c 2-5 at $c00
|
||||||
sta iobuff+1
|
sta iobuff+1
|
||||||
sta idxl+1
|
sta idxl+1
|
||||||
@ -150,10 +152,6 @@ rddir jsr goread call read block routine.
|
|||||||
lda blok have all directory blocks been read?
|
lda blok have all directory blocks been read?
|
||||||
cmp #6
|
cmp #6
|
||||||
bcc rddir loop if not.
|
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.
|
lda #4 begin look-up with first entry past header.
|
||||||
* bne nxdent1 branch always
|
* bne nxdent1 branch always
|
||||||
@ -302,11 +300,14 @@ BB.Seek lda BB.HdrTrk get track we're on
|
|||||||
jsr BB.Trk2Qtrk
|
jsr BB.Trk2Qtrk
|
||||||
sta BB.TargetQTrack
|
sta BB.TargetQTrack
|
||||||
|
|
||||||
.1 lda BB.CurrentQTrack
|
lda BB.CurrentQTrack
|
||||||
cmp BB.TargetQTrack
|
cmp BB.TargetQTrack
|
||||||
beq BB.Read
|
beq BB.Read
|
||||||
|
|
||||||
.10 jsr BB.AllPhasesOff
|
ldx BB.Slotn0 will do a ph0 off
|
||||||
|
ldy BB.Slotn0
|
||||||
|
|
||||||
|
.1 jsr BB.PhasesOff
|
||||||
|
|
||||||
bcs .2
|
bcs .2
|
||||||
|
|
||||||
@ -343,40 +344,49 @@ BB.Seek lda BB.HdrTrk get track we're on
|
|||||||
.3 dec
|
.3 dec
|
||||||
|
|
||||||
and #6
|
and #6
|
||||||
ora BB.Slotn0
|
ora Slotn0
|
||||||
|
bcc .4
|
||||||
|
|
||||||
|
* move out : invert 2 phases
|
||||||
|
|
||||||
|
phx
|
||||||
tax
|
tax
|
||||||
|
pla
|
||||||
|
|
||||||
|
.4 tay
|
||||||
|
|
||||||
lda IO.D2.Ph0On,x
|
lda IO.D2.Ph0On,x
|
||||||
nop
|
nop
|
||||||
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
|
lda BB.CurrentQTrack
|
||||||
cmp BB.TargetQTrack
|
cmp BB.TargetQTrack
|
||||||
bne .10
|
bne .1
|
||||||
|
|
||||||
.8 jsr BB.Wait25600usec
|
lda #0
|
||||||
jsr BB.AllPhasesOff
|
jsr BB.Wait
|
||||||
|
|
||||||
|
jsr BB.PhasesOff
|
||||||
bcs BB.Read ALWAYS
|
bcs BB.Read ALWAYS
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
BB.AllPhasesOff ldy #4
|
BB.PhasesOff bit IO.D2.Ph0Off,x
|
||||||
ldx BB.Slotn0
|
nop
|
||||||
|
nop
|
||||||
|
|
||||||
.1 bit IO.D2.Ph0Off,x
|
ldx IO.D2.Ph0Off,y
|
||||||
inx
|
nop
|
||||||
inx
|
nop
|
||||||
dey
|
|
||||||
bne .1
|
|
||||||
|
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
BB.WaitSeekTime lda #IO.D2.SeekTimeB
|
BB.Wait phx (3)
|
||||||
.HS 2C BIT ABS
|
|
||||||
BB.Wait25600usec
|
|
||||||
lda #0
|
|
||||||
|
|
||||||
phx (3)
|
|
||||||
|
|
||||||
.1 ldx #18 (2)
|
.1 ldx #18 (2)
|
||||||
|
|
||||||
@ -408,15 +418,14 @@ BB.Trk2Qtrk.RTS rts
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
BB.Read ldx BB.Slotn0
|
BB.Read ldx BB.Slotn0
|
||||||
|
|
||||||
ldy #$7f allow 127 mistakes.
|
stz BB.RetryCnt
|
||||||
sty BB.RetryCnt
|
|
||||||
php
|
php
|
||||||
|
|
||||||
tryread plp fix stack.
|
tryread plp fix stack.
|
||||||
|
|
||||||
rdhead sec anticipate error.
|
rdhead sec anticipate error.
|
||||||
dec BB.RetryCnt if = 0 then give up!
|
inc BB.RetryCnt if = 0 then give up!
|
||||||
beq BB.Trk2Qtrk.RTS branch if can't fine/read sector.
|
bmi BB.Trk2Qtrk.RTS branch if can't fine/read sector.
|
||||||
|
|
||||||
clc indicate reading header.
|
clc indicate reading header.
|
||||||
rddata php carry set if reading sector.
|
rddata php carry set if reading sector.
|
||||||
|
@ -120,14 +120,17 @@ D2MoveHead >PULLB MoveTo
|
|||||||
|
|
||||||
.4 tay
|
.4 tay
|
||||||
|
|
||||||
lda IO.D2.Ph0On,x
|
|
||||||
nop
|
|
||||||
nop
|
|
||||||
lda IO.D2.Ph0On,y
|
lda IO.D2.Ph0On,y
|
||||||
nop
|
nop
|
||||||
nop
|
nop
|
||||||
|
|
||||||
|
lda IO.D2.Ph0On,x
|
||||||
|
nop
|
||||||
|
nop
|
||||||
|
|
||||||
lda #IO.D2.SeekTimeF
|
lda #IO.D2.SeekTimeF
|
||||||
jsr D2.Wait100usecA
|
jsr D2.Wait100usecA
|
||||||
|
|
||||||
bra .1
|
bra .1
|
||||||
|
|
||||||
.7 jsr D2.Wait25600usec
|
.7 jsr D2.Wait25600usec
|
||||||
|
@ -40,7 +40,7 @@ XDOS.FindFile jsr lookfile see if file exists
|
|||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
lookfile jsr preproot go find volume
|
lookfile jsr preproot go find volume
|
||||||
bcs fnderr
|
bcs fnderr.RTS
|
||||||
|
|
||||||
bne lookfil0 branch if more than root
|
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)
|
H37C2 lda #MLI.E.INVPATH bad path (carry set)
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
errdir lda #MLI.E.BADDIR directory error
|
||||||
|
fnderr sec
|
||||||
|
fnderr.RTS rts
|
||||||
|
*--------------------------------------
|
||||||
lookfil0 stz nofree reset free entry indicator.
|
lookfil0 stz nofree reset free entry indicator.
|
||||||
|
|
||||||
sec dir to be searched has header in this block.
|
sec dir to be searched has header in this block.
|
||||||
|
|
||||||
L37C9 stz totent reset entry counter.
|
L37C9 stz totent reset entry counter.
|
||||||
@ -90,17 +95,10 @@ L37C9 stz totent reset entry counter.
|
|||||||
bcc L37E2 maybe, check hi count.
|
bcc L37E2 maybe, check hi count.
|
||||||
bne L37EB no, read next directory block.
|
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
|
beq errfnf yes, give 'file not found' error
|
||||||
bne L37EB or branch always.
|
|
||||||
|
|
||||||
L37E2 dec entcnth should be at least one
|
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.
|
L37EB sta entcntl keep a running count.
|
||||||
lda /gbuf reset indirect pointer
|
lda /gbuf reset indirect pointer
|
||||||
sta zpt+1
|
sta zpt+1
|
||||||
@ -119,7 +117,7 @@ L37FC ldx gbuf+3 acc has value for block# (low).
|
|||||||
.FIN
|
.FIN
|
||||||
bcc L37C9 if no error.
|
bcc L37C9 if no error.
|
||||||
rts return error in acc.
|
rts return error in acc.
|
||||||
|
*--------------------------------------
|
||||||
errfnf lda nofree was any free entry found?
|
errfnf lda nofree was any free entry found?
|
||||||
bne fnf0
|
bne fnf0
|
||||||
lda gbuf+2 test link
|
lda gbuf+2 test link
|
||||||
|
@ -326,6 +326,9 @@ XDOS.UnpackGBuf jsr XDOS.Pack.Init
|
|||||||
clc make sure CC
|
clc make sure CC
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
*XDOS.PackGBuf.Bitmap .BS 2
|
||||||
|
XDOS.PackGBuf.Bitmap .EQ sos
|
||||||
|
*--------------------------------------
|
||||||
XDOS.PackGBuf jsr XDOS.Pack.Init
|
XDOS.PackGBuf jsr XDOS.Pack.Init
|
||||||
|
|
||||||
.1 lda (zpt)
|
.1 lda (zpt)
|
||||||
@ -384,7 +387,7 @@ XDOS.Pack.Init lda #4
|
|||||||
sta zpt+1
|
sta zpt+1
|
||||||
|
|
||||||
ldx h_maxent
|
ldx h_maxent
|
||||||
beq * DEBUG : should never happends
|
* beq * DEBUG : should never happends
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
XDOS.Pack.Next lda h_entln
|
XDOS.Pack.Next lda h_entln
|
||||||
@ -396,9 +399,6 @@ XDOS.Pack.Next lda h_entln
|
|||||||
inc zpt+1
|
inc zpt+1
|
||||||
|
|
||||||
.8 rts
|
.8 rts
|
||||||
|
|
||||||
XDOS.PackGBuf.Bitmap .BS 2
|
|
||||||
|
|
||||||
.FIN
|
.FIN
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
XDOS.GetMark ldx fcbptr index to open fcb.
|
XDOS.GetMark ldx fcbptr index to open fcb.
|
||||||
|
@ -179,12 +179,12 @@ regrwts ldy #1
|
|||||||
|
|
||||||
jsr XRW.PreNibble
|
jsr XRW.PreNibble
|
||||||
|
|
||||||
.1 ldy #64
|
|
||||||
sty XRW.RetryCnt
|
|
||||||
|
|
||||||
lda #$fe
|
lda #$fe
|
||||||
sta XRW.BadSeek
|
sta XRW.BadSeek
|
||||||
|
|
||||||
|
.1 ldy #64
|
||||||
|
sty XRW.RetryCnt
|
||||||
|
|
||||||
.2 jsr XRW.ReadAddr read next address field.
|
.2 jsr XRW.ReadAddr read next address field.
|
||||||
bcc .4 if CC, A = current track
|
bcc .4 if CC, A = current track
|
||||||
|
|
||||||
@ -194,9 +194,11 @@ regrwts ldy #1
|
|||||||
dec XRW.RecalibrateCnt
|
dec XRW.RecalibrateCnt
|
||||||
sec
|
sec
|
||||||
bmi .9
|
bmi .9
|
||||||
|
|
||||||
.DO XRWDBG=1
|
.DO XRWDBG=1
|
||||||
jsr XRW.DEBUG
|
jsr XRW.DEBUG
|
||||||
.FIN
|
.FIN
|
||||||
|
|
||||||
ldy XRW.UnitIndex
|
ldy XRW.UnitIndex
|
||||||
|
|
||||||
lda #41
|
lda #41
|
||||||
@ -205,8 +207,8 @@ regrwts ldy #1
|
|||||||
lda #0
|
lda #0
|
||||||
sta XRW.D2VolNum-1,y
|
sta XRW.D2VolNum-1,y
|
||||||
|
|
||||||
.30 jsr XRW.Seek
|
jsr XRW.Seek
|
||||||
bra .3
|
bra .1
|
||||||
|
|
||||||
.4 cmp XRW.ReqTrack
|
.4 cmp XRW.ReqTrack
|
||||||
beq .5
|
beq .5
|
||||||
@ -223,7 +225,8 @@ regrwts ldy #1
|
|||||||
sta XRW.D2SeekTime-1,x
|
sta XRW.D2SeekTime-1,x
|
||||||
|
|
||||||
.41 lda XRW.ReqTrack
|
.41 lda XRW.ReqTrack
|
||||||
bra .30
|
jsr XRW.Seek
|
||||||
|
bra .3
|
||||||
|
|
||||||
.5 lda XRW.AddrField.S is this the right sector ?
|
.5 lda XRW.AddrField.S is this the right sector ?
|
||||||
cmp XRW.ReqSector
|
cmp XRW.ReqSector
|
||||||
@ -834,14 +837,16 @@ XRW.Seek ldx XRW.UnitIndex
|
|||||||
|
|
||||||
.4 tay
|
.4 tay
|
||||||
|
|
||||||
lda IO.D2.Ph0On,x
|
|
||||||
nop
|
|
||||||
nop
|
|
||||||
lda IO.D2.Ph0On,y
|
lda IO.D2.Ph0On,y
|
||||||
nop
|
nop
|
||||||
nop
|
nop
|
||||||
|
|
||||||
|
lda IO.D2.Ph0On,x
|
||||||
|
nop
|
||||||
|
nop
|
||||||
|
|
||||||
jsr XRW.WaitSeekTime
|
jsr XRW.WaitSeekTime
|
||||||
|
|
||||||
bra .1
|
bra .1
|
||||||
|
|
||||||
.7 jsr XRW.Wait25600usec
|
.7 jsr XRW.Wait25600usec
|
||||||
@ -849,6 +854,7 @@ XRW.Seek ldx XRW.UnitIndex
|
|||||||
.8 bit IO.D2.Ph0Off,x
|
.8 bit IO.D2.Ph0Off,x
|
||||||
nop
|
nop
|
||||||
nop
|
nop
|
||||||
|
|
||||||
ldx IO.D2.Ph0Off,y
|
ldx IO.D2.Ph0Off,y
|
||||||
nop
|
nop
|
||||||
nop
|
nop
|
||||||
|
Loading…
Reference in New Issue
Block a user