A fork of DemoFX to be used as a benchmarking tool
Find a file
Sylvain PILLOT d12a3b8e4a bench_report : classement lisible dans le gabarit du site
La cellule td.who du classement heritait de la classe .who du site (flex,
marge de 40 px) : nom et machine se retrouvaient sur une ligne, et le tableau
debordait jusqu'a masquer la colonne du score. La cellule redevient une
table-cell, et le sous-titre peut passer a la ligne.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 21:30:35 +01:00
assets Initial commit - fork from DemoFX 2025-04-11 21:43:28 +02:00
assets-cg Nouveaux effets portables en 320x240 (TI-Nspire) 2026-10-31 21:42:59 +01:00
bench Comparatif : score BenchFX, dix releves en -O2, synthese 2026-11-01 17:24:37 +01:00
src fx-CG20 : plus de crash, effets trop gourmands sautes 2026-11-01 17:24:37 +01:00
tools bench_report : classement lisible dans le gabarit du site 2026-11-01 21:30:35 +01:00
.gitignore Initial commit - fork from DemoFX 2025-04-11 21:43:28 +02:00
build Initial commit - fork from DemoFX 2025-04-11 21:43:28 +02:00
capture Initial commit - fork from DemoFX 2025-04-11 21:43:28 +02:00
clean Initial commit - fork from DemoFX 2025-04-11 21:43:28 +02:00
CMakeLists.txt fx-CG20 : plus de crash, effets trop gourmands sautes 2026-11-01 17:24:37 +01:00
README.md Comparatif : score BenchFX, dix releves en -O2, synthese 2026-11-01 17:24:37 +01:00
rebuild Initial commit - fork from DemoFX 2025-04-11 21:43:28 +02:00
send Initial commit - fork from DemoFX 2025-04-11 21:43:28 +02:00

BenchFX - a collection of classical demoscene effects aiming at benchmarking fx-CGs calculators

Intro

This is based on my participation to the CEMETCH CC26 contest hold during November 2023. The theme of the contest was "Screen Saver".

I was looking for some good visual stuff to put on the screen of my fx-CG50 and found the idea of developping a collection of Oldschool Demoscene Effects.

It also intends to demonstrate, while not fully optimized, what we can do with this machine and fxSDK, the SDK developped by Lephenixnoir for Casio fx9860G serie and Prism/fx-CGs.

Watch the video on Youtube :

Watch the Video

This version has been rewritten to propose a better plateform to easily add effects and permit to develop further demo effect in the future. Benchmarking features have been later on added. It is then possible the set a given OC parameter using PTune and then run this addin. Performances achieved will then be collected in a output file.

What it contains

So far, 77 effects have been coded and are implemented into the revision: the 24 original ones, 4 ported from the web, 7 old-school classics and 42 newer ones (see the end of this file). I hope the variety of effects will provide you great satisfaction. Here are some screenshots of each effect.

Intro Bump Mapping Particuled Fire
WormHole Dot Ball Dot Wavy Flag
Screen Fire Dot Moired Cube 3D Sphere
XOR Moire Starfield Bouncing Line
Spline Distortion Bouncing Star Rotozoom
Plasma Sinosoids Dot Morphing Lens
Burning Cube Matrix Morphing Blur
Rain Drops Motion Blur Infinite Bobs
3D Tunnel Metablobs Glittering Sea
Noise Swirl
Particle Explosions Sine Scroller Variations Shadebobs
Copper Bars Glenz Vectors Twister
Image Deformations
Mandelbrot Zoom Julia Morphing Voxel Landscape
Textured Cube Flat Shaded Torus Vector Balls
Gouraud Shaded Torus Phong Shaded Torus Environment Mapped Torus
Plasma Cube
Raytraced Spheres Mode 7 Floor Hyperspace
Kaleidoscope Circle Interference Rasterbars & Checkerboards
Spirograph Fluid Smoke Lightning Storm
Transitions Strange Attractors Roto-Plasma
Burning Ship Game of Life Reaction-Diffusion
Boids Flock Water Ripples Aurora Borealis
Synthwave Sunset Underwater Caustics Wireframe Terrain
Torus Knot & Moebius Echo Cubes 3D Logo
ASCII Art Truchet Tiles Penrose Tiling
Op Art Oscilloscope IFS Fractals
Newton Fractal Dragon Curve

The collection of effects is expected to grow in the future. Stay Tuned ...

What does it deliver

