Skip to content

Releases: rohingosling/3d-cube-commodore

v1.0.0 - Initial Release

04 May 15:28

Choose a tag to compare

3D Cube v1.0.0

Initial release of 3D Cube — an interactive, real-time wire-frame 3D cube demo for the unexpanded Commodore VIC-20 and Commodore 64, written in 6502 assembly.

Highlights

  • Wire-frame 3D rendering — eight-vertex, twelve-edge unit cube with yaw + pitch rotation, three-axis translation, perspective projection with per-vertex 1/depth lookup, and post-projection zoom.
  • Pseudo-pixel canvas — 44 x 46 (VIC-20) or 80 x 50 (C64) pixel grid synthesised from the native PETSCII character matrix using quadrant-block screen codes. No bitmap mode, no custom character ROM, no RAM expansion.
  • Double-buffered output — every frame is composed in an off-screen back buffer and copied to screen RAM during vertical blanking, so the visible image never shows a partially drawn frame.
  • Auto-rotate or interactive keyboard control — SPACE toggles between continuous auto-rotation and direct keyboard control of yaw, pitch, three-axis translation, and zoom.
  • Four-state UI — Home, Help, Main (animation), and Main + Help (animation paused with help overlaid). F1 / F2 / F3 navigate between states.
  • Tunable aspect correction — single-line .const edits change the cube's rendered proportions without modifying the projection code.
  • Fixed-point math — Q2.6 / Q1.6 / Q1.7 throughout, signed 8 x 8 multiply, assembly-time-generated sine and inverse-depth tables, and per-row screen-address tables that replace runtime multiplies.

Versions

Machine Source Load address Entry Pseudo-pixel canvas
VIC-20 src/cube-vic20.asm $1001 SYS 4110 44 x 46
C64 src/cube-c64.asm $0801 SYS 2062 80 x 50

Downloads

  • 3d-cube.d64 — disk image containing both the C64 and VIC-20 builds, plus a CLS utility and two PETSCII art images.
  • 3d-cube.tap — tape image containing the VIC-20 build.

Both builds load from a BASIC stub on a stock machine — no cartridge, no RAM expansion, no custom character ROM required.

See the README for full controls, build instructions, and technical notes on the rendering pipeline.