Crates
These crates provide generic Rust implementations of hardware and runtime pieces used by games. Each one comes from case-study code or source inspection. Its README says what was compared with an original and what remains open. Its tests use no game's files. All crates are Apache 2.0.
| Crate | What it is | Comes from |
|---|---|---|
| gameframe-opl2 | The Yamaha YM3812 (OPL2) FM chip of the AdLib and Sound Blaster cards, at its own 49,716 Hz, with a band-limited resampler | Frontier: Elite II, where its output matches the original AdLib driver sample for sample |
| gameframe-opl3 | Yamaha YMF262 with 18 channels, six four-operator pairs, eight waveforms, four output words, timers, compatibility mode, indexed ports and serial DAC frames | Extends GameFrame's OPL2 core from Yamaha's datasheet and an original AdLib Gold driver trace; independent four-operator carrier routing, YAC512 analog conversion and card adapters remain open |
| gameframe-saa1099 | Philips SAA1099 stereo sound generator and the two-chip Creative Music System/Game Blaster port model | Philips's data handbook and static traces of the original CMS and Sierra drivers; noise taps, tone/noise mixing, analog output and card detection remain open |
| gameframe-sn76496 | TI SN76496 three-tone and noise generator, PCjr and original Tandy port adapters and audio muxes | TI and machine documentation plus static traces of Sierra's JR.DRV and TANDY.DRV; TI noise feedback, the Tandy mux's fourth input, NCR/PSSJ variants, CPU wait mapping and analog output remain open |
| gameframe-yac512 | Yamaha YAC512 serial input, FSEL format decoding and two channel latches | Yamaha's YAC512 and YMF262 datasheets plus a published YMF262 serial timing measurement; the analog transfer curve remains open |
| gameframe-ymz263 | Yamaha YMZ263B/MMA dual PCM/ADPCM channels, FIFOs, timers, DMA request state, MIDI FIFOs and UART timing | Yamaha data sheet, Ad Lib Gold Developer Toolkit v1.01 and static GSS Wave/MIDI driver trace; exact ADPCM rounding, interleave and some status semantics need software comparisons |
| gameframe-adlib-gold | AdLib Gold/GSS YMF262 and YMZ263 ports, Control Chip register access, busy status, EEPROM commands, audio-port relocation and linear source mixing | Ad Lib Gold Developer Toolkit v1.01 and original OPL3/Wave-MIDI driver traces; TDA8425 processing, analog filters, external DMA/IRQ and revision defaults remain open |
| gameframe-sound-blaster | Creative Sound Blaster DSP generations 1.xx–4.xx, generation-specific mixers, DSP MIDI and SB16 MPU-401 UART | Creative's hardware programming reference and a static CT1741 firmware 4.05 trace; existing software tests cover the port model, 8/16-bit DMA paths and IRQ behavior. ADPCM sample parity and machine-level DMA/PIC remain open |
| gameframe-wma | A Windows Media Audio v2 decoder for xWMA and ASF streams, with no dependencies, building for WebAssembly | Un-Banished, where it decodes every sound of the game within 60 dB of FFmpeg |
| gameframe-msvc-crt | MSVC math, qsort and rand, plus safe byte, string and integer text routines | Un-Banished's runtime math and sort; the added x86 CRT routines are source-inspected and await runtime comparison |
| gameframe-mmx | The Intel MMX instructions bit for bit: wrapping and saturating packed arithmetic, pmulhw, pmaddwd, packs, unpacks and shifts | POD: Planet of Death (1997), where a model of the game's MMX mixer built on it matched the original on 500 random channels |
| gameframe-texel | The texel layouts of the 1990s 3D chips decoded to RGBA, and the 2:1 point-sampled reduction | POD: Planet of Death (1997) |
| gameframe-rage | ATI 3D Rage and ATI3DCIF: texture and surface formats, render states, primitives, and the chip's solid, flat and Gouraud drawing with alpha blending | POD: Planet of Death (1997), whose ATI build was traced with it |
| gameframe-virge | S3 ViRGE and the S3D Toolkit: formats, state keys, the function list, and the chip's Gouraud drawing with source-alpha blending | POD: Planet of Death (1997), whose S3 build was traced with it |
| gameframe-powervr | PowerVR PCX2 and VideoLogic's SGL 3.1: the scene graph, the driver's lighting and the chip's per-pixel rules (depth sort, fog, translucent passes, light volumes) into a 565 buffer at any scale | POD: Planet of Death (1997), whose PowerVR build was traced with it |
| gameframe-raster | A small software triangle rasteriser into 8-, 15- and 16-bit frame buffers, shared by the Rage and ViRGE models | POD: Planet of Death (1997) |
| gameframe-d3d | Direct3D 3 immediate mode in software: execute buffers written and parsed, render states, and a rasteriser with Direct3D's fill rules, texture blends, alpha test, blending, stipple and vertex fog | POD: Planet of Death (1997), whose Direct3D build was traced with it |
| gameframe-voodoo | 3dfx Glide 2.x texture formats and NCC tables, and a software model of the Voodoo Graphics pixel pipeline as Glide 2.x drives it: combiners, chroma key, alpha test, table fog, Z and W buffers, blending, the 565 buffer with its dither | POD: Planet of Death (1997), whose 3dfx build Un-POD draws with it |
| gameframe-scale | Whole-multiple scaling of a finished frame: nearest, Scale2x (EPX) and a CRT-style look, for any pixel type | POD: Planet of Death (1997), whose replacement Glide and DirectDraw libraries show the game's frame scaled this way |
| gameframe-turbo-pascal | Turbo Pascal's 6-byte Real with its exact arithmetic, Random, and Pascal data layouts | Tyrian 2026, matching the original runtime on 40,000 operands per routine |
| gameframe-indeo | An Intel Indeo Video Interactive 4.1 (IV41) decoder, clean room, with Intel's tables read from the player's own IR41_32.DLL | POD: Planet of Death (1997), whose 13,663 video pictures it decodes byte for byte as Intel's codec does under the emulator |
| gameframe-disc-image | Reads CD images in place: CUE sheets, raw BIN (Mode 1, Mode 2 Form 1), cooked ISO, ISO 9660 with Joliet names, any range of a file | POD: Planet of Death (1997), whose port runs from the player's own disc image natively and in the browser; tests build their own images |
| gameframe-game-source | One Source trait over a folder, a CD image, layers of patches and a URL: downloaded with resume and an MD5 check, or read in 1 MiB ranges in the browser and kept in OPFS or IndexedDB | POD: Planet of Death (1997); tests run a local HTTP server |
| gameframe-library | The player's library: game data, saves and opt-in sections declared in one library.json, kept in folders or encrypted in IndexedDB, shared with the library page | Un-Banished's browser start page and save store, POD's sources and Hardwar's file and save crates; the browser store was checked against the page by hand |
| gameframe-frame | The contract between a port's core and the frame: event topics, a manifest of capabilities, renderers with grades, settings and controls, a session, and adapters for games in other languages (JSON lines) or set up from frame.json, a port's own end of the JSON lines (Link) and a new program per game (Respawn) | Written for Un-Banished, POD and Hardwar; tested against the demo game and a shell-script game; Link and Respawn run POD's and Hardwar's launchers |
| gameframe-frame-ui | The frame's views as Dioxus components for the browser and the desktop, styled by the library page's tokens and eleven ready-made themes | Checked by hand in the frame demo, in a browser and on a macOS desktop |
| gameframe-report | Reports from a running port: an unported path (unported!), a mismatch or a crash, with the place, the original's address, the values, the game's state and the launch, one per place; Dev keeps them on the machine, Production adds a filled-in GitHub issue link | Written for POD and Hardwar's setup dialog; tested on its own and through the frame's Link |
| gameframe-bitmap-font | An old game's bitmap font as a TrueType font built in memory, with a CSS @font-face rule, for a theme in the game's own letters | Hardwar's launcher, with the game's HARDS.FNT and HARDL.FNT, checked by eye in the frame on macOS; tests on the tables, the checksum and the glyph order |
Ask your agent
Check a crate against my game. Copy this prompt into your coding agent:
In my GameFrame project, check whether <crate> matches this game.
1. Read the crate's README in GameFrame's crates/ folder.
2. Find the game's own version of the code: the runtime functions, the music driver or the
decoder.
3. Run the original under GameFrame's emulator on many inputs (the re-emulate skill).
4. Compare the results with the crate bit for bit and report the first difference.
5. If they match, add the crate as a dependency. If not, trace the game's version.Use them
The crates live in the repository's crates/ folder, a Cargo workspace. Add one as a git dependency:
[dependencies]
gameframe-opl2 = { git = "https://github.com/tanepiper/game-frame" }Each crate's page shows its API, an example, what it does not model, and how to check that it matches your game. The PC audio coverage map records hardware gaps and external projects that may provide black-box comparison output. The current code license is Apache-2.0. The owner may relicense owned work, including a crate as Apache-2.0 OR MIT, and should record the selected scope in that crate's metadata and README.
When to use a crate, and when to check it first
A crate reproduces one program's version of a chip or a runtime. Your game may use another version: a later compiler's maths functions, a different Pascal runtime, an OPL3 instead of an OPL2. Before you rely on a crate for exact results:
- Find the matching code in your game: the runtime functions, the music driver, the decoder.
- Run the original on many inputs under GameFrame's emulator (
re-emulate). - Compare the results with the crate bit for bit.
If they match, use the crate. If they differ, trace your game's version and port it.
Rules for adding a crate
- It comes from a reimplementation where it was checked against the original program, or, for a platform piece such as the library, from a port where it was used. Its README says how it was checked.
- It is generic: no game's names, formats or rules in its code.
- Its tests run without any game's files. Tests that need a tool (such as FFmpeg) skip when the tool is missing.
- It has no
unsafecode, few dependencies, and builds forwasm32-unknown-unknown. - Its README follows Writing: what it is, how to use it, what it does not model, how to check it against your game, and its licence.
- Code from another project keeps that project's licence notice (as
gameframe-wmadoes for its codec tables).