Search
lxdream.org :: lxdream :: r431:248dd77a9e44
lxdream 0.9.1
released Jun 29
Download Now
changeset431:248dd77a9e44
parent430:467519b050f4
child432:0b761ef2dbfd
authornkeynes
dateTue Oct 09 08:12:29 2007 +0000 (12 years ago)
Fix compilation warnings
src/aica/aica.c
src/aica/armcore.c
src/aica/armcore.h
src/aica/armdasm.c
src/aica/armmem.c
src/aica/audio.c
src/display.c
src/dreamcast.h
1.1 --- a/src/aica/aica.c Mon Oct 08 12:09:06 2007 +0000
1.2 +++ b/src/aica/aica.c Tue Oct 09 08:12:29 2007 +0000
1.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.11
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.22
1.23 @@ -183,7 +179,7 @@
1.24 * 29 1 Volume
1.25 * 2C
1.26 * 30
1.27 - *
1.28 + */
1.29
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.33
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 +0000
2.2 +++ b/src/aica/armcore.c Tue Oct 09 08:12:29 2007 +0000
2.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.11
2.12 #define MODULE aica_module
2.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.33
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 +0000
3.2 +++ b/src/aica/armcore.h Tue Oct 09 08:12:29 2007 +0000
3.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 +0000
4.2 +++ b/src/aica/armdasm.c Tue Oct 09 08:12:29 2007 +0000
4.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) disassembler
4.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.16
4.17
4.18
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.25
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 +0000
5.2 +++ b/src/aica/armmem.c Tue Oct 09 08:12:29 2007 +0000
5.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.17
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 happy
5.25 }
5.26 }
5.27
5.28 @@ -151,7 +153,7 @@
5.29 /* Undefined memory */
5.30 }
5.31 }
5.32 - return 0;
5.33 + return;
5.34 }
5.35
5.36 /* User translations - TODO */
6.1 --- a/src/aica/audio.c Mon Oct 08 12:09:06 2007 +0000
6.2 +++ b/src/aica/audio.c Tue Oct 09 08:12:29 2007 +0000
6.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 sound
6.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 +0000
7.2 +++ b/src/display.c Tue Oct 09 08:12:29 2007 +0000
7.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 display
7.9 * driver is expected to deliver events here, where they're translated and
7.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.15
7.16 typedef struct keymap_entry {
7.17 uint16_t keycode;
8.1 --- a/src/dreamcast.h Mon Oct 08 12:09:06 2007 +0000
8.2 +++ b/src/dreamcast.h Tue Oct 09 08:12:29 2007 +0000
8.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 modules
8.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.15
8.16 gboolean dreamcast_load_config( const gchar *filename );
8.17 gboolean dreamcast_save_config( const gchar *filename );
.