Initial public OpenBMH 0.1 source (by Codex)
This commit is contained in:
commit
558fbf166b
613 files changed
+168029
No files matched your search
@@ -0,0 +1,7 @@
|
||||
# Palette: `M3PC.COL`
|
||||
|
||||
The file contains 256 RGB triplets: 768 bytes, with each channel a six-bit VGA DAC value. `load_palette` in `src/formats/palette.cpp` requires at least that size and ignores trailing data.
|
||||
|
||||
A channel is masked with `0x3f` and expanded to eight bits using `(v * 255 + 31) / 63`. Rendering uses opaque alpha unless the drawing operation supplies transparency separately. No palette index is inherently transparent.
|
||||
|
||||
Some [VGA](VGA.md) images supply a separate palette. The same channel conversion applies. `Palette::nearest` is an implementation helper for colour matching, not an additional file field.
|
||||
@@ -0,0 +1,11 @@
|
||||
# Legacy installation configuration
|
||||
|
||||
`SOUND.CFG` and `PFAD.MAN` belong to the DOS installation. OpenBMH uses host SDL audio and its data-directory configuration instead of DOS ports, IRQs, DMA channels or path-prefix files.
|
||||
|
||||
## `SOUND.CFG`
|
||||
|
||||
The 30-byte file begins with the nine-byte `ALPTRAUM!` signature. A marker byte and two words precede two eight-byte device records. Each record contains four little-endian words representing the enabled state and legacy Sound Blaster configuration. These values describe the old machine, not valid SDL device settings.
|
||||
|
||||
## `PFAD.MAN`
|
||||
|
||||
This short legacy text file supplies a DOS path prefix. OpenBMH accepts a game location through startup selection or `--data`. Do not copy machine-specific DOS configuration into a new OpenBMH configuration file.
|
||||
@@ -0,0 +1,7 @@
|
||||
# Switch settings: `.EIN` and saved settings
|
||||
|
||||
The legacy settings block is 180 bytes: twenty rows of nine bytes, without a header or encryption. The same block is retained in [FBM](FBM.md). OpenBMH's settings actions operate on the career's block; standalone `.EIN` import is not the save mechanism.
|
||||
|
||||
Rows are indexed 0–19 and columns 0–8 in code. On-screen row letters and one-based column labels are presentation conventions. For supported boolean cells, zero means enabled and one means disabled. Some cells carry high-bit flags, reserved values or numeric settings; do not normalise the whole block to booleans.
|
||||
|
||||
`src/game/state.hpp`, the settings action implementation and the settings projection define supported cells and their bounds. Availability can also depend on the current frontend's audio capabilities. A failed audio device is not represented by rewriting the stored music preference. Clients should use the projected availability and normal actions rather than editing raw settings bytes.
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,33 @@
|
||||
# Savegame container: `.FBM`
|
||||
|
||||
`src/formats/fbm.cpp` reads the outer container. `src/formats/savestate.cpp` splits the decoded state; `src/game/save.cpp` writes the normal save representation. Saving goes through `CareerSession` so the manager, phase and committed state are validated.
|
||||
|
||||
## Container layout
|
||||
|
||||
| Part | Size | Meaning |
|
||||
|---|---|---|
|
||||
| Plain header | Variable | Manager/date information for the load list |
|
||||
| Signature area | 10 bytes | Eight-byte `KRON_FBM` signature and two following bytes |
|
||||
| First ID | u32 | Container identifier |
|
||||
| Version | 6 bytes | NUL-terminated version field, normally `V2.24` for the supported state layout |
|
||||
| Second ID | u32 | Save identifier |
|
||||
| Random byte | u8 | Header value |
|
||||
| Initial key | u8 | Rolling-cipher seed |
|
||||
| Stream | Remaining bytes except checksum | Encrypted state and name pools |
|
||||
| Checksum | u8 | Initial key plus all decoded stream bytes, modulo 256 |
|
||||
|
||||
The loader searches for the signature after the plain header and checks the fixed fields fit. A bad checksum is represented by `Savegame::checksum_ok`; callers must decide whether to accept the save. Neither the cipher nor this checksum provides security or authenticity.
|
||||
|
||||
For each byte, decrypt with `plain = (encrypted - key) XOR key`, or encrypt with `encrypted = (plain XOR key) + key`. Reduce all byte arithmetic modulo 256, then subtract `0x29` from the key before the next byte.
|
||||
|
||||
## Decoded stream
|
||||
|
||||
The supported layout contains a fixed ordered block table, followed by four name pools. Blocks have no tags or encoded lengths. Their sizes depend on the layout and database counts; `kBlocks` in `src/formats/savestate.cpp` is the authoritative order. Some blocks describe fixed arrays and others hold the contents of legacy dynamically allocated tables. The final optional team-record block is present only when its saved presence field is nonzero.
|
||||
|
||||
Each name pool has a u16 byte length followed by that many bytes, in club, player, referee and stadium order. These pools preserve renamed entities. The splitter rejects missing/truncated blocks or pools and requires exact stream consumption. See [STATE](STATE.md) for interpreted records and [M3D](M3D.md) for pool references.
|
||||
|
||||
## Edition compatibility
|
||||
|
||||
Original Football Limited V2.20 saves use a different state block list despite sharing the signature and rolling cipher. They are not interchangeable with the V2.24 layout. Reading an English installation and importing its original saves are separate features; do not edit a version string to bypass the distinction. OpenBMH's own English careers use the session's supported save representation.
|
||||
|
||||
Keep a backup before using a save with another engine version. Unknown bytes retained for compatibility are not safe targets for direct client manipulation.
|
||||
@@ -0,0 +1,27 @@
|
||||
# Bitmap fonts: `.FNT`
|
||||
|
||||
`src/formats/font.cpp` loads a 28-byte little-endian header followed by a bitmap and glyph tables. The layout resembles an Amiga TextFont with pointer slots stored as placeholders.
|
||||
|
||||
| Offset | Type | Meaning |
|
||||
|---|---|---|
|
||||
| 0 | u16 | Glyph height |
|
||||
| 2 | u8 | Style |
|
||||
| 3 | u8 | Flags; value 2 omits the spacing table |
|
||||
| 4 | u16 | Nominal advance |
|
||||
| 6 | u16 | Baseline |
|
||||
| 8 | u8 | First character |
|
||||
| 9 | u8 | Last character |
|
||||
| 10 | u16 | Reserved |
|
||||
| 12 | u32 | Bitmap pointer placeholder |
|
||||
| 16 | u16 | Bytes per bitmap row |
|
||||
| 18 | u16 | Reserved |
|
||||
| 20 | u32 | Glyph-location pointer placeholder |
|
||||
| 24 | u32 | Spacing pointer placeholder |
|
||||
|
||||
Let `n = last - first + 2`; the extra entry is the replacement glyph. After the header come:
|
||||
|
||||
1. `height * row_bytes` bytes of one-bit bitmap, most significant bit first.
|
||||
2. `n` pairs of u16 bit offset and bit width.
|
||||
3. `n` signed 16-bit advances, unless flags equal 2. Fixed-width glyphs use the nominal advance instead.
|
||||
|
||||
The loader requires the computed total size to match. Characters outside the supported range use the replacement glyph. Legacy character conversion is described in the [format index](README.md); use the supplied font with its matching text encoding.
|
||||
@@ -0,0 +1,15 @@
|
||||
# Executable images used as data
|
||||
|
||||
OpenBMH reads tables and text from the user's original executable. It does not execute that program. The file is not part of the OpenBMH distribution.
|
||||
|
||||
## German LE image
|
||||
|
||||
`src/formats/le.cpp` loads the DOS/4GW Linear Executable format. The DOS header's u32 field at `0x3c` locates the LE header. Object records define virtual sizes, image bases and page ranges. Page-map entries locate file data; unloaded areas are zero-filled. The image applies supported internal relocation records before consumers follow pointers.
|
||||
|
||||
The reader supports the internal offset/selector forms required by the installation. External fixups are rejected. Bounds and object validation belong to the loader; arbitrary executable formats are not accepted merely because they begin with an MZ stub. String access decodes the legacy single-byte encoding.
|
||||
|
||||
## English X-32 image
|
||||
|
||||
Football Limited uses a different executable layout. `src/launch/fltd.cpp` prepares supported English executable data and maps the required tables into the engine's expected data view. It is not an instruction emulator or a conversion of English game rules into a separate engine.
|
||||
|
||||
The [executable layout reference](EXECUTABLE_LAYOUT.md) describes supported table locations and semantic layout identifiers. A byte address is meaningful only with its edition and image layout. Application APIs should expose the table's meaning rather than an address-derived field name.
|
||||
@@ -0,0 +1,37 @@
|
||||
# Master database: `M3D.MAN` / `M3E.MAN`
|
||||
|
||||
`load_database` in `src/formats/m3d.cpp` reads an unencrypted sequence of string pools and parallel tables. Counts are supplied by `DbCounts`, not stored in the file. Default counts are 419 clubs, 2,574 players, 168 team records and an auxiliary extent of 3,096. Readers must agree on these counts; changing a count without rebuilding dependent tables does not define a valid new database.
|
||||
|
||||
Let `C`, `P`, `T` and `A` denote those counts. The stream order is:
|
||||
|
||||
| Size | Content |
|
||||
|---|---|
|
||||
| 4 × u16 | Byte lengths of club, player, referee and stadium name pools |
|
||||
| `A + 50` bytes | Player bonus/flag table and auxiliary entries |
|
||||
| Sum of pool lengths | Four consecutive NUL-separated name pools |
|
||||
| `C` × u16 | Club name offsets into pool 0 |
|
||||
| `P` × u16 | Player name offsets into pool 1 |
|
||||
| 100 bytes | Auxiliary table |
|
||||
| `T` × u16 | Auxiliary team table |
|
||||
| `C` × u16 | Club crest/flag words; low nine bits select a crest |
|
||||
| 251 + 189 + 50 + 419 + 168 bytes | Five fixed-size auxiliary tables |
|
||||
| `2 * (A - 4) + 108` bytes | Squad-list words |
|
||||
| `P` × u32, three times | Three parallel player-word tables |
|
||||
|
||||
The loader checks bounds and requires complete consumption. Pool references are byte offsets; they are neither club IDs nor Unicode indices. The name pools also occur in [savegame trailers](FBM.md). A career initialises and reorders parts of the database, so its runtime team IDs can differ from the master club index.
|
||||
|
||||
## Player words
|
||||
|
||||
A squad-list word stores a twelve-bit player ID and four flag bits. Player ID `0xfff` means no player. The `Player` accessors in `src/formats/m3d.hpp` interpret the three words in file order:
|
||||
|
||||
| Word | Bits | Meaning |
|
||||
|---|---|---|
|
||||
| 1 | 0–6 | Form |
|
||||
| 1 | 7–13 | Technique |
|
||||
| 1 | 14–20 | Condition |
|
||||
| 2 | 0–13 | Seven two-bit skills: teamplay, speed, shooting, passing, tackling, free kick, corner |
|
||||
| 2 | 27–31 | Nationality |
|
||||
| 3 | 0–1 | Position: goalkeeper, defender, midfielder, forward |
|
||||
| 3 | 21–25 | Age minus 16 |
|
||||
|
||||
Other bits carry additional state or remain uninterpreted by these accessors. Preserve them when changing a supported field. Display strength is `min((((form >> 3) + 94) * (technique + condition) / 100) / 2, 99)` with integer division in that order. It is a derived value, not an extra database field.
|
||||
@@ -0,0 +1,7 @@
|
||||
# Formation coordinates: `M3.DAT`
|
||||
|
||||
The file is a 1,408-byte raw block containing four 352-byte manager slots. Each slot contains an outdoor and indoor set, each with eight 22-byte formation records.
|
||||
|
||||
A record stores eleven horizontal coordinates followed by eleven vertical coordinates. For a formation `f` and player slot `p`, the horizontal coordinate is at `set_base + f * 22 + p`; the vertical coordinate is eleven bytes later. The indoor set begins 176 bytes into the manager slot.
|
||||
|
||||
Career initialisation copies the first manager slot over the other three. Subsequently the manager-specific block is retained in [FBM](FBM.md). The semantic accessor is `GameState::formation_position` in `src/game/state.cpp`. Coordinates belong to the game's pitch grid, not directly to screen pixels.
|
||||
@@ -0,0 +1,20 @@
|
||||
# Desktop layout: `.MEN`
|
||||
|
||||
A desktop layout is 864 bytes: 54 entries of 16 bytes, without a header or encryption. `src/ui/desk_state.cpp` interprets the list. New careers initialise manager slots from the installation's layout; saved careers retain their layouts in [FBM](FBM.md).
|
||||
|
||||
Entry zero is the list head. Byte 5 contains the first visible entry; each following entry uses byte 5 for its successor and byte 6 for its predecessor. Index zero terminates a chain and `0xff` denotes an unlisted entry. The reader checks indices and detects cycles.
|
||||
|
||||
| Offset within entry | Type | Meaning |
|
||||
|---|---|---|
|
||||
| 0 | u16 | Horizontal coordinate; bit `0x1000` hides the entry |
|
||||
| 2 | u8 | Vertical coordinate |
|
||||
| 3 | u8 | Width |
|
||||
| 4 | u8 | Height |
|
||||
| 5 | u8 | Next entry |
|
||||
| 6 | u8 | Previous entry |
|
||||
| 7–11 | bytes | Reserved |
|
||||
| 12 | u8 | Item kind |
|
||||
| 13 | u8 | Drawer state; bit 7 indicates open |
|
||||
| 14–15 | bytes | Reserved |
|
||||
|
||||
Icon kinds occupy 0–29; drawer kinds occupy 50–72. The graphical client decides which kinds it can display and which actions are available in the current mode. A kind number is not a console window ID. Unrecognised or inactive layout data must not be interpreted as an executable action.
|
||||
@@ -0,0 +1,25 @@
|
||||
# File formats
|
||||
|
||||
OpenBMH reads files from a game installation supplied by the user. This directory documents their structure and the implementation's interfaces; it does not distribute game content or inventories of extracted text or artwork.
|
||||
|
||||
Unless a page says otherwise, integer fields are little endian. Legacy strings use a single-byte encoding; the German character substitutions are handled by `iso646de_to_utf8` in `src/formats/binary.cpp`. Text presented to clients is converted to UTF-8. Do not interpret a legacy byte offset as a Unicode character index.
|
||||
|
||||
| Data | Files | Documentation | Implementation |
|
||||
|---|---|---|---|
|
||||
| Palette | `M3PC.COL` | [COL](COL.md) | `src/formats/palette.cpp` |
|
||||
| Indexed images | `KB/*.VGA`, `W/*.VGA` | [VGA](VGA.md) | `src/formats/vga.cpp` |
|
||||
| Bitmap fonts | `F/*.FNT` | [FNT](FNT.md) | `src/formats/font.cpp` |
|
||||
| Text database | `TEXTD.BLK`, `TEXTE.BLK` | [TEXTD](TEXTD.md) | `src/formats/textd.cpp` |
|
||||
| Master database | `M3D.MAN`, `M3E.MAN` | [M3D](M3D.md) | `src/formats/m3d.cpp` |
|
||||
| Desktop layout | `M3.MEN`, `*.MEN` | [M3MEN](M3MEN.md) | `src/ui/desk_state.cpp` |
|
||||
| Formation coordinates | `M3.DAT` | [M3DAT](M3DAT.md) | `src/game/state.cpp` |
|
||||
| Settings | `*.EIN`, saved settings block | [EIN](EIN.md) | `src/game/state.hpp` |
|
||||
| Save container and state | `*.FBM` | [FBM](FBM.md), [STATE](STATE.md) | `src/formats/fbm.cpp`, `savestate.cpp` |
|
||||
| Legacy configuration | `SOUND.CFG`, `PFAD.MAN` | [CONFIG](CONFIG.md) | Not used for host device configuration |
|
||||
| Audio containers | `S/2000` through `S/2003` | [SOUND](SOUND.md) | `src/audio/container.cpp`, `original.cpp` |
|
||||
| Executable data | German LE and English X-32 images | [LE](LE.md), [executable layout](EXECUTABLE_LAYOUT.md) | `src/formats/le.cpp`, `src/launch/fltd.cpp` |
|
||||
| IFF crest template | `WAPPEN.LBM` | [WAPPEN](WAPPEN.md) | Not loaded by OpenBMH |
|
||||
|
||||
German and English editions can share a physical format while differing in text, league contents, executable layout and currency. Select the edition through the supplied installation; do not rename files or patch a save header to simulate another version. Original English V2.20 save import is a separate compatibility limitation from English installation support.
|
||||
|
||||
The loaders and accessors are authoritative for supported bounds and validation. Unknown fields are preserved where required by save compatibility; an unexplained value is not an extension point. File offsets and record strides here describe formats, not stable application API names.
|
||||
@@ -0,0 +1,36 @@
|
||||
# Audio containers: `S/2000` through `S/2003`
|
||||
|
||||
`src/audio/container.cpp` validates the sound containers and decodes bounded PCM samples. `src/audio/original.cpp` implements the supported music sequencer, OPL instrument path, sample channel and effect dispatch. Audio resources and instrument values come from the user's installation; none are distributed here.
|
||||
|
||||
## Container structure
|
||||
|
||||
| Offset | Size | Meaning |
|
||||
|---|---|---|
|
||||
| 0 | 4 | `FORM` signature |
|
||||
| 4 | u32, little endian | Declared length |
|
||||
| 8 | 8 | `ALPTRAUM` type |
|
||||
| 16 | Variable | Consecutive chunks |
|
||||
|
||||
Each chunk has a four-byte ID, a little-endian u32 payload length and its payload. Unlike standard padded IFF chunks, these chunks are adjacent without an alignment byte. The walker rejects overflows and requires the final chunk to end at the file boundary.
|
||||
|
||||
Music banks contain `HEDR`, `SONG`, `TRCK`, `PART`, `INST` and `SAMP` chunks. The effects bank uses `HEDR`, `SEFX`, `INST` and `SAMP`. The usual FORM length excludes the first eight bytes. The supported effects variant instead declares the whole file size; this exception is accepted only with its validated fixed chunk layout.
|
||||
|
||||
## PCM samples
|
||||
|
||||
A `SAMP` payload starts with two u16 words: a header field and the sample count. Each sample has a 16-byte descriptor followed by a shared unsigned eight-bit mono data area. Within a descriptor:
|
||||
|
||||
| Offset | Type | Meaning |
|
||||
|---|---|---|
|
||||
| 0 | u16 | Start relative to the sample-data area |
|
||||
| 2 | u16 | Length in bytes |
|
||||
| 8 | u16 | Sample rate |
|
||||
|
||||
`decode_sample` checks the descriptor table and sample bounds, rejects empty samples and validates the rate. Conversion to signed sixteen-bit PCM is `(value - 128) * 256`.
|
||||
|
||||
## Sequencing and effects
|
||||
|
||||
`SONG`, `TRCK` and `PART` provide sequence order and timed note events; `INST` supplies instrument records. `OriginalSynth` schedules the supported register and sample operations using a deterministic audio tick. Nuked OPL3 renders the OPL-compatible register stream. This audio clock is separate from career random generators and match time.
|
||||
|
||||
The effects table has a four-byte prefix and sixteen-byte records. Instrument-backed effects and sample-backed effects use separate paths. `decode_original_cue` alone supports the direct sample-backed subset; this does not mean the full synthesiser lacks the instrument path. Music and effects settings control playback, while actual device availability belongs to the frontend. English audio compatibility remains subject to the release's experimental edition limits.
|
||||
|
||||
Sample-domain output checks establish decoder behaviour, not the timing or audible quality of a physical audio device. Platform listening and device checks are separate validation work.
|
||||
@@ -0,0 +1,27 @@
|
||||
# Interpreting saved game state
|
||||
|
||||
The [FBM container](FBM.md) contains fixed-order state blocks rather than a self-describing object graph. `src/formats/savestate.cpp` defines the physical layout; `src/game/state.hpp` and `state.cpp` provide semantic accessors. Keep those implementations as the single source of truth when adding a field.
|
||||
|
||||
## Manager records
|
||||
|
||||
Five compatibility slots use 2,828-byte records. Not every slot represents a playable manager. Important offsets within each record include:
|
||||
|
||||
| Record offset | Type | Meaning |
|
||||
|---|---|---|
|
||||
| `0x0a8` | Fixed character area | Manager name |
|
||||
| `0x290` | i16 | Runtime team ID; a sentinel represents no club |
|
||||
| `0x314` | i32 | Cash balance in the engine's currency units |
|
||||
| `0x748` | i32 array | First income accounting table |
|
||||
| `0x85c` | i32 array | Second income accounting table |
|
||||
|
||||
Financial projections can include computed expenses; raw accounting tables do not by themselves reproduce the complete balance screen. A displayed currency conversion is not a change to saved arithmetic.
|
||||
|
||||
Other blocks retain desktop layouts, settings, formation coordinates, tactics, transfers, loan ledgers, calendar state, results, player words and name offsets. Loan duration is kept separately from a player's contract-byte sentinel; a sentinel must not be read as a real multi-century contract.
|
||||
|
||||
## Identity and schedule
|
||||
|
||||
Master club indices, club-name pool offsets, runtime team IDs, player IDs and squad rows are distinct identifiers. Initialisation can shuffle clubs between runtime positions. Promotion and relegation can change those positions again. Use a session's current projections to resolve identity rather than holding a runtime row across a season boundary.
|
||||
|
||||
The base league structure contains five eighteen-team and four twelve-team ranges. A result byte packs home goals in the high nibble and away goals in the low nibble; `0xcc` denotes an unplayed result. The schedule combines round templates with current calendar and competition state. Tables additionally incorporate deductions and selected competition rules; clients should request a table projection instead of deriving one from raw results alone.
|
||||
|
||||
Do not serialise frontend capabilities, pointers, callback owners or request IDs into this compatibility state. Session staging and rollback must include the associated runtime state and both [random streams](../RNG.md), not just selected byte arrays.
|
||||
@@ -0,0 +1,16 @@
|
||||
# Text database: `TEXTD.BLK` / `TEXTE.BLK`
|
||||
|
||||
`src/formats/textd.cpp` reads a seven-byte header followed by consecutive NUL-terminated legacy strings.
|
||||
|
||||
| Offset | Type | Meaning |
|
||||
|---|---|---|
|
||||
| 0 | u8 | Edition-specific identifier |
|
||||
| 1 | u16 | Declared buffer size |
|
||||
| 3 | u32 | Header field with no application-level interpretation |
|
||||
| 7 | bytes | String buffer |
|
||||
|
||||
The loader indexes the first 1,382 strings and rejects a shorter database. Declared buffer size can differ from the actual payload; the loader takes the remaining file bytes rather than trusting it as a stream length. Each stored offset is relative to the start of the string buffer, not to the file or a UTF-8 result.
|
||||
|
||||
Strings are converted through the legacy character decoder when displayed. Currency labels and other edition content come from the installation. The text database is not copied into a savegame; the name pools stored in [FBM](FBM.md) are separate.
|
||||
|
||||
This document intentionally describes structure only. A distributable replacement must provide independently licensed text; copying or translating the supplied game's text database does not create a new license for it.
|
||||
@@ -0,0 +1,16 @@
|
||||
# Indexed bitmap: `.VGA`
|
||||
|
||||
`src/formats/vga.cpp` decodes eight-bit palette indices from a continuous run-length stream. Coordinates use a top-left origin.
|
||||
|
||||
| Offset | Type | Meaning |
|
||||
|---|---|---|
|
||||
| 0 | u16 | Width |
|
||||
| 2 | u16 | Height |
|
||||
| 4 | u32 | Encoded length, including one trailing byte |
|
||||
| 8 | bytes | Encoded pixel stream |
|
||||
|
||||
For a control byte `c >= 0x80`, repeat the following byte `c - 0x7f` times. Otherwise copy the next `c + 1` literal bytes. Decoding continues across row boundaries until `width * height` indices have been produced. The loader rejects truncated data and requires exactly one byte to remain within the declared stream afterwards. A run exceeding the pixel count is clipped by the decoder.
|
||||
|
||||
The default colours come from [M3PC.COL](COL.md). Certain full-screen resources append a 768-byte palette after the encoded stream; callers loading those resources must select that palette separately. `decode_vga` itself returns indices and does not interpret appended palette data.
|
||||
|
||||
Crest sheets use 38 by 38 pixel cells, eight per sheet. For a nine-bit crest ID, the file number is `id >> 3` and the horizontal cell is `id & 7`. This describes the lookup scheme rather than any particular copyrighted crest or sheet content.
|
||||
@@ -0,0 +1,7 @@
|
||||
# IFF crest templates: `WAPPEN.LBM`
|
||||
|
||||
OpenBMH does not load this file. Its crest renderer uses indexed [VGA](VGA.md) sheets. No authorship or redistribution permission for templates found alongside a game installation is implied by their filename.
|
||||
|
||||
An IFF `FORM` of type `PBM ` can contain a `BMHD` bitmap header, an eight-bit RGB `CMAP`, optional application chunks and a `BODY` with chunky pixel indices. IFF lengths and header integers are big endian; chunks are padded to even boundaries.
|
||||
|
||||
For ByteRun1-compressed data, controls 0–127 copy the next `n + 1` bytes, controls 129–255 repeat the next byte `257 - n` times, and 128 is a no-op. This encoding differs from the game's VGA run-length stream. Adding a loader would require its own input validation and independently licensed test fixture.
|
||||
Reference in new issue
Block a user