Interface Emulator

interface Emulator {
    powerOffChangeEvent: Event<boolean>;
    isUiInitializedChangeEvent: Event<boolean>;
    audioInitializedEvent: Event<void>;
    timesliceEvent: Event<void>;
    hotsyncNameChangeEvent: Event<string>;
    gameModeChangeEvent: Event<boolean>;
    loadRom(rom, deviceId?): Emulator;
    loadSession(session): Emulator;
    insertCompressedCardImage(cardImage): Emulator;
    insertCardImage(cardImage): Emulator;
    ejectCard(): Emulator;
    isCardMounted(): boolean;
    setCanvas(canvas): Emulator;
    bindInput(keyboardTarget?): Emulator;
    releaseInput(): Emulator;
    installDatabase(file): Emulator;
    installAndLaunchDatabase(file): Emulator;
    installFromZipfile(file): Emulator;
    installFromZipfileAndLaunch(file, launchFile): Emulator;
    launchByName(name): Emulator;
    launchDatabase(database): Emulator;
    reset(): Emulator;
    resetNoExtensions(): Emulator;
    resetHard(): Emulator;
    isRunning(): boolean;
    isPowerOff(): boolean;
    isUiInitialized(): boolean;
    resume(): Emulator;
    pause(): Emulator;
    buttonDown(button): Emulator;
    buttonUp(button): Emulator;
    setSpeed(speed): Emulator;
    getSpeed(): number;
    setVolume(volume): Emulator;
    getVolume(): number;
    initializeAudio(): Promise<boolean>;
    isAudioInitialized(): boolean;
    setGameMode(gameModeActive): Emulator;
    isGameMode(): boolean;
    setGameModeHotkeyEnabled(enableGamemodeHotkey): Emulator;
    isGameModeHotkeyEnabled(): boolean;
    setGameModeIndicatorEnabled(gameModeIndicatorEnabled): Emulator;
    isGameModeIndicatorEnabled(): boolean;
    setOrientation(orientation): Emulator;
    getOrientation(): DeviceOrientation;
    setHotsyncName(hotsyncName): Emulator;
    getHotsyncName(): undefined | string;
    setRunHidden(toggle): Emulator;
    getRunHidden(): boolean;
    getStatistics(): EmulationStatistics;
    getSerialPortIR(): SerialPort;
    getSerialPortSerial(): SerialPort;
}

Properties

powerOffChangeEvent: Event<boolean>

Fires when the device turns on or off.

isUiInitializedChangeEvent: Event<boolean>

Fires when PalmOS resets or passed UI initialization during boot.

audioInitializedEvent: Event<void>

Fires when audio is initializd successfully.

timesliceEvent: Event<void>

Fires after each emulated timeslice (typicall 60 times per second)

hotsyncNameChangeEvent: Event<string>

Fires when the hotsync name changes. This does not happen immediatelly when setHotsyncName is called, but only when the OS is notified of the new name.

gameModeChangeEvent: Event<boolean>

Fires if game mode is enabled or disabled.

Methods

  • Receive input events from the specified sources. If this method is called multiple times the previous sources will be unbound.

    Parameters

    • Optional keyboardTarget: EventTarget

      Optional: target for keyboard events, default: window

    Returns Emulator

  • Extract all databases from a zip archive and install them, then attampt to launch the specified file.

    Parameters

    • file: Uint8Array

      The zip archive data.

    • launchFile: string

      The file name of the database that Cloudpilot will try to launch.

    Returns Emulator

  • Attempt to extract the name from a database and launch it.

    Parameters

    • database: Uint8Array

      Database data (only the first 32 bytes are required)

    Returns Emulator

  • Has the emulated device passed UI initialization (during boot)? This is required before software can be installed.

    Returns boolean

  • Initialize audio. This must be called from an event handler that was triggered by a user interaction, i.e. a click or a key press.

    Returns Promise<boolean>

  • Enable or disable shift-ctrl for toggling game mode (enabled by default).

    Parameters

    • enableGamemodeHotkey: boolean

      Desired state

    Returns Emulator

  • Enable or disable game mode indicator (overlays hard buttons if game mode is active)? Enabled by default.

    Parameters

    • gameModeIndicatorEnabled: boolean

      Desired state

    Returns Emulator

Generated using TypeDoc