Log In  

I'm a bit new here, so I don't know if adding network capability has previously been discussed (?)

But it feels to me some simple UDP send/receive instructions would add some cool functionality, without adding too much complexity.

Perhaps something like:

[write message to RAM]
poke4([ip-locn],ip)
poke2([port-locn],port)
send(0x4300,length) 

Where [ip-locn],[port-locn] would be some special reserved locations for IP address and port.
UDP packets are usually small. I've seen <=512 bytes recommended in places, which easily fits into the user RAM address range.
And an IPV4 address would fit in a number variable, and would be adequate for LAN play.

Receive could be:

length=recv(0x4300,maxlength)
[read message from RAM]

Returning 0 if nothing is waiting.
It could also populate [ip-locn] with the return IP address so that replying would be straightforward.

Perhaps [port-locn] could be pre-populated with a default port number (0x1C08 ?).

Any thoughts?
Am I trying to make it simpler than is actually possible? (I haven't done socket programming in a while, so I forget what's necessary to get UDP/IP working).

P#77688 2020-06-05 09:36

GPIO already does that but unfortunately only practical for network within a web page.

Agree that some LAN extension would open up a lot of options (and could even be extended to WAN thanks to port forwarding or other VPN tricks0

P#77690 2020-06-05 09:55

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-04-20 07:32:14 | 0.007s | Q:9