mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-08-10 07:25:07 +00:00
Fix Uthernet2 MAC address (doesn't like non-zero MSB)
This commit is contained in:
@@ -75,7 +75,7 @@ word[] rom
|
||||
word saveidx
|
||||
byte regidx
|
||||
byte regdata
|
||||
byte[] slot
|
||||
byte slot
|
||||
//
|
||||
// Wiznet MAC address
|
||||
//
|
||||
@@ -474,8 +474,8 @@ def wizOpenUDP(localport, callback, param)
|
||||
wiz=>channel_lclport = localport
|
||||
wiz=>channel_recv_func = callback
|
||||
wiz=>channel_recv_parm = param
|
||||
pokeregw(wiz=>channel_regs + WIZ_SnPORT, localport)
|
||||
pokereg(wiz=>channel_regs + WIZ_SnMR, $02) // UDP protocol
|
||||
pokeregw(wiz=>channel_regs + WIZ_SnPORT, localport)
|
||||
pokereg(wiz=>channel_regs + WIZ_SnCR, $01) // OPEN
|
||||
return wiz
|
||||
end
|
||||
@@ -693,7 +693,6 @@ def wizServiceIP
|
||||
|
||||
ir = peekreg(WIZ_IR)
|
||||
if ir
|
||||
puth(ir);putln
|
||||
wiz = @wizChannel
|
||||
for i = 0 to 3
|
||||
//
|
||||
@@ -703,7 +702,7 @@ def wizServiceIP
|
||||
wizregs = wiz=>channel_regs
|
||||
wizdata = wiz=>channel_rxmem
|
||||
sir = peekreg(wizregs + WIZ_SnIR)
|
||||
pokereg(wiz=>channel_regs + WIZ_SnIR, sir) // Clear SnIR
|
||||
pokereg(wizregs + WIZ_SnIR, sir) // Clear SnIR
|
||||
when wiz->channel_proto
|
||||
is WIZ_PROTO_UDP
|
||||
if sir & $04
|
||||
@@ -861,7 +860,9 @@ for slot = $90 to $F0 step $10
|
||||
regdata = slot + 3
|
||||
_pokedata.1 = regdata
|
||||
_peekdata.1 = regdata
|
||||
repeat
|
||||
pokeio(slot, $03) // Auto-increment indirect I/F + enable ping
|
||||
until peekio(slot) == $03
|
||||
//
|
||||
// The following looks redundant, but it sets up the peek/poke locations
|
||||
// for peekreg(s)/pokereg(s)
|
||||
@@ -872,6 +873,7 @@ for slot = $90 to $F0 step $10
|
||||
//
|
||||
// Initialize common registers
|
||||
//
|
||||
wizMAC[5] = slot >> 4 // Slighty unique MAC address
|
||||
pokeregs(WIZ_SHAR, @wizMAC, 6) // MAC addr
|
||||
pokeregw(WIZ_RTR, 5000) // Timeout period to 500ms
|
||||
pokereg(WIZ_RMSR, $55) // 2K Rx memory/channel
|
||||
|
Reference in New Issue
Block a user