From a0d0c5e7a5bdc396b4c370a750273b6e3b963bb0 Mon Sep 17 00:00:00 2001 From: Nebuleon Fumika Date: Fri, 21 Dec 2012 03:50:10 -0500 Subject: 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. --- source/nds/entry.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'source/nds/entry.cpp') diff --git a/source/nds/entry.cpp b/source/nds/entry.cpp index 24c0e03..467461b 100644 --- a/source/nds/entry.cpp +++ b/source/nds/entry.cpp @@ -90,6 +90,7 @@ void S9xParseDisplayArg (char **argv, int &ind, int) void S9xExit () { + ds2_setCPUclocklevel(13); // Crank it up to exit quickly if(Settings.SPC7110) (*CleanUp7110)(); @@ -382,15 +383,15 @@ void init_sfc_setting(void) Settings.SixteenBit = TRUE; Settings.SupportHiRes = FALSE; - Settings.NetPlay = FALSE; - Settings.ServerName [0] = 0; Settings.ThreadSound = FALSE; Settings.SoundSync = TRUE; Settings.AutoSaveDelay = 0; #ifdef _NETPLAY_SUPPORT + Settings.NetPlay = FALSE; + Settings.ServerName [0] = 0; Settings.Port = NP_DEFAULT_PORT; #endif - Settings.ApplyCheats =FALSE; + Settings.ApplyCheats = FALSE; Settings.TurboMode = FALSE; Settings.TurboSkipFrames = 40; Settings.StretchScreenshots = 1; @@ -1009,7 +1010,8 @@ unsigned int S9xReadJoypad (int which1) key |= (inputdata.key & (1<