@emu198x/zx-spectrum 0.4.1 → 0.4.3

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/README.md CHANGED
@@ -47,6 +47,7 @@ the browser will blur the pixels.
47
47
  | `tick(elapsedMs)` | Run elapsed real time and draw. Returns frames run. |
48
48
  | `loadSnapshot(bytes, format)` | Load a `.sna` or `.z80` snapshot. |
49
49
  | `load(slot, kind, bytes)` | Load media — for example a tape into `tape-1`. |
50
+ | `autoload(maxBootFrames)` | Load the tape in `tape-1`: type `LOAD ""` and press play. A machine that has already run is reset first; the tape stays in. |
50
51
  | `keyDown(code)` / `keyUp(code)` | Feed a DOM `KeyboardEvent.code`. |
51
52
  | `setAudioEnabled(on)` | Start or stop audio. |
52
53
  | `configureAudio(rate, channels, capacity)` | Match the page's `AudioContext`. |
@@ -27,6 +27,9 @@ export class Spectrum {
27
27
  * the editor prompt to be repainted before it is read, and for the 128K
28
28
  * family's loader to be listening before the tape rolls.
29
29
  *
30
+ * A machine that has already run is reset first, keeping the tape, so
31
+ * choosing a tape works however the machine has been used (#1569).
32
+ *
30
33
  * Returns the number of frames spent waiting for boot. Load a tape first.
31
34
  *
32
35
  * # Errors
@@ -43,7 +46,7 @@ export class Spectrum {
43
46
  /**
44
47
  * Builds a 48K attached to `canvas`, from ROM bytes the page supplies.
45
48
  *
46
- * Async even though nothing here awaits: restoring the GPU path (#1436)
49
+ * Async even though nothing here awaits: adopting the GPU path (#1414)
47
50
  * needs an adapter, and acquiring one is async. Shipping this synchronous
48
51
  * would make that a breaking change for every consumer.
49
52
  *
@@ -325,8 +328,8 @@ export interface InitOutput {
325
328
  readonly spectrum_setAudioEnabled: (a: number, b: number) => void;
326
329
  readonly spectrum_step: (a: number) => [number, number];
327
330
  readonly spectrum_tick: (a: number, b: number) => [number, number, number];
328
- readonly wasm_bindgen_d6cb7d81ec28c0ae___convert__closures_____invoke___wasm_bindgen_d6cb7d81ec28c0ae___JsValue__core_f0fd674eaa06beef___result__Result_____wasm_bindgen_d6cb7d81ec28c0ae___JsError___true_: (a: number, b: number, c: any) => [number, number];
329
- readonly wasm_bindgen_d6cb7d81ec28c0ae___convert__closures_____invoke___js_sys_e5668971ffde892f___Function_fn_wasm_bindgen_d6cb7d81ec28c0ae___JsValue_____wasm_bindgen_d6cb7d81ec28c0ae___sys__Undefined___js_sys_e5668971ffde892f___Function_fn_wasm_bindgen_d6cb7d81ec28c0ae___JsValue_____wasm_bindgen_d6cb7d81ec28c0ae___sys__Undefined_______true_: (a: number, b: number, c: any, d: any) => void;
331
+ readonly wasm_bindgen_611755a19ba2f9de___convert__closures_____invoke___wasm_bindgen_611755a19ba2f9de___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_611755a19ba2f9de___JsError___true_: (a: number, b: number, c: any) => [number, number];
332
+ readonly wasm_bindgen_611755a19ba2f9de___convert__closures_____invoke___js_sys_45bc0768306d725e___Function_fn_wasm_bindgen_611755a19ba2f9de___JsValue_____wasm_bindgen_611755a19ba2f9de___sys__Undefined___js_sys_45bc0768306d725e___Function_fn_wasm_bindgen_611755a19ba2f9de___JsValue_____wasm_bindgen_611755a19ba2f9de___sys__Undefined_______true_: (a: number, b: number, c: any, d: any) => void;
330
333
  readonly __wbindgen_exn_store: (a: number) => void;
331
334
  readonly __externref_table_alloc: () => number;
332
335
  readonly __wbindgen_externrefs: WebAssembly.Table;
@@ -45,6 +45,9 @@ export class Spectrum {
45
45
  * the editor prompt to be repainted before it is read, and for the 128K
46
46
  * family's loader to be listening before the tape rolls.
47
47
  *
48
+ * A machine that has already run is reset first, keeping the tape, so
49
+ * choosing a tape works however the machine has been used (#1569).
50
+ *
48
51
  * Returns the number of frames spent waiting for boot. Load a tape first.
49
52
  *
50
53
  * # Errors
@@ -74,7 +77,7 @@ export class Spectrum {
74
77
  /**
75
78
  * Builds a 48K attached to `canvas`, from ROM bytes the page supplies.
76
79
  *
77
- * Async even though nothing here awaits: restoring the GPU path (#1436)
80
+ * Async even though nothing here awaits: adopting the GPU path (#1414)
78
81
  * needs an adapter, and acquiring one is async. Shipping this synchronous
79
82
  * would make that a breaking change for every consumer.
80
83
  *
@@ -639,7 +642,7 @@ function __wbg_get_imports() {
639
642
  const a = state0.a;
640
643
  state0.a = 0;
641
644
  try {
642
- return wasm_bindgen_d6cb7d81ec28c0ae___convert__closures_____invoke___js_sys_e5668971ffde892f___Function_fn_wasm_bindgen_d6cb7d81ec28c0ae___JsValue_____wasm_bindgen_d6cb7d81ec28c0ae___sys__Undefined___js_sys_e5668971ffde892f___Function_fn_wasm_bindgen_d6cb7d81ec28c0ae___JsValue_____wasm_bindgen_d6cb7d81ec28c0ae___sys__Undefined_______true_(a, state0.b, arg0, arg1);
645
+ return wasm_bindgen_611755a19ba2f9de___convert__closures_____invoke___js_sys_45bc0768306d725e___Function_fn_wasm_bindgen_611755a19ba2f9de___JsValue_____wasm_bindgen_611755a19ba2f9de___sys__Undefined___js_sys_45bc0768306d725e___Function_fn_wasm_bindgen_611755a19ba2f9de___JsValue_____wasm_bindgen_611755a19ba2f9de___sys__Undefined_______true_(a, state0.b, arg0, arg1);
643
646
  } finally {
644
647
  state0.a = a;
645
648
  }
@@ -703,8 +706,8 @@ function __wbg_get_imports() {
703
706
  return ret;
704
707
  },
705
708
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
706
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 30, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
707
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen_d6cb7d81ec28c0ae___convert__closures_____invoke___wasm_bindgen_d6cb7d81ec28c0ae___JsValue__core_f0fd674eaa06beef___result__Result_____wasm_bindgen_d6cb7d81ec28c0ae___JsError___true_);
709
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 29, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
710
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_611755a19ba2f9de___convert__closures_____invoke___wasm_bindgen_611755a19ba2f9de___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_611755a19ba2f9de___JsError___true_);
708
711
  return ret;
709
712
  },
710
713
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
@@ -728,15 +731,15 @@ function __wbg_get_imports() {
728
731
  };
729
732
  }
730
733
 
731
- function wasm_bindgen_d6cb7d81ec28c0ae___convert__closures_____invoke___wasm_bindgen_d6cb7d81ec28c0ae___JsValue__core_f0fd674eaa06beef___result__Result_____wasm_bindgen_d6cb7d81ec28c0ae___JsError___true_(arg0, arg1, arg2) {
732
- const ret = wasm.wasm_bindgen_d6cb7d81ec28c0ae___convert__closures_____invoke___wasm_bindgen_d6cb7d81ec28c0ae___JsValue__core_f0fd674eaa06beef___result__Result_____wasm_bindgen_d6cb7d81ec28c0ae___JsError___true_(arg0, arg1, arg2);
734
+ function wasm_bindgen_611755a19ba2f9de___convert__closures_____invoke___wasm_bindgen_611755a19ba2f9de___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_611755a19ba2f9de___JsError___true_(arg0, arg1, arg2) {
735
+ const ret = wasm.wasm_bindgen_611755a19ba2f9de___convert__closures_____invoke___wasm_bindgen_611755a19ba2f9de___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_611755a19ba2f9de___JsError___true_(arg0, arg1, arg2);
733
736
  if (ret[1]) {
734
737
  throw takeFromExternrefTable0(ret[0]);
735
738
  }
736
739
  }
737
740
 
738
- function wasm_bindgen_d6cb7d81ec28c0ae___convert__closures_____invoke___js_sys_e5668971ffde892f___Function_fn_wasm_bindgen_d6cb7d81ec28c0ae___JsValue_____wasm_bindgen_d6cb7d81ec28c0ae___sys__Undefined___js_sys_e5668971ffde892f___Function_fn_wasm_bindgen_d6cb7d81ec28c0ae___JsValue_____wasm_bindgen_d6cb7d81ec28c0ae___sys__Undefined_______true_(arg0, arg1, arg2, arg3) {
739
- wasm.wasm_bindgen_d6cb7d81ec28c0ae___convert__closures_____invoke___js_sys_e5668971ffde892f___Function_fn_wasm_bindgen_d6cb7d81ec28c0ae___JsValue_____wasm_bindgen_d6cb7d81ec28c0ae___sys__Undefined___js_sys_e5668971ffde892f___Function_fn_wasm_bindgen_d6cb7d81ec28c0ae___JsValue_____wasm_bindgen_d6cb7d81ec28c0ae___sys__Undefined_______true_(arg0, arg1, arg2, arg3);
741
+ function wasm_bindgen_611755a19ba2f9de___convert__closures_____invoke___js_sys_45bc0768306d725e___Function_fn_wasm_bindgen_611755a19ba2f9de___JsValue_____wasm_bindgen_611755a19ba2f9de___sys__Undefined___js_sys_45bc0768306d725e___Function_fn_wasm_bindgen_611755a19ba2f9de___JsValue_____wasm_bindgen_611755a19ba2f9de___sys__Undefined_______true_(arg0, arg1, arg2, arg3) {
742
+ wasm.wasm_bindgen_611755a19ba2f9de___convert__closures_____invoke___js_sys_45bc0768306d725e___Function_fn_wasm_bindgen_611755a19ba2f9de___JsValue_____wasm_bindgen_611755a19ba2f9de___sys__Undefined___js_sys_45bc0768306d725e___Function_fn_wasm_bindgen_611755a19ba2f9de___JsValue_____wasm_bindgen_611755a19ba2f9de___sys__Undefined_______true_(arg0, arg1, arg2, arg3);
740
743
  }
741
744
 
742
745
  const SpectrumFinalization = (typeof FinalizationRegistry === 'undefined')
Binary file
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@emu198x/zx-spectrum",
3
3
  "type": "module",
4
4
  "description": "ZX Spectrum in the browser, published to npm as @emu198x/zx-spectrum",
5
- "version": "0.4.1",
5
+ "version": "0.4.3",
6
6
  "license": "SEE LICENSE IN README.md",
7
7
  "repository": {
8
8
  "type": "git",