Kernel 0.94

This commit is contained in:
Rémy GIBERT 2020-06-29 07:49:24 +02:00
parent 70a6741086
commit 3c7188a189
12 changed files with 130 additions and 148 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -176,14 +176,17 @@ A2osX.Screen80 lda #$8C Reset 80 col screen ($0C:HOME)
sta LOGO.Filename,x sta LOGO.Filename,x
dex dex
bne .1 bne .1
ldx Boot.Prefix ldx Boot.Prefix
ldy #0 ldy #0
.2 inx .2 inx
iny iny
lda A2osX.LOGO,y lda A2osX.LOGO,y
sta LOGO.Filename,x sta LOGO.Filename,x
cpy A2osX.LOGO cpy A2osX.LOGO
bne .2 bne .2
stx LOGO.Filename stx LOGO.Filename
jsr MLI jsr MLI
.DA #MLIOPEN .DA #MLIOPEN
@ -197,6 +200,7 @@ A2osX.Screen80 lda #$8C Reset 80 col screen ($0C:HOME)
.DA #MLIREAD .DA #MLIREAD
.DA MLIREAD00 .DA MLIREAD00
bcs .98 bcs .98
jsr .98 jsr .98
bra A2osX.ScreenDLGR bra A2osX.ScreenDLGR
@ -216,12 +220,13 @@ A2osX.ScreenDLGR
sta SETMIXED sta SETMIXED
sta SET80DISP sta SET80DISP
sta SET80STORE sta SET80STORE
sta CLRPAGE2
* bit RDIOUDIS bit RDIOUDIS
* sta SETIOUDIS sta SETIOUDIS
sta SETDHIRES sta SETDHIRES
* bmi .10 bmi .10
* sta CLRIOUDIS sta CLRIOUDIS
.10 sta CLRTEXT .10 sta CLRTEXT

View File

