Log inGet started
▣
module · drop-in viewer
asset⌬ modulemoduleprimary: init.luau·originates fromworld 47b50fcd-5…

emuworker

Runs an emulator core off the engine thread, on the `jobs` worker pool, so a console station's emulation costs the frame nothing. One machine per worker key: `ConsoleStation` dispatches `boot` once with the cartridge bytes (and the BIOS) under a key of its own, then `step` whenev…

by◐Deata·posted 2d ago
What it does

emuworker

Runs an emulator core off the engine thread, on the jobs worker pool, so a console station's emulation costs the frame nothing. One machine per worker key: ConsoleStation dispatches boot once with the cartridge bytes (and the BIOS) under a key of its own, then step whenever the previous step settled, and releases the key when the cart comes out.

A core opts in by naming the require path of its spec as workerModule in its emulatorCore (the Neo Geo does); a core without it keeps running in the frame.

local key = "console:" .. stationId .. ":1"
jobs.dispatch("stations.emuworker", "boot", { core = "neogeo.neogeo_core", rom = romBytes, bios = biosBytes }, { key = key })
-- each tick once the last step settled (n = frames wall time owes, at most 5):
local p = jobs.dispatch("stations.emuworker", "step", { n = 2, p1 = padWord1, p2 = padWord2 }, { key = key })
-- p settles with { fb = buffer (RGBA, a copy), audio = buffer? (stereo f32), frames, n, ms } or { lost = true }
jobs.release(key)

Only the last frame of a step is drawn (drawControl cores); ms is the worker's time for the n frames.

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

conforms to

zero/source-extract/v2

strict

keyOf( ) → string

boot(args: any) → any

args = { core: string (require path of the core spec), rom: string, bios: string? }

argtypedescription
argsany

applyPads(spec: any, m: any, p1: number, p2: number) → void

argtypedescription
specany
many
p1number
p2number

step(args: any) → any

args = { n: number, p1: number, p2: number } -> { fb: buffer, audio: buffer?, frames: number, ms: number } (fb/audio copies)

argtypedescription
argsany

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported. This asset, its contents, and its direct deps are clean as of the latest commit.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ quality × 0.35
+ performance × 0.25
± compat factor

Usability ratings

Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.