Skip to content

gase-recomp 0.2.0

Choose a tag to compare

@github-actions github-actions released this 11 Oct 19:23
fc496da

The Rust edition: the first published release. Recompiled games run on the
chips of gase 0.3.0 and use its menus,
save states and frontends, on desktops and on phones. The C + Python
edition (0.1.0) stays in the repository as a teaching reference.

Added

  • The Rust recompiler (crates/recomp, the gase-recomp program):
    ROM loader, 68000 decoder, control-flow analysis and Rust code
    generation (blocks as a state machine: Rust has no goto). info,
    disasm and recomp; a generated game is its own crate, built with
    cargo, for the desktop, Android, iOS or headless.
  • A runtime that plugs into gase (crates/runtime): only the 68000 is
    replaced, as gase's ExternalCpu; the VDP, sound chips and Z80 stay
    gase's. Code the analysis missed runs on gase's interpreter and is
    logged, so the next recompilation includes it.
  • Exact 68000 timings, measured on gase's interpreter for every
    instruction form, and hardware waits charged where they happen: the
    difftest compares cycles too. GASE_RECOMP_INTERPRET forces address
    ranges onto the interpreter to bisect a glitch.
  • Real games: hashbug, Sonic 1 and Aladdin play recompiled from start to
    finish of the tested levels.
  • Phones: a generated game has a mobile/ crate with its own
    SDL_main and the ROM built in, so gase's Android and iOS projects build
    it as an app of its own.
  • gase-recomp studio (gase-recomp-studio): pick a ROM, press Build.
    This computer recompiles and compiles the game, then Play; Android
    app
    builds an APK with gase's Android project and installs it over
    USB. It lists the missing tools and installs what one command can.
    --cli does the same without a window, --desktop ROM is what gase's
    Recompile to native… opens.
  • A JIT (crates/jit): 68000 code to x86-64 or AArch64 machine code
    while the game runs, for any ROM, through a small IR, with gase's
    interpreter as the fallback (10.6× the interpreter on a register loop).
    gase-jit is gase with the JIT for every ROM; "gase JIT" is the same as
    an Android app.
  • Phone builds (crates/remote): in gase JIT's pause menu, Make an
    app of this game…
    finds the studio on the local network, sends the ROM
    and installs the app the computer builds once someone clicks Accept.
  • Differential testing against gase's hardware-validated interpreter:
    random instruction snippets (registers, flags, memory and cycles), and an
    end-to-end test that plays a hand-made ROM recompiled, frame for frame.
  • The making-of (English and French): every step, from the ROM header
    to the JIT, with the bugs found on the way.
  • Release files: the programs for Linux and macOS (Apple silicon), and the
    gase JIT APK.

Downloads

File For
*-linux-x86_64.tar.gz Linux (x86-64, glibc 2.35+): gase-recomp, gase-recomp-studio, gase-jit.
*-macos-arm64.tar.gz macOS 11+ on Apple silicon, the same three. Not notarised: run xattr -d com.apple.quarantine gase-* once.
*-gase-jit-android.apk "gase JIT" for Android 5+ on arm64, with Make an app of this game…. Signed with a debug key: allow installs from this source.
SHA256SUMS.txt Checksums of the files above.

Recompiling a game compiles the Rust code it generates: install Rust first (and, for Android apps, the Android SDK and NDK). gase-recomp-studio --check lists what is missing. gase-jit includes SDL2 (zlib licence) and needs nothing else.