25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: file.c,v 1.2 2007/04/19 15:18:16 debug Exp $ |
* $Id: file.c,v 1.4 2007/05/22 09:49:31 debug Exp $ |
29 |
* |
* |
30 |
* This module contains functions which load executable images into (emulated) |
* This module contains functions which load executable images into (emulated) |
31 |
* memory. File formats recognized so far are: |
* memory. File formats recognized so far are: |
310 |
"0x8c010000:%s.descrambled", filename); |
"0x8c010000:%s.descrambled", filename); |
311 |
debug("loading descrambled Dreamcast binary\n"); |
debug("loading descrambled Dreamcast binary\n"); |
312 |
file_load_raw(machine, mem, tmp_filename, entrypointp); |
file_load_raw(machine, mem, tmp_filename, entrypointp); |
313 |
|
|
314 |
|
snprintf(tmp_filename, strlen(filename) + 100, |
315 |
|
"%s.descrambled", filename); |
316 |
|
remove(tmp_filename); |
317 |
free(tmp_filename); |
free(tmp_filename); |
318 |
|
|
319 |
/* Hack: Start a "boot from CDROM" sequence: */ |
/* Hack: Start a "boot from CDROM" sequence: */ |
344 |
fprintf(stderr, "\n\nPossible explanations:\n\n" |
fprintf(stderr, "\n\nPossible explanations:\n\n" |
345 |
" o) If this is a disk image, you forgot '-d' " |
" o) If this is a disk image, you forgot '-d' " |
346 |
"on the command line.\n" |
"on the command line.\n" |
347 |
|
" o) You are attempting to load a raw binary " |
348 |
|
"into emulated memory,\n" |
349 |
|
" but forgot to add the address prefix.\n" |
350 |
" o) This is an unsupported binary format.\n\n"); |
" o) This is an unsupported binary format.\n\n"); |
351 |
exit(1); |
exit(1); |
352 |
} |
} |