In addition to the simple beauty of the effects, pressing [EXIT] or [BACK] will exit the addin and write a file called BenchFX.txt at the root of the filesystem of your machine. This file contains a list of data for each effect, providing a detailed review of FPS measured during the session. That's a great tool to measure the effect of Overclocking parameters.

BENCHMARK Data - BenchFX 1.0 by SLYVTT
--------------------------------------

>MODULE : "Fire, Donut & Siner Scrollers  > _" :
	 - Min FPS : 20.9 FPS 
	 - Max FPS : 22.2 FPS 
	 - Ave FPS : 21.4 FPS 
	 - Images Rendered : 641 
	 - Total Time : 29.96 sec 


>MODULE : "Bump Mapping > _" :
	 - Min FPS : 21.1 FPS 
	 - Max FPS : 29.2 FPS 
	 - Ave FPS : 28.2 FPS 
	 - Images Rendered : 847 
	 - Total Time : 30.02 sec 


>MODULE : "Particuled Fire > _" :
	 - Min FPS : 28.5 FPS 
	 - Max FPS : 30.2 FPS 
	 - Ave FPS : 29.2 FPS 
	 - Images Rendered : 877 
	 - Total Time : 30.03 sec 

....

and so on for all effects ....

Comparing machines

bench/ collects BenchFX.txt files from several machines and settings, and tools/bench_report.py turns them into a full comparison: every effect's Min / Average / Max FPS and pre-computation time, on each machine (bench/RESULTS.md), charts (bench/charts/) and an interactive page with hover details and machine toggles (bench/report.html).

Each run also gets a BenchFX score, in the manner of 3DMark or PCMark: the fx-CG100 at F4 is worth 1000, and a run's score is the geometric mean over all effects of its FPS divided by the reference's (75 % average FPS, 25 % minimum FPS), times 1000. Twice the score means twice as fast.

Overall ranking

To add a machine or an overclock setting: copy its BenchFX.txt into bench/data/, add an entry to bench/machines.json, then run python3 tools/bench_report.py. Each calculator has its own colour, in the order it first appears in the file (append a new calculator at the end), and its overclock levels are shades of it, darker or brighter as the level rises; the level is read from the file. The key findings at the top of the comparison come from bench/findings.md, written by hand: update it when the runs change.

Controls

The addin will continuously cycle between the effects. By default it will change the effect every 20 seconds.

The user can use the following keys to interract with the addin :

  • [EXIT] or [BACK] to leave to the Operating System.

  • [F1] or [PREVTAB] and [F6] or [NEXTTAB] to change manually the effect.

  • [x10^x] : take a screenshot over USB. Run fxlink -iw on the computer; the first press opens the USB link, and the screenshot is sent as soon as fxlink is connected.

  • [OPTN] or [SETTINGS] : to show/hide the option menu. While in this menu, the following keys can be used :

    • [UP / DOWN] : to select the parameter,
    • [LEFT / RIGHT] : to adjust the value of the parameter.

    The "CPU Clock" line sets the processor speed to one of the Ftune/PTune levels, F1 (default) to F5 (F4 on the Graph Math+ / fx-CG100, where gint makes F5 identical to F4), and shows the resulting frequency. The change applies at once, the frame during which it happens is left out of the statistics, and the speed in use at launch is restored when leaving the add-in. BenchFX.txt gives the speed each effect was measured at ("Mixed" if it was changed while the effect ran).

    Menu Select Options

  • [MENU] or [CATALOG] : to show/hide the effect selection menu. While in this menu, the following keys can be used :

    • [LEFT / RIGHT] : to select the effect to show,
    • [EXE] : to validate your choice.

    Menu Choice of Effect

Credit

Thanks to Lephenixnoir for his impressive work on fxSDK/gint and for his helpful support.

Thanks to the Planète Casio community.

Effects ported from demofx

"3D Tunnel" (src/effects/tunnel.cpp) and "Metablobs" (src/effects/blobs.cpp) are ports of src/tunnel.ts and src/blobs.ts from demofx, rewritten in fixed point (LibFPM) with lookup tables. The tunnel uses demofx's space.jpg texture (assets-cg/space.png, RGB565) and draws straight into the VRAM. demofx license:

 Copyright (c) 2021, seancode
 All rights reserved.

   Redistribution and use in source and binary forms, with or without
   modification, are permitted provided that the following conditions are met:

 * Redistributions of source code must retain the above copyright notice, this
 list of conditions and the following disclaimer.

 * Redistributions in binary form must reproduce the above copyright notice,
 this list of conditions and the following disclaimer in the documentation
 and/or other materials provided with the distribution.

 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 THE POSSIBILITY OF SUCH DAMAGE.

