1.1 --- a/src/dreamcast.c Sat May 20 02:38:58 2006 +0000
1.2 +++ b/src/dreamcast.c Tue Jun 27 09:34:27 2006 +0000
1.5 - * $Id: dreamcast.c,v 1.16 2006-05-20 02:38:58 nkeynes Exp $
1.6 + * $Id: dreamcast.c,v 1.17 2006-06-19 11:00:40 nkeynes Exp $
1.7 * Central switchboard for the system. This pulls all the individual modules
1.8 * together into some kind of coherent structure. This is also where you'd
1.9 * add Naomi support, if I ever get a board to play with...
1.11 mem_create_ram_region( 0x00800000, 2 MB, MEM_REGION_AUDIO );
1.12 mem_create_ram_region( 0x00703000, 8 KB, MEM_REGION_AUDIO_SCRATCH );
1.13 mem_create_ram_region( 0x05000000, 8 MB, MEM_REGION_VIDEO );
1.14 - mem_load_rom( "dcboot.rom", 0x00000000, 0x00200000, 0x89f2b1a1 );
1.15 + mem_load_rom( dreamcast_get_config_value(CONFIG_BIOS_PATH),
1.16 + 0x00000000, 0x00200000, 0x89f2b1a1 );
1.17 mem_create_ram_region( 0x00200000, 0x00020000, MEM_REGION_FLASH );
1.18 - mem_load_block( "../bios/dcflash.rom", 0x00200000, 0x00020000 );
1.19 - // mem_load_rom( "dcflash.rom",0x00200000, 0x00020000, 0x357c3568 );
1.20 + mem_load_block( dreamcast_get_config_value(CONFIG_FLASH_PATH),
1.21 + 0x00200000, 0x00020000 );
1.23 /* Load in the rest of the core modules */
1.24 dreamcast_register_module( &sh4_module );
1.26 dreamcast_register_module( &aica_module );
1.27 dreamcast_register_module( &maple_module );
1.28 dreamcast_register_module( &ide_module );
1.30 - /* Attach any default maple devices, ie a pair of controllers */
1.32 - maple_device_t controller1 = maple_new_device("Sega Controller");
1.33 - maple_device_t controller2 = maple_new_device("Sega Controller");
1.34 - maple_attach_device( controller1, 0, 0 );
1.35 - maple_attach_device( controller2, 1, 0 );
1.42 /***************************** User Configuration **************************/
1.45 static struct dreamcast_config_entry global_config[] =
1.46 {{ "bios", CONFIG_TYPE_FILE, "dcboot.rom" },
1.47 { "flash", CONFIG_TYPE_FILE, "dcflash.rom" },
1.48 @@ -202,6 +196,11 @@
1.52 +const gchar *dreamcast_get_config_value( int key )
1.54 + return global_config[key].value;
1.57 gboolean dreamcast_load_config( const gchar *filename )
1.59 FILE *f = fopen(filename, "ro");