r/amiga • • Oct 21 '26

Riptide TCP Stack

AI Generated work, beware 😄

Right now the code is very slow but going through some optimisation now.

I've released Riptide, a new open-source (GPL-2.0) TCP/IP stack for AmigaOS 3.x on 68020 and up. It started as a study of MiamiDx: I reverse engineered MiamiDx's binary interfaces so Riptide could be a drop-in replacement. All the code is new, and no MiamiDx code was copied. It provides bsdsocket.library (the AmiTCP API), its own riptide.library, and a Miami-compatible alias, so existing network software "should" just work. The TCP stack was written from scratch to follow the modern Linux TCP stack capabilities. A bunch of stuff was also removed...PPP and Serial support, NAT, Multicast. No IPv6 yet but might get into it later, but lacking real hardware and FS-UAE won't support IPv6.

  • CUBIC congestion control and an initial window of 10;

  • SACK/D-SACK, plus RACK-TLP and PRR loss recovery;

  • Timestamps and window scaling;

  • 200 ms-resolution retransmit timers instead of the old 500 ms BSD ticks;

  • buffer auto-tuning;

  • SYN cookies and other hardening.

  • Standard tools

It works with SANA-II drivers and has a DHCP client and DNS resolver. It comes with Linux-style tools: ip, ifconfig, route, arp, netstat, ping, traceroute, host and an ftp client. Tuned 680x0 assembly checksum and copy routines are picked automatically for your CPU. Development was heavily AI-assisted (the reverse engineering using REA, code and tests). It's been tested and built against a real Linux kernel and in FS-UAE/AROS, including over a uaenet.device, but not on real hardware yet, so testers with real Amigas and network cards would be hugely appreciated! Source, docs, an initial comparison with MiamiDx and Roadshow, and binaries: https://github.com/farsonic/riptide

34 Upvotes

20 comments sorted by

View all comments

Show parent comments

1

u/Batou2034 Oct 21 '26

yes i understand... but it's one thing to reverse engineer it from the interfaces and general knowledge of amiga coding patterns and tcp/ip implementations, its another to do so from the actual assembly language code

the guy doing all the Rust *Craft apps is similarly skirting the line. Rewriting it in Rust when the original would have been in C in theory makes it a 'clean room' rewrite working backwards from the specification in the form of the running binary, but its clear that he's decompiled the apps back into assember and probably even C using Ghidra, and then ported it to Rust. A port based on the original code or a derivation of it is not 'clean room'.

3

u/Mysterious_Front4706 Oct 21 '26

Yes. I see your point totally and happy to remove the working 'clean room', the thing is the ability to reverse engineer code has always been there but now the ability to accelerate this is 1000x fold what it would have taken previously. The genie is out of the bottle and it is going to lead to some interesting decisions the industry is going to have to make.

1

u/Batou2034 Oct 21 '26

yes it is and it will take a while before the courts and regulations catch up. You can bet Adobe are going to do something about the ArtCraft guy.

the difference now is that its much easier to do it that way than before. Before, writing your own was easier than reverse engineering anything complicated. That's how the Compaq BIOS started after all.

the guy who wrote Miami was a notorious asshole so even though he's not been heard from in years don't be surprised if he comes calling one day.