Search
lxdream.org :: lxdream/src/dreamcast.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/dreamcast.c
changeset 742:e730ba4938f6
prev740:dd11269ee48b
next766:336858fb0160
author nkeynes
date Mon Jul 21 00:08:34 2008 +0000 (15 years ago)
permissions -rw-r--r--
last change Add gettext.h and build sanely without libintl if it's not available
Remove x86dasm's config.h & opintl.h (no longer needed and actually wrong)
file annotate diff log raw
1.1 --- a/src/dreamcast.c Wed Jul 16 10:40:10 2008 +0000
1.2 +++ b/src/dreamcast.c Mon Jul 21 00:08:34 2008 +0000
1.3 @@ -40,6 +40,7 @@
1.4
1.5 static volatile dreamcast_state_t dreamcast_state = STATE_UNINIT;
1.6 static gboolean dreamcast_has_bios = FALSE;
1.7 +static gboolean dreamcast_has_flash = FALSE;
1.8 static gboolean dreamcast_exit_on_stop = FALSE;
1.9 static gchar *dreamcast_program_name = NULL;
1.10 static sh4addr_t dreamcast_entry_point = 0xA0000000;
1.11 @@ -81,6 +82,7 @@
1.12 mem_create_ram_region( 0x00200000, 0x00020000, MEM_REGION_FLASH );
1.13 mem_load_block( lxdream_get_config_value(CONFIG_FLASH_PATH),
1.14 0x00200000, 0x00020000 );
1.15 + dreamcast_has_flash = TRUE;
1.16
1.17 /* Load in the rest of the core modules */
1.18 dreamcast_register_module( &sh4_module );
1.19 @@ -102,8 +104,10 @@
1.20
1.21 void dreamcast_save_flash()
1.22 {
1.23 - const char *file = lxdream_get_config_value(CONFIG_FLASH_PATH);
1.24 - mem_save_block( file, 0x00200000, 0x00020000 );
1.25 + if( dreamcast_has_flash ) {
1.26 + const char *file = lxdream_get_config_value(CONFIG_FLASH_PATH);
1.27 + mem_save_block( file, 0x00200000, 0x00020000 );
1.28 + }
1.29 }
1.30
1.31 /**
.