#!/bin/bash
. "`dirname $0`/bootscriptfunctions.sh"

if [ "$#" != 3 ]
then
	echo "usage: $0 <terminal type> <host> <port>" >&2
	exit 1
fi

cd "$OSM_ROOT/utils/mame_terminals/$1" || panic "terminal directory for $1 not found"

_DEFAULT_MAME_VERSION="0.288"
_DEFAULT_MAME_DRIVER="$1"
_MAME_ALLOW_UNEVEN_STRETCH=1
host="$2"
port="$3"

source_emulator_functions mame-auto -rs232 null_modem -bitb "socket.$host:$port"