@ -90,6 +90,7 @@ L.IRC.USER .DA IRC.USER
L.IRC.JOIN .DA IRC.JOIN L.IRC.JOIN .DA IRC.JOIN
L.IRC.JOINKEY .DA IRC.JOINKEY L.IRC.JOINKEY .DA IRC.JOINKEY
L.IRC.PONG .DA IRC.PONG L.IRC.PONG .DA IRC.PONG
L.IRC.PART .DA IRC.PART
L.SEQ.INIT .DA SEQ.INIT L.SEQ.INIT .DA SEQ.INIT
L.SEQ.BAR .DA SEQ.BAR L.SEQ.BAR .DA SEQ.BAR
L.SEQ.TXTCLR .DA SEQ.TXTCLR L.SEQ.TXTCLR .DA SEQ.TXTCLR
@ -268,16 +269,11 @@ CS.RUN.LOOP >SLEEP
lda hFile lda hFile
>SYSCALL feof >SYSCALL feof
bcs .9 bcs .9
tay
* bne .2
beq .77
lda $427
eor #$C0
sta $427
bra .2
.77 >PUSHWI MSGSIZE tay
bne .2
>PUSHWI MSGSIZE
>PUSHW ZPMsgPtr >PUSHW ZPMsgPtr
lda hFile lda hFile
>SYSCALL fgets >SYSCALL fgets
@ -285,6 +281,8 @@ CS.RUN.LOOP >SLEEP
jsr CS.RUN.REQ jsr CS.RUN.REQ
bcs .9 bcs .9
>SLEEP
.2 ldy #S.PS.hStdIn .2 ldy #S.PS.hStdIn
lda (pPS),y lda (pPS),y
@ -475,9 +473,7 @@ CS.RUN.NICK >LDYA L.MSG.NICK
bra .1 bra .1
.8 lda #"N" .8 clc
sta $427
clc
.9 rts .9 rts
*-------------------------------------- *--------------------------------------
CS.RUN.USER >LDYA L.MSG.USER CS.RUN.USER >LDYA L.MSG.USER
@ -519,9 +515,7 @@ CS.RUN.USER >LDYA L.MSG.USER
bra .1 bra .1
.8 lda #"U" .8 clc
sta $427
clc
.9 rts .9 rts
*-------------------------------------- *--------------------------------------
CS.RUN.JOIN >LDYA L.MSG.JOIN CS.RUN.JOIN >LDYA L.MSG.JOIN
@ -603,8 +597,7 @@ CS.RUN.REQ jsr CS.RUN.SPLITMSG
*-------------------------------------- *--------------------------------------
CS.RUN.CMD.JOIN sec CS.RUN.CMD.JOIN sec
ror bJoin ror bJoin
lda #"J"
sta $427
clc clc
rts rts
*-------------------------------------- *--------------------------------------
@ -875,6 +868,15 @@ CS.RUN.CHARIN.CTRL
.1 cmp #$14 Ctrl-T .1 cmp #$14 Ctrl-T
bne .8 bne .8
>PUSHB hFile
>PUSHW L.IRC.PART
lda #4 channel
>SYSCALL ArgV
>PUSHYA
>PUSHBI 2
>SYSCALL FPrintF
lda #3 lda #3
sec sec
rts rts
@ -980,10 +982,11 @@ IRC.USER .AZ "USER %s 0 * :%s\r\n"
IRC.JOIN .AZ "JOIN %s\r\n" IRC.JOIN .AZ "JOIN %s\r\n"
IRC.JOINKEY .AZ "JOIN %s %s\r\n" IRC.JOINKEY .AZ "JOIN %s %s\r\n"
IRC.PONG .AZ "PONG %s\r\n" IRC.PONG .AZ "PONG %s\r\n"
IRC.PART .AZ "PART %s\r\n"
IRC.PRIVMSG .AZ "PRIVMSG %s :%s\r\n" IRC.PRIVMSG .AZ "PRIVMSG %s :%s\r\n"
*-------------------------------------- *--------------------------------------
SEQ.INIT .AZ "\ec\e(B\e)0\e[?7l\e[2;20r\e[22;1H\e[?7h" SEQ.INIT .AZ "\ec\e(B\e)0\e[?7l\e[2;20r\e[22;1H\e[?7h"
SEQ.BAR .AZ "\e7\e[%d;1H\e[7m\e[37;40m%79s\e[0m\e8" SEQ.BAR .AZ "\e7\e[%d;1H\e[7m\e[37;40m%80s\e[0m\e8"
SEQ.TXTCLR .AZ "\e[22;1H\e[K\r\n\e[K\r\n\e[K\e[22;1H" SEQ.TXTCLR .AZ "\e[22;1H\e[K\r\n\e[K\r\n\e[K\e[22;1H"
SEQ.PRIVMSG .AZ "\e7\e[20;1H\r\n\e[7m%s:\e[0m%s\e8" SEQ.PRIVMSG .AZ "\e7\e[20;1H\r\n\e[7m%s:\e[0m%s\e8"
SEQ.DUMPMSG .AZ "\e7\e[20;1H\r\n\e[7m%s \e[0m%s %s %s\e8" SEQ.DUMPMSG .AZ "\e7\e[20;1H\r\n\e[7m%s \e[0m%s %s %s\e8"

View File

