aboutsummaryrefslogtreecommitdiff
path: root/source/ppu.h
diff options
context:
space:
mode:
authorNebuleon Fumika2012-12-21 03:50:10 -0500
committerNebuleon Fumika2012-12-21 03:50:10 -0500
commita0d0c5e7a5bdc396b4c370a750273b6e3b963bb0 (patch)
tree6bc433422db602b974a01dffbfc5ce5d84afc578 /source/ppu.h
parent3972512b2a5c25236ea3ba586621dba6e5b56361 (diff)
downloadsnes9x2005-a0d0c5e7a5bdc396b4c370a750273b6e3b963bb0.tar.gz
snes9x2005-a0d0c5e7a5bdc396b4c370a750273b6e3b963bb0.tar.bz2
snes9x2005-a0d0c5e7a5bdc396b4c370a750273b6e3b963bb0.zip
Eliminate the latency of button press recognition, which was bad enough to lose keys entirely sometimes, and could otherwise delay a button press or release by 200 ms.
This was the entire reason I created the fork, and I finally did it! It syncs the controls every scanline of a frame, which costs about 60,000 MIPS instructions per frame to deal with. Luckily, the processor runs at 396 MHz, which means the cost of checking the controls is 1% of the CPU's power.
Diffstat (limited to 'source/ppu.h')
-rw-r--r--source/ppu.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/ppu.h b/source/ppu.h
index 6daf473..065ad5f 100644
--- a/source/ppu.h
+++ b/source/ppu.h
@@ -151,6 +151,9 @@ struct InternalPPU {
int CurrentLine;
int Controller;
uint32 Joypads[5];
+#ifdef SYNC_JOYPAD_AT_HBLANK
+ uint32 JoypadsAtHBlanks[5][SNES_MAX_PAL_VCOUNTER];
+#endif
uint32 SuperScope;
uint32 Mouse[2];
int PrevMouseX[2];