2 * $Id: main.c,v 1.10 2006-01-10 13:57:54 nkeynes Exp $
4 * Main program, initializes dreamcast and gui, then passes control off to
5 * the gtk main loop (currently).
7 * FIXME: Remove explicit GTK/Gnome references from this file
9 * Copyright (c) 2005 Nathan Keynes.
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
30 #include "dreamcast.h"
32 char *option_list = "a:A:V:p";
33 char *aica_program = NULL;
34 gboolean start_immediately = FALSE;
36 int main (int argc, char *argv[])
40 bindtextdomain (PACKAGE, PACKAGE_LOCALE_DIR);
44 while( (opt = getopt( argc, argv, option_list )) != -1 ) {
46 case 'a': /* AICA only mode - argument is an AICA program */
47 aica_program = optarg;
49 case 'A': /* Audio driver */
51 case 'V': /* Video driver */
53 case 'p': /* Start immediately */
54 start_immediately = TRUE;
58 if( aica_program == NULL ) {
60 gnome_init ("dreamon", VERSION, argc, argv);
62 dreamcast_register_module( >k_gui_module );
64 dreamcast_configure_aica_only();
65 mem_load_block( aica_program, 0x00800000, 2048*1024 );
66 gnome_init ("dreamon", VERSION, argc, argv);
67 dreamcast_register_module( >k_gui_module );
68 set_disassembly_cpu( main_debug, "ARM7" );
71 INFO( "DreamOn! ready..." );
72 if( start_immediately )
.