/* gcc ree.c -o ree.bin rom extension extractor (ported to shell from the pascal version of 1997) (and now it is .c, and like 69 times faster or so) see http://www.firmware.com/support/bios/romext.htm for more info extracts system, scsi, video bios gurkan@linuks.mine.nu, www.linuks.mine.nu a checksum of 0 is ok! any other number indicates it is either not a rom extension or the rom is defective scan from c0000 - f0000 in 512 byte blocks UŠ{l}{code} l*512=length of the code including headers */ #include char* ID_ROMEXT="UŠ"; /* 0x55aa */ FILE* f; unsigned char buffer[256*1024]; char filename[32]; void dd(long skip, long count) { fseek(f,skip,SEEK_SET); fread(buffer,count,1,f); } void save(char* filename,long size) { FILE* out; out=fopen(filename,"w"); fwrite(buffer,size,1,out); fclose(out); } unsigned char checksum(long size) { unsigned sum=0; int c; for (c=0; c