reg2VREG
561 Bytes
#!/usr/sbin/perl
#
$cnt = 0;
$reg_val = ();
while (<>) {
chop;
split;
if ($_[1] ne "") { $reg_val[$cnt++] = $_[1]; }
if ($_[2] ne "") { $reg_val[$cnt++] = $_[2]; }
if ($_[3] ne "") { $reg_val[$cnt++] = $_[3]; }
if ($_[4] ne "") { $reg_val[$cnt++] = $_[4]; }
}
if ($cnt != 128) {
die "Inssufficient VU reg initial values";
}
for ($i=0; $i<32; $i++) {
printf "@%2.2X %8.8lX_%8.8lX_%8.8lX_%8.8lX //VR%d\n",$i,hex($reg_val[($i*4) ]),
hex($reg_val[($i*4)+1]),
hex($reg_val[($i*4)+2]),
hex($reg_val[($i*4)+3]),$i;
}