[Edit 13h00]
Pour les impatients, voici le convertisseur de fichier .BKP, en principe compatible toutes plateformes (au moins Windows, Linux, MacOS-X).
Code : Tout sélectionner
/***********************************************************************\
* BKP2CRAM - Creation fichier .cram a partir de .bkp *
* Auteur : Daniel Coulom - danielcoulom@gmail.com *
* Site web : http://dcexel.free.fr *
* Creation : 20 Juillet 2009 *
* *
* This file is part of BKP2CRAM. *
* *
* BKP2CRAM is free software: you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* BKP2CRAM is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty *
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with BKP2CRAM. If not, see <http://www.gnu.org/licenses/>. *
* *
\***********************************************************************/
#include <stdio.h>
#define BKP_FILE "PYROX.BKP"
#define CRAM_FILE "pyrox.cram"
int main(int argc, char *argv[])
{
FILE *fp;
int i, j, n;
char cram[0x4000];
fp = fopen(BKP_FILE, "rb");
fseek(fp, 0x200, SEEK_SET);
i = 0x4000;
while(i > 0)
{
n = (fgetc(fp) & 0xff) << 8;
n += fgetc(fp) & 0xff;
for(j = 0; j < n; j++) cram[--i] = fgetc(fp);
printf("%03i\n", n);
}
fclose(fp);
fp = fopen(CRAM_FILE, "wb");
fwrite(cram, 0x4000, 1, fp);
fclose(fp);
return 0;
}