Effects ported from CodePen

"Glittering Sea" (src/effects/glitter.cpp) is a port of glitteringSea.js by Toshiya Marukubo (2020). "Noise Swirl" (src/effects/swirl.cpp) is a port of the "Swirl" pen by Sean Free (codepen.io/seanfree), with a fixed-point 3D simplex noise after Stefan Gustavson. Both are rewritten in fixed point (LibFPM) for the calculators.

Old-school effects

Seven classic effects share src/effects/oldskool.h / oldskool.cpp (sine table, integer sqrt and atan2, random generator). The same files build in BenchFX, BenchFXAzur and BenchFxNSP. They are all integer maths, with no float and no LibFPM:

  • "Particle Explosions" (explosion.cpp): bursts of hot particles under gravity, with a fire filter on their trails.
  • "Sine Scroller Variations" (sinescroll.cpp): one text, five variants of 4 s each (sine wave, twin scrollers, jumping letters, elastic letters, water mirror). The 16x16 font (scrollfont.h) is rendered from DejaVu Sans Bold.
  • "Shadebobs" (shadebob.cpp): six bobs add heat along Lissajous paths and remove it at the tail. The heat adds up in a 16-bit buffer and maps to a smooth black-to-pale-yellow palette.
  • "Copper Bars" (copper.cpp): eight bars on a rotating cylinder, sorted by depth, in front of moving pillars.
  • "Glenz Vectors" (glenz.cpp): a see-through checked solid with a lit octahedron inside. Each pixel byte holds bit fields for the layers, and the palette does the blending.
  • "Twister" (twister.cpp): two square columns that twist, with a pattern on each face.
  • "Image Deformations" (deform.cpp): one texture (assets-cg/deform.png) in four modes of 4 s each: waves, ripples, swirl, and pinch/bulge.

