Wiki Home >> SIO-Command-$F0-Enable-UDPStream-Mode

SIO-Command-$F0-Enable-UDPStream-Mode


This is a command for Device $70 - The FujiNet Device itself (see SIO-Commands-for-Device-ID-$70).

Enable UDPStream Mode ($F0)

Description

Given a hostname or ip address (64 characters) and port as aux1 & 2, it will open a UDP port to the address and allow data streaming. This is used to enable MIDIMaze emulation on port 5004.

Parameters

DCBValue
DDEVIC$70
DUNIT$01
DCOMND$FB
DSTATS$80
DBUFPointer to a 64 byte buffer containing hostname or ip address, example below
DTIMLO$0F
DBYT64
DAUX1byte 1 of port
DAUX2byte 2 of port

Examples

C

/**
 * Enable UDP Stream on HOST / PORT
 */
void fuji_sio_enable_udpstream()
{
  char host[64];
  int port = 6502;
  strcat(host, "192.168.1.118");

  set_sio_defaults();
  OS.dcb.dcomnd = 0xF0; // Enable UDP Stream
  OS.dcb.dstats = 0x80; // Computer->Peripheral
  OS.dcb.dbuf = &host;
  OS.dcb.dbyt = sizeof(host);
  OS.dcb.daux = port;
  siov();
}

See Also


Wiki content is mirrored from the FujiNet Github Wiki