Commit Graph

14550 Commits

Author SHA1 Message Date
skidau
11126f0bfc Merge pull request #1155 from booto/dsp-int-fix
dsp int timing tweak
2014-10-02 13:46:03 +10:00
KAMiKAZOW
c026bf4af1 Update dolphin-emu.spec
Removed glew-devel
2014-10-02 04:27:39 +02:00
Fiora
1bce0a847b Fix BAT register initial values in bootcode
Probably won't affect any real things for now, since these BATs are already
hardcoded into the memory handling functions.
2014-10-01 12:54:06 -07:00
KAMiKAZOW
d620b915d4 Create dolphin-emu.spec
Cross-distribution spec file to build Linux packages.
Confirmed to work with Fedora, openSUSE, and even CentOS:
https://build.opensuse.org/package/show/home:KAMiKAZOW:Test/dolphin-emu

Mageia should work as well.
2014-10-01 20:10:42 +02:00
Rachel Bryk
4280d9777a Add support for cc and nunchuck in input display. 2014-10-01 03:51:49 -04:00
skidau
d983fe1ddd Merge pull request #1178 from Stevoisiak/MissingGameSettings
Added missing game settings files
2014-10-01 13:28:19 +10:00
skidau
ffe160ad81 Merge pull request #1187 from lioncash/global
AudioCommon: Prefix soundStream global with g_
2014-10-01 13:23:11 +10:00
skidau
19fbefd9bd Merge pull request #1176 from FioraAeterna/pagecrossings
MMU: support loads/stores that cross page boundaries
2014-10-01 13:22:52 +10:00
Lioncash
0d8b34612e WiiSaveCrypted: Move some function params over to std::string 2014-09-30 20:31:59 -04:00
Rachel Bryk
621d5c5cd8 Don't allow multi compress to compress wbfs or wad files. 2014-09-30 19:28:16 -04:00
Rachel Bryk
f6c6f03cce Add on screen frame counter. 2014-09-30 18:49:44 -04:00
Rohit Nirmal
ce8a4f5cc5 VideoCommon: Silence -Wmaybe-uninitialized warnings. 2014-09-30 16:14:18 -04:00
Tony Wasserka
13fc8e7df1 Merge pull request #578 from RachelBryk/IR
Cleanup Renderer::CalculateTargetSize(), and allow IRs higher than 4x to be set via INI.
2014-09-30 19:21:21 +02:00
Rachel Bryk
c0270f63c5 If one argument is given, assume it is a game, and run it. 2014-09-30 09:21:34 -04:00
Rachel Bryk
f7a993a853 Fix IR input display. 2014-09-30 08:24:18 -04:00
Fiora
85547d94be JIT: properly remove FIFO write addresses when code is invalidated
Fixes a bug caused by interaction with carry optimizations; might fix other
issues too.
2014-09-30 01:00:23 -07:00
Lioncash
7f7fb5e70c AudioCommon: Prefix soundStream global with g_ 2014-09-30 03:06:16 -04:00
comex
a9b4016cd3 Merge pull request #1166 from FioraAeterna/flaglocking
JIT+Emitter: support locking flags
2014-09-30 02:57:53 -04:00
comex
acac5325f5 Merge pull request #1134 from RachelBryk/movie-menu
Create new Movie menu.
2014-09-30 02:51:21 -04:00
comex
58a29ec0cd Merge pull request #1177 from lioncash/array
DSPJitRegCache: Use std::array to represent the register arrays
2014-09-30 02:50:53 -04:00
comex
71b4c2ee9c Merge pull request #1180 from Stevoisiak/Replace-GCM-With-ISO
Replaced GCM functions with ISO functions
2014-09-30 02:47:33 -04:00
comex
4edc7fbf85 Merge pull request #1190 from comex/stackalign
Remove useless STACKALIGN macro.
2014-09-30 01:54:38 -04:00
comex
ac1f9f950f Merge pull request #1186 from lioncash/macro
NetPlayClient: Remove unused macro
2014-09-30 01:52:01 -04:00
comex
ed2ce8d8d4 Merge pull request #1191 from comex/wxGetActiveWindow
Fix focus detection on OS X by replacing wxGetActiveWindow with wxWindow...
2014-09-30 01:49:39 -04:00
comex
2eebdff01b Remove useless STACKALIGN macro.
It only ever did anything on 32-bit OS X.

