Go to the documentation of this file.00001
00002 #include "ines_convert.h"
00003 #include "load_unif.h"
00004
00005 #include <stdlib.h>
00006
00007
00008
00009
00010 int main(int argc, char *argv[]) {
00011 unif_cart_t dta;
00012 ines_info_t ines;
00013
00014 const char *source;
00015 const char *dest;
00016
00017 if(argc != 3) {
00018 fprintf(stderr, "usage: lib_unif <source.nes> <dest.unf>\n");
00019 return -1;
00020 }
00021
00022 source = argv[1];
00023 dest = argv[2];
00024
00025 make_unif_file_from_nes(dest, source);
00026
00027 if(load_file_UNIF(dest, &dta) != UNIF_OK) {
00028 fprintf(stderr, "error loading UNIF file %s\n", dest);
00029 return -1;
00030 }
00031
00032
00033 get_ines_mapper(dta.mapr_name, &ines);
00034 free_file_UNIF(&dta);
00035 return 0;
00036 }
00037
00038