1.1 --- a/src/main.c Thu Nov 22 11:10:15 2007 +0000
1.2 +++ b/src/main.c Tue Jan 15 20:50:23 2008 +0000
1.5 - * $Id: main.c,v 1.35 2007-11-07 11:45:53 nkeynes Exp $
1.8 * Main program, initializes dreamcast and gui, then passes control off to
1.11 #include "aica/audio.h"
1.12 #include "gdrom/gdrom.h"
1.13 #include "maple/maple.h"
1.14 -#include "sh4/sh4core.h"
1.15 +#include "sh4/sh4.h"
1.17 #define S3M_PLAYER "s3mplay.bin"
1.19 -char *option_list = "a:m:s:A:V:puhbd:c:t:xD";
1.20 +char *option_list = "a:m:s:A:V:v:puhbd:c:t:T:xDn";
1.21 struct option longopts[1] = { { NULL, 0, 0, 0 } };
1.22 char *aica_program = NULL;
1.23 char *s3m_file = NULL;
1.24 const char *disc_file = NULL;
1.25 char *display_driver_name = NULL;
1.26 char *audio_driver_name = NULL;
1.27 +char *trace_regions = NULL;
1.28 gboolean start_immediately = FALSE;
1.29 +gboolean no_start = FALSE;
1.30 gboolean headless = FALSE;
1.31 gboolean without_bios = FALSE;
1.32 gboolean use_xlat = TRUE;
1.34 t = strtod(optarg, NULL);
1.35 sh4_cpu_multiplier = (int)(1000.0/t);
1.37 + case 'n': /* Don't start immediately */
1.39 + start_immediately = FALSE;
1.41 case 's': /* AICA-only w/ S3M player */
1.42 aica_program = S3M_PLAYER;
1.46 case 'p': /* Start immediately */
1.47 start_immediately = TRUE;
1.50 case 'u': /* Allow unsafe dcload syscalls */
1.51 dcload_set_allow_unsafe(TRUE);
1.52 @@ -109,6 +116,14 @@
1.53 time_secs = (uint32_t)t;
1.54 time_nanos = (int)((t - time_secs) * 1000000000);
1.56 + case 'T': /* trace regions */
1.57 + trace_regions = optarg;
1.59 + case 'v': /* Log verbosity */
1.60 + if( !set_global_log_level(optarg) ) {
1.61 + ERROR( "Unrecognized log level '%s'", optarg );
1.64 case 'x': /* Disable translator */
1.68 mem_load_block( s3m_file, 0x00810000, 2048*1024 - 0x10000 );
1.71 + mem_set_trace( trace_regions, TRUE );
1.73 if( without_bios ) {
1.77 ERROR( "Unrecognized file '%s'", argv[optind] );
1.79 - start_immediately = ok;
1.81 + start_immediately = ok;
1.85 if( disc_file != NULL ) {