@ -228,13 +228,13 @@ bterr2 bcs booterr
jmp kernel go execute kernel code. jmp kernel go execute kernel code.
*-------------------------------------- *--------------------------------------
booterr booterr
* jsr clrscrn clear video jsr clrscrn clear video
* ldy #BB.MSG.ERR.Len-1 ldy #BB.MSG.ERR.Len-1
*.1 lda BB.MSG.ERR,y .1 lda BB.MSG.ERR,y
* sta scrn,y sta scrn,y
* dey dey
* bpl .1 bpl .1
jmp $ff69 jmp $ff69
*-------------------------------------- *--------------------------------------
@ -254,8 +254,8 @@ endcode ldx BB.Slotn0
jmp BB.Seek jmp BB.Seek
*-------------------------------------- *--------------------------------------
*BB.MSG.ERR .AS -"ERR" BB.MSG.ERR .AS -"BOOT ERROR"
*BB.MSG.ERR.Len .EQ *-BB.MSG.ERR BB.MSG.ERR.Len .EQ *-BB.MSG.ERR
BB.ProDOS .DA #$26 $20 = storage type + 6 = "PRODOS" len BB.ProDOS .DA #$26 $20 = storage type + 6 = "PRODOS" len
.AS "PRODOS" .AS "PRODOS"
*-------------------------------------- *--------------------------------------
@ -282,7 +282,8 @@ BB.ReadBlock lda blok figure out track & sector.
ldx BB.Slotn0 ldx BB.Slotn0
lda IO.D2.DrvOn,x lda IO.D2.DrvOn,x
lda IO.D2.Ph0Off,x
jsr BB.AllPhasesOff
jsr BB.Seek go read sector. jsr BB.Seek go read sector.
@ -304,97 +305,67 @@ BB.Seek lda BB.HdrTrk get track we're on
jsr BB.Trk2Qtrk jsr BB.Trk2Qtrk
sta BB.TargetQTrack sta BB.TargetQTrack
ldy #0 .1 lda BB.CurrentQTrack
pha
.1 lda BB.TargetQTrack
sec
sbc BB.CurrentQTrack
beq .8
bcc .2
* Current < Target, must move in
cmp #2
bcc .5 one QT remaining
lda BB.CurrentQTrack
inc
inc
bra .3
* Current > Target, must move out
.2 cmp #$FF
bcs .6 one QT remaining
lda BB.CurrentQTrack
dec
.3 and #$FE
sta BB.CurrentQTrack
and #6 and #6
ora BB.Slotn0 ora BB.Slotn0
tax tax
tya
beq .4
lda IO.D2.Ph0Off,y pla
pha
inc
and #6
ora BB.Slotn0
tay
lda IO.D2.Ph0On,x
lda IO.D2.Ph0On,y
pla
cmp BB.TargetQTrack
beq .8
bcs .2
* Current < Target, must move in
inc
.HS B0 BCS
* Current > Target, must move out
.2 dec
sta BB.CurrentQTrack
jsr BB.WaitSeekTime jsr BB.WaitSeekTime
.4 lda IO.D2.Ph0On,x jsr BB.AllPhasesOff
txa
tay
jsr BB.WaitSeekTime jsr BB.WaitSeekTime
bra .1 bra .1
* Last QTrack .8 jsr BB.Wait25600usec
jsr BB.Wait25600usec
.5 tya jsr BB.AllPhasesOff
inc bcs BB.Read ALWAYS
inc *--------------------------------------
bra .7 BB.AllPhasesOff ldx BB.Slotn0
.6 tya
* sec
adc #5
.7 and #$f6
tax
jsr BB.WaitSeekTime lda IO.D2.Ph0On,x
lda IO.D2.Ph0On,x
jsr BB.WaitSeekTime
.80 jsr BB.Wait25600usec
lda IO.D2.Ph0Off,y
lda IO.D2.Ph0Off,x lda IO.D2.Ph0Off,x
bra BB.Read lda IO.D2.Ph1Off,x
lda IO.D2.Ph2Off,x
.8 tya lda IO.D2.Ph3Off,x
beq BB.Read rts
tax
bra .80
*-------------------------------------- *--------------------------------------
BB.WaitSeekTime lda #IO.D2.SeekTime BB.WaitSeekTime lda #IO.D2.SeekTime
.HS 2C BIT ABS .HS 2C BIT ABS
BB.Wait25600usec BB.Wait25600usec
lda #0 lda #0
phx
.1 ldx #19 (2) .1 ldx #19 (2)
.2 dex (2) delay 86 usec. .2 dex (2) delay 86 usec.
@ -406,7 +377,7 @@ BB.Wait25600usec
sec (6) sec (6)
sbc #1 (2) sbc #1 (2)
bne .1 (2+) bne .1 (2+)
plx
rts (6) rts (6)
*-------------------------------------- *--------------------------------------
BB.Trk2Qtrk asl x2 BB.Trk2Qtrk asl x2

View File

@ -94,7 +94,6 @@ D2MoveHead >PULLB MoveTo
bcs .9 bcs .9
jsr D2MoveHead.1 jsr D2MoveHead.1
jsr D2.Wait25600usec
clc clc
.9 rts .9 rts
@ -133,6 +132,7 @@ D2MoveHead.1
bra .1 bra .1
.8 jsr D2.Wait25600usec .8 jsr D2.Wait25600usec
jsr D2.Wait25600usec
*-------------------------------------- *--------------------------------------
D2.AllPhasesOff ldx Slotn0 D2.AllPhasesOff ldx Slotn0
lda IO.D2.Ph0Off,x lda IO.D2.Ph0Off,x
@ -158,8 +158,8 @@ D2.QPhaseOn pha
*-------------------------------------- *--------------------------------------
D2.Wait25600usec D2.Wait25600usec
lda #0 lda #0
D2.Wait100usecA phx (3)
D2.Wait100usecA
.1 ldx #18 (2) .1 ldx #18 (2)
.2 dex (2) .2 dex (2)
@ -172,7 +172,6 @@ D2.Wait100usecA phx (3)
sbc #1 (2) sbc #1 (2)
bne .1 (3) bne .1 (3)
plx (4)
rts (6) rts (6)
*/-------------------------------------- */--------------------------------------
* # D2TrkRead16s * # D2TrkRead16s

