Commit Graph

41 Commits

Author SHA1 Message Date
19459e827f Partially revert "General: Toss out PRI macro usage" 2015-09-11 09:49:00 -04:00
8fdb013d54 General: Toss out PRI macro usage
Now that VS supports more printf specifiers, these aren't necessary
2015-09-05 16:02:35 -04:00
6ec4bdf862 CoreTiming: remove unused functions 2015-08-26 15:40:15 +02:00
0f4861cac2 CoreTiming: make loops easier to read 2015-08-26 14:53:58 +02:00
c375111076 Options: merge SCoreStartupParameter into SConfig 2015-06-12 19:07:45 +02:00
d31bed8b79 Fifo: Rewrite SyncGpu
The new implementation has 3 options:
 SyncGpuMaxDistance
 SyncGpuMinDistance
 SyncGpuOverclock

The MaxDistance controlls how many CPU cycles the CPU is allowed to be in front
of the GPU. Too low values will slow down extremly, too high values are as
unsynchronized and half of the games will crash.
The -MinDistance (negative) set how many cycles the GPU is allowed to be in
front of the CPU. As we are used to emulate an infinitiv fast GPU, this may be
set to any high (negative) number.

The last parameter is to hack a faster (>1.0) or slower(<1.0) GPU. As we don't
emulate GPU timing very well (eg skip the timings of the pixel stage completely),
an overclock factor of ~0.5 is often much more accurate than 1.0
2015-06-08 23:16:24 +02:00
030d467d62 Use PanicAlert instead of PanicAlertT when appropriate
It means less work for the translators... But I'm not too sure
about this, because most of these have already been translated.
2015-06-04 13:25:17 +02:00
c0e567731a Merge pull request #2352 from JosJuice/scheduleevent-immediate-assert
CoreTiming: Add assert to ScheduleEvent_Immediate
2015-06-02 20:22:14 -04:00
0c5aa54606 Merge pull request #2470 from degasus/syncgpu
Common: Blocking Loop (extracted from Fifo.cpp)
2015-06-02 20:19:00 -04:00
02a3a063c3 Fifo: Extract syncing loop
It's now a new helper function within common.
2015-05-30 12:58:09 +02:00
138d72313e Add a quick check to ScheduleEvent_Threadsafe to ensure it doesn't happen in deterministic mode. 2015-05-28 19:14:43 -04:00
c59bfd2b7f Fix building with PCH disabled. 2015-05-26 22:44:51 -05:00
30ebb2459e Set copyright year to when a file was created 2015-05-25 13:22:31 +02:00
cefcb0ace9 Update license headers to GPLv2+ 2015-05-25 13:22:31 +02:00
9851bd818d CoreTiming: Add assert to ScheduleEvent_Immediate
My PR with ScheduleEvent_Immediate and magumagu's PR with the asserts
were made around the same time, so this function never got an assert.
2015-05-01 12:17:39 +02:00
e000aaaf5d Have the UI thread do PauseAndLock before messing with GetUsbPointer.
Since its lifetime is managed on the CPU thread, this (or a refactoring)
is absolutely required.  One of the functions with a PauseAndLock call
added is CFrame::UpdateGUI; this is fine now, since it's called only
after important events happen, so just make sure not to call it every
frame or something :)
2015-04-13 01:49:24 -04:00
b020ae1c5d Fifo: rewrite sync on idle skipping hack
Now it's done without a busy loop
2015-04-06 12:35:35 +02:00
8cc6e5cff9 Merge pull request #1854 from JosJuice/read-disc-after-delay
DVDInterface: Read disc after delay, not before
2015-02-18 20:35:07 +00:00
3ac0977bc6 DVDInterface: Read disc after delay, not before 2015-02-17 14:57:36 +01:00
98b809a05e Disable thread safety assertions added in PR1987.
We do a whole bunch of non-threadsafe stuff, especially in the UI, and I'm
probably not going to get around to implementing a threadsafe framework
for interaction between the UI and the CPU thread anytime soon.  See issue
8220.
2015-02-12 11:54:17 -08:00
47be9d8e6b Clean up usage of ScheduleEvent_Threadsafe. 2015-01-30 14:48:23 -08:00
257deb7886 CoreTiming: fix warning 2015-01-28 08:27:14 +01:00
213eb730d0 For idle loops, don't explicitly call CoreTiming::Advance.
This is more consistent with the way Dolphin behaves with idle skipping off.
2015-01-11 20:42:08 -08:00
c2c950108d Support overclocking and underclocking the Gamecube CPU
Won't work with all games, but provides a nice way to spend extra CPU to make
a variable framerate game faster (e.g. Spyro or The Last Story), or to make
a game use less CPU at the cost of a lower framerate (e.g. Rogue Leader).
2015-01-10 10:46:38 -08:00
7e12fec7c3 VideoCommon: Make GPU syncing hack optional
This hack is there for quite a long time, and lots of games crashes if it's disabled.
But it's still a hack, so it shouldn't be enabled hard coded. This commit create a new
ini option for this hack which is enabled by default.
Maybe some games does still run very fine without this hack.
2014-12-21 11:54:53 +01:00
b25e1a2eb4 Various formatting and consistency fixes 2014-11-13 22:42:18 -05:00
2f9e9bf1fc JIT: completely inline timer reading
Should be a bit faster on games that heavily use the timer.
2014-09-04 21:55:36 -07:00
eb535be874 Core: Clean up brace placements 2014-08-30 18:06:49 -04:00
eb3a1de3f6 Core: Turn some includes into forward declarations. 2014-07-27 13:37:09 -04:00
6d3f249dcc mark all local variables as static 2014-07-11 16:10:20 +02:00
22e1aa5bb4 mark all local functions as static 2014-07-11 16:07:23 +02:00
a40ae6883a Move CoreTiming::downcount to PowerPC::ppcState.
This isn't technically the correct place to have the downcount variable, but it is similar to what PPSSPP does to gain a bit of extra speed on ARM.
We access this variable quite a bit, with each exit in a block it is subtracted from.
On ARM this required four instructions to load and store the value, while now it only requires two.

