revision 431:248dd77a9e44
summary |
tree |
shortlog |
changelog |
graph |
changeset |
raw | bz2 | zip | gz changeset | 431:248dd77a9e44 |
parent | 430:467519b050f4 |
child | 432:0b761ef2dbfd |
author | nkeynes |
date | Tue Oct 09 08:12:29 2007 +0000 (16 years ago) |
Fix compilation warnings
src/aica/aica.c | view | annotate | diff | log | ||
src/aica/armcore.c | view | annotate | diff | log | ||
src/aica/armcore.h | view | annotate | diff | log | ||
src/aica/armdasm.c | view | annotate | diff | log | ||
src/aica/armmem.c | view | annotate | diff | log | ||
src/aica/audio.c | view | annotate | diff | log | ||
src/display.c | view | annotate | diff | log | ||
src/dreamcast.h | view | annotate | diff | log |
1.1 --- a/src/aica/aica.c Mon Oct 08 12:09:06 2007 +00001.2 +++ b/src/aica/aica.c Tue Oct 09 08:12:29 2007 +00001.3 @@ -1,5 +1,5 @@1.4 /**1.5 - * $Id: aica.c,v 1.21 2007-01-17 09:37:22 nkeynes Exp $1.6 + * $Id: aica.c,v 1.22 2007-10-09 08:11:51 nkeynes Exp $1.7 *1.8 * This is the core sound system (ie the bit which does the actual work)1.9 *1.10 @@ -62,12 +62,8 @@1.12 void aica_reset( void )1.13 {1.14 - struct timeval tv;1.15 arm_reset();1.16 aica_event(2); /* Pre-deliver a timer interrupt */1.17 -1.18 - // gettimeofday( &tv, NULL );1.19 - // aica_time_of_day = tv.tv_sec + RTC_OFFSET;1.20 aica_time_of_day = 0x5bfc8900;1.21 }1.23 @@ -183,7 +179,7 @@1.24 * 29 1 Volume1.25 * 2C1.26 * 301.27 - *1.28 + */1.30 /* Write to channels 0-31 */1.31 void mmio_region_AICA0_write( uint32_t reg, uint32_t val )1.32 @@ -233,7 +229,6 @@1.34 int32_t mmio_region_AICARTC_read( uint32_t reg )1.35 {1.36 - struct timeval tv;1.37 int32_t rv = 0;1.38 switch( reg ) {1.39 case AICA_RTCHI:
2.1 --- a/src/aica/armcore.c Mon Oct 08 12:09:06 2007 +00002.2 +++ b/src/aica/armcore.c Tue Oct 09 08:12:29 2007 +00002.3 @@ -1,5 +1,5 @@2.4 /**2.5 - * $Id: armcore.c,v 1.20 2006-01-22 22:40:05 nkeynes Exp $2.6 + * $Id: armcore.c,v 1.21 2007-10-09 08:11:51 nkeynes Exp $2.7 *2.8 * ARM7TDMI CPU emulation core.2.9 *2.10 @@ -18,6 +18,7 @@2.12 #define MODULE aica_module2.13 #include "dream.h"2.14 +#include "dreamcast.h"2.15 #include "mem.h"2.16 #include "aica/armcore.h"2.17 #include "aica/aica.h"2.18 @@ -405,7 +406,7 @@2.19 #define SHIFTIMM(ir) ((ir>>7)&0x1F)2.20 #define IMMROT(ir) ((ir>>7)&0x1E)2.21 #define ROTIMM12(ir) ROTATE_RIGHT_LONG(IMM8(ir),IMMROT(ir))2.22 -#define SIGNEXT24(n) ((n&0x00800000) ? (n|0xFF000000) : (n&0x00FFFFFF))2.23 +#define SIGNEXT24(n) (((n)&0x00800000) ? ((n)|0xFF000000) : ((n)&0x00FFFFFF))2.24 #define SHIFT(ir) ((ir>>4)&0x07)2.25 #define DISP24(ir) ((ir&0x00FFFFFF))2.26 #define UNDEF(ir) do{ arm_raise_exception( EXC_UNDEFINED ); return TRUE; } while(0)2.27 @@ -632,7 +633,7 @@2.28 */2.29 static uint32_t arm_get_address_operand( uint32_t ir )2.30 {2.31 - uint32_t addr;2.32 + uint32_t addr=0;2.34 /* I P U . W */2.35 switch( (ir>>21)&0x1D ) {2.36 @@ -759,6 +760,7 @@2.37 cond = 1;2.38 break;2.39 case 15: /* (NV) */2.40 + default:2.41 cond = 0;2.42 UNDEF(ir);2.43 }
3.1 --- a/src/aica/armcore.h Mon Oct 08 12:09:06 2007 +00003.2 +++ b/src/aica/armcore.h Tue Oct 09 08:12:29 2007 +00003.3 @@ -1,5 +1,5 @@3.4 /**3.5 - * $Id: armcore.h,v 1.14 2006-01-22 22:40:05 nkeynes Exp $3.6 + * $Id: armcore.h,v 1.15 2007-10-09 08:11:51 nkeynes Exp $3.7 *3.8 * Interface definitions for the ARM CPU emulation core proper.3.9 *3.10 @@ -105,5 +105,5 @@3.11 void arm_write_byte_user( uint32_t addr, uint32_t val );3.12 int32_t arm_read_phys_word( uint32_t addr );3.13 int arm_has_page( uint32_t addr );3.14 -3.15 +void arm_mem_init(void);3.16 #endif /* !dream_armcore_H */
4.1 --- a/src/aica/armdasm.c Mon Oct 08 12:09:06 2007 +00004.2 +++ b/src/aica/armdasm.c Tue Oct 09 08:12:29 2007 +00004.3 @@ -1,5 +1,5 @@4.4 /**4.5 - * $Id: armdasm.c,v 1.12 2007-01-17 21:27:20 nkeynes Exp $4.6 + * $Id: armdasm.c,v 1.13 2007-10-09 08:11:51 nkeynes Exp $4.7 *4.8 * armdasm.c 21 Aug 2004 - ARM7tdmi (ARMv4) disassembler4.9 *4.10 @@ -43,7 +43,7 @@4.11 #define DISP24(ir) ((ir&0x00FFFFFF))4.12 #define FSXC(ir) msrFieldMask[RN(ir)]4.13 #define ROTIMM12(ir) ROTATE_RIGHT_LONG(IMM8(ir),IMMROT(ir))4.14 -#define SIGNEXT24(n) ((n&0x00800000) ? (n|0xFF000000) : (n&0x00FFFFFF))4.15 +#define SIGNEXT24(n) (((n)&0x00800000) ? ((n)|0xFF000000) : ((n)&0x00FFFFFF))4.19 @@ -121,6 +121,7 @@4.20 operand = ROTATE_RIGHT_LONG(operand, tmp);4.21 return snprintf(buf, len, "#%08Xh", operand );4.22 }4.23 + return 0;4.24 }4.26 static int arm_disasm_address_index( uint32_t ir, char *buf, int len )
5.1 --- a/src/aica/armmem.c Mon Oct 08 12:09:06 2007 +00005.2 +++ b/src/aica/armmem.c Tue Oct 09 08:12:29 2007 +00005.3 @@ -1,5 +1,5 @@5.4 /**5.5 - * $Id: armmem.c,v 1.7 2006-01-10 13:56:54 nkeynes Exp $5.6 + * $Id: armmem.c,v 1.8 2007-10-09 08:11:51 nkeynes Exp $5.7 *5.8 * Implements the ARM's memory map.5.9 *5.10 @@ -101,7 +101,7 @@5.11 /* Undefined memory */5.12 }5.13 }5.14 - return 0;5.15 + return;5.16 }5.18 uint32_t arm_combine_byte( uint32_t addr, uint32_t val, uint8_t byte )5.19 @@ -115,6 +115,8 @@5.20 return (val & 0xFF00FFFF) | (byte<<16);5.21 case 3:5.22 return (val & 0x00FFFFFF) | (byte<<24);5.23 + default:5.24 + return val; // Can't happen, but make gcc happy5.25 }5.26 }5.28 @@ -151,7 +153,7 @@5.29 /* Undefined memory */5.30 }5.31 }5.32 - return 0;5.33 + return;5.34 }5.36 /* User translations - TODO */
6.1 --- a/src/aica/audio.c Mon Oct 08 12:09:06 2007 +00006.2 +++ b/src/aica/audio.c Tue Oct 09 08:12:29 2007 +00006.3 @@ -1,5 +1,5 @@6.4 /**6.5 - * $Id: audio.c,v 1.7 2006-12-15 10:19:49 nkeynes Exp $6.6 + * $Id: audio.c,v 1.8 2007-10-09 08:11:51 nkeynes Exp $6.7 *6.8 * Audio mixer core. Combines all the active streams into a single sound6.9 * buffer for output.6.10 @@ -75,7 +75,7 @@6.11 bytes_per_sample <<= 1;6.12 if( samplerate == audio.output_rate &&6.13 bytes_per_sample == audio.output_sample_size )6.14 - return;6.15 + return TRUE;6.16 samples_per_buffer = (samplerate * MS_PER_BUFFER / 1000);6.17 for( i=0; i<NUM_BUFFERS; i++ ) {6.18 if( audio.output_buffers[i] != NULL )
7.1 --- a/src/display.c Mon Oct 08 12:09:06 2007 +00007.2 +++ b/src/display.c Tue Oct 09 08:12:29 2007 +00007.3 @@ -1,5 +1,5 @@7.4 /**7.5 - * $Id: display.c,v 1.9 2007-10-07 06:03:22 nkeynes Exp $7.6 + * $Id: display.c,v 1.10 2007-10-09 08:12:29 nkeynes Exp $7.7 *7.8 * Generic support for keyboard and other input sources. The active display7.9 * driver is expected to deliver events here, where they're translated and7.10 @@ -22,6 +22,7 @@7.11 #include <assert.h>7.12 #include "dream.h"7.13 #include "display.h"7.14 +#include "pvr2/pvr2.h"7.16 typedef struct keymap_entry {7.17 uint16_t keycode;
8.1 --- a/src/dreamcast.h Mon Oct 08 12:09:06 2007 +00008.2 +++ b/src/dreamcast.h Tue Oct 09 08:12:29 2007 +00008.3 @@ -1,5 +1,5 @@8.4 /**8.5 - * $Id: dreamcast.h,v 1.16 2007-10-08 11:50:15 nkeynes Exp $8.6 + * $Id: dreamcast.h,v 1.17 2007-10-09 08:12:29 nkeynes Exp $8.7 *8.8 * Public interface for dreamcast.c -8.9 * Central switchboard for the system. This pulls all the individual modules8.10 @@ -65,6 +65,7 @@8.11 void dreamcast_run_for( unsigned int seconds, unsigned int nanosecs );8.12 void dreamcast_stop(void);8.13 void dreamcast_shutdown(void);8.14 +gboolean dreamcast_is_running(void);8.16 gboolean dreamcast_load_config( const gchar *filename );8.17 gboolean dreamcast_save_config( const gchar *filename );
.