@wasm-gaming/rsdkv4-wasm 0.1.4 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,60 @@
1
- import type { EngineConfig, EngineInstance, AssetData } from '@wasm-gaming/engine-specs';
2
- import { manifest } from './rsdkv4.manifest.js';
3
- export { manifest };
4
- /** RSDKv4-specific bridge for the launcher's debug/stage-select UI. */
1
+ /**
2
+ * The engine package's entry point: an `EngineSDK` for RSDKv4.
3
+ *
4
+ * ```ts
5
+ * import Rsdkv4SDK from '@wasm-gaming/rsdkv4-wasm';
6
+ *
7
+ * const play = await new Rsdkv4SDK()
8
+ * .mount(document.querySelector('#stage'))
9
+ * .assets({ data: () => library.readBytes('Sonic2') })
10
+ * .storage({ namespace: 'rsdkv4/Sonic2' })
11
+ * .config({ startMenu: 'host' })
12
+ * .on('saves', ({ detail }) => paintSlots(detail))
13
+ * .start({ slot: 0 });
14
+ * ```
15
+ *
16
+ * Everything a host drives is the contract's, and documented there: the four payloads
17
+ * with their descriptors, `mount`, `on`/`off`, `start`, `restart`, `destroy`. What is
18
+ * this engine's own lives in two places — {@link Rsdkv4Config} and friends, which say
19
+ * what the payloads accept *here*, and the extra members of {@link Rsdkv4Play} below:
20
+ * {@link Rsdkv4Play.game} and {@link Rsdkv4Play.devMenu}, for a host that draws
21
+ * RSDKv4's start screens itself, owner-aware {@link Rsdkv4Play.pause}, and
22
+ * {@link Rsdkv4Play.input}, for a host that would rather drive the buttons than let
23
+ * the engine read the keyboard.
24
+ *
25
+ * One game-agnostic `rsdkv4.wasm` runs both Sonic 1 and Sonic 2 — the difference is
26
+ * only which `Data.rsdk` the host hands over in `assets.data`, written into the
27
+ * filesystem at runtime (not baked with `--preload-file`).
28
+ *
29
+ * Filesystem: built with `-sWASMFS`. The working dir is mounted on **OPFS** when the
30
+ * page is cross-origin isolated *and* the build can create the OPFS backend from the
31
+ * main thread (an Asyncify/JSPI build — today's is not, see `WebFS.cpp`); otherwise it
32
+ * falls back to the WASMFS in-memory backend, which boots fine but forgets everything.
33
+ * That fallback is why the SDK mirrors `SData.bin` into OPFS itself: see
34
+ * {@link Rsdkv4Storage.persist}.
35
+ *
36
+ * @module
37
+ * @see [The engine contract](https://wasm-gaming.github.io/engine-specs/api-docs/)
38
+ */
39
+ import { EnginePlayBase, EngineSDKBase, EventEmitter } from '@wasm-gaming/engine-specs';
40
+ import type { EngineInit, EngineSDKConstructor, EventsOf, PayloadKind, PromisePlay, PropertiesDefinition } from '@wasm-gaming/engine-specs';
41
+ import { type Rsdkv4Buttons, type Rsdkv4Options, type Rsdkv4Payloads, type RsdkSaveSlot } from './rsdkv4.options.js';
42
+ export type { Rsdkv4Asset, Rsdkv4AssetData, Rsdkv4Assets, Rsdkv4Button, Rsdkv4Buttons, Rsdkv4Config, Rsdkv4Events, Rsdkv4InputDefaults, Rsdkv4Options, Rsdkv4Payloads, Rsdkv4Stage, Rsdkv4Storage, RsdkSaveSlot, } from './rsdkv4.options.js';
43
+ export { RSDKV4_BUTTONS, RSDKV4_INPUT, RSDKV4_SPEC } from './rsdkv4.options.js';
44
+ /** The core events unioned with this engine's own — what `on`/`off` accept. */
45
+ export type Rsdkv4Events_ = EventsOf<Rsdkv4Payloads>;
46
+ /**
47
+ * The picture's native size, which is what the SDK scales to fit its mount.
48
+ *
49
+ * A module constant rather than a manifest field: `EngineManifest` left the contract
50
+ * in 0.3.0, and this was one of only two things the SDK ever read back out of it.
51
+ */
52
+ export declare const RSDKV4_VIDEO: {
53
+ readonly baseWidth: 424;
54
+ readonly baseHeight: 240;
55
+ readonly aspect: "16:9";
56
+ };
57
+ /** RSDKv4-specific bridge for a host's debug/stage-select UI. */
5
58
  export interface RsdkDevMenuBridge {
6
59
  getStageList(): Array<{
7
60
  name: string;
@@ -12,37 +65,180 @@ export interface RsdkDevMenuBridge {
12
65
  loadStage(categoryIdx: number, stageIdx: number): void;
13
66
  setPaused(paused: boolean): void;
14
67
  }
15
- export type Rsdkv4Instance = EngineInstance & {
16
- devMenu: RsdkDevMenuBridge;
17
- /** True when the working dir is OPFS-backed (persistent) rather than in-memory. */
18
- persistent: boolean;
19
- /** Relative storage namespace used under /data (e.g. "sonic1", "sonic2"). */
20
- storageNamespace: string;
21
- /** Remove persisted game files for this namespace only. */
22
- purgeStorage(): {
23
- data: boolean;
24
- settings: boolean;
25
- };
26
- };
27
68
  /**
28
- * Extra (engine-specific) config on top of the contract's EngineConfig: lazy asset
29
- * providers, invoked only on a cache miss — e.g. to skip a large Data.rsdk fetch
30
- * when it's already persisted in OPFS.
69
+ * A row of the engine's GAME OPTIONS screen (differs between Sonic 1 and 2), as the
70
+ * engine reports it — with `value` as the raw number it stores.
71
+ *
72
+ * The same rows also come back through `play.options()` as descriptors, where a
73
+ * boolean row reads as a boolean and an enum row as one of its choice labels. This is
74
+ * the untranslated view, for a host that wants it.
31
75
  */
32
- export type Rsdkv4LoadConfig = EngineConfig & {
33
- dataProvider?: () => Promise<AssetData> | AssetData;
34
- settingsProvider?: () => Promise<AssetData> | AssetData;
76
+ export interface RsdkGameOption {
77
+ key: string;
78
+ label: string;
79
+ value: number;
80
+ type: 'boolean' | 'enum';
81
+ /** Choice labels, for `type: 'enum'` (item box sets). */
82
+ values?: string[];
83
+ }
84
+ /**
85
+ * The engine's Start Menu as data, so a host can render save-slot / character /
86
+ * game-option screens itself. Everything here mirrors what RSDKv4's own in-canvas menu
87
+ * does — see WebGame.cpp.
88
+ */
89
+ export interface RsdkGameBridge {
90
+ /** 1 = Sonic 1, 2 = Sonic 2, 0 = unrecognised pack. */
91
+ type(): number;
92
+ /** Playable characters from the pack's GameConfig, in engine order. */
93
+ players(): string[];
94
+ saveSlots(): RsdkSaveSlot[];
35
95
  /**
36
- * Per-game storage folder under /data used for OPFS/WASMFS files.
37
- * Examples: "sonic1", "sonic2", "my-pack/v1".
96
+ * Start a game the way the native menu would: a slot with data continues it, an
97
+ * empty slot starts a new game as `player`, and `slot: null` plays without saving.
98
+ * Resumes the engine if the SDK had it paused.
99
+ *
100
+ * This is the index-taking form. `play.restart({ slot, player })` is the same thing
101
+ * through the contract, with the character named rather than numbered.
38
102
  */
39
- storageNamespace?: string;
40
- };
41
- /** Boot the RSDKv4 engine. */
42
- export declare function load(config: Rsdkv4LoadConfig): Promise<Rsdkv4Instance>;
43
- declare const _default: {
44
- manifest: import("@wasm-gaming/engine-specs").EngineManifest;
45
- load: typeof load;
46
- };
47
- export default _default;
103
+ start(slot: number | null, player?: number): void;
104
+ /** Wipe a slot back to "NEW GAME". */
105
+ deleteSave(slot: number): void;
106
+ options(): RsdkGameOption[];
107
+ /** Set an option; written through to the engine and its save file, as the engine does. */
108
+ setOption(key: string, value: number): void;
109
+ }
110
+ /**
111
+ * Input ownership, named — the same thing as `options({ buttons })` and
112
+ * `options({ buttons: null })`, for a host that would rather say what it means.
113
+ *
114
+ * See {@link Rsdkv4Options.buttons} for what a claim costs the host: keyup on focus
115
+ * loss, the gamepad, and remembering to release.
116
+ */
117
+ export interface RsdkInputBridge {
118
+ /**
119
+ * Take input over. The object is kept by reference and read once per tick — write
120
+ * to it, do not replace it.
121
+ *
122
+ * All fourteen keys of {@link Rsdkv4Buttons} must be present and nothing else may
123
+ * be: a missing key would read `false` for ever, and a misspelled one would be
124
+ * written to and never read. Both throw here instead.
125
+ */
126
+ claim(buttons: Rsdkv4Buttons): PromisePlay<Rsdkv4Payloads>;
127
+ /** Hand input back; the engine polls SDL again from the next tick. */
128
+ release(): PromisePlay<Rsdkv4Payloads>;
129
+ /** Whether a claim is held. The `options()` descriptor deliberately will not say. */
130
+ readonly claimed: boolean;
131
+ }
132
+ /**
133
+ * What `start()` and `restart()` hand back: the contract's chainable promise, narrowed
134
+ * so that awaiting it gives this engine's {@link Rsdkv4Play} rather than the contract's
135
+ * `EnginePlay` — which is what puts {@link Rsdkv4Play.game} within reach without a cast.
136
+ *
137
+ * Chaining (`.mount(…)`, `.options(…)`) returns the contract's own `PromisePlay`, so
138
+ * put the `await` at the end of the chain to keep the narrowing.
139
+ */
140
+ export interface Rsdkv4Session extends PromisePlay<Rsdkv4Payloads> {
141
+ then<TResult1 = Rsdkv4Play, TResult2 = never>(onfulfilled?: ((value: Rsdkv4Play) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
142
+ }
143
+ /**
144
+ * The running engine.
145
+ *
146
+ * Most of it is the contract's, inherited: the four getter/setter pairs, the cumulative
147
+ * merge, the chainable promise, the event channel, and `destroy()`. What this class
148
+ * adds is the four hooks the base leaves to an engine — {@link open}, {@link close},
149
+ * {@link mounted}, {@link patched} — plus the members below, which have no contract
150
+ * equivalent and exist because RSDKv4 has a start menu worth drawing from HTML.
151
+ */
152
+ export declare class Rsdkv4Play extends EnginePlayBase<Rsdkv4Payloads> {
153
+ #private;
154
+ constructor(init?: EngineInit<Rsdkv4Payloads>, events?: EventEmitter<Rsdkv4Events_>);
155
+ /**
156
+ * Open or reopen a session. The first call brings the wasm up; every call after that
157
+ * reuses it, because RSDKv4 cannot power-cycle in process and does not need to — a
158
+ * session is a save slot, a character and a stage, and all three are reachable on a
159
+ * running engine.
160
+ */
161
+ protected open(options: Rsdkv4Options): Promise<void>;
162
+ /**
163
+ * Stop and release. The base emits `exit` once this resolves.
164
+ *
165
+ * There is no coming back: RSDKv4 cannot be restarted in process, so a later
166
+ * `start()` on the same factory reports that rather than quietly doing nothing.
167
+ */
168
+ protected close(): Promise<void>;
169
+ /**
170
+ * Where the picture goes. Called by the base before the first `open()`, which is what
171
+ * guarantees the canvas exists before Emscripten's SDL2 port goes looking for it.
172
+ *
173
+ * Hand over a `<canvas>` and it is used as-is, untouched apart from the id SDL needs;
174
+ * hand over any other element and the SDK creates a canvas inside it and keeps it
175
+ * scaled to fit. Reparenting a live engine is legal — the same canvas moves.
176
+ */
177
+ protected mounted(target: HTMLElement): Promise<void>;
178
+ /**
179
+ * A payload changed on a running engine. Only the GAME OPTIONS rows are `live` here —
180
+ * `config` is `settings.ini`, read once at boot, and `player`/`slot`/`stage` are what
181
+ * a `restart()` is for.
182
+ */
183
+ protected patched(kind: PayloadKind, patch: object): Promise<void>;
184
+ /**
185
+ * The session's descriptors, enriched with what only a loaded pack can say: the
186
+ * playable characters, the stage list, and the engine's own GAME OPTIONS rows.
187
+ *
188
+ * The base builds descriptors from a spec fixed at construction, which is right for
189
+ * every other payload and cannot work for this one — Sonic 1 and Sonic 2 do not offer
190
+ * the same characters or the same options, and neither is knowable before
191
+ * `Data.rsdk` is read. Before the engine is up this answers the static spec, which is
192
+ * still enough for a host to know the keys exist.
193
+ */
194
+ options(): Promise<PropertiesDefinition<Rsdkv4Options>>;
195
+ options(patch: Partial<Rsdkv4Options>): PromisePlay<Rsdkv4Payloads>;
196
+ restart(options?: Partial<Rsdkv4Options>): Rsdkv4Session;
197
+ /**
198
+ * Pause, on behalf of `owner`. The first caller to pause owns it and only that
199
+ * owner's `resume()` lifts it, so a pause overlay cannot resume a game a start
200
+ * screen — or the host — had already frozen. Audio stops with the engine.
201
+ *
202
+ * Emits the contract's `pause` event, whose detail carries the owner.
203
+ */
204
+ pause(owner?: string): void;
205
+ resume(owner?: string): void;
206
+ /** Who is holding the engine paused, or null. */
207
+ get pausedBy(): string | null;
208
+ /** True when the working dir is OPFS-backed rather than in-memory. */
209
+ get persistent(): boolean;
210
+ /** The normalised {@link Rsdkv4Storage.namespace} this session actually used. */
211
+ get namespace(): string;
212
+ /**
213
+ * Input ownership, named. `play.input.claim(buttons)` and `play.input.release()`
214
+ * are exactly `options({ buttons })` and `options({ buttons: null })` — same state,
215
+ * same survival across `restart()`, same everything.
216
+ */
217
+ get input(): RsdkInputBridge;
218
+ /** RSDKv4's Start Menu as data. Available once the engine is up. */
219
+ get game(): RsdkGameBridge;
220
+ /** The engine's stage list and loader. Available once the engine is up. */
221
+ get devMenu(): RsdkDevMenuBridge;
222
+ }
223
+ /**
224
+ * The factory a host imports: identity on the constructor, one live engine per
225
+ * instance, and a `start()` that brings the wasm up and opens a session.
226
+ *
227
+ * Everything on it is the contract's — see the module doc for the shape of a call.
228
+ */
229
+ export declare class Rsdkv4SDK extends EngineSDKBase<Rsdkv4Payloads> {
230
+ static readonly id = "rsdkv4";
231
+ /** Kept in step with package.json by `node scripts/sync-version.mjs`. */
232
+ static readonly version = "0.2.0";
233
+ static readonly name = "Retro Software Development Kit v4";
234
+ static readonly description = "RSDKv4 compiled to WebAssembly via Emscripten. One game-agnostic WASM binary runs both Sonic 1 and Sonic 2 \u2014 the difference is only which Data.rsdk the host supplies at runtime. Ships none of the game: the player provides their own Data.rsdk, and it never leaves their browser.";
235
+ protected createPlay(init: EngineInit<Rsdkv4Payloads>, events: EventEmitter<Rsdkv4Events_>): Rsdkv4Play;
236
+ start(options?: Partial<Rsdkv4Options>): Rsdkv4Session;
237
+ }
238
+ /**
239
+ * The line that puts the contract in CI: if this file stops satisfying
240
+ * `EngineSDKConstructor`, `make typecheck` says so.
241
+ */
242
+ export declare const RSDKV4_ENGINE: EngineSDKConstructor<Rsdkv4Payloads>;
243
+ export default Rsdkv4SDK;
48
244
  //# sourceMappingURL=rsdkv4.sdk.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rsdkv4.sdk.d.ts","sourceRoot":"","sources":["../../src/rsdkv4.sdk.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACzF,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGhD,OAAO,EAAE,QAAQ,EAAE,CAAC;AA+GpB,uEAAuE;AACvE,MAAM,WAAW,iBAAiB;IAChC,YAAY,IAAI,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,KAAK,CAAC;YAAE,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KAAE,CAAC,CAAC;IACzE,SAAS,CAAC,WA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