Search
lxdream.org :: lxdream/src/main.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/main.c
changeset 1125:9dd5dee45db9
prev1116:09a69dfc7931
next1129:7b16bbd6209c
author nkeynes
date Mon Sep 13 10:13:42 2010 +1000 (9 years ago)
permissions -rw-r--r--
last change Implement shadow-execution 'core' to run translator + interpreter side by
side (for testing)
file annotate diff log raw
1.1 --- a/src/main.c Wed Sep 08 08:43:15 2010 +1000
1.2 +++ b/src/main.c Mon Sep 13 10:13:42 2010 +1000
1.3 @@ -42,7 +42,7 @@
1.4 #include "hotkeys.h"
1.5 #include "plugin.h"
1.6
1.7 -char *option_list = "a:A:bc:e:dfg:G:hHl:m:npt:T:uvV:x?";
1.8 +char *option_list = "a:A:bc:e:dfg:G:hHl:m:npt:T:uvV:xX?";
1.9 struct option longopts[] = {
1.10 { "aica", required_argument, NULL, 'a' },
1.11 { "audio", required_argument, NULL, 'A' },
1.12 @@ -58,6 +58,7 @@
1.13 { "log", required_argument, NULL,'l' },
1.14 { "multiplier", required_argument, NULL, 'm' },
1.15 { "run-time", required_argument, NULL, 't' },
1.16 + { "shadow", no_argument, NULL, 'X' },
1.17 { "trace", required_argument, NULL, 'T' },
1.18 { "unsafe", no_argument, NULL, 'u' },
1.19 { "video", no_argument, NULL, 'V' },
1.20 @@ -72,7 +73,7 @@
1.21 gboolean start_immediately = FALSE;
1.22 gboolean no_start = FALSE;
1.23 gboolean headless = FALSE;
1.24 -gboolean use_xlat = TRUE;
1.25 +sh4core_t sh4_core = SH4_TRANSLATE;
1.26 gboolean show_debugger = FALSE;
1.27 gboolean show_fullscreen = FALSE;
1.28 gboolean use_bootrom = TRUE;
1.29 @@ -110,6 +111,7 @@
1.30 printf( " -v, --version %s\n", _("Print the lxdream version string") );
1.31 printf( " -V, --video=DRIVER %s\n", _("Use the specified video driver (? to list)") );
1.32 printf( " -x %s\n", _("Disable the SH4 translator") );
1.33 + printf( " -X %s\n", _("Run both SH4 interpreter and translator") );
1.34 }
1.35
1.36 static void bind_gettext_domain()
1.37 @@ -207,7 +209,10 @@
1.38 display_driver_name = optarg;
1.39 break;
1.40 case 'x': /* Disable translator */
1.41 - use_xlat = FALSE;
1.42 + sh4_core = SH4_INTERPRET;
1.43 + break;
1.44 + case 'X': /* Shadow translator */
1.45 + sh4_core = SH4_SHADOW;
1.46 break;
1.47 }
1.48 }
1.49 @@ -321,7 +326,7 @@
1.50 }
1.51 }
1.52
1.53 - sh4_translate_set_enabled( use_xlat );
1.54 + sh4_set_core( sh4_core );
1.55
1.56 /* If requested, start the gdb server immediately before we go into the main
1.57 * loop.
.