Evidence-first reverse-engineering notes and original resource tools for the SiglusEngine build used by Rewrite 超自研活动记录外传 (front and latter chapters).
The investigation began with the engine's G00, NWA, OVK, and OMV media paths and eventually recovered the Lucia–Chihaya idol performance: a six-second, 180-frame movie that had resisted an earlier extraction attempt in 2024.
The complete technical story is in Recovering Six Lost Seconds. The shorter Lucia/Chihaya scene index records the save-state and scenario alignment in Traditional Chinese.
This repository contains original source code, compact reverse-engineering notes, synthetic tests, and a small set of compressed documentation figures. It does not contain:
- game executables, archives, saves, or scenario packages;
- extracted G00, NWA, OVK, OMV, Ogg, WAV, MKV, or full-resolution output;
- IDA databases, decompiler dumps, or proprietary SDK files;
- generated manifests containing local paths.
Use the tools only with files from a copy you are legally allowed to inspect. The documentation figures are included only to identify and explain the research result; they are not licensed under MIT. See the asset notice.
| Family | Input | Output / analysis | Status |
|---|---|---|---|
| Images | G00 types 0 and 2 | RGBA PNG, including sparse type-2 parts | Corpus-validated |
| Images | G00 type 1 | Palette/index decoder | Executable-confirmed; no sample in this title |
| Audio | NWA raw and compressed levels 0–5 | PCM WAV | Corpus-validated |
| Voice | OVK | Original bounded Ogg/Vorbis entries | Corpus-validated |
| Video | OMV mode 1 | Ogg/Theora plus reconstructed BGRA/alpha | Corpus-validated |
| Video | OMV mode 2 | Ogg/Theora plus opaque RGBA/FFV1 | Latter chapter validated |
| Scenario | Scene.pck / Scene.chs | XOR removal and per-block LZ decoding | Validated on JP and CHS packages |
| Saves | numbered manual saves | Decrypted payload and resume metadata | Validated on the CHS build |
| Indexing | encrypted VM strings | Ordered media references from a saved IP | Validated on scene01001 |
The NWA decoder has two implementations: readable Python as the reference and
a locally written C version exposed through CFFI. The accelerated path reduced
the measured BGM002.nwa conversion from roughly 15 seconds to 1.18 seconds,
with byte-identical WAV output.
.
├── siglus_unpack.py # G00/NWA/OVK/OMV unpacker
├── nwa_decoder.c/.h # optional native NWA hot loop
├── build_nwa_cffi.py # CFFI build entry point
├── siglus_scene_unpack.py # Scene package XOR/LZ decoder
├── siglus_save_unpack.py # manual-save decoder
├── index_scene_media.py # encrypted-string media indexer
├── compare_g00_sets.py # front/latter SHA-256 comparison
├── verify_unpacked.py # output-tree validation
├── tests/ # synthetic, asset-free codec tests
└── docs/
├── BLOG.md
├── RE_NOTES.md
├── UNPACKING.md
├── G00_COMPARISON.md
├── LUCIA_CHIHAYA_SCENE.zh-TW.md
└── assets/
- Python 3.11 or newer
- Pillow
- CFFI and a C compiler for the optional NWA accelerator
- FFmpeg and FFprobe for Ogg/Theora inspection, Vorbis conversion, and restored FFV1 video
python3 -m venv .venv
. .venv/bin/activate
python -m pip install -r requirements.txt
python build_nwa_cffi.py # optional but recommendedIf the compiled module is absent, siglus_unpack.py automatically falls back
to the pure-Python NWA implementation.
Point the tools at your own local installation. Generated output is ignored by Git.
export SIGLUS_GAME_DIR='/path/to/chapter'
python siglus_unpack.py all \
"$SIGLUS_GAME_DIR" ./unpacked \
--restore-video
python verify_unpacked.py ./unpackedSingle-resource examples:
python siglus_unpack.py g00 \
"$SIGLUS_GAME_DIR/g00/BG002.g00" ./one/images
python siglus_unpack.py nwa \
"$SIGLUS_GAME_DIR/bgm/BGM002.nwa" ./one/audio
python siglus_unpack.py ovk \
"$SIGLUS_GAME_DIR/koe/z0003.ovk" ./one/voice
python siglus_unpack.py omv \
"$SIGLUS_GAME_DIR/mov/lucihaya01.omv" ./one/video \
--restore-videoThe detailed unpacking notes describe the output tree and the corpus-wide validation result.
The decisive evidence came from aligning a CHS manual save with byte-identical
Japanese VM code. Save 0008 resumed scene01001 at IP 0x24F2C; the media
operand at 0x25983 resolved to lucihaya01.omv.
python siglus_scene_unpack.py \
'/path/to/Scene.pck' ./scene_decoded/Scene.pck.dec \
--manifest ./scene_decoded/Scene.pck.json
python siglus_save_unpack.py \
'/path/to/savedata' ./scene_output/saves \
--engine '/path/to/SiglusEngine_CHS.exe'
python index_scene_media.py \
./scene_decoded/Scene.pck.dec \
./scene_decoded/Scene.pck.json \
'/path/to/latter/chapter' \
./scene_output/index \
--block 1 --module scene01001 --ip 0x24F2CThe repository does not ship the resulting decoded scenario, save payload, media index with local paths, or restored movie. It ships the parser and the evidence needed to reproduce the finding.
The original full front-chapter run completed with zero extraction errors:
- 444 G00 inputs produced 1,453 RGBA PNG files;
- 40 NWA files produced 40 PCM WAV files;
- two OVK banks produced 552 bounded Ogg/Vorbis streams;
- six OMVs produced six embedded OGV streams and six lossless BGRA FFV1 reconstructions;
- 705 OMV frames were validated in total.
Repository tests use only synthetic byte streams and therefore require no game data:
python -m unittest discover -s tests -v- Full English technical article
- Executable-level notes and IDA rename map
- Unpacking and corpus validation
- Front/latter G00 comparison
- Lucia/Chihaya scene index (Traditional Chinese)
The original source code and text are released under the MIT License. SiglusEngine, Rewrite, and all depicted game material belong to their respective rights holders. This project is an independent interoperability and preservation-oriented research effort and is not affiliated with VisualArt's or Key.
