Kernel 0.94+

This commit is contained in:
Rémy GIBERT 2021-02-20 11:18:02 +01:00
parent 6ece240fc8
commit 0c8f530e20
13 changed files with 293 additions and 85 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -406,7 +406,8 @@ CS.RUN.LL.DISKII
lda #5
jsr CS.RUN.Wait
.80 >PUSHB DSSS0000
.80
>PUSHB DSSS0000
>LIBCALL hLIBBLKDEV,LIBBLKDEV.D2Recalibrate
lda #5

View File

@ -62,6 +62,8 @@ L.MSG.HEXDUMP .DA MSG.HEXDUMP
L.MSG.STRING .DA MSG.STRING
L.PPP.LCPReq .DA PPP.LCPReq
L.PPP.IPCPReq .DA PPP.IPCPReq
L.FILE.Buf .DA FILE.Buf
L.FILE.Bufp1 .DA FILE.Buf+1
L.RCV.Buf .DA RCV.Buf
L.RCV.Bufp1 .DA RCV.Buf+1
L.RCV.Bufp2 .DA RCV.Buf+2
@ -163,23 +165,31 @@ PPP.ETCFILE >PUSHW L.ETCFILE
>SYSCALL PrintF
.1 >PUSHB hETCFILE
>PUSHW L.RCV.Buf
>PUSHW L.FILE.Buf
>PUSHWI 255
>SYSCALL FGetS
bcs .8
lda RCV.Buf
cmp #'?'
bne .7
>LDYA L.RCV.Buf
lda FILE.Buf
cmp #'#'
beq .1
>LDYA L.FILE.Buf
>SYSCALL PutS
>LDYA L.RCV.Bufp1
lda FILE.Buf
cmp #'?'
bne .2
>LDYA L.FILE.Bufp1
jsr SSC.WriteYA
bcs .9
bra .1
.2 jsr SSC.Read
.2 cmp #'!'
bne .7
jsr SSC.Read
bcs .9
tya
@ -195,9 +205,14 @@ PPP.ETCFILE >PUSHW L.ETCFILE
>PUSHBI 3
>SYSCALL PrintF
.7 bra .1
jmp .1
.7 lda #E.SYN
sec
bra .9
.8 cmp #MLI.E.EOF
sec
bne .9
lda #0
@ -227,6 +242,19 @@ PPP.Init >LDYAI PPP.LCPReq.LEN
jsr SSC.WriteYAX
bcs .9
.1 jsr SSC.Read
bcs .9
tya
beq .1
sty ZPBufLen
stz ZPBufLen+1
>LDYA L.RCV.Buf
ldx #2
jsr DumpBuf
>LDYAI PPP.IPCPReq.LEN
>STYA ZPBufLen
>LDYA L.PPP.IPCPReq
@ -242,11 +270,11 @@ PPP.Init >LDYAI PPP.LCPReq.LEN
jsr SSC.WriteYAX
bcs .9
.1 jsr SSC.Read
.2 jsr SSC.Read
bcs .9
tya
beq .1
beq .2
sty ZPBufLen
stz ZPBufLen+1
@ -404,9 +432,45 @@ DumpBuf >STYA ZPPtr1
>SYSCALL PrintF
bcs .9
stz ZPPtr2
stz ZPPtr2+1
lda (ZPPtr1)
cmp #$0D
bne DumpBuf.PPP
lda ZPBufLen
eor #$ff
sta ZPBufLen
lda ZPBufLen+1
eor #$ff
sta ZPBufLen+1
.1 inc ZPBufLen
bne .2
inc ZPBufLen+1
beq .9
.2 lda (ZPPtr1)
inc ZPPtr1
bne .3
inc ZPPtr1+1
.3 cmp #$0D
beq .4
cmp #C.SPACE
bcs .4
ora #$20
.4 >SYSCALL PutS
bcc .1
.9 rts
DumpBuf.PPP stz ZPPtr2
stz ZPPtr2+1
.1 >PUSHW L.MSG.HEXDUMP
>PUSHW ZPPtr2
@ -628,6 +692,7 @@ PPP.IPCPReq.DATA.LEN .EQ *-PPP.IPCPReq.DATA
.HS 7E
PPP.IPCPReq.LEN .EQ *-PPP.IPCPReq
*--------------------------------------
FILE.Buf .BS 256
RCV.Buf .BS 256
*--------------------------------------
* Driver Code

View File

