Forge
Pack once. Verify always. Play anywhere.
Forge is the sigilOS toolchain for ROM containers — it packs ROM + BIOS + save state into a single capability-secured Relic file, verifies it before launch, and gates the emulator core to exactly what it's allowed to see.
Sigil Forge, running native on your desktop. Written once in Sigil, compiled per platform by cc0 — no VM, no emulator, no interpreter, no Python. This v0.1 preview prints the Forge library — 66 launchable systems and their shared-CPU emulation cores (growing fast — check PARITY.md for the current count) — as a real native binary; the same Sigil source produces all three downloads, differing only in a thin per-platform backend.
macOS: ad-hoc signed (not notarized) — right-click → Open, or xattr -d com.apple.quarantine forge-0.1-macos-arm64. Windows: unsigned preview — SmartScreen may warn; “More info → Run anyway”. Verify any download with SHA256SUMS (shasum -a 256 -c SHA256SUMS) — full README. All three are built from one Sigil source by cc0; windowed emulator cores (display/input/audio) are the next milestone.
Sub-components
Reads ROM + optional BIOS + optional save state. Computes CRC32 of the ROM section. Writes the 16-byte Relic header, section table, and all section data into a single .relic file. Accepts key=value metadata at the CLI.
Validates magic bytes (FORG), format version, section table coherence, file size, and recomputes CRC32 of the ROM section against the stored value. Returns FORG_OK or a typed error. Called by rp_launch before any capability is issued.
16-byte header: magic FORG · version · section count · flags. Section table: offset+length per section. Sections: ROM (required), BIOS (optional), SAVE (optional), META (key-value store). CRC32 + SHA-256 over ROM data. Full spec →
The launcher calls forgery_verify.sg before issuing any emulator capability. On FORG_OK, it grants the emulator core a scoped handle covering only the ROM and BIOS sections — no ambient filesystem access, no loose file paths.
Lifecycle
.relic.FORG_OK or error.--embed-save.Relic header layout
FORG (0x464F5247). Verified first by forgery_verify.sg — wrong magic → immediate reject.forgery_pack.sg. Checked for compatibility on verify.forgery_verify.sg at launch time.Creating a Relic
# NES ROM with metadata
forgery_pack.sg mario.nes title="Super Mario Bros" region="US" year="1985"
# SNES ROM + save state
forgery_pack.sg zelda.sfc --embed-save zelda.sav title="Zelda: A Link to the Past"
# System requiring BIOS
forgery_pack.sg game.bin --bios bios.bin title="My Game" sys="zxspectrum"
Verification and status
All Relic format operations — pack, verify, CRC32 integrity, section table coherence, BIOS embedding, save-state round-trip — verified on sigilOS RetroPie. forgery_verify.sg gates every launch. Zero tolerance for tampered or truncated containers.
Supported ROM formats
| Extension | System | BIOS required |
|---|---|---|
.nes | Nintendo Entertainment System | No |
.sfc / .smc | Super Nintendo | No |
.gba | Game Boy Advance | Optional |
.gb / .gbc | Game Boy / Color | No |
.md / .bin | Sega Mega Drive / Genesis | No |
.bin | PlayStation 1 (multi-bin) | Yes |
.zip | ZX Spectrum (z80/tap) | Yes |
| any | Custom via sys= metadata | Varies |
Relics are the native game format for sigilOS Forge. The Relic container spec lives at relics.html → Binary format. Forge ships as part of the Forge lane's 0.7.0 milestone.