Skip to content

Releases

v0.1.2-alpha — frame pacing, import cost, embedded resources

Choose a tag to compare

@chenxukk-web chenxukk-web released this 28 Nov 23:08

Frame pacing, per-import cost, embedded resources, and the second device

Four measured defects fixed, one new failure documented, and one known problem
recorded as still open.

Frame pacing. The HUD reports the frame interval, not only FPS. Device reports
showed 17.2 ms against a 16.667 ms target. Cause: EGL_SWAP_INTERVAL was never set,
so the default of 1 applied and eglSwapBuffers waited for the display while the
guest independently slept to 1/60 s of QueryPerformanceCounter time. Two
deadlines, whichever lands later wins. The interval is now 0 and the host paces to
an absolute deadline. Measured after: 16.6 ms steady, 60.0 fps.

Per-import cost. Import dispatch was a linear strcmp chain per module, and fread
sat tenth in it: 2400000 calls, each paying ~394 failed comparisons first. FNV-1a
hash indices in android, crt and user32, plus the libc file/stdio/time groups moved
to the front. Benchmark over the real 144-name union: 274 ms -> 37 ms, 7.4x.

Staging that never finished. The staleness stamp included dirSize(dst), so the
first successful copy guaranteed a mismatch next launch; copyTree had no resume.
Stamp now reads the source only; equal-length destinations are skipped.

Embedded resources. The APK can carry the game tree as STORED zip volumes under
assets/ (37.5 MB / 23790 files after excluding 1.21 GB of duplicates), unpacked on
first launch. STORED because packed/*.a is already deflate -- measured 100.0%.

STILL OPEN -- the one-second room stall. A device run after the dispatch change
still takes about a second per room. Dispatch was one component, not the whole
cost; LIMITATIONS.md 3a lists the remaining candidates with their evidence and
marks each as measured / reduced / unknown. While investigating, a real defect was
found: the keepres guard tested g_keepres_n (objects retained), not scans
performed, so with only 50 retained it scanned the whole resource table on every
free. Now capped at 512 scans with a log line when spent -- a code change, not yet
measured.

The child-process fallback. On a lower-end device ART owns
0x12c00000..0x42c00000, covering the guest window at 0x3C000000; the translated
code refers to guest memory absolutely, so no other base is possible. The launcher
detects this, uses the child process on the first launch, the image loads at its
compiled base, gl4es reaches a working backend, and 7 s later the process dies
with SIGSEGV. Faulting address unknown (private log). DEVICE_NOTES.md records what
was verified; device-logs/2026-11-29/app.log is the evidence.

Both trees now carry every fix. The Chinese tree had missed the pacing fixes
entirely (no fp_pace, no eglSwapInterval) until this tag; LIMITATIONS.md 7b records
the one file where the trees differ deliberately -- host_gl4es.c carries two
divergent diagnostic probe designs, left alone.

No defect is fixed in this release. It ships source only.

Verified: both C trees compile for aarch64-linux-android24 with no new warnings;
link yields 9 exports, 3 NEEDED, 0 undefined host_*, no RUNPATH; both Java trees
compile to 41 classes; a 2.70 GB APK was built and its contents checked; the PIE
loads the guest image on the development device. NOT verified: the second device
beyond the run in DEVICE_NOTES.md, and the room-stall change.

v0.1.1-alpha — startup measured, PE path fixed

Choose a tag to compare

@chenxukk-web chenxukk-web released this 27 Nov 02:54

Source-only snapshot. No APK and no .so.

If you built from v0.1.0, your .so cannot start. Read the first section.

v0.1.0 COULD NOT PRODUCE A WORKING BUILD

host_main.c carried the absolute path of the maintainer's Termux install:

const char *pe = "/data/data/com.termux/files/home/work/analysis/isaac-ng.exe.unpacked";

That path is owned by the Termux uid with mode 0700, so the game process -- a
different uid -- cannot traverse it. guest_image_load() failed, and its only
message went to stdout, which the in-process logger does not capture. The app
opened, showed a nearly empty log, and dropped back to the launcher.

The only thing that masked this was a post-link binary replace inside
build_apk.sh and push_elf.sh, which rewrote the string to
"./isaac-ng.exe.unpacked". Any build that linked obj_pic/ directly skipped that
step and was unstartable.

Fixed at the source in 66d6592: the relative path is now the default, the JNI
layer already chdir()s into the game directory, and ISAAC_PE overrides the path
for PC or command-line testing. The failure message now goes to stderr.

Verified: built this way, the app starts and reports
[boot] PE path = ./isaac-ng.exe.unpacked followed by
[boot] image loaded base=0x3c000000.

NEW: STARTUP_AND_ARCHIVES.md

The one performance question that is now fully measured, with the tools to
re-run every number.

Startup is 16.4-21.2 s, and ~17.5 s of that is inflate() executing as translated
x86 -- zlib is statically linked into the executable, so it was lifted to C with
everything else. Native zlib does the same 1.2 GB in 2.5 s. That 7x is the
translation layer's cost and it is the whole of startup time. Nothing is cached:
every start repeats the work.

The ARCH000 container is documented from the retail archives -- three codecs, the
djb2 name hash (91.8% of entries resolve against the shipped filelist), and the
fact that a 1024-byte chunk is stored verbatim and never inflated. Since 97.1% of
deflate chunks inflate to exactly 1024 bytes, they can be replaced offline by
stored chunks. Verified byte-for-byte over 13,282 entries; on device it cuts
startup from 17.8 s to 8 s.

It is not enabled, because it crashes. fault_addr=0x87e7fff0 sits 16 bytes
below a page boundary the allocator reports as occupied, during input setup long
after the archives were read. That is a pre-existing out-of-bounds write which the
change in file size exposes -- the same double-free that logs 10 times in every
run, including the ones that survive. §3.3 records four configurations and which
of them crashed.

Tools shipped in tools/archives/: the reader, the repacker, a single-entry
extractor and a native-zlib benchmark.

WHAT IS STILL BROKEN

Both defects from v0.1.0 are unfixed. Nothing here claims otherwise.

  1. Some UI atlases upload empty, so every HUD counter renders as the same "µ"
    and the main menu list is blank. The font atlas is created as an empty
    512x128 ImageSolid and never filled. New evidence in STARTUP_AND_ARCHIVES.md
    §2.2: the .fnt decompressed from fonts.a is the English original while the
    loose copy is a Chinese localisation, and the PNG that both reference lives in
    afterbirthp.a inside an encrypted stored chunk that does not decode. Not
    tested.

  2. Dense rooms drop frames. Root cause located (the game uses zero VBOs and
    client-side vertex arrays, so the driver re-reads vertices every draw), fix
    identified, never applied.

Mod support: the three host-layer defects that broke every mod independently --
non-ASCII names, 8 directory handles, */*.ext-only wildcards -- are repaired
in a working tree and pass 24 unit assertions, but are not in this release
and have never run on a device. A LIBGL_BATCH experiment was also abandoned: one
frame issued 480,000 malloc/free pairs and the game aborted within 80 frames.

