@gameslate/sdk 0.3.9 → 0.3.10

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gameslate/sdk",
3
- "version": "0.3.9",
3
+ "version": "0.3.10",
4
4
  "description": "Build plugins for GameSlate, the second-screen companion for PC games: the plugin contract, game-state and catalogue schemas, and the plugin builder.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -124,6 +124,11 @@ Mario Kart 64's verified addresses):
124
124
  }
125
125
  ```
126
126
 
127
+ It prints the table unless given `--out`, and it fails on any `${VAR}` in the spec that isn't
128
+ set (`CLANG_INCLUDE` is `$(clang-18 -print-resource-dir)/include`). Some decomps keep a symbol
129
+ only in the linker script, which the `.map` reader skips (F-Zero X's `gRacers`): find it in the
130
+ splat `symbol_addrs*.txt`, and confirm its size against the struct times the count.
131
+
127
132
  A decomp that generates headers at build time (Paper Mario's `item_enum.h`) needn't be built:
128
133
  list them in `"stubHeaders"` and the probe gets empty ones (a layout that really needs one still
129
134
  fails to compile). Constants come back signed.
@@ -272,6 +277,22 @@ plugin exactly as the core will before running it. Then bump `version`, tag `vX.
272
277
 
273
278
  ## Pitfalls seen in real plugins
274
279
 
280
+ **Add to this list as you go.** When a review, a route or a live run catches something a future
281
+ game could repeat, add it here (in `@gameslate/sdk`'s `template/claude/skills`, then copy it into
282
+ the plugin repos) in the same change as the fix. The next game should not have to find it again.
283
+
284
+ - **"Racing" is more than one state.** Wave Race 64 runs the race in its race state, then in five
285
+ more after the finish line, a retire or a quit, until the results (0x29-0x2D): reading only the
286
+ named race state dropped the final place as it was decided. Find the function that dispatches
287
+ on the game state and list every state it runs as the race.
288
+ - **Player arrays hold more than players.** Mario Kart 64's time-trial ghosts are human-flagged
289
+ karts with one extra bit (`PLAYER_INVISIBLE_OR_BOMB`), and a replay puts a ghost in slot 0.
290
+ Read every function that spawns into the array before deciding which slots are rivals, ghosts
291
+ or people.
292
+ - **CI must run the real check.** On a runner without the `packageManager` pin, `yarn` is Yarn 1
293
+ and plain `yarn check` is its built-in lockfile check: CI stayed green while running no tests.
294
+ Pin `packageManager` and run `yarn run check`.
295
+
275
296
  - **Texture packs:** a port's HD packs (`mods/*.o2r`) replace textures. Read them the way the game
276
297
  does: packs first, in name order, each preferring its `alt/` asset, then the base archive.
277
298
  Otherwise you overwrite HD output with vanilla.
@@ -39,7 +39,14 @@ The steps:
39
39
  two contexts 0x30 bytes apart that sit just before them, each holding a framebuffer pointer.
40
40
  Grabbing an emulator's window can come back black (WSLg, GPU surfaces).
41
41
  4. **Press buttons:** XTEST key events into the emulator's window (Gopher64 maps Start to Return,
42
- A to Left Shift, B to Left Ctrl, Z to `z`, the stick to the arrows).
42
+ A to Left Shift, B to Left Ctrl, Z to `z`, the stick to the arrows). Those need the window to
43
+ have the keyboard, which an unattended WSLg run never gets. **RetroArch needs no focus:** its
44
+ network RetroPad takes `pad:` keys (`gameslate drive press pad:START 120 pad:B 6000`). Start it
45
+ with an appended config holding `network_remote_enable = "true"`,
46
+ `network_remote_enable_user_p1 = "true"` and `pause_nonactive = "false"`, and write the
47
+ route's `press` steps as `pad:` keys. With mupen64plus-next, RetroPad **B is the N64's A**
48
+ (confirms menus in Mario Kart 64 and F-Zero X, accelerates in F-Zero X) and RetroPad A is the
49
+ N64's B.
43
50
  5. **Wait on state, not time:** after each input, read until the game state you expect appears
44
51
  (for example "game state = racing"), with a timeout.
45
52
 
@@ -51,8 +58,11 @@ Script the route per game as inputs plus checks, such as "Start until game state
51
58
  (`.eep`/`.sra`) work across emulators. A save state is the last resort: tied to one emulator
52
59
  version, and it needs a person to make it. Keep saves and states out of the repo: they're game
53
60
  data.
54
- - **RetroArch** can load a state at start (`-e <slot>`) and answers network commands, but its
55
- N64 core crashed on one dev machine. Check that it boots a game before relying on it.
61
+ - **RetroArch** can load a state at start (`-e <slot>`), answers network commands and takes the
62
+ network RetroPad. Its mupen64plus-next core crashed on one dev machine with one build and ran
63
+ for an hour with another (`stable-cores`): check that it boots a game first. Under it,
64
+ `drive frame` comes back black (the renderer doesn't write the frame to RDRAM) and so do its own
65
+ screenshots under WSL: take frames from Gopher64, or check values with `peek` instead.
56
66
  - **PC games:** a save file at that moment, loaded by hand. Then the tool only reads; leave
57
67
  `retroarch` out of the spec.
58
68