View File

@ -1079,9 +1079,11 @@ SKT.EOF.I ldy #S.SOCKET.TCP.INUSED
jsr SKT.CheckStream jsr SKT.CheckStream
bcs .9 bcs .9
lda #$ff no DATA, EOF = true lda #$ff no DATA, EOF = true
* clc * clc
rts rts
.8 lda #0 ...EOF = false .8 lda #0 ...EOF = false
clc clc
.9 rts .9 rts
@ -1101,6 +1103,7 @@ SKT.CheckTCP ldy #S.SOCKET.O
lda (ZPPtrSKT),y lda (ZPPtrSKT),y
cmp #S.SOCKET.TCP.S.ESTBLSH cmp #S.SOCKET.TCP.S.ESTBLSH
beq .8 beq .8
bcc .90 bcc .90
lda #MLI.E.IO lda #MLI.E.IO

View File

@ -192,7 +192,7 @@ TCP.IN.JMP.ESTBLSH
.5 lda (ZPFrameInPtr),y .5 lda (ZPFrameInPtr),y
eor SKT.Cache+S.SOCKET.TCP.INSEQNUM,x eor SKT.Cache+S.SOCKET.TCP.INSEQNUM,x
bne .9 Missed a frame..... bne .90 Missed a frame.....go send ACK
dey dey
dex dex
@ -231,11 +231,10 @@ TCP.IN.JMP.ESTBLSH
jsr SKT.StoreTCB update socket jsr SKT.StoreTCB update socket
lda #S.TCP.OPTIONS.FIN+S.TCP.OPTIONS.ACK lda #S.TCP.OPTIONS.FIN+S.TCP.OPTIONS.ACK
jsr TCP.SetSocketTCPO FIN received, Send FIN.ACK jsr TCP.OUT.SendOptA FIN received, Send FIN.ACK
lda #S.SOCKET.TCP.S.LASTACK lda #S.SOCKET.TCP.S.LASTACK
ldy #S.SOCKET.TCP.S jmp SKT.StoreTCB.S
sta (ZPPtrSKT),y
.8 ldy #S.SOCKET.TCP.O .8 ldy #S.SOCKET.TCP.O
lda (ZPPtrSKT),y lda (ZPPtrSKT),y
@ -246,6 +245,9 @@ TCP.IN.JMP.ESTBLSH
.80 clc .80 clc
rts rts
.90 lda #S.TCP.OPTIONS.ACK
jsr TCP.OUT.SendOptA
.9 sec .9 sec
rts rts
*-------------------------------------- *--------------------------------------

View File