STILL UNVERIFIED

One device only (Adreno 830 / Android 17). No run has reached an ending. No mod
has been loaded. x87 is modelled as double, not 80-bit. No behaviour-parity test
against the PC original exists.

Read LIMITATIONS.md before quoting any number from this archive; every claim
there is labelled measured or unverified, and each row carries the command to
check it.

HOW THIS WAS MADE

AI-assisted throughout, directed by a human who ran every device test. Documents
and code changes were written by an AI from logs and source; no AI ever installed
this on a device. If a claim here conflicts with what you measure, trust your
measurement.

DISCLAIMER

This archive contains no game and no game resources. Supply your own legitimate
copy. Using a modified client may violate the game's EULA or Steam's Subscriber
Agreement; you bear that risk. Full terms: DISCLAIMER.md.

v0.1.0-alpha — source only

Pre-release

Choose a tag to compare

@chenxukk-web chenxukk-web released this 26 Nov 17:29

This tag cannot produce a working build. See v0.1.1-alpha.

Source-only release of the Android arm64 static recompilation of
The Binding of Isaac: Repentance.

Status: it boots, plays, and fights — with two visible defects.

WHAT THIS IS

15,071 x86 functions of the PC executable (PE32) are translated to C at build
time and cross-compiled into a native arm64 .so. There is no emulator and no
x86 interpreter: the translation is complete before the binary exists.

Measured on one device (Adreno 830 / Android 17, Snapdragon 8 Elite class):
median 56.9 fps over 142 samples, ~18.7 s startup, no crashes in the current
build.

WHAT YOU GET IN THIS RELEASE

Source only. No APK and no .so — by design, because the translated code is
derived from the game and cannot be redistributed.

To run it you supply your own copy of The Binding of Isaac: Repentance and
build it yourself. BUILD_SPEC_FOR_AGENTS.md is the build spec: per-stage
contracts, machine-checkable pass criteria, 8 documented traps.

TWO KNOWN DEFECTS, NEITHER FIXED

  1. Some UI atlases upload empty, so every HUD counter renders as the same "µ"
    and the main menu list is blank. 105 of 538 uploaded textures are all zero,
    though some of those are legitimate offscreen canvases. The font atlas
    specifically uploads through a call path that is not among the 6 known
    SetTexelData sites. Six other hypotheses are already ruled out.

  2. Dense rooms drop frames. Frame time is about 3.21 ms + 0.88 ms per
    offscreen-RT draw, and each offscreen draw costs 879 us where a normal GLES
    draw should cost 20-50 us. Root cause: the game uses zero VBOs and
    client-side vertex arrays, so the driver re-reads and converts vertices from
    CPU memory on every draw. The fix in gl4es is identified but not implemented.

Both are documented in README.md with the measurements behind them.

UNVERIFIED

  • One device only. Other GPUs are unknown.
  • No run has reached an ending, so "completable" is unproven.
  • No mod has ever been loaded.
  • x87 is modelled as double, not 80-bit.
  • No behaviour-parity test exists against the PC original.

Read LIMITATIONS.md before trusting any number here. Every claim is labelled
measured or unverified, and each row carries the command to check it yourself.

HOW THIS WAS MADE

AI-assisted throughout, directed by a human who ran every device test.
Documents and code changes were written by an AI from logs and source; no AI
ever installed this on a device. If a claim here conflicts with what you
measure, trust your measurement.

DISCLAIMER

This archive contains no game and no game resources. You must supply your own
legitimate copy. Using a modified client may violate the game's EULA or Steam's
Subscriber Agreement; you bear that risk. Full terms: DISCLAIMER.md.

Not affiliated with or endorsed by Nicalis or Edmund McMillen.

UPSTREAM REFERENCE

repentogxm (https://github.com/0xl0cal/repentogxm) is an independent, working
PS Vita port of the same game by static recompilation. This project is a host
layer on top of that approach; its published measurements are the reference
that keeps the numbers here honest.