The ideas come from The Demo Effects Collection (https://demo-effects.sourceforge.net, GPL). The code was written from scratch, not copied. tools/gen_oldskool.py in BenchFxNSP regenerates the tables, the font and the texture.

Newer effects

Eighteen more effects use the same helpers. They store no image: textures, terrains and pictures are computed at init, so they only add code to the add-in. The larger buffers are allocated at init and freed on exit; without enough memory the effect shows the usual "not enough memory" screen.

  • "Mandelbrot Zoom" and "Julia Morphing" (fractal.cpp): Q28 fixed point on a half-resolution grid, with guessing fill, cardioid/bulb test, Brent periodicity check and an iteration budget adjusted each frame. The Mandelbrot zoom dives 2^12 into four targets and back; the Julia set follows a path of c values and uses its 180° symmetry.
  • "Voxel Landscape" (voxel.cpp): diamond-square height map, column ray casting with fog.
  • "Textured Cube" (texcube.cpp): perspective-correct mapping of a procedural texture (exact every 16 pixels, linear in between), lit per face.
  • "Plasma Cube" (texcube.cpp): the same cube and filler, with a 64x64 plasma texture recomputed every frame (four sine waves of period 64, so it wraps across the edges).
  • "Flat Shaded Torus" (torus.cpp): 288 quads, painter's sort, two materials. fx3d.h holds the shared rotation, sort and triangle filler.
  • "Gouraud Shaded Torus", "Phong Shaded Torus" and "Environment Mapped Torus" (torusshade.cpp): a finer 32x16 torus with exact vertex normals. Gouraud interpolates the per-vertex lighting; Phong interpolates the normal and looks the lighting up per pixel in a 128x128 map indexed by (nx, ny), the demoscene way; the environment map does the same with the reflection of a sky, a checkered floor and a sun, for a chrome look.
  • "Vector Balls" (vectorballs.cpp): 96 shaded balls morphing between five shapes, with shadows.
  • "Raytraced Spheres" (raytrace.cpp): three spheres over a checked floor, with reflections, shadows and highlights, half resolution.
  • "Mode 7 Floor" (mode7.cpp): a flight over a procedural printed circuit board (chips with their pins, SMD parts, capacitors, LEDs, 45-degree traces ending on vias), following a looping data bus; light pulses run along the traces and the LEDs blink (palette animation), with a purple haze and a city skyline on the horizon.
  • "Hyperspace" (hyperspace.cpp): 700 stars that stretch into streaks and back.
  • "Kaleidoscope" (kaleido.cpp): 8 or 16 mirrored sectors of a moving pattern.
  • "Circle Interference" (interference.cpp): four moving wave sources, one shared distance table.
  • "Rasterbars & Checkerboards" (rasterchecker.cpp): depth-sorted bars between a scrolling floor and ceiling.
  • "Spirograph" (spirograph.cpp): three pens drawing hypotrochoids with glowing trails.
  • "Fluid Smoke" (smoke.cpp): semi-Lagrangian advection in a divergence-free velocity field.
  • "Lightning Storm" (lightning.cpp): midpoint-displacement bolts with branches, flashes through the palette, clouds and rain.
  • "Transitions" (transitions.cpp): four computed pictures linked by fizzlefade (17-bit LFSR), burn, mosaic, iris and blinds.
  • "Strange Attractors" (attractor.cpp): a rotating Lorenz attractor with a comet, then a Clifford attractor whose parameters drift.
  • "Roto-Plasma" (rotoplasma.cpp): rotating plane waves, a circular wave and a five-arm spiral added together, with a cycling palette.

A third batch of 21 effects, in other styles:

  • "Burning Ship" (fractal.cpp): the Mandelbrot engine with |Re z| and |Im z|, diving from the whole ship to three small ships on the real axis.
  • "Game of Life" (life.cpp): Conway's rules on 198x112 cells; cells change colour with age and leave a fading trail. Random seeds restart life when it dies down.
  • "Reaction-Diffusion" (reactdiff.cpp): the Gray-Scott model on 132x75 cells, eight steps per frame; coral, dividing spots, mazes and fingerprints.
  • "Boids Flock" (boids.cpp): 160 birds with separation, alignment and cohesion, following a moving point.
  • "Water Ripples" (water.cpp): the two-buffer height field over a tiled pool; the slope bends and lights the floor.
  • "Aurora Borealis" (aurora.cpp): two waving light curtains with rays, over snowy mountains and twinkling stars.
  • "Synthwave Sunset" (synthwave.cpp): striped sun, neon wireframe mountains and a scrolling perspective grid.
  • "Underwater Caustics" (caustics.cpp): two moving, warped layers of a tileable Voronoi-edge texture, with light rays.
  • "Wireframe Terrain" (wireterrain.cpp): a flight over a wireframe landscape, with hidden lines removed by a floating horizon.
  • "Torus Knot & Moebius" (knot.cpp): a trefoil knot tube and a Moebius strip, flat shaded, 15 s each.
  • "Echo Cubes" (echocubes.cpp): three wireframe solids, each followed by eight older copies of itself.
  • "3D Logo" (text3d.cpp): "BENCHFX" in extruded 5x7 voxel letters, swinging and spinning.
  • "ASCII Art" (ascii.cpp): a plasma, a tunnel and the spinning donut (after Andy Sloane's donut.c) drawn with characters.
  • "Truchet Tiles" (truchet.cpp): quarter-circle tiles that turn, randomly and in waves, and reconnect the paths.
  • "Penrose Tiling" (penrose.cpp): Robinson triangle subdivision, refined level by level from the centre while it turns.
  • "Op Art" (opart.cpp): Vasarely's bulging checkerboard, Bridget Riley's waves and twisted nested squares.
  • "Oscilloscope" (oscillo.cpp): Lissajous figures, a rose and a waveform on a green phosphor screen with persistence.
  • "IFS Fractals" (ifs.cpp): the chaos game draws Barnsley's fern, a maple leaf, the Heighway dragon, a spiral and Sierpinski's triangle.
  • "Newton Fractal" (newton.cpp): basins of z^3 = 1, computed once at start-up and then rotated and zoomed.
  • "Dragon Curve" (dragon.cpp): the paper-folding dragon, folding up to 4096 segments and back.

Compressed assets

The larger images (bglens, space, xorcircles, mapworld, circuit, earth16c, bump, deform) and the wormhole table are stored zlib-compressed by the custom fxconv types in assets-cg/converters.py, and unpacked into RAM by src/utilities/packed.cpp when their effect starts. The unpacked data is byte-identical to what fxconv produced before, palettes included. This took the add-in from 1.7 MB to under 1 MB before the newer effects were added; it is now about 1.3 MB, under the 2 MB limit of the OS.