Skip to content

sd2snesConnector ​

A connector for reading log files.

Kind: Class

Namespace: ConnectorLib.sd2snes

Inheritance: ConsoleBase → I16BitConnector → I8BitConnector → IAddressableConnector → IConsoleConnector → IDisposable → IDomainMappableConnector → IGameConnector → IROMFileSystem → IROMProcessor → ISNESConnector

Public Constructors

sd2snesConnector()

Creates a new instance of the ConnectorLib.sd2snes.sd2snesConnector class.

sd2snesConnector(Action messageHandler, bool showConsole = false)

Creates a new instance of the ConnectorLib.sd2snes.sd2snesConnector class.

Public Member Functions

virtual override

Task>

Connect()

virtual override

Task

Disconnect(string message)

virtual override

void

KeepAlive()

bool

Read(ulong address, Span buffer)

virtual override

bool

Read(ulong address, Span buffer, int offset, int length)

bool

Read(ulong address, byte[] buffer)

bool

Read(ulong address, byte[] buffer, int offset, int length)

virtual override

IBatchWriteContext

OpenBatchWriteContext()

bool

Write(ulong address, ReadOnlySpan buffer)

virtual override

bool

Write(ulong address, ReadOnlySpan buffer, int offset, int length)

bool

Write(ulong address, byte[] buffer)

bool

Write(ulong address, byte[] buffer, int offset, int length)

bool

Write(MappedMemory memory, byte[] buffer, int offset, int length)

bool

FreezeU8(ulong address, byte value, byte cmpValue, CompareType cmpType)

bool

FreezeU16(ulong address, ushort value, ushort cmpValue, CompareType cmpType)

bool

FreezeU8TU8(ulong address, byte value, byte cmpValue, CompareType cmpType)

bool

FreezeU8TU16(ulong address, byte value, ushort cmpValue, CompareType cmpType)

bool

FreezeU16TU8(ulong address, ushort value, byte cmpValue, CompareType cmpType)

bool

FreezeU16TU16(ulong address, ushort value, ushort cmpValue, CompareType cmpType)

bool

FreezeU8TU8(ulong address, byte value, ulong cmpAddress, byte cmpValue, CompareType cmpType)

bool

FreezeU8TU16(ulong address, byte value, ulong cmpAddress, ushort cmpValue, CompareType cmpType)

bool

FreezeU16TU8(ulong address, ushort value, ulong cmpAddress, byte cmpValue, CompareType cmpType)

bool

FreezeU16TU16(ulong address, ushort value, ulong cmpAddress, ushort cmpValue, CompareType cmpType)

bool

FreezeU8(ulong address, byte value)

bool

FreezeU16(ulong address, ushort value)

virtual override

bool

Freeze(ulong address, ulong value, byte size, WriteType writeType, ulong cmpAddress, ulong cmpValue, byte cmpSize, CompareType cmpType)

virtual override

bool

Freeze(ulong address, ulong value, ulong mask, byte size, WriteType writeType, ulong cmpAddress, ulong cmpValue, byte cmpSize, CompareType cmpType)

virtual override

bool

Unfreeze(ulong address)

virtual override

string

GetROMPath()

bool

MakeDir(string remotePath)

bool

FileExists(string remotePath)

bool

Remove(string remotePath)

bool

Rename(string remoteSource, string remoteDest)

bool

BootROM(string remotePath)

bool

Info(sd2snesInfo out info)

bool

List(string remotePath, ValueTuple[] out files)

bool

GetFile(string remotePath, byte[] out data)

bool

PutFile(string remotePath, byte[] data)

bool

PutFile(string remotePath, string localPath)

virtual override

bool

OpenROM(string localPath)

virtual override

bool

CloseROM()

virtual override

bool

PatchROM(IROMPatch patch)

virtual override

bool

PatchROM(byte[] data)

virtual override

bool

ResetConsole()

IBatchContext8

GetBatchContext8()

IBatchContext16

GetBatchContext16()

byte?

ReadByte(ulong address)

byte?

ReadByte(uint address)

bool

ReadByte(ulong address, byte out value)

bool

ReadByte(ulong address, string domain, byte out value)

ushort?

ReadWord(ulong address)

Reads an unsigned 16-bit value from the game system.

bool

ReadWord(ulong address, ushort out value)

Reads an unsigned 16-bit value from the game system.

virtual override

bool

SendMessage(string message)

bool

SetBits(ulong address, byte value, byte out oldVal)

virtual override

bool

SetBits(ulong address, string domain, byte value, byte out oldVal)

bool

UnsetBits(ulong address, byte value, byte out oldVal)

virtual override

bool

UnsetBits(ulong address, string domain, byte value, byte out oldVal)

bool

CompareSwap(ulong address, byte test, byte value, byte out oldValue)

bool

WriteByte(ulong address, byte value)

bool

WriteByte(ulong address, string domain, byte value)

bool

WriteWord(ulong address, ushort value)

virtual override

bool

Read(ulong address, string domain, Span buffer, int offset, int length)

virtual override

bool

Write(ulong address, string domain, ReadOnlySpan buffer, int offset, int length)

virtual override

bool

Freeze(ulong address, string domain, ulong value, byte size, WriteType writeType, ulong cmpAddress, ulong cmpValue, byte cmpSize, CompareType cmpType)

virtual override

bool

Freeze(ulong address, string domain, ulong value, ulong mask, byte size, WriteType writeType, ulong cmpAddress, ulong cmpValue, byte cmpSize, CompareType cmpType)

virtual override

bool

Unfreeze(ulong address, string domain)

Public Static Functions

bool

MapAddressInRange(uint address, uint srcRangeBegin, uint srcRangeEnd, uint destRangeBegin, uint out mappedAddress)

Maps an address from one range to another, returning true if the address was within the source range.

uint

TranslateAddress(uint address, TranslationMode mode)

Translates an address from the SNES address space to the sd2snes address space.

Properties

Endianness

Endianness

[get, ]

PointerFormat

PointerFormat

[get, ]

static

string

Usb2SnesApplicationName

[get, set]

Allow for overriding the application name displayed in the e.g. legacy Usb2Snes host app. While this is not visible when using the CrowdControl SD2SNES service, it is recommended for custom applications to set this, so that they can be properly distinguished in any applicable user-facing UI from the CrowdControl app.

SNESMapper

Mapper

[get, ]

bool

Connected

[get, ]

uint

FreezeAddress

[get, set]

Gets or sets the address where freeze table is stored.

int

FreezeSlotCount

[get, set]

Gets or sets the maximum number of freeze slots available.