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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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