1.1 --- a/src/main.c Tue Jan 10 13:57:54 2006 +0000
1.2 +++ b/src/main.c Mon Jan 16 11:18:29 2006 +0000
1.5 - * $Id: main.c,v 1.10 2006-01-10 13:57:54 nkeynes Exp $
1.6 + * $Id: main.c,v 1.11 2006-01-16 11:18:29 nkeynes Exp $
1.8 * Main program, initializes dreamcast and gui, then passes control off to
1.9 * the gtk main loop (currently).
1.12 #include "dreamcast.h"
1.14 -char *option_list = "a:A:V:p";
1.15 +#define S3M_PLAYER "s3mplay.bin"
1.17 +char *option_list = "a:s:A:V:ph";
1.18 char *aica_program = NULL;
1.19 +char *s3m_file = NULL;
1.20 gboolean start_immediately = FALSE;
1.21 +gboolean headless = FALSE;
1.23 int main (int argc, char *argv[])
1.26 case 'a': /* AICA only mode - argument is an AICA program */
1.27 aica_program = optarg;
1.29 + case 's': /* AICA-only w/ S3M player */
1.30 + aica_program = S3M_PLAYER;
1.31 + s3m_file = optarg;
1.33 case 'A': /* Audio driver */
1.35 case 'V': /* Video driver */
1.37 case 'p': /* Start immediately */
1.38 start_immediately = TRUE;
1.40 + case 'h': /* Headless */
1.46 if( aica_program == NULL ) {
1.48 - gnome_init ("dreamon", VERSION, argc, argv);
1.50 - dreamcast_register_module( >k_gui_module );
1.52 + gnome_init ("dreamon", VERSION, argc, argv);
1.54 + dreamcast_register_module( >k_gui_module );
1.57 dreamcast_configure_aica_only();
1.58 mem_load_block( aica_program, 0x00800000, 2048*1024 );
1.59 - gnome_init ("dreamon", VERSION, argc, argv);
1.60 - dreamcast_register_module( >k_gui_module );
1.61 - set_disassembly_cpu( main_debug, "ARM7" );
1.62 + if( s3m_file != NULL ) {
1.63 + mem_load_block( s3m_file, 0x00810000, 2048*1024 - 0x10000 );
1.66 + gnome_init ("dreamon", VERSION, argc, argv);
1.67 + dreamcast_register_module( >k_gui_module );
1.68 + set_disassembly_cpu( main_debug, "ARM7" );
1.72 INFO( "DreamOn! ready..." );
1.73 if( start_immediately )