Anyway, it wasn't even on the right functions, and these days
ABI_PushRegistersAndAdjustStack should handle maintaining the ABI
correctly.
2014-09-30 01:42:47 -04:00
comex
8fed5aa492 Fix focus detection on OS X by replacing wxGetActiveWindow with wxWindow::FindFocus.
wxGetActiveWindow is implemented as "return NULL" on OS X, while
wxWindow::FindFocus works.  On Windows, the difference is in the use of
GetActiveWindow() vs. GetForegroundWindow().  A MSDN comment says:

> A system has only one active window, which GetForegroundWindow()
> returns. GetActiveWindow() seems to return the same window as
> GetForegroundWindow() if the foreground window belongs to the current
> thread. Otherwise, it always returns null, rather than the topmost
> window of the calling thread.

Since we are on the GUI thread, it shouldn't make any difference.
2014-09-30 01:35:48 -04:00
comex
5d61081f91 Merge pull request #1188 from comex/ReadDataFromFifo
ReadDataFromFifo is always called with len = 32.  Remove the parameter t...
2014-09-30 01:08:36 -04:00
Fiora
22f087275c MMU: support loads/stores that cross page boundaries
Fixes some strange issues with Rogue Squadron 3 in JIT mode.
2014-09-29 21:19:21 -07:00
Rachel Bryk
f40e8a5cd0 Create new Movie menu. 2014-09-30 00:10:39 -04:00
skidau
63cee3328f Merge pull request #1167 from FioraAeterna/fixdebugwindow
Debug: fix display of instructions in virtual memory in MMU games
2014-09-30 13:28:41 +10:00
skidau
f675b33640 Merge pull request #1164 from FioraAeterna/bpcarry
JIT: fix carry merging across breakpoints
2014-09-30 13:25:24 +10:00
skidau
9d9984e96f Merge pull request #1159 from FioraAeterna/blocklinkdebug
JIT: enable block linking and idle skipping in debug mode
2014-09-30 13:24:16 +10:00
skidau
7828ddd542 Merge pull request #1150 from FioraAeterna/extsmerge
JIT: merge lbz + extsb
2014-09-30 13:19:45 +10:00
skidau
da221e3d9c Merge pull request #1018 from zhuowei/elf_map_basename_only
When loading the map file for a DOL/ELF file, extract only the filename from the DOL/ELF's path
2014-09-30 13:17:29 +10:00
comex
87a95727cd ReadDataFromFifo is always called with len = 32. Remove the parameter to enable optimizations.
And rename some variables around it to be less confusing.
2014-09-29 22:07:16 -04:00
Lioncash
05a8d9d54a NetPlayClient: Remove unused macro 2014-09-29 08:42:18 -04:00
comex
b5ebace92e Merge pull request #1185 from comex/opengl-core-extensions
Add OpenGL 4.0-4.5 core extensions.
2014-09-29 02:22:50 -04:00
Lioncash
843a3f6c15 Core: Move FPSCR exception flags to a typed enum 2014-09-29 00:46:15 -04:00
comex
b8e31c1d3e Add OpenGL 4.0-4.5 core extensions.
This noticeably includes GL_ARB_get_program_binary, which was previously
thought unsupported on OS X.  Well, actually, the OS X implementation is
trivial and reports 0 binary formats (as of 10.10; this is hardcoded in
GLEngine, by the way), but at least it'll work if it's fixed someday.
2014-09-29 00:36:45 -04:00
comex
4c031bed4b Merge pull request #1179 from lioncash/casts
Jit_Integer: Get rid of some cast noise in boolX
2014-09-28 23:58:09 -04:00
skidau
8ae2152093 Merge pull request #1168 from lioncash/unique
CoreParameter: Use unique_ptrs over raw pointers.
2014-09-29 13:55:00 +10:00
skidau
007ba13cfa Merge pull request #1144 from skidau/fifo-linked
Moved the linking of the FIFO CPWritePointer near where CPWritePointer gets updated
2014-09-29 13:52:33 +10:00
skidau
c7f3858379 Merge pull request #1138 from FioraAeterna/arithetweak
JIT: a small optimization for subfex and friends
2014-09-29 13:51:44 +10:00
Lioncash
d13383c4e6 Merge pull request #1181 from FioraAeterna/debuggqr
GekkoDisassembler: show W and I in psq_l/psq_st disassembly
2014-09-28 23:45:49 -04:00
comex
fbabc03b3f Merge pull request #885 from comex/gpu-determinism
GPU determinism (apparently it is ready for merge)
2014-09-28 21:59:27 -04:00
comex
6c0a68d507 Add the override config option.
I hate the config code, but now is not the time to fix it...
2014-09-28 21:34:31 -04:00
comex
3a2048ea57 Add a central variable g_want_determinism which controls whether to try to make things deterministic.
It now affects the GPU determinism mode as well as some miscellaneous
things that were calling IsNetPlayRunning.  Probably incomplete.

