require 'hsslib.pl';

# customization
$verbose = 1;
$voice = 1;

if ($verbose) {
	$hss'verbose = 1;
}

&hss'init('/dev/hss0');
if (&hss'testStart) {
	die "card not ready";
}
&hss'startSH;

print STDERR "downloading vcv file...\n" if ($verbose);
&hss'downloadVCV('ongen101.vcv');
print STDERR "ok\n" if ($verbose);

print STDERR "resetting\n" if ($verbose);
&hss'kisoku("S4P4U0V32X0\n");

if ($voice) {
	# download wo
	&hss'kisoku("\xc0\xde\xb3\xdd\xdb\xb5\xc4\xde\xb5/04.\n");
	# kanryo simasita.
	&hss'kisoku("\xb6\xdd\xd8\xae\xb5\xbc\xcf\xbc\xc0/03.\n");
}
print STDERR "done\n" if ($verbose);

exit 0;
