25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: main.c,v 1.275 2006/06/24 19:52:28 debug Exp $ |
* $Id: main.c,v 1.277 2006/06/30 20:22:53 debug Exp $ |
29 |
*/ |
*/ |
30 |
|
|
31 |
#include <stdio.h> |
#include <stdio.h> |
195 |
{ |
{ |
196 |
printf("GXemul"); |
printf("GXemul"); |
197 |
#ifdef VERSION |
#ifdef VERSION |
198 |
printf("-" VERSION); |
printf(" " VERSION); |
199 |
#endif |
#endif |
200 |
printf(" Copyright (C) 2003-2006 Anders Gavare\n"); |
printf(" Copyright (C) 2003-2006 Anders Gavare\n"); |
201 |
printf("Read the source code and/or documentation for " |
printf("Read the source code and/or documentation for " |
202 |
"other Copyright messages.\n"); |
"other Copyright messages.\n"); |
203 |
|
|
222 |
"with -E.)\n"); |
"with -E.)\n"); |
223 |
|
|
224 |
printf("\nOther options:\n"); |
printf("\nOther options:\n"); |
|
printf(" -A disable alignment checks in some cases (for higher" |
|
|
" speed)\n"); |
|
225 |
printf(" -C x try to emulate a specific CPU. (Use -H to get a " |
printf(" -C x try to emulate a specific CPU. (Use -H to get a " |
226 |
"list of types.)\n"); |
"list of types.)\n"); |
227 |
printf(" -d fname add fname as a disk image. You can add \"xxx:\"" |
printf(" -d fname add fname as a disk image. You can add \"xxx:\"" |
246 |
printf(" actual runtime speed) (this disables automatic" |
printf(" actual runtime speed) (this disables automatic" |
247 |
" clock adjustments)\n"); |
" clock adjustments)\n"); |
248 |
printf(" -i display each instruction as it is executed\n"); |
printf(" -i display each instruction as it is executed\n"); |
249 |
printf(" -J disable some speed tricks\n"); |
printf(" -J disable dyntrans instruction combinations\n"); |
250 |
printf(" -j name set the name of the kernel; for DECstation " |
printf(" -j name set the name of the kernel; for DECstation " |
251 |
"emulation, this passes\n the name to the bootloader," |
"emulation, this passes\n the name to the bootloader," |
252 |
" for example:\n"); |
" for example:\n"); |
275 |
printf(" -r register dumps before every instruction\n"); |
printf(" -r register dumps before every instruction\n"); |
276 |
printf(" -S initialize emulated RAM to random bytes, " |
printf(" -S initialize emulated RAM to random bytes, " |
277 |
"instead of zeroes\n"); |
"instead of zeroes\n"); |
278 |
|
printf(" -s f:name write statistics to file 'name', " |
279 |
|
"f is one or more of the following:\n"); |
280 |
|
printf(" v virtual program counter\n"); |
281 |
|
printf(" p physical equivalent of program counter\n"); |
282 |
|
printf(" i internal ic->f representation of " |
283 |
|
"the program counter\n"); |
284 |
|
printf(" and optionally:\n"); |
285 |
|
printf(" d disable statistics gathering at " |
286 |
|
"startup\n"); |
287 |
|
printf(" o overwrite instead of append\n"); |
288 |
printf(" -t show function trace tree\n"); |
printf(" -t show function trace tree\n"); |
289 |
printf(" -U enable slow_serial_interrupts_hack_for_linux\n"); |
printf(" -U enable slow_serial_interrupts_hack_for_linux\n"); |
290 |
#ifdef WITH_X11 |
#ifdef WITH_X11 |
354 |
struct machine *m = emul_add_machine(emul, "default"); |
struct machine *m = emul_add_machine(emul, "default"); |
355 |
|
|
356 |
char *opts = |
char *opts = |
357 |
"A" |
"C:c:Dd:E:e:G:HhI:iJj:KM:Nn:Oo:p:QqRrSs:tU" |
|
"C:c:Dd:E:e:G:HhI:iJj:KM:Nn:Oo:p:QqRrStU" |
|
358 |
#ifdef UNSTABLE_DEVEL |
#ifdef UNSTABLE_DEVEL |
359 |
"u:" |
"u:" |
360 |
#endif |
#endif |
366 |
|
|
367 |
while ((ch = getopt(argc, argv, opts)) != -1) { |
while ((ch = getopt(argc, argv, opts)) != -1) { |
368 |
switch (ch) { |
switch (ch) { |
|
case 'A': |
|
|
fprintf(stderr, "NOTE: The -A command line option" |
|
|
" is DEPRECATED and will be removed soon.\n"); |
|
|
m->dyntrans_alignment_check = 0; |
|
|
msopts = 1; |
|
|
break; |
|
369 |
case 'C': |
case 'C': |
370 |
m->cpu_name = strdup(optarg); |
m->cpu_name = strdup(optarg); |
371 |
msopts = 1; |
msopts = 1; |
440 |
msopts = 1; |
msopts = 1; |
441 |
break; |
break; |
442 |
case 'J': |
case 'J': |
443 |
m->speed_tricks = 0; |
m->allow_instruction_combinations = 0; |
444 |
msopts = 1; |
msopts = 1; |
445 |
break; |
break; |
446 |
case 'j': |
case 'j': |
512 |
m->random_mem_contents = 1; |
m->random_mem_contents = 1; |
513 |
msopts = 1; |
msopts = 1; |
514 |
break; |
break; |
515 |
|
case 's': |
516 |
|
machine_statistics_init(m, optarg); |
517 |
|
msopts = 1; |
518 |
|
break; |
519 |
case 't': |
case 't': |
520 |
m->show_trace_tree = 1; |
m->show_trace_tree = 1; |
521 |
msopts = 1; |
msopts = 1; |
758 |
/* Print startup message: */ |
/* Print startup message: */ |
759 |
debug("GXemul"); |
debug("GXemul"); |
760 |
#ifdef VERSION |
#ifdef VERSION |
761 |
debug("-" VERSION); |
debug(" " VERSION); |
762 |
#endif |
#endif |
763 |
debug(" Copyright (C) 2003-2006 Anders Gavare\n"); |
debug(" Copyright (C) 2003-2006 Anders Gavare\n"); |
764 |
debug("Read the source code and/or documentation for " |
debug("Read the source code and/or documentation for " |
765 |
"other Copyright messages.\n\n"); |
"other Copyright messages.\n\n"); |
766 |
|
|