VECTORLIST - The Mailing List For The Technical Discussion of Vector-Based Arcade Games

October_1997
trivial binary compare pgm


From: Al Kossow ( )
Date: Thu Oct 16 1997 - 11:56:47 CDT


here was something I hacked together when Dave and I
were comparing ROM versions. catenate the images together
and it will print out any bytes that differ

#include <stdio.h>
main(){
        FILE *f1, *f2;
        unsigned char c1, c2;
        unsigned int adr = 0;

        f1 = fopen("el2_prom","rb");
        f2 = fopen("el_prom","rb");
        while(!feof(f1)){
         c1 = getc(f1);
         c2 = getc(f2);
         if (c1 != c2){
          printf("%04x %02x %02x\n", adr, c1 ,c2);
         }
         adr++;
        }
}

..not pretty but it got the job done


HOME