From e5869adc4469115c7eac9abf70145fc178e017de Mon Sep 17 00:00:00 2001 From: Nebuleon Fumika Date: Wed, 26 Dec 2012 14:42:02 -0500 Subject: Merge Registers structures into their respective CPUs to avoid additional memory addresses being loaded every opcode. --- source/cpuexec.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source/cpuexec.cpp') 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); -- cgit v1.2.3