Silence warnings and fixes
- Silence warning [-Wmaybe-uninitialized] - m359: Fix value overflow - m534: Silence warnings - mmc1: Silence warnings - Silence more warnings
This commit is contained in:
@@ -56,8 +56,8 @@ void Mirror(uint8 value)
|
|||||||
|
|
||||||
|
|
||||||
static void Sync() {
|
static void Sync() {
|
||||||
uint8 prglo;
|
uint8 prglo = 0;
|
||||||
uint8 prghi;
|
uint8 prghi = 0;
|
||||||
|
|
||||||
uint8 outb = outer << 1;
|
uint8 outb = outer << 1;
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
#include "mapinc.h"
|
#include "mapinc.h"
|
||||||
|
|
||||||
static uint8 mapperNum;
|
static uint32 mapperNum;
|
||||||
static uint8 preg[4];
|
static uint8 preg[4];
|
||||||
static uint8 creg[8];
|
static uint8 creg[8];
|
||||||
static uint8 exRegs[4];
|
static uint8 exRegs[4];
|
||||||
|
|||||||
@@ -30,10 +30,10 @@ static uint32 GetPRGBank(uint32 bank)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SyncPRG_GNROM(int A14, int AND, int OR) {
|
void SyncPRG_GNROM(int A14, int AND, int OR) {
|
||||||
setprg8(0x8000, (GetPRGBank(0) & ~A14) & AND | OR);
|
setprg8(0x8000, ((GetPRGBank(0) & ~A14) & AND) | OR);
|
||||||
setprg8(0xA000, (GetPRGBank(1) & ~A14) & AND | OR);
|
setprg8(0xA000, ((GetPRGBank(1) & ~A14) & AND) | OR);
|
||||||
setprg8(0xC000, (GetPRGBank(0) | A14) & AND | OR);
|
setprg8(0xC000, ((GetPRGBank(0) | A14) & AND) | OR);
|
||||||
setprg8(0xE000, (GetPRGBank(1) | A14) & AND | OR);
|
setprg8(0xE000, ((GetPRGBank(1) | A14) & AND) | OR);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void M534PW(uint32 A, uint8 V) {
|
static void M534PW(uint32 A, uint8 V) {
|
||||||
@@ -47,13 +47,6 @@ static void M534CW(uint32 A, uint8 V) {
|
|||||||
setchr1(A, (V & 0xFF) | ((EXPREGS[2] & 0x0F) << 3) | ((EXPREGS[0] & 0x18) << 4));
|
setchr1(A, (V & 0xFF) | ((EXPREGS[2] & 0x0F) << 3) | ((EXPREGS[0] & 0x18) << 4));
|
||||||
}
|
}
|
||||||
|
|
||||||
static DECLFR(M534Read) {
|
|
||||||
if (EXPREGS[1] & 0x01)
|
|
||||||
return (EXPREGS[4] | (X.DB & ~0x03));
|
|
||||||
else
|
|
||||||
return CartBR(A);
|
|
||||||
}
|
|
||||||
|
|
||||||
static DECLFW(M534IRQWrite) {
|
static DECLFW(M534IRQWrite) {
|
||||||
MMC3_IRQWrite(0xC000 | (A & 1), V ^ 0xFF);
|
MMC3_IRQWrite(0xC000 | (A & 1), V ^ 0xFF);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,6 +52,8 @@ static void Sync(void) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
preg[0] = bank;
|
preg[0] = bank;
|
||||||
|
preg[1] = 0;
|
||||||
|
|
||||||
switch (mode & 3) {
|
switch (mode & 3) {
|
||||||
case 0x00:
|
case 0x00:
|
||||||
case 0x01:
|
case 0x01:
|
||||||
|
|||||||
@@ -335,7 +335,8 @@ static void GenMMC1Init(CartInfo *info, int prg, int chr, int wram, int saveram)
|
|||||||
is155 = 0;
|
is155 = 0;
|
||||||
|
|
||||||
info->Close = GenMMC1Close;
|
info->Close = GenMMC1Close;
|
||||||
MMC1PRGHook16 = MMC1CHRHook4 = MMC1WRAMHook8 = 0;
|
MMC1PRGHook16 = MMC1CHRHook4 = 0;
|
||||||
|
MMC1WRAMHook8 = 0;
|
||||||
WRAMSIZE = wram * 1024;
|
WRAMSIZE = wram * 1024;
|
||||||
NONSaveRAMSIZE = (wram - saveram) * 1024;
|
NONSaveRAMSIZE = (wram - saveram) * 1024;
|
||||||
PRGmask16[0] &= (prg >> 14) - 1;
|
PRGmask16[0] &= (prg >> 14) - 1;
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ static DECLFW(TXC_CMDWrite) {
|
|||||||
if (txc.increase)
|
if (txc.increase)
|
||||||
txc.accumulator++;
|
txc.accumulator++;
|
||||||
else
|
else
|
||||||
txc.accumulator = ((txc.accumulator & ~txc.mask) | (txc.staging ^ txc.invert) & txc.mask);
|
txc.accumulator = ((txc.accumulator & ~txc.mask) | ((txc.staging ^ txc.invert) & txc.mask));
|
||||||
break;
|
break;
|
||||||
case 0x101:
|
case 0x101:
|
||||||
txc.invert = (V & 0x01) ? 0xFF : 0x00;
|
txc.invert = (V & 0x01) ? 0xFF : 0x00;
|
||||||
@@ -133,9 +133,6 @@ static void GenTXCPower(void) {
|
|||||||
TXCRegReset();
|
TXCRegReset();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void TXCClose(void) {
|
|
||||||
}
|
|
||||||
|
|
||||||
static void StateRestore(int version) {
|
static void StateRestore(int version) {
|
||||||
WSync();
|
WSync();
|
||||||
}
|
}
|
||||||
@@ -148,7 +145,7 @@ static void GenTXC_Init(CartInfo *info, void (*proc)(void), uint32 jv001) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int CheckHash(CartInfo *info) {
|
static int CheckHash(CartInfo *info) {
|
||||||
int x, i = 0;
|
int x = 0;
|
||||||
uint64 partialmd5 = 0;
|
uint64 partialmd5 = 0;
|
||||||
|
|
||||||
/* These carts do not work with new mapper implementation.
|
/* These carts do not work with new mapper implementation.
|
||||||
|
|||||||
@@ -81,7 +81,6 @@ static unsigned turbo_delay = 0;
|
|||||||
static unsigned input_type[MAX_PLAYERS + 1] = {0}; /* 4-players + famicom expansion */
|
static unsigned input_type[MAX_PLAYERS + 1] = {0}; /* 4-players + famicom expansion */
|
||||||
enum RetroZapperInputModes{RetroLightgun, RetroMouse, RetroPointer};
|
enum RetroZapperInputModes{RetroLightgun, RetroMouse, RetroPointer};
|
||||||
static enum RetroZapperInputModes zappermode = RetroLightgun;
|
static enum RetroZapperInputModes zappermode = RetroLightgun;
|
||||||
static unsigned show_advance_sound_options;
|
|
||||||
|
|
||||||
/* emulator-specific variables */
|
/* emulator-specific variables */
|
||||||
|
|
||||||
@@ -2215,7 +2214,7 @@ bool retro_load_game(const struct retro_game_info *game)
|
|||||||
FCEU_printf(" Loading custom palette: %s%cnes.pal\n", dir, slash);
|
FCEU_printf(" Loading custom palette: %s%cnes.pal\n", dir, slash);
|
||||||
|
|
||||||
/* Save region and dendy mode for region-auto detect */
|
/* Save region and dendy mode for region-auto detect */
|
||||||
systemRegion = (dendy << 1) | retro_get_region() & 1;
|
systemRegion = (dendy << 1) | (retro_get_region() & 1);
|
||||||
|
|
||||||
retro_set_custom_palette();
|
retro_set_custom_palette();
|
||||||
FCEUD_SoundToggle();
|
FCEUD_SoundToggle();
|
||||||
|
|||||||
@@ -396,7 +396,7 @@ void FCEU_MemoryRand(uint8 *ptr, uint32 size)
|
|||||||
*ptr = (x & 1) ? 0x55 : 0xAA; /* F-15 Sity War HISCORE is screwed... */
|
*ptr = (x & 1) ? 0x55 : 0xAA; /* F-15 Sity War HISCORE is screwed... */
|
||||||
/* 1942 SCORE/HISCORE is screwed... */
|
/* 1942 SCORE/HISCORE is screwed... */
|
||||||
#endif
|
#endif
|
||||||
uint8_t v;
|
uint8_t v = 0;
|
||||||
switch (option_ramstate)
|
switch (option_ramstate)
|
||||||
{
|
{
|
||||||
case 0: v = 0xff; break;
|
case 0: v = 0xff; break;
|
||||||
|
|||||||
@@ -312,7 +312,7 @@ static int SetBoardName(FCEUFILE *fp) {
|
|||||||
FCEU_fread(boardname, 1, uchead.info, fp);
|
FCEU_fread(boardname, 1, uchead.info, fp);
|
||||||
boardname[uchead.info] = 0;
|
boardname[uchead.info] = 0;
|
||||||
/* strip whitespaces */
|
/* strip whitespaces */
|
||||||
boardname = string_trim_whitespace(boardname);
|
boardname = string_trim_whitespace((char const*)boardname);
|
||||||
FCEU_printf(" Board name: %s\n", boardname);
|
FCEU_printf(" Board name: %s\n", boardname);
|
||||||
sboardname = boardname;
|
sboardname = boardname;
|
||||||
if (!memcmp(boardname, "NES-", 4) || !memcmp(boardname, "UNL-", 4) ||
|
if (!memcmp(boardname, "NES-", 4) || !memcmp(boardname, "UNL-", 4) ||
|
||||||
|
|||||||
Reference in New Issue
Block a user