2 * $Id: main.c,v 1.12 2006-01-22 22:40:53 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.
31 #include "dreamcast.h"
33 #define S3M_PLAYER "s3mplay.bin"
35 char *option_list = "a:s:A:V:phb";
36 char *aica_program = NULL;
37 char *s3m_file = NULL;
38 gboolean start_immediately = FALSE;
39 gboolean headless = FALSE;
40 gboolean without_bios = FALSE;
42 int main (int argc, char *argv[])
46 bindtextdomain (PACKAGE, PACKAGE_LOCALE_DIR);
50 while( (opt = getopt( argc, argv, option_list )) != -1 ) {
52 case 'a': /* AICA only mode - argument is an AICA program */
53 aica_program = optarg;
55 case 's': /* AICA-only w/ S3M player */
56 aica_program = S3M_PLAYER;
59 case 'A': /* Audio driver */
61 case 'V': /* Video driver */
63 case 'p': /* Start immediately */
64 start_immediately = TRUE;
66 case 'b': /* No BIOS */
69 case 'h': /* Headless */
75 if( aica_program == NULL ) {
78 gnome_init ("dreamon", VERSION, argc, argv);
80 dreamcast_register_module( >k_gui_module );
83 dreamcast_configure_aica_only();
84 mem_load_block( aica_program, 0x00800000, 2048*1024 );
85 if( s3m_file != NULL ) {
86 mem_load_block( s3m_file, 0x00810000, 2048*1024 - 0x10000 );
89 gnome_init ("dreamon", VERSION, argc, argv);
90 dreamcast_register_module( >k_gui_module );
91 set_disassembly_cpu( main_debug, "ARM7" );
98 INFO( "DreamOn! ready..." );
99 if( start_immediately )
.