mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-26 13:49:18 +00:00
UTHERNET drivers optimisation/bugfix
This commit is contained in:
parent
5e5a1a42cb
commit
ebb4ef0618
@ -43,10 +43,10 @@ PP.RxCTL.ExtradataA .EQ %01000000.00000000
|
||||
PP.TxCFG .EQ $0106 Transmit Configuration (RW)
|
||||
PP.TxCMD .EQ $0108 Receiver Control (RW)
|
||||
PP.TxCMD.LID .EQ %00000000.00001001
|
||||
PP.TxCMD.TxStart5 .EQ %00000000.00000000 00 = start after 5 Bytes
|
||||
PP.TxCMD.TxStart381 .EQ %00000000.01000000 01 = start after 381 Bytes
|
||||
PP.TxCMD.TxStart1021 .EQ %00000000.10000000 10 = start after 1021 Bytes
|
||||
PP.TxCMD.TxStartFULL .EQ %00000000.11000000 11 = start after ENTIRE Frame
|
||||
PP.TxCMD.TxStart5 .EQ %00000000.00000000
|
||||
PP.TxCMD.TxStart381 .EQ %00000000.01000000
|
||||
PP.TxCMD.TxStart1021 .EQ %00000000.10000000
|
||||
PP.TxCMD.TxStartFULL .EQ %00000000.11000000
|
||||
PP.TxCMD.Force .EQ %00000001.00000000
|
||||
PP.TxCMD.OneColl .EQ %00000010.00000000
|
||||
PP.TxCMD.InhibitCRC .EQ %00010000.00000000
|
||||
@ -155,17 +155,31 @@ Dev.Detect sta hArgs
|
||||
.3 stx DEVSLOTx0
|
||||
|
||||
lda hARGS
|
||||
bne .4
|
||||
lda #$00
|
||||
sta MAC
|
||||
lda #$0E
|
||||
sta MAC+1
|
||||
lda #$3A
|
||||
sta MAC+2
|
||||
lda A2osX.RANDOM16
|
||||
eor A2osX.TIMER16
|
||||
sta MAC+3
|
||||
eor A2osX.RANDOM16+1
|
||||
sta MAC+4
|
||||
eor A2osX.TIMER16+1
|
||||
sta MAC+5
|
||||
bra .8
|
||||
|
||||
beq .4
|
||||
>SYSCALL SYS.GetMemPtrA
|
||||
.4 >SYSCALL SYS.GetMemPtrA
|
||||
>STYA ZPTmpPTR
|
||||
jsr DecodeMac
|
||||
bcc .4
|
||||
bcc .8
|
||||
lda #DEVMGR.ERRICL
|
||||
sec
|
||||
rts
|
||||
|
||||
.4 >LDYA L.MSG.DETECT.OK
|
||||
.8 >LDYA L.MSG.DETECT.OK
|
||||
>SYSCALL SYS.PSTROutYA
|
||||
>LDYA L.DEV.HEADER.NAME
|
||||
>SYSCALL SYS.PSTROutYA
|
||||
@ -359,14 +373,6 @@ SEND >PULLW ZPTmpPTR
|
||||
eor #$ff
|
||||
sta Counter+1
|
||||
|
||||
ldy #S.ETH.SRCMAC+5
|
||||
ldx #5
|
||||
.10 lda MAC,x
|
||||
sta (ZPTmpPTR),y
|
||||
dey
|
||||
dex
|
||||
bpl .10
|
||||
|
||||
ldx DEVSLOTx0
|
||||
>LDYAI PP.TxCMD.LID+PP.TxCMD.TxStartFULL
|
||||
>STYA TxCMD,x
|
||||
@ -394,7 +400,16 @@ SEND >PULLW ZPTmpPTR
|
||||
sec
|
||||
rts
|
||||
|
||||
SENDPREADY ldy #2
|
||||
SENDPREADY ldy #S.ETH.SRCMAC+5
|
||||
ldx #5
|
||||
.10 lda MAC,x
|
||||
sta (ZPTmpPTR),y
|
||||
dey
|
||||
dex
|
||||
bpl .10
|
||||
|
||||
ldx DEVSLOTx0
|
||||
ldy #2
|
||||
|
||||
.1 inc Counter
|
||||
bne .11
|
||||
|
@ -174,8 +174,8 @@ Dev.Detect sta hArgs
|
||||
.INB DRV/X.NET.DRV.S
|
||||
*--------------------------------------
|
||||
CS.END
|
||||
MSG.DETECT >PSTRING "UtherNetII/W5100 Driver.\n"
|
||||
MSG.DETECT.OK >PSTRING "UtherNetII/W5100 Installed As Device : "
|
||||
MSG.DETECT >PSTRING "UtherNet2/W5100 Driver.\n"
|
||||
MSG.DETECT.OK >PSTRING "UtherNet2/W5100 Installed As Device : "
|
||||
MSG.DETECT.KO >PSTRING "Hardware Not Found.\n"
|
||||
hArgs .BS 1
|
||||
*--------------------------------------
|
||||
@ -383,7 +383,17 @@ SEND >PULLW ZPTmpPTR
|
||||
sec
|
||||
rts
|
||||
|
||||
SEND.READY >AR.SELECT S0.TX.WR
|
||||
SEND.READY ldy #S.ETH.SRCMAC+5
|
||||
ldx #5
|
||||
.1 lda MAC,x
|
||||
sta (ZPTmpPTR),y
|
||||
dey
|
||||
dex
|
||||
bpl .1
|
||||
|
||||
ldx DEVSLOTx8
|
||||
|
||||
>AR.SELECT S0.TX.WR
|
||||
lda W5100.DR,x Get HI
|
||||
ldy W5100.DR,x Get LO
|
||||
and /RXTX.MASK
|
||||
@ -418,8 +428,8 @@ SEND.READY >AR.SELECT S0.TX.WR
|
||||
|
||||
lda Offset+1
|
||||
adc RXTX.Size+1
|
||||
and /RXTX.MASK
|
||||
ora /TX.BASE
|
||||
* and /RXTX.MASK
|
||||
* ora /TX.BASE
|
||||
sta W5100.DR,x write HI
|
||||
pla
|
||||
sta W5100.DR,x write LO
|
||||
|
Loading…
Reference in New Issue
Block a user