Search
lxdream.org :: lxdream/src/main.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/main.c
changeset 414:fd8e96bc513e
prev402:85fd4a4582be
next422:61a0598e07ff
author nkeynes
date Wed Oct 03 08:22:27 2007 +0000 (14 years ago)
permissions -rw-r--r--
last change Add (probably temporary) CPU frequency scaling command-line option
file annotate diff log raw
1.1 --- a/src/main.c Thu Sep 20 08:42:40 2007 +0000
1.2 +++ b/src/main.c Wed Oct 03 08:22:27 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: main.c,v 1.25 2007-09-20 08:42:40 nkeynes Exp $
1.6 + * $Id: main.c,v 1.26 2007-10-03 08:22:27 nkeynes Exp $
1.7 *
1.8 * Main program, initializes dreamcast and gui, then passes control off to
1.9 * the gtk main loop (currently).
1.10 @@ -35,7 +35,7 @@
1.11
1.12 #define S3M_PLAYER "s3mplay.bin"
1.13
1.14 -char *option_list = "a:s:A:V:puhbd:c:t:xD";
1.15 +char *option_list = "a:m:s:A:V:puhbd:c:t:xD";
1.16 struct option longopts[1] = { { NULL, 0, 0, 0 } };
1.17 char *aica_program = NULL;
1.18 char *s3m_file = NULL;
1.19 @@ -50,6 +50,7 @@
1.20 gboolean show_debugger = FALSE;
1.21 uint32_t time_secs = 0;
1.22 uint32_t time_nanos = 0;
1.23 +extern uint32_t sh4_cpu_multiplier;
1.24
1.25 audio_driver_t audio_driver_list[] = { &audio_null_driver,
1.26 &audio_esd_driver,
1.27 @@ -82,6 +83,10 @@
1.28 case 'D': /* Launch w/ debugger */
1.29 show_debugger = TRUE;
1.30 break;
1.31 + case 'm': /* Set SH4 CPU clock multiplier (default 0.5) */
1.32 + t = strtod(optarg, NULL);
1.33 + sh4_cpu_multiplier = (int)(1000.0/t);
1.34 + break;
1.35 case 's': /* AICA-only w/ S3M player */
1.36 aica_program = S3M_PLAYER;
1.37 s3m_file = optarg;
.