@ -54,7 +54,7 @@ D2Recalibrate >PULLB DrvSlt
pla
bne .1
jsr D2.Wait25600usec
lda IO.D2.Ph0Off,y
@ -89,8 +89,7 @@ D2MoveHead.SEI lda MoveFrom
.1 pha
sta IO.D2.Ph0Off,x
sta IO.D2.Ph0Off,y
jsr .8
bcs .2
* Current < Target, must move in
@ -122,44 +121,28 @@ D2MoveHead.SEI lda MoveFrom
ora Slotn0
tay
lda Slotn0
ora #IO.D2.RData
sta .4+1
sta .5+1
* lda Slotn0
* ora #IO.D2.RData
* sta .4+1
* sta .5+1
sta IO.D2.Ph0On,x
.4 lda IO.D2.RData SELF MODIFIED
*.4 lda IO.D2.RData SELF MODIFIED
sta IO.D2.Ph0On,y
.5 lda IO.D2.RData SELF MODIFIED
*.5 lda IO.D2.RData SELF MODIFIED
lda #IO.D2.SeekTimeF
jsr D2.Wait100usecA
lda MoveFrom
cmp MoveTo
bne .1
jsr D2.Wait25600usec
sta IO.D2.Ph0Off,x
.8 sta IO.D2.Ph0Off,x
sta IO.D2.Ph0Off,y
rts
*--------------------------------------
D2.Wait25600usec
lda #0
D2.Wait100usecA phx
.1 ldx #20 (2)
.2 dex (2)
bne .2 (3)
dec (2)
bne .1 (3)
plx
rts (6)
*/--------------------------------------
* # D2TrkRead16s
* Write a track (16 sectors)
@ -180,7 +163,9 @@ D2TrkRead16s >PULLW ZPPtr1
lda VolNum
clc
.9 rts
.9
D2TrkRead16s.RTS
rts
*/--------------------------------------
* # D2TrkWrite16s
* Write a track (16 sectors)
@ -197,15 +182,42 @@ D2TrkWrite16s >PULLW ZPPtr1
>PULLB DrvSlt
jsr CheckDiskII
bcs .9
bcs D2TrkRead16s.RTS
>LDYAI TRACK16.LEN+256+1
>SYSCALL2 GetMem
bcs .9
bcs D2TrkRead16s.RTS
>STYA ZPPtr2
stx hTrkBuf
lda TrkNum
jsr D2.Trk2Qtrk
tay
and #6
ora Slotn0
tax
tya
inc
and #6
ora Slotn0
tay
sta IO.D2.Ph0On,x
stx PhX
sta IO.D2.Ph0On,y
sty PhY
* lda #5
* jsr D2.Wait100usecA
* ldx PhX
* sta IO.D2.Ph0Off,x
* ldy PhY
* sta IO.D2.Ph0Off,y
stz SectNum
ldy #0 put 256 FF sync bytes for slooooow drives
@ -248,6 +260,13 @@ D2TrkWrite16s >PULLW ZPPtr1
lda #0
sta (ZPPtr2)
ldx PhX
sta IO.D2.Ph0Off,x
ldy PhY
sta IO.D2.Ph0Off,y
* jsr D2.Wait25600usec
jsr D2WriteTrackPtr2
php
pha
@ -256,7 +275,7 @@ D2TrkWrite16s >PULLW ZPPtr1
pla
plp
.9 rts
rts
*/--------------------------------------
*\--------------------------------------
D2TrkReadNIB
@ -345,6 +364,35 @@ DrvSpinCheck ldy #0
.8 sec
rts
*--------------------------------------
D2.Trk2Qtrk asl x2
sta .1+1
bit VolNum
bpl .1 x4
bvs .1 > $C0 ? (VOL=254)
lsr x3
.1 adc #$ff SELF MODIFIED
rts
*--------------------------------------
D2.Wait25600usec
lda #0
D2.Wait100usecA phx
.1 ldx #20 (2)
.2 dex (2)
bne .2 (3)
dec (2)
bne .1 (3)
plx
rts (6)
*--------------------------------------
PutSyncBytePtr2 lda #$7f
.1 jsr PutBytePtr2

View File

@ -623,6 +623,9 @@ hTrkBuf .BS 1
MoveFrom .BS 1
MoveTo .BS 1
PhX .BS 1
PhY .BS 1
Checksum .BS 1
SectNum .BS 1
TrkNum .BS 1

View File

