OptionalautoOptionalgameLast loaded ROM path set after loadGame succeeds.
OptionalsaveSave path used for the current game set after loadGame succeeds.
Registers core callbacks for emulator lifecycle and custom events.
Callback object to register.
Attempts to automatically load cheats for the currently loaded game.
True if cheats were loaded successfully, otherwise false.
Binds a physical key (SDL key name) to a GBA input action.
SDL key name (ex. "Return", "Left", "Keypad X").
GBA input/action (ex. "A", "B", "Start", "Up").
Presses a named emulated button.
Button name to press (ex. "A", "B", "Start", "Select", "Up").
Releases (unpress) a named emulated button.
Button name to release (ex. "A", "B", "Start", "Select", "Up").
Returns common filesystem path strings used by this build.
Forces an auto save state capture immediately.
True if the auto save state was captured successfully, otherwise false.
Initializes the Emscripten filesystem and any runtime FS mounts needed by the emulator.
Synchronizes filesystem state to the backing store (IDBFS).
Reads the current auto save state from the filesystem (if present).
The auto save state name and bytes, or null if none exists.
Gets the current fast forward multiplier.
multiplier = 1 = normal speedmultiplier > 1 = fast forward (xN)multiplier < 0 = slow down (1/abs(N))Current fast forward multiplier.
Gets the current main loop timing mode.
Current timing mode value.
Gets the current main loop timing value for the current mode.
Current timing value.
Reads the currently loaded game save data.
Save data as bytes, or null if no save exists.
Gets the current audio volume multiplier.
1.0 = 100%0.0..2.0 (0%..200%)Current volume multiplier.
Gets the current local linked session status, contains the active player and whether a local link is currently running.
Selects which linked player is rendered and controlled by normal input APIs.
Starts a local linked GBA session, currently supports two players.
Stops the active local linked session, tears down the local link and running games.
Lists ROM file names under the game directory.
Directory entries from filePaths().gamePath.
Lists save file names under the save directory.
Directory entries from filePaths().savePath.
Loads the current auto save state (if present).
True if the auto save state loaded successfully, otherwise false.
Loads a rom into the emulator and runs the game, optionally overriding the save path used.
Path to the rom file within the emulated filesystem.
OptionalsavePathOverride: string
Optional override for the save path.
True if the game loaded successfully, otherwise false.
Loads a save state from a given slot.
State slot index.
True if the state loaded successfully, otherwise false.
Loads a save state from a given slot using explicit binary literal flags.
State slot index.
Optionalflags: number
Bitmask controlling which save state sections are restored.
True if the state loaded successfully, otherwise false.
Pauses audio output without pausing emulation.
Pauses the game emulation.
Performs a quick reload of the current ROM file.
Quits the currently running game session.
Exits the emulator runtime.
Resumes audio output.
Resumes game emulation and audio.
Saves a save state to a given slot.
State slot index.
True if the state saved successfully, otherwise false.
Saves a save state to a given slot using explicit binary literal flags.
State slot index.
Optionalflags: number
Bitmask controlling which save state sections are written.
True if the state saved successfully, otherwise false.
Captures a screenshot and writes it to the screenshots directory.
OptionalfileName: string
Optional custom screenshot file name.
True if screenshot was captured successfully, otherwise false.
Applies core settings to the emulator runtime.
Settings object to apply.
Sets the current fast forward multiplier.
multiplier = 1 = normal speedmultiplier > 1 = fast forward (xN)multiplier < 0 = slow down (1/abs(N))The fast forward multiplier to apply.
Registers a callback for mGBA core log output.
Use this to capture emulator logs in your application UI, such as a log panel, instead of relying on browser console output alone.
Passing null removes the custom logger and restores default console
logging.
Log handler, or null to clear it.
Sets the main loop timing mode and value.
Timing mode identifier.
Timing value associated with the mode.
Sets the audio volume multiplier.
1.0 = 100%0.0..2.0 (0%..200%)Volume multiplier to apply.
Enables or disables keyboard input handling.
If true input is accepted, if false input is ignored.
Enables/disables active rewinding while the core is running.
If true the core rewinds, if false rewind stops.
Uploads auto save state data into the emulator filesystem.
Full auto save path to write to.
Raw auto save state bytes.
Uploads a cheats file into the emulator filesystem.
Cheats file to upload.
Optionalcallback: () => void
Optional callback fired after upload completes.
Uploads a patch file into the emulator filesystem.
Patch file to upload.
Optionalcallback: () => void
Optional callback fired after upload completes.
Uploads a ROM file into the emulator filesystem.
ROM file to upload.
Optionalcallback: () => void
Optional callback fired after upload completes.
Uploads a save or save state file into the emulator filesystem.
Save or state file to upload.
Optionalcallback: () => void
Optional callback fired after upload completes.
Uploads a screenshot file into the emulator filesystem.
Screenshot file to upload.
Optionalcallback: () => void
Optional callback fired after upload completes.
Auto save state path and file name used for the current game set after
loadGamesucceeds.