Short: Endlessly scrambling cube screensaver Author: Paul Seibert (Desert Palms Software) Uploader: Paul Seibert Type: util/blank Version: 1.0 Requires: Nothing extra. Any Amiga, 512K is plenty. Architecture: m68k-amigaos >= 1.3 Distribution: Aminet Rubik 1.0 - (c) 2026 Desert Palms Software. Written by Paul Seibert. Freeware. Rubik is a Rubik's Cube that scrambles itself forever, one slice at a time, while the whole cube spins and wanders on the screen. It is written in C and 68000 assembly for AmigaOS 1.3 (V33) and runs unchanged on 2.x and 3.x. It uses only the 1.3 operating system, so it works on a stock A500 as well as on bigger machines. No FPU, no libraries. It is a port of rubik.py, itself a reimplementation of the xscreensaver "rubik" hack by Marcelo F. Vianna (see Credits below). The cube is modelled honestly: every small cube carries its own coloured stickers, and each quarter turn of a slice moves both the cubes and their stickers, exactly as a real cube does. The move model is tested against the Python original: 2000 random twists give identical cubes. What you see ------------ * A 3x3x3 cube. A random slice (any of three axes, any layer, either direction) turns 90 degrees, then the next one starts. The whole cube spins slowly and wanders around the window. * It opens as a window on the Workbench screen. Press F to switch to a full-screen 16-colour display (320x256, 4 bitplanes) and back. * The title bar shows the frame rate. Keys ---- F window / full screen Space pause Esc or Q quit (the close gadget works too; in full screen a mouse click quits as well) Speed ----- Measured on a stock A500 (68000 at 7 MHz, OCS) under WinUAE: window (272x136, 2 bitplanes) about 13 fps at rest, 11 mid-twist full screen (256x160, 4 planes) about 8.8 fps (blitter fill) Faster CPUs run it correspondingly faster. The animation follows the clock (up to a limit of five 50 Hz ticks a frame), so the cube turns at about the same speed whatever the frame rate. Using it -------- From Workbench, double-click the Rubik icon. From the CLI type rubik. Copy the Rubik drawer anywhere you like. Command line: rubik opens the window, rubik FULL starts full screen, rubik REPORT prints a self-test, rubik BENCH times the renderer. Technical notes --------------- * Fixed-point 3D with a sine table; painter's algorithm with back-face culling. The polygons are filled by our own scanline filler in 68000 assembly, drawing straight into the bitplanes (pixel-identical to its C reference, fuzz-tested on the 68000 under an emulator). In full screen on a 68000 the blitter does the filling instead. * Full screen is double-buffered: the cube is drawn into the hidden screen and the screens are swapped, so there is no flicker. * Built with GCC 6.5 (bebbo's amiga-gcc) and vasm. * Tested on Kickstart 1.3 (A500, OCS) and Kickstart 3.1 under WinUAE. Not tested on real hardware, and not on Kickstart 2.0. History ------- 1.0 (14.11.2026) First release. Credits ------- Based on the xscreensaver "rubik" hack by Marcelo F. Vianna, which is distributed under the permissive xscreensaver licence: permission to use, copy, modify, distribute and sell the software and its documentation for any purpose is granted without fee, provided that the original copyright notice and this permission notice appear in all copies. The original software is provided "as is" without any express or implied warranty. See the xscreensaver sources (jwz.org/xscreensaver) for the original notice. Copyright and distribution -------------------------- The Amiga port is (c) 2026 Desert Palms Software, written by Paul Seibert. Rubik is freeware. You may use it for free and copy it freely, as long as the archive is passed on complete and unchanged and no money is charged for it beyond the cost of the media. It may be put on Aminet, cover disks and CD-ROM collections. Rubik is provided "as is", without warranty of any kind. Use it at your own risk. "Rubik's Cube" is a trademark of its owner; this program is not affiliated with or endorsed by them. Source code: https://github.com/PaulSeibert/amiga-rubik-screensaver Desert Palms Software makes new software for classic Amiga computers.