I don’t remember off-hand if there are issues with the AMFV copy protection table in the Lost Treasures manual. I definitely saw one in the Starcross manual though, where the Lost Treasures list Theta for UM08 as 110 instead of 210. (It’s also missing the coordinates for Mars, which you don’t really need.)
I guess the safest way to recreate the AMFV copy protection table would be to use the code in the SECURITY-CHECK
routine as reference. Here’s a quick-and-dirty (and not well tested) conversion to C. Making it format the result nicely is left as an exercise for the reader:
#include <stdio.h>
int main() {
const char *colors[] = {
"WHITE", "DARK GREEN", "DARK BLUE", "PINK",
"ORANGE", "PURPLE", "TAN", "AQUA",
"LIGHT BLUE", "LIGHT GREEN", "LIGHT GRAY", "YELLOW",
"BLACK", "DARK GRAY", "BROWN", "RED"
};
const int outer_numbers[] = {
12, 66, 73, 36, 90, 41, 19, 48, 62, 92, 55, 23, 84, 99, 57, 20,
78, 67, 51, 88, 17, 31, 70, 39, 96, 25, 81, 83, 47, 54, 13, 43
};
const int inner_numbers[] = {
89, 61, 50, 18, 29, 82, 46, 77, 27, 68, 22, 95, 40, 58, 15, 86,
28, 33, 94, 11, 64, 98, 34, 49, 60, 16, 85, 52, 37, 53, 93, 91
};
int i, j;
for (i = 0; i < sizeof(colors) / sizeof(colors[0]); i++) {
for (j = 0; j < sizeof(inner_numbers) / sizeof(inner_numbers[0]); j++) {
printf("%-15s %d -> %d\n",
colors[i],
inner_numbers[j],
outer_numbers[(2 * i + j) % 32]);
}
}
return 0;
}