aboutsummaryrefslogtreecommitdiff
path: root/source/ppu.c
diff options
context:
space:
mode:
authorJoão Silva2017-02-12 14:46:44 +0000
committerJoão Silva2017-02-12 14:46:44 +0000
commitfb2517282da2fdfc26e58207bbb8e0a8bca35be2 (patch)
treecb331b665bc5d53ad180d5500bf37e2dfbf683d8 /source/ppu.c
parentfa04c025a2108be9bd0432d3d56606e2ef3027f4 (diff)
downloadsnes9x2005-fb2517282da2fdfc26e58207bbb8e0a8bca35be2.tar.gz
snes9x2005-fb2517282da2fdfc26e58207bbb8e0a8bca35be2.tar.bz2
snes9x2005-fb2517282da2fdfc26e58207bbb8e0a8bca35be2.zip
Minor SuperFX optimization. Fixed broken graphics caused by All-Stars SMW speedhack.
Diffstat (limited to 'source/ppu.c')
-rw-r--r--source/ppu.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/source/ppu.c b/source/ppu.c
index bf1aa8a..80920b1 100644
--- a/source/ppu.c
+++ b/source/ppu.c
@@ -1165,8 +1165,8 @@ void S9xSetCPU(uint8_t byte, uint16_t Address)
CPU.Flags |= NMI_FLAG;
CPU.NMIActive = true;
CPU.NMICycleCount = CPU.Cycles + TWO_CYCLES;
+ break;
}
- break;
case 0x4201:
if ((byte & 0x80) == 0 && (Memory.FillRAM[0x4213] & 0x80) == 0x80)
S9xLatchCounters(1);
@@ -2363,20 +2363,15 @@ void S9xSuperFXExec()
{
if (Settings.SuperFX)
{
- if ((Memory.FillRAM [0x3000 + GSU_SFR] & FLG_G) &&
- (Memory.FillRAM [0x3000 + GSU_SCMR] & 0x18) == 0x18)
+ if ((Memory.FillRAM [0x3000 + GSU_SFR] & FLG_G) && (Memory.FillRAM [0x3000 + GSU_SCMR] & 0x18) == 0x18)
{
if (!Settings.WinterGold || Settings.StarfoxHack)
FxEmulate(~0);
else
FxEmulate((Memory.FillRAM [0x3000 + GSU_CLSR] & 1) ? 700 : 350);
- int32_t GSUStatus = Memory.FillRAM [0x3000 + GSU_SFR] |
- (Memory.FillRAM [0x3000 + GSU_SFR + 1] << 8);
+ int32_t GSUStatus = Memory.FillRAM [0x3000 + GSU_SFR] | (Memory.FillRAM [0x3000 + GSU_SFR + 1] << 8);
if ((GSUStatus & (FLG_G | FLG_IRQ)) == FLG_IRQ)
- {
- // Trigger a GSU IRQ.
- S9xSetIRQ(GSU_IRQ_SOURCE);
- }
+ S9xSetIRQ(GSU_IRQ_SOURCE); // Trigger a GSU IRQ.
}
}
}