Repository navigation
Releases
jitterbug 0.1.2
jitterbug v0.1.2
Internal groundwork for future backends; no public API changes.
- Repository: https://github.com/jardarton/jitterbug
- Live web demo: https://jardarton.github.io/jitterbug/
Changes
- Backend rollback checkpoints (docs/design.md): the internal backend boundary gains an optional checkpoint that saves the GP0 drawing registers, touched VRAM tiles, stale 1x tiles and the palette cache, and rolls them back after a temporary pass. The software backend implements it; core configuration changes are refused while a checkpoint is active.
The source tarball is the tracked tree at v0.1.2 (nix build .#source); check it with sha256sum -c jitterbug-0.1.2.tar.gz.sha256.
jitterbug 0.1.1
jitterbug v0.1.1
Fixes and checks that close the known gaps in 0.1.0; no API changes.
- Repository: https://github.com/jardarton/jitterbug
- Live web demo: https://jardarton.github.io/jitterbug/
Changes
jb-meshOBJ reader (docs/tools.md): faces of 5 to 1024 corners are now cut into triangles by ear clipping along the dominant axis of the Newell normal rather than fanned from the first corner, handling concave faces while keeping the previous fan on strictly convex ones (triangles and quads bypass ear clipping and its area and normal checks; collinear corners can change the triangulation). Faces of 5 to 1024 corners with zero area or a non-finite normal (a face of N corners with no area), uncuttable 5–1024-corner faces (a face of N corners that cannot be cut into triangles (does it cross itself?)), faces with more than 1024 corners, and emptyusemtl/newmtlnames are refused withpath:line. Backslash line continuations now work before CRLF as well as LF;#onusemtl,newmtlandmtlliblines starts a comment only when preceded by a space or tab and followed by a space, a tab or the end of the line (keeping names such asMaterial #1andmat#1whole; only numeric directives andfstop at any#beginning a token,map_Kdonly records that a texture was mentioned, and unknown directives are ignored).- Browser checks in
nix flake check(docs/testing.md):checks.<system>.browser-demoandchecks.<system>.browser-first-lightnow runexamples/*/web/check-browser.mjsin headless Chromium in the Nix sandbox onx86_64-linuxandaarch64-linux(not in hosted CI). The scripts check frame advancement by default (any non-emptyJB_CHECK_FPSvalue, e.g.JB_CHECK_FPS=1, adds a check expecting 30–70 frames of advance between two samples about a second apart when run by hand) and fail cleanly if Chromium or its DevTools connection drops. - CMake install and relocatability (docs/getting-started.md): with install rules enabled (the root with
JB_INSTALL=ON, and each tool withJB_INSTALL=ONandJB_TOOLS=ON), a-DJB_SANITIZE=ONbuild now refuses installation before copying any files, including when installing a tool directory alone. AcrossCMAKE_INSTALL_LIBDIR,INCLUDEDIR,BINDIRandDATADIR, relative destinations always followcmake --install --prefix, and if every absolute destination passes a lexical inside-prefix check againstCMAKE_INSTALL_PREFIX(mixing relative and absolute-inside-prefix is allowed), the absolute destinations are rewritten relative to the prefix so the install and CMake package remain relocatable; if any absolute destination fails the check, none of the absolute destinations is rewritten. Independently,jitterbug.pcderives eligible library and header paths from${pcfiledir}on its own. The containment check rejects..in either path rather than resolving it. - Native arm64 verification (docs/determinism.md): the
aarch64-linuxflake check suite as it stood before the browser checks were added, plus 20 repeated rebuilds of the threadedclangcheck, passed in an Apple silicon NixOS virtual machine (aarch64-linux).
The source tarball is the tracked tree at v0.1.1 (nix build .#source); check it with sha256sum -c jitterbug-0.1.1.tar.gz.sha256.
jitterbug 0.1.0
jitterbug v0.1.0
First public release of jitterbug, a standalone C library that renders 3D and 2D graphics the way the original PlayStation's GPU did, for new games and homebrew.
- Repository: https://github.com/jardarton/jitterbug
- Live web demo: https://jardarton.github.io/jitterbug/
What is in 0.1.0
- Software renderer (
libjitterbug): 1024x512 16-bit VRAM, affine texture mapping, vertex snapping, 15-bit drawing colour with 4x4 dithering, 4- and 8-bit palette textures with hardware CLUT caching, all four semi-transparency blend modes, mask bits, 24-bit display mode, and internal resolution scaling from 1x to 8x across multiple worker threads (or single-threaded withJB_THREADS=OFF). - Two API levels in one C99 header (
include/jitterbug.h, C++11 compatible, no global state):- Friendly level: double-buffered frames in VRAM, automatic texture/palette placement, deterministic float maths, camera, up to three directional lights + ambient, depth-cue fog, GTE fixed-point or float geometry path, near/far and screen-space polygon clipping, meshes, billboards, 3D lines, sprites, and an original 8x8 bitmap font.
- Console level:
jb_gp0,jb_gp1,jb_gpuread,jb_gpustat, VRAM transfers, immediate primitives, ordering tables, and all 22 documented GTE commands (jb_gte_*). - Runtime switches: toggle internal scale (1x–8x), precise sub-pixel vertices, perspective-correct texturing, 4x4 dithering, the CLUT cache, 16:9 widescreen, and GTE vs float geometry at any time.
- Binary asset formats and converters:
.jbttextures and.jbmmeshes (docs/formats.md) with strict untrusted-input loaders (jb_texture_parse,jb_texture_load*,jb_mesh_load*) and deterministic CLI convertersjb-tex(PNG ->.jbt, own median-cut quantiser, Floyd-Steinberg dithering, palette animation frames) andjb-mesh(OBJ/MTL and glTF 2.0 ->.jbm), plusjb-bench(docs/tools.md). - Examples:
examples/first-lightandexamples/demo(native SDL3, headless, and WebAssembly), plusexamples/header-imagesrendering the README's animated beetle logo, favicon and 1x/4x demo banner through the public API. - Documentation & benchmarks: concise
README.md,FAQ.md,CHANGELOG.md,SECURITY.md,CONTRIBUTING.md,todo.md, anddocs/covering getting started, API tour, design, formats, tools, conformance, hardware probe, determinism, refreshed 0.1.0 desktop andwasm32benchmark measurements (docs/performance.md), and testing. - Packaging: relocatable CMake package (
find_package(jitterbug 0.1), targetjitterbug::jitterbug),pkg-config(jitterbug.pc),add_subdirectorysupport, and a Nix flake.
Note: there is no ABI stability guarantee before 1.0.
What is claimed (and what is not)
- Console conformance (
docs/conformance.md): reproduces the published real-console results from ps1-tests for 13 named GPU programs — 11 VRAM dumps on their 15 colour bits (excluding 64 uninitialised-colour pixels inlines) and 2 console logs (mask-bit,gp0-e1), both at 1x and in the 1x VRAM of 2x/3x contexts — plus all 1150 distinct GTE cases (gte_test_all). This is evidence, not proof of full hardware equivalence: jitterbug's own MIPS hardware probe (docs/probe.md) has not yet been run on a real console, and scaled output above 1x is faithful to the console's rules rather than exact against hardware. - Determinism (
docs/determinism.md): one set of checked-in hashes is matched across gcc and clang,-O0and-O3,-march=x86-64-v3(under QEMU Haswell-v4, with-ffp-contract=off), static and shared builds, ASan + UBSan (plus libFuzzer),wasm32under Node,aarch64cross-builds (GCC and Clang) under QEMU, and 1 to 16 rasterising threads. No physical arm64 machine has run the suite yet.
Platforms
- Supported in 0.1.0: Linux on x86-64, Linux on arm64 (cross-compiled and tested under QEMU), and WebAssembly (Emscripten, single-threaded).
- Not yet claimed: macOS and Windows. The core is plain C11 and builds without a thread library when
-DJB_THREADS=OFF, so adding them requires a Win32 thread shim and MSVC fallbacks for the GNU extensions used in the core (__int128and__attribute__); neither platform has been built or tested yet.
How to get it
- Source tarball: download
jitterbug-0.1.0.tar.gzfrom the GitHub release assets, or clone the tagv0.1.0from https://github.com/jardarton/jitterbug:cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DJB_TOOLS=ON cmake --build build ctest --test-dir build --output-on-failure cmake --install build - Nix flake:
nix build github:jardarton/jitterbug/v0.1.0 # library + tools nix build github:jardarton/jitterbug/v0.1.0#demo-web # browser demo
See docs/getting-started.md for find_package, pkg-config, add_subdirectory, Nix and Emscripten instructions.
Licence
Zlib licence (LICENSE). Vendored code under third_party/ retains its own licences (third_party/*/README.md).