Page 3 of 3

Re: Phoenix Air - WiFi for the H5 Phoenix

Posted: 04 Dec 2026 21:21
by exxos
Phoenix Air update, the ESP32-S3 FPU against the 68882.

I wanted to see what the FPU inside the ESP32-S3 on the Phoenix Air board can actually do, and how it compares to a real 68882. So I had a test program made that runs exactly the same floating point work on the Atari and on the ESP, and both give the same answers, apart from the odd point right on the edge of the Mandelbrot set where single and extended precision round differently.

The board was in my H5, and I ran the Atari side on my Falcon, both stock with its 16MHz 68882 and with the DFB1X, which runs the 68882 at 50MHz, currently the fastest FPU possible on real hardware.

For the demo, MANDEL.TOS draws the same 320 x 200 Mandelbrot in 16 colours, with up to 640 iterations a point, which comes to just over 7 million iterations.

Worth watching it all before skipping to the results below ;)





@dml be jealous now :P


On the Falcon with the DFB1X it took 64.9 seconds.
On the H5 with the Phoenix Air board it took 0.65 seconds, and that is timed from the start to the last line being on the H5's screen, so sending the picture over to the H5 is included.
So the ESP32-S3 was about 100 times faster than a 50MHz 68882 on this job. The 68882 had time for a cup of tea, the ESP32 did not even have time to put the kettle on.

The FPU test program (FPUTEST) times eleven different tests. A few of them, as the time for one unit of work:
1000 float multiply-adds: H5 in software 473 ms, Falcon 68882 13.75 ms, DFB1X 5.64 ms, ESP32-S3 0.055 ms.
1000 float divides: Falcon 68882 15.6 ms, DFB1X 6.1 ms, ESP32-S3 0.27 ms.
Drawing a small 64 x 64 SVG picture: H5 in software 84.4 seconds, Falcon 68882 4.5 seconds, DFB1X 2.7 seconds, ESP32-S3 0.015 seconds.

Over the eight single precision tests, the ESP's FPU came out 149 times faster than the stock Falcon 68882 in the middle of the range (44 to 296 times), and 55 times faster than the DFB1X (23 to 178 times).

Now the important bit, before anyone gets too excited.

The ESP's FPU is not a 68882 and it cannot run 68882 code. It is part of the ESP32's own processor, with its own instruction set, and it only does single precision. Double precision is done in software on the ESP, so there it only beats the DFB1X by 2.4 to 12.6 times.

It also cannot be used as a drop-in FPU for an ST by sending each FPU instruction over to the board. On the early test firmware, one trip over the link and back took about 225 microseconds, while a single 68882 instruction takes between about 1 and 33 microseconds at 16MHz. Each instruction would spend far longer travelling than being worked out.

Where it does work is giving the ESP a whole job and getting the finished result back, which is what the Mandelbrot demo does. The Atari sends one request, the ESP does all the maths on its second core, and the Atari just copies the picture lines onto its screen as they arrive. Sending the whole picture over only added 7 ms to the run.

So anything with a lot of maths for the amount of data, like drawing pictures, fractals, fonts or SVG images, could be handed over to the board and come back finished.

Side note for the emulator users, Hatari does not time FPU instructions at all. FSIN takes no longer than FMOVE there, so all of this had to be done on real hardware.

The ESP is already doing a lot of the heavy lifting on the current board. HighWire has no encryption at all, so every https page is fetched and decrypted by the ESP and handed to the Atari as plain HTML, which is the only reason https sites load at all. On top of that it keeps connections to the server open between files, can work out a page's style sheets for HighWire, and can turn the pictures into GIFs at the size and number of colours of the Atari's screen. A few before and after figures:

Forum index on the real board, connections kept open: 67 seconds before, 50 seconds after.
Style sheets worked out by the ESP, forum index in the emulator with the real network: 42.2 seconds before, 12.4 seconds after.
Pictures converted by the ESP, a forum topic page full of large screenshots in the emulator: 304.5 seconds before, 82.4 seconds after.

On the real board, seven pictures came down as 32 KB of GIFs instead of the 225 KB of the originals.

The emulator figures are from Hatari, which has matched the real board to within about a second and a half on the same page.

TL;DR: The ESP32-S3's FPU drew the Mandelbrot about 100 times faster than a 50MHz 68882, but it cannot run 68882 code, so it only helps with whole jobs written for the ESP.

EDIT:

Phoenix Air update, the MandelBulb test.

MBULB_PREVIEW.png
MBULB_PREVIEW.png (58.01 KiB) Viewed 14 times

Next up after the Mandelbrot test is a MandelBulb. dml's MandelBulb program is designed for the Falcon's higher resolutions, so we wrote our own in ST low resolution, 320 x 200 in 16 colours, so it runs on the ST and the Falcon alike.

As before, it is the same C code on both machines. The Falcon draws it with its own 68882, and the ESP32-S3 on the Phoenix Air board works it out with its own FPU and sends the rows over the board's link, ready for the screen.

The results:
Falcon with the DFB1X (68882 at 50MHz): 213.5 seconds.
H5 with the Phoenix Air board: 12.96 seconds, from the start to the last row on the screen, link included.
So the S3 was about 16.5 times faster. The DFB1X took about as long as a game used to take to load off tape.

Two runs on the H5 gave 12.96 and 12.97 seconds. The link and drawing on the H5 added only about 0.05 seconds, the rest is the S3's own work.

So why only 16.5 times, when the Mandelbrot was about 100 times faster on the S3 (0.65 seconds against 64.9 on the DFB1X)?
The Mandelbrot is nothing but multiplies and adds, which the S3's FPU does in hardware. The MandelBulb needs sine, cosine, arc cosine, arc tangent, square root and logarithm on every step, and the 68882 has an instruction for each of those. The S3 does not, so its maths library has to work them out from lots of multiplies and adds.
So this test plays to the 68882's strengths, and the S3 still came out well ahead.

The two machines counted 1,688,418 and 1,688,414 fractal steps. The two FPUs round differently, so a handful of points come out slightly different.

The same limit applies as before: the S3's FPU cannot run 68882 code, so the work has to be written for the ESP and sent to it as a whole job.

TL;DR: On the MandelBulb the S3 was about 16.5 times faster than the DFB1X's 50MHz 68882 (12.96 s against 213.5 s). That's much less than the Mandelbrot's 100 times, because the 68882 has sine, cosine and log in hardware and the S3 does not.

Re: Phoenix Air - WiFi for the H5 Phoenix

Posted: 05 Dec 2026 00:43
by Bikerbob
Very nice .. fast work too! :)