... perhaps 10 years late but hey, it does. ;)
I don't remember how long it actually took me to convince / exhaust him, but one day in Spring 2019 PeP gave me access to his sv_drivers git repository. Naturally, I jumped right onto it let it sit on my disk for another seven years. :-)
A couple of months ago, while working on a totally unrelated project, I remembered about this repo and out of curiosity (the famous first words ;)) I tried to compile at least sv_xbios.prg (unfortunately, there was no history, just a random dump of its 2019 state). Of course there were a ton of errors, referencing an ancient mintlib, requiring native Atari tools and gcc etc. And most likely I would have given up if it weren't for Claude -- I let it fix them, one by one, every time with a careful code review.
It took Claude maybe 15 minutes to get me into a proper cross-compilation friendly state (of course, with my previous verification that I can produce 1:1 identical builds as the last official release). And after that... I was hooked. One bugfix after another, with Claude disassembling NVDI drivers, comparing code paths for different bit depths, relentlessly searching for stuff which would have taken me weeks to find and analyse. Then I could design a fix, verify it and move onto the next bug (yeah, there were quite a few!)
When I was done (after ~2 weeks) I got this crazy idea: how hard would it be to actually include SV_XBIOS.PRG into CT60 TOS itself? As it turned out, not very. Literally less than 100 lines of code.
Parallel to that (what are you supposed to do while waiting for Claude's responses, right?) I got an even crazier idea: first I let Claude design a SVEthLANa driver for Linux. I was blown away to see that the whole "driver" was basically just a few configuration settings because the OpenCore MAC unit, which Nature used in the FPGA, has Linux support already (which actually makes sense, how else would have the OpenCore authors tested it, right?)
Seeing that its transfer rate was much better than FreeMiNT's, what about porting the whole driver from Linux to FreeMiNT to see whether its (presumably) cleaner design wouldn't help here? At first, the numbers weren't very encouraging but it got better very quickly (upload = sending from Atari to PC, download = receiving from PC to Atari):
- Baseline (Linux-m68k current kernel's driver for FW010): upload 700 KB/s, download 1.4 MB/s
- FW009 driver: upload 3274 KB/s, download 710 KB/s (that 710 KB/s was actually a driver limit, due to a bug in its implementation)
- FW010 driver by Nature: upload 135 KB/s (!), download 1.6 MB/s (here we can see that download more or less matched but upload was totally broken)
- Ported driver: upload 42 KB/s (!!!), download 3 MB/s
- After discovering and working around four hardware issues with Svethlana's DMA: upload 4 MB/s, download 3 MB/s (huh!)
Yup, you read it correctly, FreeMiNT now beats Linux by a factor of 2-4 and surprisingly, it isn't because the Linux driver doesn't contain the workarounds (it uses a different way of preparing packets so the bugs are not so visible there).
An interesting fact: 32bpp resolutions, at least the 1920x1080 I have been using, seems to upset Svethlana's DMA in a much more visible way. My fixes are almost useless in 16bpp but in 32bpp I can see all of them working their ass off to keep the packets flowing (that also means that there is a slight performance decrease, about 200 KB/s in both directions due to retransmissions).
Where to get all this great stuff you ask?
- grab Linux 7.3 when released, (almost) everything has been pushed upstream (yeah, I also added some framebuffer fixes; of course, with Linux being Linux and m68k being a totally obscure platform, you are most likely going to end up with compiling everything by yourself... not so hard with docker and debian's multiarch support but still, nothing for newbies)
- SuperVidel Drivers 1.00 (unpack & replace your existing files)
- CT60 TOS 3.00 (built-in SV XBIOS, with a few fixes/additions inherited from CT60 TOS 1.03f which has been released today, too)
- New SVEthLANa driver is now part of FreeMiNT snapshots
Look at my hastily filled desktop with random utilities to see this in action! :-)
Add comment