From fd62f73dfb599c4309e29be1156d0b41d94de478 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20GIBERT?= Date: Fri, 8 Jan 2016 17:41:11 +0100 Subject: [PATCH] UTHERNET2:Work in progress --- DRV/UTHERNET2.DRV.S.txt | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/DRV/UTHERNET2.DRV.S.txt b/DRV/UTHERNET2.DRV.S.txt index f29a4dbe..9c277eed 100644 --- a/DRV/UTHERNET2.DRV.S.txt +++ b/DRV/UTHERNET2.DRV.S.txt @@ -10,6 +10,7 @@ AUTO 6 *-------------------------------------- .INB INC/MACROS.I .INB INC/A2OSX.I + .INB INC/LIBTCPIP.I *-------------------------------------- ZPTmpPTR .EQ ZPDRV *-------------------------------------- @@ -32,6 +33,7 @@ W5100.AR .EQ $C081 Memory Pointer W5100.AR.GAR .EQ $0001 W5100.AR.SUBR .EQ $0005 W5100.AR.SHAR .EQ $0009 +W5100.AR.SIPR .EQ $000F W5100.AR.IR .EQ $0015 W5100.AR.IMR .EQ $0016 W5100.AR.RTR .EQ $0017 @@ -232,7 +234,7 @@ OPEN jsr Reset >AR.SELECT S0.MR lda #3 IPRAW sta W5100.DR-$81,x for S0.MR - lda #1 + lda #1 OPEN sta W5100.DR-$81,x for S0.CR clc rts @@ -331,6 +333,40 @@ SENDPREADY ldy #0 .8 clc rts *-------------------------------------- +SETIPCFG >PULLW ZPTmpPTR + + >AR.SELECT GAR + + ldx DEVSLOTxF + + ldy #S.IPCFG.GW +.1 lda (ZPTmpPTR),y + sta W5100.DR-$81,x + iny + cpy #S.IPCFG.GW+4 + bne .1 + +* >AR.SELECT SUBR Implicit, next to GAR + + ldy #S.IPCFG.MASK +.2 lda (ZPTmpPTR),y + sta W5100.DR-$81,x + iny + cpy #S.IPCFG.MASK+4 + bne .2 + + >AR.SELECT SIPR + + ldy #S.IPCFG.IP +.3 lda (ZPTmpPTR),y + sta W5100.DR-$81,x + iny + cpy #S.IPCFG.IP+4 + bne .3 + + clc + rts +*-------------------------------------- * PRIVATE *-------------------------------------- Reset ldx DEVSLOTxF