aboutsummaryrefslogtreecommitdiff
path: root/source/cpuexec.cpp
diff options
context:
space:
mode:
authorNebuleon Fumika2012-12-26 14:42:02 -0500
committerNebuleon Fumika2012-12-26 14:42:02 -0500
commite5869adc4469115c7eac9abf70145fc178e017de (patch)
tree552805b1c150fea2f5e905e550d034f71c03fb75 /source/cpuexec.cpp
parent139c793b584a76acd42d72ec019d2cabab7d3ee7 (diff)
downloadsnes9x2005-e5869adc4469115c7eac9abf70145fc178e017de.tar.gz
snes9x2005-e5869adc4469115c7eac9abf70145fc178e017de.tar.bz2
snes9x2005-e5869adc4469115c7eac9abf70145fc178e017de.zip
Merge Registers structures into their respective CPUs to avoid additional memory addresses being loaded every opcode.
Diffstat (limited to 'source/cpuexec.cpp')
-rw-r--r--source/cpuexec.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/cpuexec.cpp b/source/cpuexec.cpp
index 5fb79e5..66bb8da 100644
--- a/source/cpuexec.cpp
+++ b/source/cpuexec.cpp
@@ -171,9 +171,9 @@ void S9xMainLoop (void)
DO_HBLANK_CHECK();
}
- Registers.PC = CPU.PC - CPU.PCBase;
+ ICPU.Registers.PC = CPU.PC - CPU.PCBase;
S9xPackStatus ();
- APURegisters.PC = IAPU.PC - IAPU.RAM;
+ IAPU.Registers.PC = IAPU.PC - IAPU.RAM;
S9xAPUPackStatus ();
if (CPU.Flags & SCAN_KEYS_FLAG)
{
@@ -235,10 +235,10 @@ void S9xDoHBlankProcessing ()
// ppu.cpp will determine with greater accuracy whether a key was
// pressed or released during the frame.
uint32 i;
- for (i = 0; i < 5; i++)
- {
- IPPU.JoypadsAtHBlanks [i][CPU.V_Counter] = S9xReadJoypad (i);
- }
+ for (i = 0; i < 5; i++)
+ {
+ IPPU.JoypadsAtHBlanks [i][CPU.V_Counter] = S9xReadJoypad (i);
+ }
#endif
if (IPPU.HDMA && CPU.V_Counter <= PPU.ScreenHeight)
IPPU.HDMA = S9xDoHDMA (IPPU.HDMA);