Kernel 0.9.1 : APPLETALK!

Finally FIX the KM.APPLTALK module crashing at startup,
Fix in SYS Driver messing with MOUSE IRQ,
fix VSDRIVE timout
This commit is contained in:
Rémy GIBERT 2017-11-05 22:23:21 +01:00
parent 698bad1b63
commit 704a72cee7
14 changed files with 97 additions and 66 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -24,9 +24,10 @@ CS.START cld
.DA #$61 6502,Level 1 (65c02)
.DA #1 BIN Layout Version 1
.DA 0
.DA CS.END-CS.START Code Length To Relocate
.DA 0 Data Segment to Allocate
.DA 0
.DA CS.END-CS.START CS
.DA DS.END-DS.START DS
.DA #16 SS
.DA #4 ZP
.DA 0
*--------------------------------------
* Relocation Table
@ -45,10 +46,11 @@ L.MSG.DUMP .DA MSG.DUMP
CS.INIT clc
rts
*--------------------------------------
CS.RUN stz K.MLI.PARAMS Sync
CS.RUN >STZ.G P.GetInfo Sync
lda #ATGetInfo
sta K.MLI.PARAMS+1
>MLICALL MLIATALK
>STA.G P.GetInfo+1
jsr A2osX.ATKCALL
bcc .10
pha
@ -58,42 +60,43 @@ CS.RUN stz K.MLI.PARAMS Sync
sec
.99 rts
.10 >PUSHB K.MLI.PARAMS+$E NODE
>PUSHW K.MLI.PARAMS+$8 NET
.10 >LDA.G P.GetInfo+$E NODE
>PUSHA
>PUSHW.G P.GetInfo+$8 NET
>LDYA L.MSG.NETNODE
>SYSCALL PrintF.YA
stz K.MLI.PARAMS Sync
>STZ.G P.LookupName Sync
lda #ATLookupName
>STA.G P.LookupName+1
>LDYA L.SEARCH.STRING
>STYA K.MLI.PARAMS+$08 Entry Name Ptr
>STYA.G P.LookupName+$08 Entry Name Ptr
lda #4
sta K.MLI.PARAMS+$C RetInt
sta K.MLI.PARAMS+$D RetCnt
>STA.G P.LookupName+$C RetInt
>STA.G P.LookupName+$D RetCnt
>LDYAI 1024
>STYA K.MLI.PARAMS+$10 BufLen
>STYA.G P.LookupName+$10 BufLen
>SYSCALL GetMem.YA
bcs .99
>STYA K.MLI.PARAMS+$12 BufPtr
>STYA.G P.LookupName+$12 BufPtr
>STYA ZPPTR1
txa
ldy #hBuf
sta (pData),y
>STA.G hBuf
lda #16
sta K.MLI.PARAMS+$16 MaxMatch
>STA.G P.LookupName+$16 MaxMatch
>MLICALL MLIATALK
jsr A2osX.ATKCALL
bcs .99
lda K.MLI.PARAMS+$17
>LDA.G P.LookupName+$17
beq .8
>LDYA L.MSG.DUMP0
@ -128,7 +131,7 @@ CS.RUN stz K.MLI.PARAMS Sync
adc #0
sta ZPPTR1+1
dec K.MLI.PARAMS+$17
>DEC.G P.LookupName+$17
bne .2
lda #0
@ -138,8 +141,7 @@ CS.RUN stz K.MLI.PARAMS Sync
CS.DOEVENT sec
rts
*--------------------------------------
CS.QUIT ldy #hBuf
lda (pData),y
CS.QUIT >LDA.G hBuf
beq .8
>SYSCALL FreeMem.A
@ -156,6 +158,8 @@ MSG.DUMP >CSTR "%H $%h $%h $%h %S\r\n"
.DUMMY
.OR 0
DS.START
P.GetInfo .BS $0F
P.LookupName .BS $17
hBuf .BS 1
DS.END
.ED

View File

@ -269,8 +269,7 @@ IRQ stz .8+1
tya
sta INBUF,x
lda #$ff
sta .8+1
dec .8+1
bra .1
@ -296,8 +295,7 @@ IRQ stz .8+1
.5 sty OUTBUF.TAIL
lda #$ff
sta .8+1
dec .8+1
bra .3

View File

@ -27,7 +27,7 @@ ZPLIB .EQ $40 32 bytes for TCPIP
*--------------------------------------
A2osX.SYSCALL .EQ $BD00
A2osX.LIBCALL .EQ $BD03
A2osX.MLICALL .EQ $BD06
A2osX.ATKCALL .EQ $BD06
A2osX.ROMCALL .EQ $BD09
A2osX.BADCALL .EQ $BD0C
*--------------------------------------

View File

@ -108,7 +108,7 @@ AUTO 6
.DO ]1=MLIGETBUF
lda #2
.FIN
jsr A2osX.MLICALL
jsr GP.MLICall
.EM
*--------------------------------------
.MA ROMCALL
@ -145,6 +145,12 @@ AUTO 6
ldy #]1
lda (pData),y
.EM
*--------------------------------------
.MA STZ.G
ldy #]1
lda #0
sta (pData),y
.EM
*--------------------------------------
.MA STA.G
ldy #]1

View File

@ -157,7 +157,7 @@ CSH.Run lda #0
>STA.G bCmdBufexec
>LDA.G bEcho
* beq .80
beq .80
>PUSHW ZPCMDBuf
>LDYA L.MSG.ECHO

View File

