1 // A little utility to convert SMDs to BINs
13 #undef main /* -Dmain=SDL_main */
14 int main(int argc
, char *argv
[])
21 signal(SIGPIPE
, SIG_IGN
);
24 fprintf(stderr
, "Usage: %s {from.smd} {to.bin}\n", argv
[0]);
27 rom
= load_rom(&size
, argv
[1]);
29 fprintf(stderr
, "%s: `%s': Unable to load ROM\n", argv
[0],
33 out
= fopen(argv
[2], "wb");
35 fprintf(stderr
, "%s: `%s': %s\n", argv
[0], argv
[2],
40 size
= fwrite(rom
, size
, 1, out
);
45 fprintf(stderr
, "%s: `%s': %s\n", argv
[0], argv
[2], strerror(errno
));