Clack-Studio Web IDE & Relay Simulator
Develop, compile, and execute Clack-BASIC and assembly programs directly in your browser on the virtual 16-bit relay computer — featuring an interactive 32×32 LED matrix, real-time register monitors, and variable clock rate control.
โ๏ธ Clock Frequency & Relay Clicks
Using the speed slider located in the simulator header, you can adjust the clock execution rate continuously:
- 1 Hz – 30 Hz: Authentic electromechanical relay speed with synthesized acoustic clicking for each switching cycle.
- 100 Hz – 1 kHz: Rapid development and logic testing mode.
- 10 kHz Turbo: Maximum compute throughput for compute-heavy iterative loops such as the Mandelbrot set.
โจ๏ธ Keyboard Shortcuts
For a streamlined engineering workflow, the following keyboard hotkeys are supported within the editor:
F5/Ctrl + Enter: Run program continuous execution.F10/Space: Execute single clock cycle (Step).F9: CPU Reset (clears registers, flags, and Program Counter to 0).Ctrl + S: Persist BASIC source code into browser local storage.
๐ด Interactive Breakpoints
Clack-Studio enables cycle-accurate disassembler breakpoints for in-depth algorithmic debugging:
- Setting a Breakpoint: Click any instruction memory address (e.g.
0x0042) in the Disassembler. A red indicator and the badge๐ด 1 BPconfirm the active trigger. - Execution: Under
RUN(F5), the relay computer runs at speed untilPC == Breakpoint Address, halting precisely before instruction execution. - Single Stepping: Use
STEP(F10) to step forward clock-by-clock to inspect register transitions and arithmetic flags. - Clearing: Click the address again or choose
โ Clear Breakpointsto remove all active halt flags.
๐ Register & Memory Inspector
The right-hand status panel monitors the live CPU microarchitecture in real time:
- ACC / B / PC / SP: Register contents shown simultaneously in hexadecimal and signed decimal format.
- Status Flags (Z, C, S, O): Direct indicators of active relay latches for Zero, Carry, Sign, and Overflow.
- Memory Hexdump: Inspect arbitrary memory banks (e.g. Zero-Page, Framebuffer, Program ROM) live on the fly.
๐ Mandelbrot 32×32
Computes the classic Mandelbrot fractal using 16-bit fixed-point arithmetic and renders the iconic set on the discrete 32×32 LED matrix.
๐ SQR Square Root (New in v1.5.5)
Demonstrates the 8-iteration division-free square root algorithm and evaluates fractional fixed-point precision for mathematical approximations.
๐ Ping-Pong & Ball Physics
Real-time 2D kinematic bouncing physics, boundary collision detection, and pixel projection matching real hardware relay cycle latencies.
๐ Bresenham Line Drawing
Integer-only line rasterization algorithm for geometric vector rendering across the discrete mechanical relay display matrix.
๐ป Flashing to the Physical 16-Bit Relay Computer
While the web edition delivers complete in-browser cycle simulation, the native desktop edition of Clack-Studio and the CLI enable direct hardware transfers:
- Direct USB serial communication (WebSerial / UART) to the FPGA memory bridge of Peter's relay machine.
- Writing compiled machine binaries directly into the mechanical diode-isolated memory matrices.
- Cycle-accurate bus tracing and hardware signal verification on the physical instrument.