This gives an average of 1FPS gain to most games.
Examples:
Crazy Taxi: 54FPS -> 55FPS
Luigi's Mansion: 20FPS -> 21FPS
Wind Waker(Save Screen): 27FPS -> 28FPS

This seems to average a 6mhz to 16mhz CPU core emulation improvement in the few games I've tested.
2014-06-26 01:48:00 +00:00
a82675b7d5 Kill off some usages of c_str.
Also changes some function params, but this is ok.
Some simplifications were also able to be made (ie. killing off strcmps with ==, etc).
2014-03-14 13:51:23 -04:00
31cfc73a09 Fixes spacing for "for", "while", "switch" and "if"
Also moved && and || to ends of lines instead of start.
Fixed misc vertical alignments and some { needed newlining.
2014-03-11 00:35:07 +13:00
d802d39281 clang-modernize -use-nullptr
and s/\bNULL\b/nullptr/g for *.cpp/h/mm files not compiled on my machine
2014-03-09 21:14:26 +01:00
2afe215271 Convert all includes to relative paths. 2014-02-18 02:19:10 -05:00
3fd87a7636 Second and final pass of clearing out tabs. 2014-02-17 02:19:41 -05:00
2ff794d299 Fix some warnings 2014-02-13 09:02:43 +01:00
70d2592ffb Fix warnings found by StringFromFormat having printf style checking. 2014-02-07 01:38:08 +13:00
fea3076241 Fix an unused variable within function GetScheduledEventsSummary() in CoreTiming.cpp. 2014-01-30 15:52:27 -05:00
34692ab826 Remove unnecessary Src/ folders 2013-12-31 14:03:19 -05:00