@ -737,11 +737,11 @@ CIFS.ReadDir jsr GetPFD
ldx #0
.2 lda SMB.FindFirst,x
.2 lda SMB.FindFirst2,x
sta (ZPReqPtr),y
iny
inx
cpx #SMB.FindFirst.Len
cpx #SMB.FindFirst2.Len
bne .2
bra CIFS.ReadDir.Send
@ -751,11 +751,11 @@ CIFS.ReadDir.Next
ldx #0
.2 lda SMB.FindNext,x
.2 lda SMB.FindNext2,x
sta (ZPReqPtr),y
iny
inx
cpx #SMB.FindNext.Len
cpx #SMB.FindNext2.Len
bne .2
phy
@ -1431,6 +1431,39 @@ SMB.TreeConnect.H.Len .EQ *-SMB.TreeConnect.H
SMB.TreeConnect.T
.AZ "A:" Disk Share
SMB.TreeConnect.T.Len .EQ *-SMB.TreeConnect.T
*-------------------------------------- #$2E
SMB.ComRead.H .DA #10 WORD COUNT
.HS FF000000 NO MORE CMD
.BS 2 FID
.BS 4 Offset
.BS 2 MaxCountOfBytesToReturn
.HS 0000 MinCountOfBytesToReturn
.HS 00000000 Timeout
.HS 0000 Remaining
.HS 0000 ByteCount
SMB.ComRead.H.Len .EQ *-SMB.ComRead.H
*-------------------------------------- #$2F
SMB.ComWrite.H .DA #12 WORD COUNT
.HS FF000000 NO MORE CMD
.BS 2 FID
.BS 4 Offset
.HS 00000000 Timeout
.HS 00001 WriteMode=WritethroughMode
.BS 2 Remaining
.HS 0000 Reserved
.BS 2 DataLength
.BS 2 DataOffset
SMB.ComWrite.H.Len .EQ *-SMB.ComWrite.H
.BS 2 ByteCount
SMB.ComWrite.T
* DATA.....
SMB.ComWrite.T.Len .EQ *-SMB.ComWrite.T
*-------------------------------------- #$04
SMB.ComClose.H .DA #3 WORD COUNT
.BS 2 FID
.HS 00000000 LastTimeModified
.HS 0000 ByteCount
SMB.ComClose.H.Len .EQ *-SMB.ComClose.H
*--------------------------------------
SMB.Trans2.H .DA #15 WORD COUNT
.BS 2 TotalParamCount
@ -1451,10 +1484,20 @@ SMB.Trans2.H .DA #15 WORD COUNT
SMB.Trans2.H.Len .EQ *-SMB.Trans2.H
*--------------------------------------
SMB.Open2 .DA 0 TRANS2_OPEN2
.BS 2
.BS 2 PrmCnt
.HS 000000 Padding
.HS 0000 Flags
.BS 2 Access Mode
.HS 0000 Reserved1
.BS 2 FileAttributes
.HS 00000000 CreationTime
.BS 2 OpenMode
.HS 00000000 AllocationSize
.HS 00000000000000000000 Reserved
* .AZ "filename"
SMB.Open2.Len .EQ *-SMB.Open2
*--------------------------------------
SMB.FindFirst .DA 1 TRANS2_FIND_FIRST2
SMB.FindFirst2 .DA 1 TRANS2_FIND_FIRST2
.BS 2 PrmCnt
.HS 000000 Padding
.DA $0037 SearchAttributes
@ -1462,10 +1505,10 @@ SMB.FindFirst .DA 1 TRANS2_FIND_FIRST2
.DA 2 Flags
.DA SMB_INFO_STANDARD InformationLevel
.HS 00000000 SearchStorageType
* .AZ "path\*" FileName
SMB.FindFirst.Len .EQ *-SMB.FindFirst
* .AZ "path\*"
SMB.FindFirst2.Len .EQ *-SMB.FindFirst2
*--------------------------------------
SMB.FindNext .DA 2 TRANS2_FIND_NEXT2
SMB.FindNext2 .DA 2 TRANS2_FIND_NEXT2
.BS 2 PrmCnt
.HS 000000 Padding
.BS 2 SID
@ -1473,8 +1516,8 @@ SMB.FindNext .DA 2 TRANS2_FIND_NEXT2
.DA SMB_INFO_STANDARD InformationLevel
.HS 00000000 ResumeKey
.DA 2+8 Flags
* .AZ "path\*" FileName
SMB.FindNext.Len .EQ *-SMB.FindNext
* .AZ "path\*"
SMB.FindNext2.Len .EQ *-SMB.FindNext2
*--------------------------------------
SMB.QueryPathInfo
.DA 5 TRANS2_QUERY_PATH_INFORMATION
@ -1482,7 +1525,7 @@ SMB.QueryPathInfo
.HS 000000 Padding
.DA SMB_INFO_STANDARD InformationLevel
.HS 00000000 SearchStorageType
* .AZ "file" FileName
* .AZ "filename"
SMB.QueryPathInfo.Len .EQ *-SMB.QueryPathInfo
*--------------------------------------
SMB.CreateDirectory

View File

