The Retro Desk's 8-bit fractal drawing benchmark

Topics regarding the Uzebox hardware/AVCore/BaseBoard (i.e: PCB, resistors, connectors, part list, schematics, hardware issues, etc.) should go here.
User avatar
danboid
Posts: 1936
Joined: Sun Jun 14, 2020 12:14 am

The Retro Desk's 8-bit fractal drawing benchmark

Post by danboid »

I wasn't quite sure which forum to post this in. Hardware? Software? Off topic?

Elsewhere on the forum I was wondering how the Uzebox MCU compares to the PC Engines CPU.

YT channel The Retro Desk has benchmarked several 8 bit machines by getting them to draw fractals. It would be interesting to port his assembly fractal drawing program to the Uzebox so that we can compare it to the other 8 bit machines he's run it on and do the same for the PC Engine.

https://youtu.be/oEFJ2KQDdAk
User avatar
danboid
Posts: 1936
Joined: Sun Jun 14, 2020 12:14 am

Re: The Retro Desk's 8-bit fractal drawing benchmark

Post by danboid »

If this doesn't interest anyone then this could be a good candidate for my first asm program. I think diving straight in with the SID player might be a bit much.

Ideally we'd want to use a res that matches one of the other machines being tested.
CunningFellow
Posts: 1445
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: The Retro Desk's 8-bit fractal drawing benchmark

Post by CunningFellow »

I'd guess that the Uzebox could do it >20x faster than the C64 if you reduced the screen height down to a line per pixel. (I think the mandelbrot picture is about 24 pixels high).

Probable about 2x faster than the C64 if you kept full height screen.
User avatar
Artcfox
Posts: 1382
Joined: Thu Jun 04, 2015 5:35 pm
Contact:

Re: The Retro Desk's 8-bit fractal drawing benchmark

Post by Artcfox »

Or you could just calculate it with the video output turned completely off (or down to just a single render line) and then once calculated, display it.

Also, there is this which calculates it on the Uzebox in C: https://uzebox.org/wiki/Bitmap_Demo
User avatar
danboid
Posts: 1936
Joined: Sun Jun 14, 2020 12:14 am

Re: The Retro Desk's 8-bit fractal drawing benchmark

Post by danboid »

I'd forgot there was a Mandelbrot in the bitmapdemo. As you say, that is in C and The Retro Desk has used BASIC and asm for his tests so its not the direct comparison we want but the mandelbrot in that demo takes approx 8 seconds to draw.

I realise it could be calculated faster if we don't display it whilst its drawing so I suppose we should ideally measure both from an asm version of the code.
User avatar
Artcfox
Posts: 1382
Joined: Thu Jun 04, 2015 5:35 pm
Contact:

Re: The Retro Desk's 8-bit fractal drawing benchmark

Post by Artcfox »

It's also not ultra-low resolution like that benchmark.

At the end of the day C code turns into ASM code that the compiler generates for you, so does it need to be hand written ASM? ;)
User avatar
uze6666
Site Admin
Posts: 4801
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: The Retro Desk's 8-bit fractal drawing benchmark

Post by uze6666 »

So for a 32x22 resolution, the X16 takes 3.5 seconds *in assembler* and the Uzebox 8 seconds at 120x96? Very interesting. A rule of three would then yield <0.5s for the Uzebox at the low resolution. That's >50x the C64...and without disabling video rendering. Nice. 8-)

Try using something like video mode 40 with the bitmap demo's Mandelbrot code to at least have a comparable resolution and colors. I'll have to check the generated assembly but I'm pretty sure it would be hard to improve significantly by hand since it already uses fixed point arithmetics.
User avatar
uze6666
Site Admin
Posts: 4801
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: The Retro Desk's 8-bit fractal drawing benchmark

Post by uze6666 »

For the kicks I made a little demo with the same code, parameters and resolutions as the video in order to have a fair comparison. Happens I either screwed up my calculation or was too optimistic. It's more like 1 second flush. So "just" 26x faster than the C64 and 3.5x faster than the X16. When the video is turned off, 0.08 second! 8-)
mandel-demo.PNG
mandel-demo.PNG (12.48 KiB) Viewed 1541 times
Attachments
MandelDemo.zip
(211.21 KiB) Downloaded 44 times
MandelDemo.uze
(14.69 KiB) Downloaded 44 times
MandelDemo.hex
(39.94 KiB) Downloaded 45 times
User avatar
Artcfox
Posts: 1382
Joined: Thu Jun 04, 2015 5:35 pm
Contact:

Re: The Retro Desk's 8-bit fractal drawing benchmark

Post by Artcfox »

Nice!!!
User avatar
danboid
Posts: 1936
Joined: Sun Jun 14, 2020 12:14 am

Re: The Retro Desk's 8-bit fractal drawing benchmark

Post by danboid »

An impressive bit of Uzebox fractal 8-bit propaganda there then!

Thanks Uze!
Post Reply