require 'hsslib.pl';

&hss'init('/dev/hss0');
if (&hss'testStart) {
	die "card not ready";
}
&hss'startSH;
print STDERR "teststart returns " . &hss'testStart . "\n";

print STDERR "downloading vcv file...\n";
&hss'downloadVCV('ongen100.vcv');
print STDERR "ok\n";
print STDERR "teststart returns " . &hss'testStart . "\n";

print STDERR "resetting\n";
&hss'kisoku("S4P4U0V32X0\n");
print STDERR "teststart returns " . &hss'testStart . "\n";

print STDERR "write voice 1\n";
&hss'kisoku("\xc0\xde\xb3\xdd\xdb\xb5\xc4\xde\xb5/04.\n");
print STDERR "teststart returns " . &hss'testStart . "\n";

print STDERR "write voice 2\n";
&hss'kisoku("\xb6\xdd\xd8\xae\xb5\xbc\xcf\xbc\xc0/03.\n");
print STDERR "teststart returns " . &hss'testStart . "\n";
print STDERR "done\n";

exit 0;
