diff --git a/src/boards/411120-c.c b/src/boards/411120-c.c index 765ce19..a21a898 100644 --- a/src/boards/411120-c.c +++ b/src/boards/411120-c.c @@ -32,7 +32,7 @@ #include "mmc3.h" static uint8 reset_flag = 0; -static uint8 chip, isK3088; +static uint8 isK3088; static void BMC411120CCW(uint32 A, uint8 V) { uint32 mask = isK3088 ? 0x07 : 0x03; diff --git a/src/boards/69.c b/src/boards/69.c index 2a7093b..3117106 100644 --- a/src/boards/69.c +++ b/src/boards/69.c @@ -135,7 +135,6 @@ static DECLFW(M69SWrite0) { } static DECLFW(M69SWrite1) { - int x; GameExpSound.Fill = AYSound; GameExpSound.HiFill = AYSoundHQ; switch (sndcmd) { diff --git a/src/boards/8157.c b/src/boards/8157.c index b81c05f..eb9224f 100644 --- a/src/boards/8157.c +++ b/src/boards/8157.c @@ -23,7 +23,6 @@ #include "mapinc.h" -static uint8 chip; static uint16 cmdreg; static uint8 reset; static SFORMAT StateRegs[] = diff --git a/src/boards/KS7032.c b/src/boards/KS7032.c index 41739af..8e123e5 100644 --- a/src/boards/KS7032.c +++ b/src/boards/KS7032.c @@ -31,7 +31,7 @@ #include "mapinc.h" -static uint8 reg[8], creg[8], mirr, cmd, IRQa = 0, isirqused = 0; +static uint8 reg[8], creg[8], mirr, cmd, IRQa = 0; static int32 IRQCount, IRQLatch; static uint8 KS7032; static uint8 *WRAM = NULL; diff --git a/src/boards/bmc80013b.c b/src/boards/bmc80013b.c index ddf413e..2966bde 100644 --- a/src/boards/bmc80013b.c +++ b/src/boards/bmc80013b.c @@ -37,7 +37,7 @@ static void Sync(void) { if (mode & 0x02) setprg16(0x8000, (regs[0] & 0x0F) | (regs[1] & 0x70)); else - setprg16(0x8000, regs[0] & 0x0F | 0x80); + setprg16(0x8000, (regs[0] & 0x0F) | 0x80); setprg16(0xC000, regs[1]); setmirror(((regs[0] >> 4) & 1) ^ 1); } diff --git a/src/boards/mmc3.c b/src/boards/mmc3.c index 3c9d42a..5c498fc 100644 --- a/src/boards/mmc3.c +++ b/src/boards/mmc3.c @@ -44,8 +44,6 @@ uint8 mmc3opts = 0; uint8 IRQCount, IRQLatch, IRQa; uint8 IRQReload; -static uint8 chip; - static SFORMAT MMC3_StateRegs[] = { { DRegBuf, 8, "REGS" }, @@ -1198,7 +1196,6 @@ void Mapper198_Init(CartInfo *info) { /* ---------------------------- Mapper 205 ------------------------------ */ /* UNIF boardname BMC-JC-016-2 https://wiki.nesdev.com/w/index.php/INES_Mapper_205 */ -static uint8 block[] = {0, 0, 1, 2}; static void M205PW(uint32 A, uint8 V) { uint8 bank = V & ((EXPREGS[0] & 0x02) ? 0x0F : 0x1F); diff --git a/src/boards/resettxrom.c b/src/boards/resettxrom.c index 8bef280..910c8a2 100644 --- a/src/boards/resettxrom.c +++ b/src/boards/resettxrom.c @@ -27,8 +27,6 @@ #include "mapinc.h" #include "mmc3.h" -static uint8 chip; - static void M313CW(uint32 A, uint8 V) { setchr1(A, (EXPREGS[0] << 7) | (V & 0x7F)); } diff --git a/src/boards/t-262.c b/src/boards/t-262.c index 5aaa515..ae8c818 100644 --- a/src/boards/t-262.c +++ b/src/boards/t-262.c @@ -20,7 +20,6 @@ #include "mapinc.h" -static uint8 chip; static uint8 bank, base, lock, mirr, mode; static SFORMAT StateRegs[] = { diff --git a/src/boards/vrc2and4.c b/src/boards/vrc2and4.c index b26d804..9749d48 100644 --- a/src/boards/vrc2and4.c +++ b/src/boards/vrc2and4.c @@ -31,7 +31,6 @@ static uint8 prgreg[2], chrreg[8]; static uint16 chrhi[8]; static uint8 regcmd, irqcmd, mirr, big_bank; static uint16 acount = 0; -static uint16 weirdo = 0; static uint8 *WRAM = NULL; static uint32 WRAMSIZE; @@ -65,15 +64,8 @@ static void Sync(void) { setchr8(0); else { uint8 i; - /* if (!weirdo) */ - for (i = 0; i < 8; i++) - setchr1(i << 10, (chrhi[i] | chrreg[i]) >> is22); - /* else { - setchr1(0x0000, 0xFC); - setchr1(0x0400, 0xFD); - setchr1(0x0800, 0xFF); - weirdo--; - } */ + for (i = 0; i < 8; i++) + setchr1(i << 10, (chrhi[i] | chrreg[i]) >> is22); } switch (mirr & 0x3) { case 0: setmirror(MI_V); break; diff --git a/src/vsuni.c b/src/vsuni.c index 6c7dc1c..6645046 100644 --- a/src/vsuni.c +++ b/src/vsuni.c @@ -309,13 +309,10 @@ void FCEU_VSUniCheck(uint64 md5partial, int *MapperNo, uint8 *Mirroring) { secptr = 0; - { - static int64 tko = 0x6e1ee06171d8ce3aULL, rbi = 0x6a02d345812938afULL; - if (vs->gameid & VS_TKOBOXING) - secptr = secdata[0]; - if (md5partial == rbi) - secptr = secdata[1]; - } + if (vs->gameid & VS_TKOBOXING) + secptr = secdata[0]; + if (vs->gameid & VS_RBIBASEBALL) + secptr = secdata[1]; vsdip = 0x0; if (vs->ioption & IOPTION_PREDIP) {