/* Dump a shape table. Trying to debug a weird problem. */ #include #include #include static char name[8][5]={ "NUP", /* 0 */ "NRT", /* 1 */ "NDN", /* 2 */ "NLT", /* 3 */ "UP", /* 4 */ "RT", /* 5 */ "DN", /* 6 */ "LT" /* 7 */ }; int main(int argc, char **argv) { int ch,i; int h,l; int num_shapes=0,offset; int a,b,c; short offsets[256]; /* applesoft indexes from 1 not 0 */ int shape_num=1; l=fgetc(stdin); h=fgetc(stdin); printf("BLOAD address: 0x%x\n",(h*256)+l); l=fgetc(stdin); h=fgetc(stdin); printf("BLOAD size: %d\n",(h*256)+l); offset=0; num_shapes=fgetc(stdin); printf("NUM SHAPES = %d\n",num_shapes); ch=fgetc(stdin); if (ch!=0) printf("\tERROR! NOT ZERO\n"); offset+=2; for(i=0;i>3)&0x7; c=(ch>>6)&0x3; printf("$%X:\t%x ",offset,ch); if ((c==0) && (b==0) && (a==0)) { printf("END!\n"); shape_num++; if (shape_num