2017-12-22 21:24:30 +00:00
|
|
|
|
NEW
|
2017-03-29 15:48:15 +00:00
|
|
|
|
PREFIX /A2OSX.BUILD
|
2017-12-22 21:24:30 +00:00
|
|
|
|
AUTO 4,1
|
2016-01-10 22:16:07 +00:00
|
|
|
|
.LIST OFF
|
|
|
|
|
.OP 65C02
|
|
|
|
|
.OR $2000
|
2017-03-29 15:48:15 +00:00
|
|
|
|
.TF /A2OSX.BUILD/DRV/LANCEGS.DRV
|
2016-01-10 22:16:07 +00:00
|
|
|
|
*--------------------------------------
|
2017-03-29 15:48:15 +00:00
|
|
|
|
.INB /A2OSX.BUILD/INC/MACROS.I
|
|
|
|
|
.INB /A2OSX.BUILD/INC/A2OSX.I
|
2017-04-17 19:36:00 +00:00
|
|
|
|
.INB /A2OSX.BUILD/INC/MLI.ERR.I
|
2017-12-22 21:24:30 +00:00
|
|
|
|
.INB /A2OSX.BUILD/INC/NIC.I
|
|
|
|
|
.INB /A2OSX.BUILD/INC/NIC.91C96.I
|
2017-03-29 15:48:15 +00:00
|
|
|
|
.INB /A2OSX.BUILD/INC/LIBTCPIP.I
|
2016-01-10 22:16:07 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
ZPTmpPTR .EQ ZPDRV
|
2017-10-27 14:56:46 +00:00
|
|
|
|
Size .EQ ZPDRV+2
|
2017-04-27 20:08:12 +00:00
|
|
|
|
Counter .EQ ZPDRV+4
|
2016-01-10 22:16:07 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
* File Header (16 Bytes)
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.START cld
|
|
|
|
|
jmp Dev.Detect cld,jmp abs=DRV
|
|
|
|
|
.DA #$61 6502,Level 1 (65c02)
|
|
|
|
|
.DA #1 DRV Layout Version 1
|
|
|
|
|
.DA 0
|
|
|
|
|
.DA CS.END-CS.START Code Length
|
|
|
|
|
.DA DEV.HEADER-CS.START Device Header Offset
|
|
|
|
|
.DA DRV.CS.START-CS.START Driver Code Offset
|
|
|
|
|
.DA DRV.CS.END-DRV.CS.START Drv Code Length
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Relocation Table
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
L.MSG.DETECT .DA MSG.DETECT
|
|
|
|
|
L.MSG.DETECT.OK .DA MSG.DETECT.OK
|
|
|
|
|
L.MSG.DETECT.KO .DA MSG.DETECT.KO
|
|
|
|
|
L.DEV.HEADER.NAME .DA DEV.HEADER.NAME
|
|
|
|
|
.DA 0 End Of Reloc Table
|
|
|
|
|
*--------------------------------------
|
2016-10-17 15:47:50 +00:00
|
|
|
|
Dev.Detect >STYA Args
|
2016-01-10 22:16:07 +00:00
|
|
|
|
>LDYA L.MSG.DETECT
|
2017-08-25 15:02:16 +00:00
|
|
|
|
>SYSCALL PrintF.YA
|
2016-01-10 22:16:07 +00:00
|
|
|
|
|
2017-04-17 19:36:00 +00:00
|
|
|
|
ldx #$70
|
2017-04-27 20:08:12 +00:00
|
|
|
|
ldy #7
|
2017-04-17 19:36:00 +00:00
|
|
|
|
|
2017-10-19 15:27:38 +00:00
|
|
|
|
.1 lda A2osX.S,y IO based detection, avoid scanning in Disk Controller IO!!!!
|
2017-04-17 19:36:00 +00:00
|
|
|
|
bne .2
|
|
|
|
|
|
|
|
|
|
lda L91C96.BSR+1,x
|
2016-01-10 22:16:07 +00:00
|
|
|
|
cmp #DEVID
|
2016-03-30 15:54:47 +00:00
|
|
|
|
beq .3
|
2016-01-10 22:16:07 +00:00
|
|
|
|
|
2017-04-17 19:36:00 +00:00
|
|
|
|
.2 dec DEV.HEADER.NAME+4
|
2016-01-10 22:16:07 +00:00
|
|
|
|
txa
|
2017-04-17 19:36:00 +00:00
|
|
|
|
sec
|
|
|
|
|
sbc #$10
|
2016-01-10 22:16:07 +00:00
|
|
|
|
tax
|
2017-04-27 20:08:12 +00:00
|
|
|
|
dey
|
2017-04-17 19:36:00 +00:00
|
|
|
|
bne .1
|
2016-01-10 22:16:07 +00:00
|
|
|
|
|
|
|
|
|
>LDYA L.MSG.DETECT.KO
|
2017-08-25 15:02:16 +00:00
|
|
|
|
>SYSCALL PrintF.YA
|
2016-01-10 22:16:07 +00:00
|
|
|
|
|
2017-10-26 16:01:54 +00:00
|
|
|
|
lda #MLI.E.NODEV
|
2016-01-10 22:16:07 +00:00
|
|
|
|
sec
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.3 stx DEVSLOTx0
|
2017-10-19 15:27:38 +00:00
|
|
|
|
lda #A2osX.S.NIC
|
|
|
|
|
sta A2osX.S,y
|
2017-04-17 19:36:00 +00:00
|
|
|
|
|
2016-10-17 15:47:50 +00:00
|
|
|
|
>LDYA ARGS
|
|
|
|
|
>STYA ZPTmpPTR
|
|
|
|
|
lda (ZPTmpPTR)
|
2016-01-10 22:16:07 +00:00
|
|
|
|
beq .4
|
2016-10-17 15:47:50 +00:00
|
|
|
|
|
2016-03-13 22:07:01 +00:00
|
|
|
|
sec
|
|
|
|
|
ror USERMAC
|
2017-08-25 06:37:21 +00:00
|
|
|
|
>SYSCALL GetMemPtr.A
|
2016-01-10 22:16:07 +00:00
|
|
|
|
>STYA ZPTmpPTR
|
|
|
|
|
jsr DecodeMac
|
|
|
|
|
bcc .4
|
2017-10-26 16:01:54 +00:00
|
|
|
|
lda #K.E.SYN
|
2016-01-10 22:16:07 +00:00
|
|
|
|
sec
|
|
|
|
|
rts
|
|
|
|
|
|
2016-10-17 15:47:50 +00:00
|
|
|
|
.4 >PUSHW L.DEV.HEADER.NAME
|
|
|
|
|
>LDYA L.MSG.DETECT.OK
|
2017-08-25 15:02:16 +00:00
|
|
|
|
>SYSCALL PrintF.YA
|
2016-01-10 22:16:07 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2017-04-17 19:36:00 +00:00
|
|
|
|
.INB /A2OSX.SRC/DRV/X.NET.DRV.S
|
2016-01-10 22:16:07 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.END
|
2017-04-17 19:36:00 +00:00
|
|
|
|
MSG.DETECT >CSTR "LanCeGS/SMSC91C96 Driver.\r\n"
|
|
|
|
|
MSG.DETECT.OK >CSTR "LanCeGS/SMSC91C96 Installed As Device : %S\r\n"
|
|
|
|
|
MSG.DETECT.KO >CSTR "Hardware Not Found.\r\n"
|
2016-10-17 15:47:50 +00:00
|
|
|
|
Args .BS 2
|
2016-01-10 22:16:07 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Device Header (16 Bytes)
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
DEV.HEADER cld
|
|
|
|
|
jmp (DRV.CS.START,x)
|
2017-04-17 19:36:00 +00:00
|
|
|
|
.DA #0
|
|
|
|
|
.BS 6
|
2017-12-22 21:24:30 +00:00
|
|
|
|
DEV.HEADER.NAME >CSTR "ETH7"
|
2016-01-10 22:16:07 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Driver Code
|
|
|
|
|
*--------------------------------------
|
2017-04-17 19:36:00 +00:00
|
|
|
|
DRV.CS.START .DA STATUS
|
|
|
|
|
.DA READBLOCK
|
|
|
|
|
.DA WRITEBLOCK
|
2017-07-06 15:30:40 +00:00
|
|
|
|
.DA A2osX.BADCALL
|
|
|
|
|
.DA A2osX.BADCALL
|
|
|
|
|
.DA A2osX.BADCALL
|
2017-04-17 19:36:00 +00:00
|
|
|
|
.DA OPEN
|
2016-01-10 22:16:07 +00:00
|
|
|
|
.DA CLOSE
|
2017-07-06 15:30:40 +00:00
|
|
|
|
.DA A2osX.BADCALL
|
|
|
|
|
.DA A2osX.BADCALL
|
2017-04-17 19:36:00 +00:00
|
|
|
|
L.DEVSTAT .DA DEVSTAT
|
2016-01-10 22:16:07 +00:00
|
|
|
|
.DA 0 end or relocation
|
|
|
|
|
*--------------------------------------
|
2017-12-22 21:24:30 +00:00
|
|
|
|
STATUS lda #S.DSTAT.NIC.STATUS.10
|
2017-04-17 19:36:00 +00:00
|
|
|
|
sta LINK.STATUS
|
2016-03-13 22:07:01 +00:00
|
|
|
|
|
2017-04-17 19:36:00 +00:00
|
|
|
|
ldx DEVSLOTx0
|
2016-03-13 22:07:01 +00:00
|
|
|
|
|
2017-04-17 19:36:00 +00:00
|
|
|
|
stz L91C96.BSR,x
|
|
|
|
|
lda L91C96.0.EPHSR,x
|
|
|
|
|
lda L91C96.0.EPHSR+1,x
|
|
|
|
|
and /L91C96.0.EPHSR.LINK
|
|
|
|
|
beq .1
|
|
|
|
|
lda LINK.STATUS
|
2017-12-22 21:24:30 +00:00
|
|
|
|
ora #S.DSTAT.NIC.STATUS.OK
|
2017-04-17 19:36:00 +00:00
|
|
|
|
sta LINK.STATUS
|
2016-03-13 22:07:01 +00:00
|
|
|
|
|
2017-04-17 19:36:00 +00:00
|
|
|
|
.1 lda L91C96.0.TCR,x
|
|
|
|
|
lda L91C96.0.TCR+1,x
|
|
|
|
|
and /L91C96.0.TCR.FDSE
|
2016-03-13 22:07:01 +00:00
|
|
|
|
bne .2
|
2017-04-17 19:36:00 +00:00
|
|
|
|
lda LINK.STATUS
|
2017-12-22 21:24:30 +00:00
|
|
|
|
ora #S.DSTAT.NIC.STATUS.FD
|
2017-04-17 19:36:00 +00:00
|
|
|
|
sta LINK.STATUS
|
2016-03-13 22:07:01 +00:00
|
|
|
|
|
2017-04-17 19:36:00 +00:00
|
|
|
|
.2 >LDYA L.DEVSTAT
|
2016-01-10 22:16:07 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2017-04-17 19:36:00 +00:00
|
|
|
|
READBLOCK ldx DEVSLOTx0
|
2016-03-13 22:07:01 +00:00
|
|
|
|
lda #2
|
|
|
|
|
sta L91C96.BSR,x
|
|
|
|
|
|
|
|
|
|
lda L91C96.2.IST,x
|
|
|
|
|
and #L91C96.2.IST.RCV
|
2017-04-17 19:36:00 +00:00
|
|
|
|
bne READBLOCK.RxOK
|
2016-03-20 22:12:57 +00:00
|
|
|
|
lda #ERR.DEV.NOFRAME
|
2016-03-13 22:07:01 +00:00
|
|
|
|
sec
|
2016-01-10 22:16:07 +00:00
|
|
|
|
rts
|
|
|
|
|
|
2017-04-17 19:36:00 +00:00
|
|
|
|
READBLOCK.RxOK lda #L91C96.2.PTR.RCVD+L91C96.2.PTR.AUTOI+L91C96.2.PTR.READ
|
2016-03-13 22:07:01 +00:00
|
|
|
|
sta L91C96.2.PTR,x
|
|
|
|
|
lda /L91C96.2.PTR.RCVD+L91C96.2.PTR.AUTOI+L91C96.2.PTR.READ
|
|
|
|
|
sta L91C96.2.PTR+1,x
|
|
|
|
|
|
2016-03-30 15:54:47 +00:00
|
|
|
|
lda L91C96.2.DATA,x Get Frame Status Word (lo)
|
|
|
|
|
lda L91C96.2.DATA,x Get Frame Status Word (HI)
|
|
|
|
|
|
2017-04-17 19:36:00 +00:00
|
|
|
|
asl
|
2016-03-30 15:54:47 +00:00
|
|
|
|
asl
|
|
|
|
|
asl #$10 = odd?
|
|
|
|
|
asl if odd, CS
|
|
|
|
|
|
|
|
|
|
lda L91C96.2.DATA,x get lo byte count
|
2017-04-27 20:08:12 +00:00
|
|
|
|
sbc #5 compute Size
|
|
|
|
|
sta Size
|
|
|
|
|
eor #$ff
|
|
|
|
|
sta Counter
|
2016-03-13 22:07:01 +00:00
|
|
|
|
tay
|
2017-04-27 20:08:12 +00:00
|
|
|
|
|
2016-03-30 15:54:47 +00:00
|
|
|
|
lda L91C96.2.DATA,x get hi byte count
|
|
|
|
|
sbc #0
|
2017-04-27 20:08:12 +00:00
|
|
|
|
sta Size+1
|
|
|
|
|
eor #$ff
|
|
|
|
|
sta Counter+1
|
|
|
|
|
eor #$ff
|
2016-03-13 22:07:01 +00:00
|
|
|
|
|
2016-03-30 15:54:47 +00:00
|
|
|
|
iny
|
|
|
|
|
bne .1
|
2017-04-17 19:36:00 +00:00
|
|
|
|
|
2016-03-30 15:54:47 +00:00
|
|
|
|
inc
|
|
|
|
|
.1 iny
|
|
|
|
|
bne .11
|
2017-04-17 19:36:00 +00:00
|
|
|
|
|
2016-03-30 15:54:47 +00:00
|
|
|
|
inc
|
2017-08-25 06:37:21 +00:00
|
|
|
|
.11 >SYSCALL GetMem.YA
|
2016-03-13 22:07:01 +00:00
|
|
|
|
bcs .99
|
|
|
|
|
>STYA ZPTmpPTR
|
2017-04-17 19:36:00 +00:00
|
|
|
|
stx .8+1
|
|
|
|
|
sty .8+3
|
|
|
|
|
sta .8+5
|
2016-03-13 22:07:01 +00:00
|
|
|
|
|
2017-04-27 20:08:12 +00:00
|
|
|
|
lda Size
|
2016-03-30 15:54:47 +00:00
|
|
|
|
sta (ZPTmpPTR)
|
|
|
|
|
ldy #1
|
2017-04-27 20:08:12 +00:00
|
|
|
|
lda Size+1
|
2016-03-13 22:07:01 +00:00
|
|
|
|
sta (ZPTmpPTR),y
|
2016-03-30 15:54:47 +00:00
|
|
|
|
|
2016-03-13 22:07:01 +00:00
|
|
|
|
iny
|
|
|
|
|
|
|
|
|
|
ldx DEVSLOTx0
|
|
|
|
|
|
2017-04-27 20:08:12 +00:00
|
|
|
|
.2 inc Counter
|
|
|
|
|
bne .21
|
|
|
|
|
inc Counter+1
|
2017-04-17 19:36:00 +00:00
|
|
|
|
beq .4
|
2017-04-27 20:08:12 +00:00
|
|
|
|
|
|
|
|
|
.21 lda L91C96.2.DATA,x
|
2016-03-13 22:07:01 +00:00
|
|
|
|
sta (ZPTmpPTR),y
|
|
|
|
|
iny
|
|
|
|
|
bne .3
|
|
|
|
|
inc ZPTmpPTR+1
|
2017-04-27 20:08:12 +00:00
|
|
|
|
|
|
|
|
|
.3 inc Counter
|
|
|
|
|
bne .31
|
|
|
|
|
inc Counter+1
|
2017-04-17 19:36:00 +00:00
|
|
|
|
beq .4
|
2017-04-27 20:08:12 +00:00
|
|
|
|
|
|
|
|
|
.31 lda L91C96.2.DATA,x
|
2016-03-13 22:07:01 +00:00
|
|
|
|
sta (ZPTmpPTR),y
|
|
|
|
|
iny
|
|
|
|
|
bne .2
|
|
|
|
|
inc ZPTmpPTR+1
|
|
|
|
|
bra .2
|
|
|
|
|
|
2017-04-17 19:36:00 +00:00
|
|
|
|
.4 lda #L91C96.2.MMUCR.REMREL
|
2016-03-13 22:07:01 +00:00
|
|
|
|
sta L91C96.2.MMUCR,x
|
|
|
|
|
|
2017-04-17 19:36:00 +00:00
|
|
|
|
.8 ldx #$ff hMem
|
|
|
|
|
ldy #$ff PtrLO
|
|
|
|
|
lda #$ff PtrHI
|
2016-01-10 22:16:07 +00:00
|
|
|
|
clc
|
2017-04-17 19:36:00 +00:00
|
|
|
|
.99 rts
|
2016-01-10 22:16:07 +00:00
|
|
|
|
*--------------------------------------
|
2017-04-17 19:36:00 +00:00
|
|
|
|
WRITEBLOCK >STYA ZPTmpPTR
|
2016-03-13 22:07:01 +00:00
|
|
|
|
|
|
|
|
|
ldx DEVSLOTx0
|
|
|
|
|
lda #2
|
|
|
|
|
sta L91C96.BSR,x
|
|
|
|
|
|
|
|
|
|
lda (ZPTmpPTR)
|
2017-04-27 20:08:12 +00:00
|
|
|
|
sta Size
|
|
|
|
|
eor #$ff
|
|
|
|
|
sta Counter
|
|
|
|
|
eor #$ff
|
|
|
|
|
|
2016-01-10 22:16:07 +00:00
|
|
|
|
clc
|
2016-03-13 22:07:01 +00:00
|
|
|
|
adc #6 3 WORDs more Status, len & Control
|
2016-03-31 20:07:47 +00:00
|
|
|
|
|
|
|
|
|
bne .10
|
|
|
|
|
clc LO byte is 0, no need for an extra empty page
|
2016-03-24 17:02:50 +00:00
|
|
|
|
|
2016-03-31 20:07:47 +00:00
|
|
|
|
.10 ldy #1
|
2016-03-13 22:07:01 +00:00
|
|
|
|
lda (ZPTmpPTR),y
|
2017-04-27 20:08:12 +00:00
|
|
|
|
sta Size+1
|
|
|
|
|
eor #$ff
|
|
|
|
|
sta Counter+1
|
|
|
|
|
eor #$ff
|
|
|
|
|
|
2016-03-13 22:07:01 +00:00
|
|
|
|
adc #0
|
|
|
|
|
|
|
|
|
|
.1 ora #L91C96.2.MMUCR.ALLOC
|
|
|
|
|
sta L91C96.2.MMUCR,x
|
|
|
|
|
|
|
|
|
|
ldy #0
|
|
|
|
|
|
|
|
|
|
.2 lda L91C96.2.IST,x
|
|
|
|
|
and #L91C96.2.IST.ALLOC
|
|
|
|
|
bne .3
|
|
|
|
|
dey
|
|
|
|
|
bne .2
|
|
|
|
|
|
2016-03-20 22:12:57 +00:00
|
|
|
|
lda #ERR.DEV.NOBUFFER
|
2016-03-13 22:07:01 +00:00
|
|
|
|
sec
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.3 lda L91C96.2.AAR,x
|
|
|
|
|
sta L91C96.2.PNR,x
|
|
|
|
|
|
2016-03-30 06:30:41 +00:00
|
|
|
|
lda #L91C96.2.PTR.AUTOI
|
2016-03-13 22:07:01 +00:00
|
|
|
|
sta L91C96.2.PTR,x
|
2016-03-30 06:30:41 +00:00
|
|
|
|
lda /L91C96.2.PTR.AUTOI
|
2016-03-13 22:07:01 +00:00
|
|
|
|
sta L91C96.2.PTR+1,x
|
|
|
|
|
|
2016-03-30 06:30:41 +00:00
|
|
|
|
ldy #S.ETH.SRCMAC+5 Add Src MAC Address
|
2016-03-13 22:07:01 +00:00
|
|
|
|
ldx #5
|
|
|
|
|
.4 lda MAC,x
|
|
|
|
|
sta (ZPTmpPTR),y
|
|
|
|
|
dey
|
|
|
|
|
dex
|
|
|
|
|
bpl .4
|
|
|
|
|
|
|
|
|
|
ldx DEVSLOTx0
|
2016-03-30 15:54:47 +00:00
|
|
|
|
stz L91C96.2.DATA,x write fake status word
|
2016-03-30 06:30:41 +00:00
|
|
|
|
stz L91C96.2.DATA,x
|
2016-03-13 22:07:01 +00:00
|
|
|
|
|
2017-04-27 20:08:12 +00:00
|
|
|
|
lda Size
|
2016-03-13 22:07:01 +00:00
|
|
|
|
pha
|
2016-03-30 15:54:47 +00:00
|
|
|
|
eor #$01
|
2016-03-13 22:07:01 +00:00
|
|
|
|
lsr
|
|
|
|
|
pla
|
2016-03-30 15:54:47 +00:00
|
|
|
|
adc #$05 add 5 if odd, 6 if even
|
2016-03-13 22:07:01 +00:00
|
|
|
|
sta L91C96.2.DATA,x
|
2017-04-27 20:08:12 +00:00
|
|
|
|
lda Size+1
|
2016-03-30 15:54:47 +00:00
|
|
|
|
adc #$00
|
2016-03-30 06:30:41 +00:00
|
|
|
|
sta L91C96.2.DATA,x
|
2016-03-13 22:07:01 +00:00
|
|
|
|
|
|
|
|
|
ldy #2
|
|
|
|
|
|
2017-04-27 20:08:12 +00:00
|
|
|
|
.5 inc Counter
|
|
|
|
|
bne .51
|
|
|
|
|
inc Counter+1
|
2016-03-13 22:07:01 +00:00
|
|
|
|
beq .70
|
2017-04-27 20:08:12 +00:00
|
|
|
|
|
|
|
|
|
.51 lda (ZPTmpPTR),y
|
2016-03-13 22:07:01 +00:00
|
|
|
|
iny
|
|
|
|
|
bne .6
|
|
|
|
|
inc ZPTmpPTR+1
|
|
|
|
|
|
2017-04-27 20:08:12 +00:00
|
|
|
|
.6 inc Counter
|
|
|
|
|
bne .61
|
|
|
|
|
inc Counter+1
|
2016-03-13 22:07:01 +00:00
|
|
|
|
beq .71
|
2017-04-27 20:08:12 +00:00
|
|
|
|
|
|
|
|
|
.61 sta L91C96.2.DATA,x
|
2016-03-13 22:07:01 +00:00
|
|
|
|
lda (ZPTmpPTR),y
|
2016-03-30 06:30:41 +00:00
|
|
|
|
sta L91C96.2.DATA,x
|
2016-03-13 22:07:01 +00:00
|
|
|
|
iny
|
|
|
|
|
bne .5
|
|
|
|
|
inc ZPTmpPTR+1
|
|
|
|
|
bra .5
|
|
|
|
|
|
|
|
|
|
.70 lda #0
|
|
|
|
|
sta L91C96.2.DATA,x
|
2016-03-30 06:30:41 +00:00
|
|
|
|
sta L91C96.2.DATA,x
|
2016-03-13 22:07:01 +00:00
|
|
|
|
bra .8
|
|
|
|
|
|
2017-04-27 20:08:12 +00:00
|
|
|
|
.71 sta L91C96.2.DATA,x
|
2016-03-30 15:54:47 +00:00
|
|
|
|
lda #%00100000 signal an extra (odd) byte
|
2016-03-30 06:30:41 +00:00
|
|
|
|
sta L91C96.2.DATA,x
|
2016-03-13 22:07:01 +00:00
|
|
|
|
|
|
|
|
|
.8 lda #L91C96.2.MMUCR.NQPKT
|
|
|
|
|
sta L91C96.2.MMUCR,x
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.9 sec
|
|
|
|
|
rts
|
2016-01-10 22:16:07 +00:00
|
|
|
|
*--------------------------------------
|
2017-04-17 19:36:00 +00:00
|
|
|
|
OPEN jsr CLOSE
|
|
|
|
|
|
|
|
|
|
lda #L91C96.0.TCR.FDSE+L91C96.0.TCR.FUDPLX+L91C96.0.TCR.PADEN+L91C96.0.TCR.TXENA
|
|
|
|
|
sta L91C96.0.TCR,x
|
|
|
|
|
lda /L91C96.0.TCR.FDSE+L91C96.0.TCR.FUDPLX+L91C96.0.TCR.PADEN+L91C96.0.TCR.TXENA
|
|
|
|
|
sta L91C96.0.TCR+1,x
|
|
|
|
|
|
|
|
|
|
lda #L91C96.0.RCR.NOCRC+L91C96.0.RCR.RXENA+L91C96.0.RCR.ALLMUL
|
|
|
|
|
sta L91C96.0.RCR,x
|
|
|
|
|
lda /L91C96.0.RCR.NOCRC+L91C96.0.RCR.RXENA+L91C96.0.RCR.ALLMUL
|
|
|
|
|
sta L91C96.0.RCR+1,x
|
|
|
|
|
|
|
|
|
|
lda #1
|
|
|
|
|
sta L91C96.BSR,x
|
|
|
|
|
|
|
|
|
|
lda #L91C96.1.CR.NOWAIT
|
|
|
|
|
sta L91C96.1.CR,x
|
|
|
|
|
lda /L91C96.1.CR.NOWAIT
|
|
|
|
|
sta L91C96.1.CR+1,x
|
|
|
|
|
|
|
|
|
|
ldy #0
|
|
|
|
|
bit USERMAC
|
|
|
|
|
bmi .2
|
|
|
|
|
|
|
|
|
|
.1 lda L91C96.1.IAR,x
|
|
|
|
|
sta MAC,y
|
|
|
|
|
inx
|
|
|
|
|
iny
|
|
|
|
|
cpy #6
|
|
|
|
|
bne .1
|
|
|
|
|
bra .3
|
|
|
|
|
|
|
|
|
|
.2 lda MAC,y
|
|
|
|
|
sta L91C96.1.IAR,x
|
|
|
|
|
inx
|
|
|
|
|
iny
|
|
|
|
|
cpy #6
|
|
|
|
|
bne .2
|
|
|
|
|
|
|
|
|
|
.3 ldx DEVSLOTx0
|
|
|
|
|
lda #L91C96.1.CTR.DEFAULT+L91C96.1.CTR.AUTOREL
|
|
|
|
|
sta L91C96.1.CTR,x
|
|
|
|
|
lda /L91C96.1.CTR.DEFAULT+L91C96.1.CTR.AUTOREL
|
|
|
|
|
sta L91C96.1.CTR+1,x
|
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
rts
|
2016-01-10 22:16:07 +00:00
|
|
|
|
*--------------------------------------
|
2017-04-17 19:36:00 +00:00
|
|
|
|
CLOSE ldx DEVSLOTx0
|
2016-03-30 15:54:47 +00:00
|
|
|
|
stz L91C96.BSR,x
|
2016-03-13 22:07:01 +00:00
|
|
|
|
|
|
|
|
|
lda #L91C96.0.RCR.RESET
|
|
|
|
|
sta L91C96.0.RCR,x
|
|
|
|
|
lda /L91C96.0.RCR.RESET
|
|
|
|
|
sta L91C96.0.RCR+1,x
|
|
|
|
|
|
|
|
|
|
lda $C019 we can use VBL as we are not on //c
|
|
|
|
|
.1 eor $C019
|
|
|
|
|
bpl .1
|
2016-03-30 15:54:47 +00:00
|
|
|
|
|
|
|
|
|
lda $C019
|
2016-03-13 22:07:01 +00:00
|
|
|
|
.2 eor $C019
|
|
|
|
|
bpl .2
|
2016-03-30 15:54:47 +00:00
|
|
|
|
|
|
|
|
|
stz L91C96.0.RCR,x
|
|
|
|
|
stz L91C96.0.RCR+1,x
|
2017-04-17 19:36:00 +00:00
|
|
|
|
|
|
|
|
|
clc
|
2016-01-10 22:16:07 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
DRV.CS.END
|
|
|
|
|
DEVSLOTx0 .BS 1
|
2016-03-13 22:07:01 +00:00
|
|
|
|
USERMAC .BS 1
|
2017-04-17 19:36:00 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
DEVSTAT .DA #0
|
|
|
|
|
.BS 3 size
|
|
|
|
|
>PSTR "LanCEGS/L91C96"
|
|
|
|
|
.BS 1
|
2017-10-27 06:36:46 +00:00
|
|
|
|
.DA #S.DSTAT.T.NET
|
2017-04-17 19:36:00 +00:00
|
|
|
|
.BS 1 Subtype
|
|
|
|
|
.BS 2 Version
|
2016-01-10 22:16:07 +00:00
|
|
|
|
*--------------------------------------
|
2017-04-17 19:36:00 +00:00
|
|
|
|
FLAGS .DA #0
|
2016-03-13 22:07:01 +00:00
|
|
|
|
LINK.STATUS .BS 1 OK/DUPLEX/SPEED
|
2017-04-17 19:36:00 +00:00
|
|
|
|
MAC .BS 6
|
2016-01-10 22:16:07 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
2017-04-17 19:36:00 +00:00
|
|
|
|
SAVE /A2OSX.SRC/DRV/LANCEGS.DRV.S
|
2016-01-10 22:16:07 +00:00
|
|
|
|
ASM
|