diff --git a/src/libsrc/apple/uthernet.pla b/src/libsrc/apple/uthernet.pla index 3c0b350..61ac210 100644 --- a/src/libsrc/apple/uthernet.pla +++ b/src/libsrc/apple/uthernet.pla @@ -22,7 +22,6 @@ const AUTO_INC = $8000 // // Uthernet register addresses // -byte[] slot // Init time only byte rxdata_lo, rxdata_hi byte txcmd byte txlen @@ -30,6 +29,7 @@ byte isq word rom[] byte pregidx byte pregdata +byte[] slot // Init time only // // Uthernet MAC address // @@ -219,17 +219,18 @@ for slot = $90 to $F0 step $10 if (peekiow(slot+TX_CMD) & $CC3F) == $0009 pokeiow(slot+PREG_INDEX, 0) if peekiow(slot+PREG_DATA) == $630E - pokepreg($0114, $40) // RESET - rxdata_hi = slot + 1 + pregidx = slot + PREG_INDEX + pregdata = slot + PREG_DATA + pokepreg($0114, $40) // RESET + rxdata_lo = slot + RX_DATA + rxdata_hi = slot + RX_DATA + 1 txcmd = slot + TX_CMD txlen = slot + TX_LEN isq = slot + INT_STATUS - pregidx = slot + PREG_INDEX - pregdata = slot + PREG_DATA - _pokefrml.1 = slot - _pokefrmh.1 = slot+1 - _peekfrml.1 = slot - _peekfrmh.1 = slot+1 + _pokefrml.1 = slot + TX_DATA + _pokefrmh.1 = slot + TX_DATA + 1 + _peekfrml.1 = slot + RX_DATA + _peekfrmh.1 = slot + RX_DATA + 1 pokepreg($0158, utherMAC:0) // MAC addr pokepreg($015A, utherMAC:2) // MAC addr pokepreg($015C, utherMAC:4) // MAC addr diff --git a/src/libsrc/apple/uthernet2.pla b/src/libsrc/apple/uthernet2.pla index 57e4c59..e18c983 100644 --- a/src/libsrc/apple/uthernet2.pla +++ b/src/libsrc/apple/uthernet2.pla @@ -71,11 +71,11 @@ const WIZ_RXMEM3 = $7800 // // Wiznet indirect registers // -byte slot -word rom[] -word saveidx -byte regidx -byte regdata +word[] rom +word saveidx +byte regidx +byte regdata +byte[] slot // // Wiznet MAC address // diff --git a/src/libsrc/dhcp.pla b/src/libsrc/dhcp.pla index ef3bc25..d982800 100644 --- a/src/libsrc/dhcp.pla +++ b/src/libsrc/dhcp.pla @@ -212,11 +212,11 @@ repeat break fin next - retry = retry + 1 + retry++ until retry > 4 or optsOP.2 == DHCP_ACK iNet:closeUDP(portDHCP) iNet:setInterfaceIP(@localip, @localnet, @localgw) puts("Apple II bound to:\n");putip(@localip);putc('/');putip(@localnet);putln iNet:setDNS(@localdns) -//puts("DNS: ");putip(@localdns);putln +puts("DNS:");putip(@localdns);putln done diff --git a/src/libsrc/etherip.pla b/src/libsrc/etherip.pla index ebd1c99..520aa63 100644 --- a/src/libsrc/etherip.pla +++ b/src/libsrc/etherip.pla @@ -587,7 +587,6 @@ def getEtherHA(ha) if ha; memcpy(ha, @myMAC, MAC_SIZE); fin return MAC_SIZE end - // // Fill in iNet class // diff --git a/src/libsrc/inet.pla b/src/libsrc/inet.pla index e30c73c..37cdb9b 100644 --- a/src/libsrc/inet.pla +++ b/src/libsrc/inet.pla @@ -148,7 +148,7 @@ def recvDNS(remip, remport, pkt, len, ipaddr) resptr = resptr + 8 //dumpbytes(resptr + 2, ^(resptr + 1)) resptr = resptr + 2 + ^(resptr + 1); putln - r = r - 1 + r-- loop fin stateDNS = DNS_ANSWER @@ -197,7 +197,9 @@ def iNetResolve(namestr, ipaddr) fin return ipaddr=>0 <> 0 or ipaddr=>2 <> 0 end - +// +// Initialze network stack +// def iNetInit // // Look for net hardware @@ -216,7 +218,6 @@ def iNetInit puts("No network adapters found.\n") return NULL end - // // Fill iNet class // diff --git a/src/tftprel b/src/tftprel index e63d575..dffe642 100755 --- a/src/tftprel +++ b/src/tftprel @@ -1,39 +1,39 @@ #!/bin/bash # Core VM, CMDSYS, JITC files -echo "PLASMA.SYSTEM"; atftp $1 --put -l rel/apple/PLASMA.SYSTEM#FF2000 -r PLASMA.SYSTEM#FF2000 -echo "PLVM.128"; atftp $1 --put -l rel/apple/PLVM.128#FF2000 -r PLVM.128#FF2000 -echo "PLVM16"; atftp $1 --put -l rel/apple/PLVM16#FF2000 -r PLVM16#FF2000 -echo "CMD"; atftp $1 --put -l rel/apple/CMD#061000 -r CMD#061000 -echo "CMD128"; atftp $1 --put -l rel/apple/CMD128#061000 -r CMD128#061000 -echo "SYS/JIT"; atftp $1 --put -l rel/apple/JIT#FE1000 -r SYS/JIT#FE1000 -echo "SYS/JIT16"; atftp $1 --put -l rel/apple/JIT16#FE1000 -r SYS/JIT16#FE1000 -echo "SYS/JITUNE"; atftp $1 --put -l rel/apple/JITUNE#FE1000 -r SYS/JITUNE#FE1000 +echo "PLASMA.SYSTEM"; atftp $1 --put -l rel/apple/PLASMA.SYSTEM#FF2000 -r $2/PLASMA.SYSTEM#FF2000 +echo "PLVM.128"; atftp $1 --put -l rel/apple/PLVM.128#FF2000 -r $2/PLVM.128#FF2000 +echo "PLVM16"; atftp $1 --put -l rel/apple/PLVM16#FF2000 -r $2/PLVM16#FF2000 +echo "CMD"; atftp $1 --put -l rel/apple/CMD#061000 -r $2/CMD#061000 +echo "CMD128"; atftp $1 --put -l rel/apple/CMD128#061000 -r $2/CMD128#061000 +echo "SYS/JIT"; atftp $1 --put -l rel/apple/JIT#FE1000 -r $2/SYS/JIT#FE1000 +echo "SYS/JIT16"; atftp $1 --put -l rel/apple/JIT16#FE1000 -r $2/SYS/JIT16#FE1000 +echo "SYS/JITUNE"; atftp $1 --put -l rel/apple/JITUNE#FE1000 -r $2/SYS/JITUNE#FE1000 # Core libraries -echo "SYS/ARGS"; atftp $1 --put -l rel/ARGS#FE1000 -r SYS/ARGS#FE1000 -echo "SYS/DHCP"; atftp $1 --put -l rel/DHCP#FE1000 -r SYS/DHCP#FE1000 -echo "SYS/ED"; atftp $1 --put -l rel/ED#FE1000 -r SYS/ED#FE1000 -echo "SYS/ETHERIP"; atftp $1 --put -l rel/ETHERIP#FE1000 -r SYS/ETHERIP#FE1000 -echo "SYS/FIBER"; atftp $1 --put -l rel/FIBER#FE1000 -r SYS/FIBER#FE1000 -echo "SYS/FPSTR"; atftp $1 --put -l rel/FPSTR#FE1000 -r SYS/FPSTR#FE1000 -echo "SYS/FPU"; atftp $1 --put -l rel/FPU#FE1000 -r SYS/FPU#FE1000 -echo "SYS/INET"; atftp $1 --put -l rel/INET#FE1000 -r SYS/INET#FE1000 -echo "SYS/LONGJUMP"; atftp $1 --put -l rel/LONGJMP#FE1000 -r SYS/LONGJMP#FE1000 -echo "SYS/LZ4"; atftp $1 --put -l rel/LZ4#FE1000 -r SYS/LZ4#FE1000 -echo "SYS/MEMMGR"; atftp $1 --put -l rel/MEMMGR#FE1000 -r SYS/MEMMGR#FE1000 -echo "SYS/SANE"; atftp $1 --put -l rel/SANE#FE1000 -r SYS/SANE#FE1000 -echo "SYS/CONIO"; atftp $1 --put -l rel/apple/CONIO#FE1000 -r SYS/CONIO#FE1000 -echo "SYS/DGR"; atftp $1 --put -l rel/apple/DGR#FE1000 -r SYS/DGR#FE1000 -echo "SYS/FILEIO"; atftp $1 --put -l rel/apple/FILEIO#FE1000 -r SYS/FILEIO#FE1000 -echo "SYS/GRAFIX"; atftp $1 --put -l rel/apple/GRAFIX#FE1000 -r SYS/GRAFIX#FE1000 -echo "SYS/JOYBUZZ"; atftp $1 --put -l rel/apple/JOYBUZZ#FE1000 -r SYS/JOYBUZZ#FE1000 -echo "SYS/MON"; atftp $1 --put -l rel/apple/MON#FE1000 -r SYS/MON#FE1000 -echo "SYS/PORTIO"; atftp $1 --put -l rel/apple/PORTIO#FE1000 -r SYS/PORTIO#FE1000 -echo "SYS/SPIPORT"; atftp $1 --put -l rel/apple/SPIPORT#FE1000 -r SYS/SPIPORT#FE1000 -echo "SYS/UTHERNET2";atftp $1 --put -l rel/apple/UTHERNET2#FE1000 -r SYS/UTHERNET2#FE1000 -echo "SYS/UTHERNET"; atftp $1 --put -l rel/apple/UTHERNET#FE1000 -r SYS/UTHERNET#FE1000 +echo "SYS/ARGS"; atftp $1 --put -l rel/ARGS#FE1000 -r $2/SYS/ARGS#FE1000 +echo "SYS/DHCP"; atftp $1 --put -l rel/DHCP#FE1000 -r $2/SYS/DHCP#FE1000 +echo "SYS/ED"; atftp $1 --put -l rel/ED#FE1000 -r $2/SYS/ED#FE1000 +echo "SYS/ETHERIP"; atftp $1 --put -l rel/ETHERIP#FE1000 -r $2/SYS/ETHERIP#FE1000 +echo "SYS/FIBER"; atftp $1 --put -l rel/FIBER#FE1000 -r $2/SYS/FIBER#FE1000 +echo "SYS/FPSTR"; atftp $1 --put -l rel/FPSTR#FE1000 -r $2/SYS/FPSTR#FE1000 +echo "SYS/FPU"; atftp $1 --put -l rel/FPU#FE1000 -r $2/SYS/FPU#FE1000 +echo "SYS/INET"; atftp $1 --put -l rel/INET#FE1000 -r $2/SYS/INET#FE1000 +echo "SYS/LONGJUMP"; atftp $1 --put -l rel/LONGJMP#FE1000 -r $2/SYS/LONGJMP#FE1000 +echo "SYS/LZ4"; atftp $1 --put -l rel/LZ4#FE1000 -r $2/SYS/LZ4#FE1000 +echo "SYS/MEMMGR"; atftp $1 --put -l rel/MEMMGR#FE1000 -r $2/SYS/MEMMGR#FE1000 +echo "SYS/SANE"; atftp $1 --put -l rel/SANE#FE1000 -r $2/SYS/SANE#FE1000 +echo "SYS/CONIO"; atftp $1 --put -l rel/apple/CONIO#FE1000 -r $2/SYS/CONIO#FE1000 +echo "SYS/DGR"; atftp $1 --put -l rel/apple/DGR#FE1000 -r $2/SYS/DGR#FE1000 +echo "SYS/FILEIO"; atftp $1 --put -l rel/apple/FILEIO#FE1000 -r $2/SYS/FILEIO#FE1000 +echo "SYS/GRAFIX"; atftp $1 --put -l rel/apple/GRAFIX#FE1000 -r $2/SYS/GRAFIX#FE1000 +echo "SYS/JOYBUZZ"; atftp $1 --put -l rel/apple/JOYBUZZ#FE1000 -r $2/SYS/JOYBUZZ#FE1000 +echo "SYS/MON"; atftp $1 --put -l rel/apple/MON#FE1000 -r $2/SYS/MON#FE1000 +echo "SYS/PORTIO"; atftp $1 --put -l rel/apple/PORTIO#FE1000 -r $2/SYS/PORTIO#FE1000 +echo "SYS/SPIPORT"; atftp $1 --put -l rel/apple/SPIPORT#FE1000 -r $2/SYS/SPIPORT#FE1000 +echo "SYS/UTHERNET2";atftp $1 --put -l rel/apple/UTHERNET2#FE1000 -r $2/SYS/UTHERNET2#FE1000 +echo "SYS/UTHERNET"; atftp $1 --put -l rel/apple/UTHERNET#FE1000 -r $2/SYS/UTHERNET#FE1000 # Build tools -echo "BLD/PLASM"; atftp $1 --put -l rel/PLASM#FE1000 -r BLD/PLASM#FE1000 -echo "BLD/CODEOPT"; atftp $1 --put -l rel/CODEOPT#FE1000 -r BLD/CODEOPT#FE1000 +echo "BLD/PLASM"; atftp $1 --put -l rel/PLASM#FE1000 -r $2/BLD/PLASM#FE1000 +echo "BLD/CODEOPT"; atftp $1 --put -l rel/CODEOPT#FE1000 -r $2/BLD/CODEOPT#FE1000 diff --git a/src/vmsrc/apple/cmd.pla b/src/vmsrc/apple/cmd.pla index cd7871c..61f450f 100755 --- a/src/vmsrc/apple/cmd.pla +++ b/src/vmsrc/apple/cmd.pla @@ -982,7 +982,7 @@ def loadmod(mod)#1 // dcitos(mod, @filename) refnum = open(@filename) - if !refnum + if !refnum and filename < 16 // // Try system path // diff --git a/src/vmsrc/apple/cmdjit.pla b/src/vmsrc/apple/cmdjit.pla index fbfb51c..8931509 100755 --- a/src/vmsrc/apple/cmdjit.pla +++ b/src/vmsrc/apple/cmdjit.pla @@ -1025,7 +1025,7 @@ def adddef(isfirst, addr, deflast)#1 return defentry end def loadmod(mod)#1 - word rdlen, modsize, bytecode, codefix, defofst, defcnt, init, initcode[], fixup + word rdlen[], bytecode, modsize, codefix, defofst, defcnt, init, initcode[], fixup word addr, defaddr, modaddr, modfix, modofst, modend word deftbl, deflast word moddep, rld, esd, sym @@ -1036,7 +1036,7 @@ def loadmod(mod)#1 // dcitos(mod, @filename) refnum = open(@filename) - if !refnum + if !refnum and filename < 16 // // Try system path // diff --git a/src/vmsrc/apple/sossys.pla b/src/vmsrc/apple/sossys.pla index 22c0af8..de840da 100755 --- a/src/vmsrc/apple/sossys.pla +++ b/src/vmsrc/apple/sossys.pla @@ -1059,7 +1059,7 @@ def loadmod(mod)#1 // dcitos(mod, @filename) refnum = open(@filename) - if !refnum + if !refnum and filename < 16 // // Try system path //