@ -27,7 +27,7 @@ XRW.START cld $D8 to flag language card bank 1 (main)
lda #$01 lda #$01
sta XRW.montimeh sta XRW.montimeh
L59A6 lda XRW.LastUnitUsed .1 lda XRW.LastUnitUsed
and #$70 and #$70
tax tax
beq L59BD branch if no previous ever (boot only). beq L59BD branch if no previous ever (boot only).
@ -39,8 +39,8 @@ L59A6 lda XRW.LastUnitUsed
jsr XRW.Wait100usecA jsr XRW.Wait100usecA
lda XRW.montimeh lda XRW.montimeh
bne L59A6 bne .1
*--------------------------------------
L59BD jsr XRW.AllPhasesOff make sure all motor phases are off L59BD jsr XRW.AllPhasesOff make sure all motor phases are off
lda IO.D2.ReadMode,x turn off write enable X = slot $S0 lda IO.D2.ReadMode,x turn off write enable X = slot $S0
@ -49,7 +49,7 @@ L59BD jsr XRW.AllPhasesOff make sure all motor phases are off
lda A4L command #. lda A4L command #.
cmp #$04 is the command allowed ? cmp #$04 is the command allowed ?
bcs .9 if not. bcs XRW.E.IO if not.
lda bloknml lda bloknml
ldx bloknml+1 ldx bloknml+1
@ -72,30 +72,7 @@ L59BD jsr XRW.AllPhasesOff make sure all motor phases are off
lsr lsr
lsr lsr
sta XRW.ReqSector sta XRW.ReqSector
jsr regrwts
bcs .3 if error
inc buf+1
inc XRW.ReqSector
inc XRW.ReqSector
jsr regrwts get 2nd half of block
dec buf+1
.3 rts
.9 lda #MLI.E.IO
sec
rts
*-------------------------------------- *--------------------------------------
regrwts ldy #1
sty XRW.RecalibrateCnt
* now check if the motor is on, then start it
jsr XRW.CheckMotorOn jsr XRW.CheckMotorOn
php save test results php save test results
@ -126,15 +103,17 @@ L5362 lda IO.D2.DrvSel1,x
php now zero flag set. php now zero flag set.
L5372 lda A4L make sure this command needs seeking. L5372
beq L537C branch if status check. * lda A4L make sure this command needs seeking.
* beq L537C branch if status check.
* lda XRW.ReqTrack get destination track * lda XRW.ReqTrack get destination track
* jsr XRW.Seek and go to it. * jsr XRW.Seek and go to it.
* now at desired track. was the motor already on ? * now at desired track. was the motor already on ?
L537C plp was motor on ? *L537C
plp was motor on ?
bne L538E if so, don't wait. bne L538E if so, don't wait.
* motor was off, wait for it to speed up * motor was off, wait for it to speed up
@ -156,6 +135,28 @@ L537F lda #1
L538E lda A4L get command # L538E lda A4L get command #
beq XRW.TestWP if 0 then status command beq XRW.TestWP if 0 then status command
*--------------------------------------
jsr regrwts
bcs .3 if error
inc buf+1
inc XRW.ReqSector
inc XRW.ReqSector
lda A4L get command #
jsr regrwts get 2nd half of block
dec buf+1
.3 rts
XRW.E.IO lda #MLI.E.IO
sec
rts
*--------------------------------------
regrwts ldy #1
sty XRW.RecalibrateCnt
lsr set carry = 1 for read, 0 for write. lsr set carry = 1 for read, 0 for write.
bcs L5398 must prenibblize for write bcs L5398 must prenibblize for write
@ -550,8 +551,6 @@ XRW.WaitSeekTime
lda #IO.D2.SeekTime lda #IO.D2.SeekTime
XRW.Wait100usecA XRW.Wait100usecA
phx (3)
.1 ldx #16 (2) .1 ldx #16 (2)
.2 dex (2) .2 dex (2)
@ -569,7 +568,6 @@ XRW.Wait100usecA
sbc #1 (2) sbc #1 (2)
bne .1 (3) bne .1 (3)
plx (4)
rts (6) rts (6)
*-------------------------------------- *--------------------------------------
* read subroutine (16-sector format) * read subroutine (16-sector format)
@ -773,6 +771,7 @@ XRW.Seek ldx XRW.UnitIndex
bra .1 bra .1
.8 jsr XRW.Wait25600usec .8 jsr XRW.Wait25600usec
jsr XRW.Wait25600usec
*-------------------------------------- *--------------------------------------
XRW.AllPhasesOff XRW.AllPhasesOff
ldx A2L ldx A2L

View File

@ -120,6 +120,7 @@ Kernel.Init3 sta SETALTZP
sta SET80DISP sta SET80DISP
sta SET80STORE sta SET80STORE
sta CLRPAGE2 sta CLRPAGE2
bit RDIOUDIS bit RDIOUDIS
sta SETIOUDIS sta SETIOUDIS
sta SETDHIRES sta SETDHIRES
@ -1220,8 +1221,7 @@ SBININITD .AZ "${ROOT}sbin/initd"
MLIGETFILEINFOEX00 MLIGETFILEINFOEX00
.DA #2 .DA #2
.DA MLIOPEN00.FN .DA MLIOPEN00.FN
.DA FIEX .BS S.FIEX
FIEX .BS S.FIEX
*-------------------------------------- *--------------------------------------
MLIOPEN00 .DA #3 MLIOPEN00 .DA #3
.DA MLIOPEN00.FN .DA MLIOPEN00.FN