No description
  • Lua 99.8%
  • Python 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-08-13 10:45:20 -05:00
cmake Add byte-exact CMake build system 2026-08-13 10:45:20 -05:00
docs Document parallel m Lua reconstruction campaign 2026-08-10 19:22:32 -05:00
manifests Complete Lua source readability cleanup 2026-08-13 10:31:24 -05:00
src Complete Lua source readability cleanup 2026-08-13 10:31:24 -05:00
.gitignore Add byte-exact CMake build system 2026-08-13 10:45:20 -05:00
CMakeLists.txt Add byte-exact CMake build system 2026-08-13 10:45:20 -05:00
README.md Add byte-exact CMake build system 2026-08-13 10:45:20 -05:00

SIF game Lua

Readable reconstruction of the Lua code shipped with Love Live! School Idol Festival 9.11.

This repository contains human-maintained Lua source. Exact stock chunks are the proof target, not the preferred editing format: source should retain meaningful names, clear control flow, and normal formatting even when compiler shape matters.

Layout

  • src/ mirrors paths within assets/AppAssets.zip.
  • manifests/ records status and proof evidence for each reconstructed file and nested Proto.
  • docs/ records source conventions and approved normalization policy.

The complete artifact-to-proof procedure lives in ../tooling/docs/WORKFLOW.md. Naming decisions are governed by docs/NAMING_AND_READABILITY.md.

Stock, encrypted, and decrypted proprietary assets are deliberately excluded. They live in the workspace-level private artifact store and are addressed by hash from manifests.

Building

The CMake build creates normalized Lua chunks and treats byte-exact proof as part of compilation. It can also recreate the encrypted install/ tree when explicitly enabled. The build expects the sibling tooling/ checkout and the canonical private archive at ../artifacts/extracted/en/assets/AppAssets.zip.

cmake -S . -B build -G Ninja
cmake --build build --parallel
ctest --test-dir build --output-on-failure

The default lua-assets target builds the pinned Lua 5.2 and Honoka tools, checks all source/manifest/archive paths, then builds every Lua source. Each asset is accepted only after guarded chunk normalization and a byte-identical decrypted comparison. Outputs are written to:

  • build/chunks/ — normalized decrypted Lua 5.2 chunks;
  • build/proof/ — per-asset build evidence.

Validating against an original AppAssets archive

Supply the original archive at configure time, then invoke the explicit validation target. CMake verifies the archive's SHA-256, reconciles its 1,985 Lua paths with sources and manifests, compiles the selected corpus, and checks every decrypted output against the manifest/reference hashes:

cmake -S . -B build -G Ninja \
  -DSIF_APP_ASSETS_ARCHIVE=/absolute/path/to/AppAssets.zip
cmake --build build --target validate-byte-exact --parallel

validate-reference-archive performs only the archive SHA/path/manifest preflight. validate-byte-exact performs the complete compilation proof.

Opt-in encryption

Encryption is disabled by default. Enable it explicitly to generate the preserved-header encrypted install/ tree and verify those bytes against the original archive:

cmake -S . -B build-encrypted -G Ninja \
  -DSIF_APP_ASSETS_ARCHIVE=/absolute/path/to/AppAssets.zip \
  -DSIF_ENABLE_ENCRYPTION=ON
cmake --build build-encrypted --target encrypted-lua-assets --parallel
cmake --install build-encrypted --prefix dist

Encrypted files are written to build-encrypted/install/. The option controls both generation and encrypted-byte validation; decryption of the private reference is still required to establish the byte-exact chunk target.

For a development subset, configure SIF_LUA_FILTER with a regular expression:

cmake -S . -B build-one -G Ninja -DSIF_LUA_FILTER='^common/header\.lua$'
cmake --build build-one

Paths and pinned hashes are exposed as CMake cache variables for controlled workspace relocation. The defaults remain fail-closed on the verified tooling revision and canonical archive SHA-256.

Exactness vocabulary

  • Exact: the artifact meets its explicitly named byte-exact target.
  • Instruction-equivalent: executable Proto data matches; an approved metadata or framing difference remains.
  • Behavioral: scenarios pass, but bytecode structure differs.
  • Unreconstructed: no maintained source has reached a stronger status.

An exactness claim must say whether it covers Proto code, a decrypted chunk, an encrypted payload, a complete encrypted asset, or an archive container.