Search
lxdream.org :: lxdream/src/dreamcast.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/dreamcast.c
changeset 422:61a0598e07ff
prev372:86aa060ddcec
next450:207461e79f21
author nkeynes
date Sat Oct 06 09:03:24 2007 +0000 (12 years ago)
permissions -rw-r--r--
last change Fix compilation warnings
file annotate diff log raw
1.1 --- a/src/dreamcast.c Sat Sep 08 04:38:38 2007 +0000
1.2 +++ b/src/dreamcast.c Sat Oct 06 09:03:24 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: dreamcast.c,v 1.22 2007-09-08 04:38:38 nkeynes Exp $
1.6 + * $Id: dreamcast.c,v 1.23 2007-10-06 08:59:42 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.10 @@ -36,7 +36,7 @@
1.11 #define STATE_STOPPED 3
1.12 static volatile int dreamcast_state = STATE_UNINIT;
1.13 static uint32_t timeslice_length = DEFAULT_TIMESLICE_LENGTH;
1.14 -static char *dreamcast_config = "DEFAULT";
1.15 +const char *dreamcast_config = "DEFAULT";
1.16
1.17 #define MAX_MODULES 32
1.18 static int num_modules = 0;
1.19 @@ -87,7 +87,7 @@
1.20
1.21 void dreamcast_save_flash()
1.22 {
1.23 - char *file = dreamcast_get_config_value(CONFIG_FLASH_PATH);
1.24 + const char *file = dreamcast_get_config_value(CONFIG_FLASH_PATH);
1.25 mem_save_block( file, 0x00200000, 0x00020000 );
1.26 }
1.27
1.28 @@ -199,7 +199,6 @@
1.29 void dreamcast_shutdown()
1.30 {
1.31 dreamcast_stop();
1.32 - sh4_stop();
1.33 dreamcast_save_flash();
1.34 }
1.35
1.36 @@ -272,7 +271,7 @@
1.37 gboolean dreamcast_load_config_stream( FILE *f )
1.38 {
1.39
1.40 - char buf[512], *p;
1.41 + char buf[512];
1.42 int maple_device = -1, maple_subdevice = -1;
1.43 struct dreamcast_config_group devgroup;
1.44 struct dreamcast_config_group *group = NULL;
1.45 @@ -365,6 +364,7 @@
1.46 }
1.47 result = dreamcast_save_config_stream(f);
1.48 fclose(f);
1.49 + return TRUE;
1.50 }
1.51
1.52 gboolean dreamcast_save_config_stream( FILE *f )
1.53 @@ -416,7 +416,7 @@
1.54 int dreamcast_load_state( const gchar *filename )
1.55 {
1.56 int i,j;
1.57 - uint32_t count, len;
1.58 + uint32_t len;
1.59 int have_read[MAX_MODULES];
1.60 char tmp[64];
1.61 struct save_state_header header;
1.62 @@ -485,6 +485,7 @@
1.63 }
1.64 fclose(f);
1.65 INFO( "Save state read from %s", filename );
1.66 + return 0;
1.67 }
1.68
1.69 int dreamcast_save_state( const gchar *filename )
1.70 @@ -514,5 +515,6 @@
1.71 }
1.72 fclose( f );
1.73 INFO( "Save state written to %s", filename );
1.74 + return 0;
1.75 }
1.76
.