BizhawkTCPConnector ​
Implements several IConsoleConnector types with the Crowd Control BizHawk external tool plugin (CrowdControl.Bizhawk.dll), replacing the legacy Lua connector script.
Kind: Class
Namespace: ConnectorLib
Inheritance: ConsoleBase → I16BitConnector → I32BitConnector → I64BitConnector → I8BitConnector → IAddressableConnector → IConsoleConnector → IDisposable → IDomainMappableConnector → IDomainMappableConnector\<BizhawkTCPConnector\> → IFreezableConnector → IGBAConnector → IGBConnector → IGameConnector → IGameGearConnector → IGenesisConnector → IN64Connector → INESConnector → INESProConnector → IPS1Connector → IROMProcessor → ISNESConnector
Public Constructors
Public Member Functions
Task
Task
bool
bool
bool
bool
bool
bool
bool
bool
bool
bool
bool
bool
bool
bool
bool
bool
bool
bool
bool
bool
bool
bool
bool
bool
bool
bool
bool
bool
Removes all freezes registered in the plugin.
bool
bool
bool
bool
bool
bool
bool
bool
void
Sends a keepalive while connected; otherwise attempts to reconnect (e.g. after the plugin window was closed and reopened in EmuHawk).
string
string
bool
bool
bool
bool
bool
bool
bool
bool
bool
bool
bool
Pushes the current state onto the plugin-side state stack.
bool
Pops and loads the top of the plugin-side state stack.
bool
Forces the BizHawk Shuffler to swap games. Requires the Crowd Control shuffler plugin (crowdcontrol.lua) to be enabled in the shuffler session; without it (or with no shuffler running) this is a harmless no-op.
bool
Stores a number in BizHawk's userdata bag (readable by Lua scripts via userdata.get).
bool
Stores a number in BizHawk's userdata bag (readable by Lua scripts via userdata.get).
string
Reads a value from BizHawk's userdata bag as a string. Returns null if the key is absent or the request failed/timed out.
bool
Pauses emulation.
bool
Unpauses emulation.
int
Registers a plugin-side memory watch. The plugin checks the address every frame and pushes a ConnectorLib.BizhawkTCPConnector.MemoryCallbackTriggered event when it triggers, removing the need to poll game state over the connection.
bool
Removes a plugin-side memory watch created by ConnectorLib.BizhawkTCPConnector.AddMemoryCallback(ConnectorLib.CommandType,System.UInt64,System.Byte,System.String,System.UInt64).
bool
Applies multiple writes atomically within a single emulated frame.
bool
Starts a complex effect with a known duration so the plugin can display a countdown.
bool
bool
Starts a complex effect with a known duration so the plugin can display a countdown.
bool
Starts a complex effect with a known duration so the plugin can display a countdown.
bool
DomainMappedConnector
Public Attributes
string
DEFAULT_HOST
The default host on which the BizHawk plugin listens.
int
DEFAULT_PORT
The default port (0xCC02) of the BizHawk plugin TCP service.
int
MIN_PLUGIN_MAJOR_VERSION
The minimum plugin major version this connector supports.
Properties
static
string
Host
[get, set]
The host to connect to. Change before connecting if BizHawk is configured differently.
static
int
Port
[get, set]
The port to connect to. Change before connecting if BizHawk is configured differently.
static
int
CommandResponseTimeoutMS
[get, set]
Allows globally configuring the default timeout before responses from the plugin will be considered lost/never arriving. Defaults to 1000ms.
Endianness
Endianness
[get, ]
PointerFormat
PointerFormat
[get, ]
IFeatureAware
Features
[get, ]
PointerFormat
RelativePointerFormat
[get, ]
IMemoryMapper
Mapper
[, set]
bool
Connected
[get, ]
string
CurrentSystem
[get, ]
The system id of the currently-loaded game, or null if unknown.
string
CurrentGameName
[get, ]
The name of the currently-loaded game, or null if unknown.
string
CurrentGameHash
[get, ]
The hash of the currently-loaded game, or null if unknown.
Events
Action<string, string, string>
GameChanged
Fired whenever the game loaded in BizHawk changes (including via the BizHawk Shuffler or a manual ROM swap). Arguments are (system, romName, romHash). The hash is the stable identifier - use it to pause/restore per-game effect state when a game is swapped away and back.
Action<int, ulong, ulong>
MemoryCallbackTriggered
Fired when a plugin-side memory watch triggers. Arguments are (callbackId, newValue, oldValue). Values are byte-swapped for big-endian systems like normal reads.
Action<string>
ComplexEffectDone
Raised when the plugin reports that a one-shot complex effect (slide puzzle, Rubik's cube, melt, ...) finished on its own. The argument is the ConnectorLib.BizhawkTCPConnector.ComplexEffect name that was originally started.
Action
AllEffectsCleared
Raised when the user manually clears all effects in the plugin UI ("Clear stuck effects").