@ -638,11 +638,8 @@ online1 jsr XDOS.FindVCBForDevNum see if it has already been logged in.
bra olinerr1 branch if unable to read.
volfound .DO LOWERCASE=1
lda gbuf+$23
sta h_entln
lda gbuf+$24
sta h_maxent
jsr XDOS.UnpackGBuf X trashed....
jsr XDOS.CheckAndUnpackGBuf
bcs olinerr1
.FIN
ldx vcbptr

View File

@ -421,11 +421,8 @@ L39C2 pla
bcs L39CC if error then look on other devices.
.DO LOWERCASE=1
lda gbuf+$23
sta h_entln
lda gbuf+$24
sta h_maxent
jsr XDOS.UnpackGBuf
jsr XDOS.CheckAndUnpackGBuf
bcs L39CC
.FIN
jsr XDOS.CheckVolName compare dir name with path name.

View File

@ -277,6 +277,21 @@ XDOS.RWBlock sta buf+1 buffer high.
*--------------------------------------
.DO LOWERCASE=1
XDOS.CheckAndUnpackGBuf
lda gbuf+$23
sta h_entln
ldy gbuf+$24
sty h_maxent
cmp #$27
bne .9
cpy #$0D
beq XDOS.UnpackGBuf
.9 lda #MLI.E.NOTPRODOS
sec
rts
XDOS.UnpackGBuf jsr XDOS.Pack.Init
.1 lda (zpt)

View File

@ -164,7 +164,6 @@ L538E lda A4L get command #
inc XRW.ReqSector
inc XRW.ReqSector
lda XRW.ReqTrack
jsr XRW.SectorIO get 2nd half of block
dec buf+1
@ -192,6 +191,14 @@ XRW.TrackSelect lda #2
sta XRW.RecalibrateCnt
sta XRW.BadSeek
lda XRW.ReqTrack
jsr XRW.SEEK2T
lda #5
jsr XRW.Wait100usecA
jsr XRW.SEEKOFF
.1 stz XRW.RetryCnt
.2 jsr XRW.ReadAddr read next address field.
@ -399,15 +406,15 @@ XRW.SEEK2QT2 and #6
ora A2L
tay
lda A2L
ora #IO.D2.RData
sta .1+1
sta .2+1
* lda A2L
* ora #IO.D2.RData
* sta .1+1
* sta .2+1
sta IO.D2.Ph0On,x
.1 lda IO.D2.RData SELF MODIFIED
*.1 lda IO.D2.RData SELF MODIFIED
sta IO.D2.Ph0On,y
.2 lda IO.D2.RData SELF MODIFIED
*.2 lda IO.D2.RData SELF MODIFIED
rts
*--------------------------------------
XRW.Trk2Qtrk asl x2
@ -546,13 +553,7 @@ L596F ldy #$FF index to last byte of data to write.
XRW.SectorIO bit XRW.bWrite
bpl .1
jsr XRW.SEEK2T
phx
phy
jsr XRW.PreNibble
ply
plx
jsr XRW.SEEKOFF
.1 stz XRW.RetryCnt
@ -608,9 +609,6 @@ XRW.Write bit IO.D2.ReadProt,x (4) PREWRITE MODE
dey (2)
bne .1 (3) must not cross page !
nop (2)
nop (2)
lda #$D5 (2) 1st data mark
jsr wnibl9 (15,9,6)

View File

@ -659,6 +659,8 @@ DetectZ80 ldx #Z80Code.Size
DevMgrInit >LDYAI MSG.DEV
>SYSCALL2 puts
jsr DevMgrInit.VSD
lda DEVCNT
sta .1+1
@ -791,6 +793,45 @@ DevMgrInit.AddBDev
rts
*--------------------------------------
DevMgrInit.VSD ldy #VSD.PATCH.SIZE-1
.1 lda $BF41,y
cmp VSD.PATCH,y
bne .9
dey
bpl .1
php
sei
bit RRAMWRAMBNK2
bit RRAMWRAMBNK2
sta CLRALTZP
lda $d002
sta SETALTZP
bit RRAMWRAMBNK1
bit RRAMWRAMBNK1
sec
sbc #$8F
lsr
lsr
lsr
lsr
tax
lda #A2osX.S.VSDRIVE
sta A2osX.S,x
plp
.9 rts
*--------------------------------------
VSD.PATCH sta RRAMWRAMBNK2
jsr $D001
sta RRAMWRAMBNK1
rts
VSD.PATCH.SIZE .EQ *-VSD.PATCH
*--------------------------------------
* Setup AuxLC $FFFE->Kernel IRQ Handler
* if irq not handled, jmp (S.IrqMgrOldFFFE)
*--------------------------------------