Notably, this can change while paused, if the user starts recording a
movie.  The movie code appears to have been missing locking between
setting g_playMode and doing other things, which probably had a small
chance of causing crashes or even desynced movies; fix that with
PauseAndLock.

The next commit will add a hidden config variable to override GPU
determinism mode.
2014-09-28 21:34:31 -04:00
comex
65af90669b Add the 'desynced GPU thread' mode.
It's a relatively big commit (less big with -w), but it's hard to test
any of this separately...

The basic problem is that in netplay or movies, the state of the CPU
must be deterministic, including when the game receives notification
that the GPU has processed FIFO data.  Dual core mode notifies the game
whenever the GPU thread actually gets around to doing the work, so it
isn't deterministic.  Single core mode is because it notifies the game
'instantly' (after processing the data synchronously), but it's too slow
for many systems and games.

My old dc-netplay branch worked as follows: everything worked as normal
except the state of the CP registers was a lie, and the CPU thread only
delivered results when idle detection triggered (waiting for the GPU if
they weren't ready at that point).  Usually, a game is idle iff all the
work for the frame has been done, except for a small amount of work
depending on the GPU result, so neither the CPU or the GPU waiting on
the other affected performance much.  However, it's possible that the
game could be waiting for some earlier interrupt, and any of several
games which, for whatever reason, never went into a detectable idle
(even when I tried to improve the detection) would never receive results
at all.  (The current method should have better compatibility, but it
also has slightly higher overhead and breaks some other things, so I
want to reimplement this, hopefully with less impact on the code, in the
future.)

With this commit, the basic idea is that the CPU thread acts as if the
work has been done instantly, like single core mode, but actually hands
it off asynchronously to the GPU thread (after backing up some data that
the game might change in memory before it's actually done).  Since the
work isn't done, any feedback from the GPU to the CPU, such as real
XFB/EFB copies (virtual are OK), EFB pokes, performance queries, etc. is
broken; but most games work with these options disabled, and there is no
need to try to detect what the CPU thread is doing.

Technically: when the flag g_use_deterministic_gpu_thread (currently
stuck on) is on, the CPU thread calls RunGpu like in single core mode.
This function synchronously copies the data from the FIFO to the
internal video buffer and updates the CP registers, interrupts, etc.
However, instead of the regular ReadDataFromFifo followed by running the
opcode decoder, it runs ReadDataFromFifoOnCPU ->
OpcodeDecoder_Preprocess, which relatively quickly scans through the
FIFO data, detects SetFinish calls etc., which are immediately fired,
and saves certain associated data from memory (e.g. display lists) in
AuxBuffers (a parallel stream to the main FIFO, which is a bit slow at
the moment), before handing the data off to the GPU thread to actually
render.  That makes up the bulk of this commit.

In various circumstances, including the aforementioned EFB pokes and
performance queries as well as swap requests (i.e. the end of a frame -
we don't want the CPU potentially pumping out frames too quickly and the
GPU falling behind*), SyncGPU is called to wait for actual completion.

The overhead mainly comes from OpcodeDecoder_Preprocess (which is,
again, synchronous), as well as the actual copying.

Currently, display lists and such are escrowed from main memory even
though they usually won't change over the course of a frame, and
textures are not even though they might, resulting in a small chance of
graphical glitches.  When the texture locking (i.e. fault on write) code
lands, I can make this all correct and maybe a little faster.

* This suggests an alternate determinism method of just delaying results
until a short time before the end of each frame.  For all I know this
might mostly work - I haven't tried it - but if any significant work
hinges on the competion of render to texture etc., the frame will be
missed.
2014-09-28 21:34:29 -04:00
comex
2d4b7c5900 Make ReadDataFromFifo static. 2014-09-28 21:25:12 -04:00
comex
0ae9e398c8 Rejigger some FIFO buffer variables to be more rational.
videoBuffer -> s_video_buffer
size -> s_video_buffer_write_ptr
g_pVideoData -> g_video_buffer_read_ptr (impl moved to Fifo.cpp)

This eradicates the wonderful use of 'size' as a global name, and makes
it clear that s_video_buffer_write_ptr and g_video_buffer_read_ptr are
the two ends of the FIFO buffer s_video_buffer.

Oh, and remove a useless namespace {}.
2014-09-28 21:25:12 -04:00