Package client.teavm
package client.teavm
TeaVM-specific integration layer for JSIDPlay2.
This package provides the glue code between the Java-side emulator logic and the JavaScript environment generated by TeaVM. It contains classes responsible for:
- Bridging between Java and JavaScript using
@JSBodyand@Importannotations. - Managing WebAssembly and JavaScript interoperability (e.g., transferring audio and video buffers to the browser runtime).
- Implementing browser-specific functionality like WebAudio sample conversion, pixel buffer handling, and asynchronous communication with the main thread or Web Workers.
The goal of this package is to isolate all browser- and TeaVM-dependent code so that the rest of the emulator remains platform-agnostic and testable in a pure Java environment.
Structure
ImportedApi— ImplementsIImportedApiand bridges emulator events (samples, frames, printer output, etc.) to JavaScript functions.AudioDriverTeaVM— Audio output implementation optimized for TeaVM with audio buffers.PALEmulationTeaVM— Video output implementation optimized for TeaVM with RGBA pixel buffers.client.teavm.common— Shared classes and interfaces used by both the TeaVM JavaScript and WebAssembly builds.
- Autor:
- Ken Händel
-
KlassenKlasseBeschreibungTeaVM JavaScript Interop (JSO)-based implementation of
IImportedApi.SharedArrayBuffer (SAB)-based implementation ofImportedApi.Control buffer contents: One Integer per buffer: sampleBuffer + frameBuffer + MAX_OSCILLOSCOPE_SIDS * gaugeBuffer + whatssidBufferWAV file implementation ofIImportedApi.The main entry point for the TeaVM-based implementation of JSIDPlay2, designed to generate JavaScript and WebAssembly (WASM) code.The main entry point for the TeaVM-based implementation of JSIDPlay2, designed to generate C code.Utility entry point for the TeaVM-based implementation of JSIDPlay2, designed to generate standalone JavaScript code for auxiliary functions.