INNER CODE UNIT · TypeScript
romReady
mantou132/nesbox · packages/arcade/src/index.ts:87
const romReady = new Promise((res) => (resolve = res));
this.#fbneo =
this.#fbneo ||
(await init({
start: () => {
this.#fbneo!.cwrap('startMain', 'number', ['string'])(name);
},
locateFile: (path, prefix) => {
if (path === 'fbneo-arcade.wasm') return wasmURL;
return prefix + path;
},
setRomProps: (w, h, rotateGame, _flipped, vidImageDepth, _nBurnFPS, _aspectX, _aspectY) => {
this.#width = w;
this.#height = h;
this.#rotate = !!rotateGame;
this.#vidBits = vidImageDepth;
resolve(null);
},