@ -442,9 +442,7 @@ DevMgr.SYS.SetCharAtYX
bcs .1
and #$3F
.1 php
phy
.1 phy
pha
lda DevMgr.SYS.BASEL,x
sta ZPDRV
@ -454,15 +452,20 @@ DevMgr.SYS.SetCharAtYX
lsr
tay
bcs .2
pla
php
sei
sta SETWRITEAUX
sta (ZPDRV),y
sta CLRWRITEAUX
plp
ply
rts
.2 pla
sta (ZPDRV),y
sta CLRWRITEAUX
ply
plp
rts
*--------------------------------------
DevMgr.SYS.CH .BS 1

View File

@ -21,13 +21,12 @@ AUTO 6
*--------------------------------------
jmp GP.LibCall
*--------------------------------------
* MLICALL (AUXLC to MAINLC)
* Used by Kernel
* AppleTalk MLICALL (AUXLC to MAINLC)
* Used by user
* In:
* X = MLI Function
* A = Param Count
* Y,A = Params
*--------------------------------------
jmp GP.MLICall
jmp GP.AtkCall
*--------------------------------------
* MLICALL (AUXLC to MAINLC)
* Used by Kernel
@ -83,14 +82,13 @@ GP.LibCall pha No need to save X, K.GetMemPtr.A will leave it unmodified
jsr K.GetMemPtr.A Get LIB Code Segment (MemMgr in $E000, no BNK change)
>STYA .1+1
pla
.1 jmp $ffff
.1 jmp *
*--------------------------------------
GP.MLICall stx .1
sta K.MLI.PARAMS
GP.AtkCall >STYA .1
jsr GO.ProDOS
jsr MLI
.1 .BS 1
.DA K.MLI.PARAMS
.DA #MLIATALK
.1 .DA *
jsr GO.A2osX
rts
*--------------------------------------
@ -121,7 +119,7 @@ GP.ROMCall phx
.DA $EA6B FDIVT+2
.DA $EAFD LOAD.FAC.FROM.INDEX
.DA $EB27 SETFOR GETFAC)
.DA $EB27 SETFOR (GETFAC)
.DA $EBB2 FCOMP
.DA $EBF2 QINT (F->L)
.DA $EC4A FIN StrToF
@ -135,6 +133,15 @@ GP.ROMCall phx
.DA $F03A TAN
.DA $F09E ATN
*--------------------------------------
GP.MLICall stx .1
sta K.MLI.PARAMS
jsr GO.ProDOS
jsr MLI
.1 .BS 1
.DA K.MLI.PARAMS
jsr GO.A2osX
rts
*--------------------------------------
GO.DiskII.RW jsr GO.ProDOS
stx $42
sta $43

View File

@ -397,7 +397,7 @@ K.FReadWrite.0 jsr STDIO.GetRefNum
sta K.MLI.PARAMS+4
stz K.MLI.PARAMS+5
lda #4 Param Count = 4 for MLIREAD & MLIWRITE
jsr A2osX.MLICALL
jsr GP.MLICall
bcs .9
lda K.FWrite.AY.Buf
.9 rts
@ -432,7 +432,7 @@ K.FReadWrite.1 >PULLA
>PULLW K.MLI.PARAMS+2
lda #4 Param Count = 4 for MLIREAD & MLIWRITE
jsr A2osX.MLICALL
jsr GP.MLICall
bcs .9
>LDYA K.MLI.PARAMS+6
.9 rts
@ -609,7 +609,7 @@ K.Rename jsr PFT.CheckPathSTK
>LDYAI K.Buf256
>STYA K.MLI.PARAMS+3
>MLICALL MLIRename
>MLICALL MLIRENAME
rts
*/--------------------------------------
* # SScanF

View File

@ -68,6 +68,7 @@ AT.INIT >LDAXI MSG.INIT
>LDYA MLI+1
>STYA GO.OLDMLI+1
>STYA MLIATALK.PARAMS.OLDMLI
ldy #$14
lda TmpPtr1+1 Cn
@ -97,7 +98,7 @@ AT.INIT >LDAXI MSG.INIT
cli
>LDAXI MSG.PREFIX2
>LDAXI MSG.PREFIX1
jsr PrintFAX
jsr GO.OLDMLI
@ -145,6 +146,9 @@ MLIATALK.PARAMS .DA #0 Sync
.DA #1 INIT
.BS 2 RC
.DA #$40 ??? from ATINIT disassembly
MLIATALK.PARAMS.OLDMLI
.BS 2 ??? from ATINIT disassembly
.BS 5 ??? from ATINIT disassembly
*--------------------------------------
MLIALLOCIRQ.PARAMS
.DA #2 Param Count

View File

@ -179,22 +179,31 @@ VSDRIVE.Ping ldx DRV+2 DRV.Slotn0
.4 lda SSC.STATUS,x
and #SSC.STATUS.RDRF incoming char?
beq .3
bne .5
lda SSC.DATA,x
inc VSDRIVE.Ping.TO
bne .4
inc VSDRIVE.Ping.TO+1
bne .4
.5 lda SSC.DATA,x
bne .4 end of string ?
.5 lda SSC.STATUS,x
.6 lda SSC.STATUS,x
and #SSC.STATUS.RDRF incoming char?
beq .5
bne .7
lda SSC.DATA,x
bne .1 end of list ?
inc VSDRIVE.Ping.TO
bne .6
inc VSDRIVE.Ping.TO+1
bne .6
.7 lda SSC.DATA,x
bne .4 end of list ?
clc
rts
VSDRIVE.Ping.TO .BS 2
*--------------------------------------
* Find 2 free slots in DEVPTRS (D1 & D2)