aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraliaspider2014-10-30 05:50:41 +0100
committeraliaspider2014-10-30 05:50:41 +0100
commit9d26cad1e39af6e4c96a4efb5ae00332207163ca (patch)
treefdcb68b7a608f80a7747a805988a8ab1b9ba9690
parent452f0d2ac13dd8d69b2dedcc08fd3f8184d749c8 (diff)
downloadsnesemu-9d26cad1e39af6e4c96a4efb5ae00332207163ca.tar.gz
snesemu-9d26cad1e39af6e4c96a4efb5ae00332207163ca.tar.bz2
snesemu-9d26cad1e39af6e4c96a4efb5ae00332207163ca.zip
remove warnings
-rw-r--r--source/cpuops.c66
-rw-r--r--source/dma.c4
-rw-r--r--source/dsp4emu.c33
-rw-r--r--source/gfx.c6
-rw-r--r--source/gfx.h2
-rw-r--r--source/memmap.c16
-rw-r--r--source/spc700.c2
-rw-r--r--source/spc7110.c2
8 files changed, 55 insertions, 76 deletions
diff --git a/source/cpuops.c b/source/cpuops.c
index 895ccc3..83b6910 100644
--- a/source/cpuops.c
+++ b/source/cpuops.c
@@ -3322,38 +3322,44 @@ static void Op0CM0(void)
}
#define BranchCheck1()\
- if( CPU.BranchSkip)\
- {\
- CPU.BranchSkip = FALSE;\
- if (!Settings.SoundSkipMethod) {\
- if( CPU.PC - CPU.PCBase > OpAddress)\
- return;\
- } else \
- if (Settings.SoundSkipMethod == 1)\
- return;\
- if (Settings.SoundSkipMethod == 3)\
- if( CPU.PC - CPU.PCBase > OpAddress)\
- return;\
- else\
- CPU.PC = CPU.PCBase + OpAddress;\
- }
+ if( CPU.BranchSkip)\
+ {\
+ CPU.BranchSkip = FALSE;\
+ if (!Settings.SoundSkipMethod) {\
+ if( CPU.PC - CPU.PCBase > OpAddress)\
+ return;\
+ }\
+ else \
+ if (Settings.SoundSkipMethod == 1)\
+ return;\
+ if (Settings.SoundSkipMethod == 3)\
+ {\
+ if( CPU.PC - CPU.PCBase > OpAddress)\
+ return;\
+ else\
+ CPU.PC = CPU.PCBase + OpAddress;\
+ }\
+ }
#define BranchCheck2()\
- if( CPU.BranchSkip)\
- {\
- CPU.BranchSkip = FALSE;\
- if (!Settings.SoundSkipMethod) {\
- if( CPU.PC - CPU.PCBase > OpAddress)\
- return;\
- } else \
- if (Settings.SoundSkipMethod == 1)\
- CPU.PC = CPU.PCBase + OpAddress;\
- if (Settings.SoundSkipMethod == 3)\
- if (CPU.PC - CPU.PCBase > OpAddress)\
- return;\
- else\
- CPU.PC = CPU.PCBase + OpAddress;\
- }
+ if( CPU.BranchSkip)\
+ {\
+ CPU.BranchSkip = FALSE;\
+ if (!Settings.SoundSkipMethod) {\
+ if( CPU.PC - CPU.PCBase > OpAddress)\
+ return;\
+ }\
+ else \
+ if (Settings.SoundSkipMethod == 1)\
+ CPU.PC = CPU.PCBase + OpAddress;\
+ if (Settings.SoundSkipMethod == 3)\
+ {\
+ if (CPU.PC - CPU.PCBase > OpAddress)\
+ return;\
+ else\
+ CPU.PC = CPU.PCBase + OpAddress;\
+ }\
+ }
#else
#define BranchCheck0()
#define BranchCheck1()
diff --git a/source/dma.c b/source/dma.c
index 78473ff..a5e4a35 100644
--- a/source/dma.c
+++ b/source/dma.c
@@ -261,11 +261,11 @@ void S9xDoDMA(uint8 Channel)
for (i = 0; i < Memory.SDD1LoggedDataCount; i++, p += 8)
{
if (*p == d->ABank ||
- (*(p + 1) == (d->AAddress >> 8)) &&
+ ((*(p + 1) == (d->AAddress >> 8)) &&
(*(p + 2) == (d->AAddress & 0xff)) &&
(*(p + 3) == (count >> 8)) &&
(*(p + 4) == (count & 0xff)) &&
- (*(p + 7) == SDD1Bank))
+ (*(p + 7) == SDD1Bank)))
{
found = TRUE;
break;
diff --git a/source/dsp4emu.c b/source/dsp4emu.c
index 0d06b63..712310f 100644
--- a/source/dsp4emu.c
+++ b/source/dsp4emu.c
@@ -1275,9 +1275,10 @@ sprite_found:
if (sprite_type == 1)
{
int16 plane;
- int16 car_left, car_right, car_left_a;
- int16 focal_back, focal_front;
- uint8 distance, id;
+ int16 car_left, car_right;
+ // int16 car_left_a;
+ int16 focal_back;
+// int16 focal_front;
// we already have 4 bytes we want
DSP4.in_count = 6 + 12;
@@ -1287,12 +1288,9 @@ DSP4_WAIT(3) resume3:
// filter inputs
project_y1 = DSP4_READ_WORD(0x00);
- // 0x9000 = DSP4_READ_WORD(0x02);
- id = DSP4.parameters[0x04];
- distance = DSP4.parameters[0x05];
focal_back = DSP4_READ_WORD(0x06);
- focal_front = DSP4_READ_WORD(0x08);
- car_left_a = DSP4_READ_WORD(0x0a);
+ // focal_front = DSP4_READ_WORD(0x08);
+ // car_left_a = DSP4_READ_WORD(0x0a);
car_left = DSP4_READ_WORD(0x0c);
plane = DSP4_READ_WORD(0x0e);
car_right = DSP4_READ_WORD(0x10);
@@ -1313,21 +1311,11 @@ DSP4_WAIT(3) resume3:
// debug
++block;
-#ifdef PRINT
- printf("(line %d) Op09 vehicle block %d, Loop %04X\n", c, block,
- (uint16)project_y1);
- //printf("%04X %04X %04X %04X / ",focal_back,focal_front,car_left_a,car_left);
- //printf("%02X %02X ", distance, id);
-#endif
// make the car's x-center available
DSP4.out_count = 2;
DSP4_WRITE_WORD(0, project_focalx);
-#if 0
- DSP4_WRITE_WORD(0, -1);
-#endif
-
// grab a few remaining vehicle values
DSP4.in_count = 4;
@@ -1342,10 +1330,6 @@ resume4:
// vertical lift factor
sprite_y += height;
-
-#ifdef PRINT_09
- printf("%04X\n", sprite_offset);
-#endif
}
// terrain sprite
else if (sprite_type == 2)
@@ -1379,16 +1363,11 @@ DSP4_WAIT(5) resume5:
// debug
++block;
-#ifdef PRINT
- printf("(line %d) Op09 terrain block %d, Loop %04X\n", c, block,
- (uint16)project_y1);
-#endif
}
// default sprite size: 16x16
sprite_size = 1;
- ////////////////////////////////////////////////////
// convert tile data to OAM
do
diff --git a/source/gfx.c b/source/gfx.c
index 1b57c31..ad5ef23 100644
--- a/source/gfx.c
+++ b/source/gfx.c
@@ -1924,17 +1924,17 @@ static void DrawBackgroundMode5(uint32 bg, uint8 Z1, uint8 Z2)
int Lines;
- int VOffsetMask;
+// int VOffsetMask;
int VOffsetShift;
if (BG.TileSize == 16)
{
- VOffsetMask = 0x3ff;
+// VOffsetMask = 0x3ff;
VOffsetShift = 4;
}
else
{
- VOffsetMask = 0x1ff;
+// VOffsetMask = 0x1ff;
VOffsetShift = 3;
}
int endy = IPPU.Interlace ? 1 + (GFX.EndY << 1) : GFX.EndY;
diff --git a/source/gfx.h b/source/gfx.h
index 3473670..411c464 100644
--- a/source/gfx.h
+++ b/source/gfx.h
@@ -278,7 +278,7 @@ static inline uint16 COLOR_ADD(uint16 C1, uint16 C2)
#define COLOR_ADD1_2(C1, C2) \
(((((C1) & RGB_REMOVE_LOW_BITS_MASK) + \
((C2) & RGB_REMOVE_LOW_BITS_MASK)) >> 1) + \
- ((C1) & (C2) & RGB_LOW_BITS_MASK) | ALPHA_BITS_MASK)
+ (((C1) & (C2) & RGB_LOW_BITS_MASK) | ALPHA_BITS_MASK))
#if defined(OLD_COLOUR_BLENDING)
#define COLOR_SUB(C1, C2) \
diff --git a/source/memmap.c b/source/memmap.c
index 682b98d..e3d474a 100644
--- a/source/memmap.c
+++ b/source/memmap.c
@@ -649,12 +649,8 @@ again:
S9xMessage(S9X_ERROR, S9X_ROM_CONFUSING_FORMAT_INFO, "Warning! Hacked Dump!");
}
- int orig_hi_score, orig_lo_score;
int hi_score, lo_score;
- orig_hi_score = hi_score = ScoreHiROM(FALSE, 0);
- orig_lo_score = lo_score = ScoreLoROM(FALSE, 0);
-
if (Memory.HeaderCount == 0 && !Settings.ForceNoHeader &&
((hi_score > lo_score && ScoreHiROM(TRUE, 0) > hi_score) ||
(hi_score <= lo_score && ScoreLoROM(TRUE, 0) > lo_score)))
@@ -679,8 +675,8 @@ again:
S9xMessage(S9X_INFO, S9X_HEADER_WARNING,
"Try specifying the -nhd command line option if the game doesn't work\n");
//modifying ROM, so we need to rescore
- orig_hi_score = hi_score = ScoreHiROM(FALSE, 0);
- orig_lo_score = lo_score = ScoreLoROM(FALSE, 0);
+ hi_score = ScoreHiROM(FALSE, 0);
+ lo_score = ScoreLoROM(FALSE, 0);
}
Memory.CalculatedSize = TotalFileSize & ~0x1FFF; // round down to lower 0x2000
@@ -713,8 +709,8 @@ again:
}
//CalculatedSize is now set, so rescore
- orig_hi_score = hi_score = ScoreHiROM(FALSE, 0);
- orig_lo_score = lo_score = ScoreLoROM(FALSE, 0);
+ hi_score = ScoreHiROM(FALSE, 0);
+ lo_score = ScoreLoROM(FALSE, 0);
if (Memory.ExtendedFormat != NOPE)
{
@@ -3380,13 +3376,13 @@ void JumboLoROMMap(bool8 Interleaved)
int i;
uint32 OFFSET0 = 0x400000;
- uint32 OFFSET1 = 0x400000;
+// uint32 OFFSET1 = 0x400000;
uint32 OFFSET2 = 0x000000;
if (Interleaved)
{
OFFSET0 = 0x000000;
- OFFSET1 = 0x000000;
+// OFFSET1 = 0x000000;
OFFSET2 = Memory.CalculatedSize -
0x400000; //changed to work with interleaved DKJM2.
}
diff --git a/source/spc700.c b/source/spc700.c
index 2607e1a..904c429 100644
--- a/source/spc700.c
+++ b/source/spc700.c
@@ -231,7 +231,7 @@ APUSetZN8 ((uint8) Int16);
#else
#define PushW(w)\
*(IAPU.RAM + 0xff + IAPU.Registers.S) = w;\
- *(IAPU.RAM + 0x100 + IAPU.Registers.S) = (w >> 8);\
+ *(IAPU.RAM + 0x100 + IAPU.Registers.S) = ((w) >> 8);\
IAPU.Registers.S -= 2;
#define PopW(w)\
IAPU.Registers.S += 2; \
diff --git a/source/spc7110.c b/source/spc7110.c
index fdd625c..007231f 100644
--- a/source/spc7110.c
+++ b/source/spc7110.c
@@ -1535,7 +1535,6 @@ void S9xUpdateRTC()
int year;
int temp_days;
- int year_hundreds;
int year_tens;
int year_ones;
@@ -1613,7 +1612,6 @@ void S9xUpdateRTC()
year_tens = year % 100;
year_ones = year_tens % 10;
year_tens /= 10;
- year_hundreds = (year - 1000) / 100;
rtc_f9.reg[0] = seconds % 10;
rtc_f9.reg[1] = seconds / 10;