Commit Graph

128 Commits

Author SHA1 Message Date
Shawn Hoffman 500a694ca8 msbuild: bundle all dolphin "core" code into single library 2021-01-27 14:29:49 -08:00
Lioncash 7d1bd565a6 DSP: Eliminate most global state
An unfortunately large single commit that deglobalizes the DSP code.
(which I'm very sorry about).

This would have otherwise been extremely difficult to separate due to
extensive use of the globals in very coupling ways that would result in
more scaffolding to work around than is worth it.

Aside from the video code, I believe only the DSP code is the hairiest
to deal with in terms of globals, so I guess it's best to get this dealt
with right off the bat.

A summary of what this commit does:
  - Turns the DSPInterpreter into its own class
    This is the most involved portion of this change.
    The bulk of the changes are turning non-member functions into member
    functions that would be situated into the Interpreter class.

  - Eliminates all usages to globals within DSPCore.
    This generally involves turning a lot of non-member functions into
    member functions that are either situated within SDSP or DSPCore.

  - Discards DSPDebugInterface (it wasn't hooked up to anything,
    and for the sake of eliminating global state, I'd rather get rid of
    it than think up ways for this class to be integrated with
    everything else.

  - Readjusts the DSP JIT to handle calling out to member functions.
    In most cases, this just means wrapping respective member function
    calles into thunk functions.

Surprisingly, this doesn't even make use of the introduced System class.
It was possible all along to do this without it. We can house everything
within the DSPLLE class, which is quite nice =)
2020-12-27 06:38:02 -05:00
Shawn Hoffman 2f47f486af msbuild: re-enable standalone vcxproj processing 2020-08-22 16:17:50 -07:00
Shawn Hoffman 94bf48b67c msbuild: refactor stuff out of project files (for dolphin) 2020-08-22 16:17:50 -07:00
Pokechu22 1ca3710bd2 DSPLLE: Use Memory functions isntead of directly using Memory::physical_base
Fixes bug 11980
2020-07-24 15:06:39 -07:00
Pokechu22 59dc7cfe7d Use size_t in some DSP code code 2020-07-24 15:06:39 -07:00
Tillmann Karras a12159f2b6 DSPTool: fix build 2020-05-17 10:47:20 +01:00
JosJuice 55f787b898 Remove unused function Host_UpdateProgressDialog 2020-04-03 12:53:38 +02:00
Stenzek 6fcb1c6c46 Add an ARM64 target to Visual Studio projects 2019-12-28 19:20:41 +10:00
Stenzek dd23a1ee79 Update VS projects/solutions to VS2019 2019-11-30 13:42:52 +10:00
Jordan Woyak 85ceb37ccd InputCommon: Make the "input gate" not racey. 2019-11-06 16:31:02 -06:00
Lioncash c212310fbe VideoCommon/OnScreenDisplay: Take Message's std::string parameter by value
Allows callers to std::move strings into the functions (or automatically
assume the move constructor/move assignment operator for rvalue
references, potentially avoiding copies altogether.
2019-07-28 23:00:58 -04:00
Silent 5f0b4d8da5
Fix a crash in DSPTool on malformed command line 2019-06-23 21:55:51 +02:00
Lioncash eb475025b8 Common/FileUtil: Make WriteStringToFile consistent with ReadFileToString
Makes the parameter ordering consistent and less error-prone.
2019-05-29 07:06:53 -04:00
David Korth 8417c78b7a Update Discord rich presence when the title changes
This allows us to update the rich presence description if a channel
is launched from the Wii Menu. It also handles other PPC title
launches, e.g. Smash Bros. Masterpieces.

Host.h: Added Host_TitleChanged().

DolphinNoGUI/MainNoGUI.cpp: Implemented Host_TitleChanged().
DolphinQt/Host.cpp: Implemented Host_TitleChanged().

Android/jni/MainAndroid.cpp: Stubbed Host_TitleChanged().
DSPTool/StubHost.cpp: Stubbed Host_TitleChanged().
UnitTests/StubHost.cpp: Stubbed Host_TitleChanged().
2019-05-24 14:12:48 +02:00
Tillmann Karras 97cc9894e4 Update to Visual Studio's default Windows SDK 2018-10-20 00:53:08 +01:00
Stenzek a877d5f6dc Remove unused Host_ShowVideoConfig 2018-09-28 14:05:53 +10:00
Léo Lam eb9009e5c0 DSPTool: Use std::string == instead of strcmp
Less C-like and conveniently fixes a build issue caused by strcmp
not being declared for some reason.

Converting to std::string is safe because the argument count is
checked every time so the char* cannot be a nullptr.
2018-07-05 09:40:43 +02:00
Lioncash 43daebbc66 DSPTool: Get rid of unnecessary casts 2018-06-22 17:53:24 -04:00
Lioncash 83dab8dd36 DSPTool: Get rid of raw new and delete
We can just use a vector of a vector, which also has the benefit of
keeping the size accounted for as well, allowing us to get rid of a
count parameter for CodesToHeader().
2018-06-22 17:53:20 -04:00
Lioncash d81e3fddce DSPTool: Make CodeToHeader() and CodesToHeader() return a std::string directly
Instead of using an out-reference, we can modernize these to return the
std::string directly. While we're at it, also remove the unused name
parameter.
2018-06-22 16:50:13 -04:00
Lioncash 537d09e1d4 DSPTool: Remove unnecessary c_str() calls
These functions already accept std::string instances, so c_str here just
causes an unnecessary copy of the string to be made.
2018-06-22 16:38:15 -04:00
Lioncash f62dffa9f0 DSPTool: Factor out assembly file retrieval
Keeps the retrieval behavior isolated and lessens the amount of
variables within PerformAssembly's scope.
2018-06-22 16:36:35 -04:00
Lioncash 78eba28975 DSPTool: Factor out behavior from main()
Keeps all behavior localized in their own functions, making it a tiny
bit nicer to read.
2018-06-17 18:21:33 -04:00
Lioncash 4288bfe0f9 Common: Move host communication enum to Host.h
Given this is actually a part of the Host interface, this should be
placed with it.

While we're at it, turn it into an enum class so that we don't dump its
contained values into the surrounding scope. We can also make
Host_Message take the enum type itself directly instead of taking a
general int value.

After this, it'll be trivial to divide out the rest of Common.h and
remove the header from the repository entirely
2018-05-28 14:34:59 -04:00
spycrab db0e5108dc Win32/FileUtil: Fix IsDirectory() not working for certain directories 2018-05-04 23:53:41 +02:00
Tillmann Karras 4cfd900c67 Fix some warnings 2018-04-17 14:10:05 +01:00
Lioncash 0f25627614 DSPCodeUtil: Don't return data via an out parameter
We can just return directly in these cases.
2018-03-25 18:55:08 -04:00
Léo Lam 12da9c8473 DSPTool: Fix build
Stub implementations of Host functions are required, as DSPTool links
against Core (which makes use of Host).
2017-09-13 17:38:23 +02:00
Michael Maltese 97e6ba773b Move DSP::CodesToHeader to DSPTool
It's the only place it's used, and highly-specific to DSPTool's needs.
2017-06-05 19:28:40 -07:00
Michael Maltese 80710984dc DSPTool: extract tests into a DSPAssemblyTest
- Moves all test code from DSPTool into UnitTests/Core/DSPAssemblyTest.
- Converts test files (which could only be loaded if they were in the
  shell's working directory, so basically never) into C++ values.
- Enables most of the commented-out tests.
- Removes non-deterministic random code test.
2017-06-05 19:28:40 -07:00
Michael Maltese 1580b6e627 DSPTool: make existing tests pass
Disassemble code without the additional text for humans, like the
current PC and opcode hex values, so that it can be reassembled.

I'm not updating any commented-out tests here.
2017-06-05 19:28:40 -07:00
Shawn Hoffman ddae5058e9 msbuild: increment other version numbers to vs2017 equivalents 2017-06-03 18:20:39 -07:00
BhaaL 072c161445 upgrade to Windows SDK 10.0.15063.0
this is required for /permissive- to work, because some headers in the
Windows SDK use Microsoft extensions that are not allowed in standards mode
2017-05-28 13:37:31 +02:00
Pierre Bourdon d592bdd4d4 Migrate to Visual Studio 2017.
Auto-generated by the IDE, I'll trust it knows what it's doing.
2017-05-25 15:58:59 -07:00
Lioncash ee61bd6f2e CMakeLists: Normalize whitespace
Normalizes tabs to spaces to follow our codebase's indentation style.
2017-03-01 14:53:23 -05:00
Lioncash 3eb25cea6f DSP: Namespace remaining un-namespaced DSP code 2016-12-31 17:20:14 -05:00
Pierre Bourdon 3570c7f03a Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
Shawn Hoffman aa7208e270 [windows] Update projects to vs2015. 2015-09-03 04:23:01 -07:00
Tillmann Karras 30ebb2459e Set copyright year to when a file was created 2015-05-25 13:22:31 +02:00
Tillmann Karras cefcb0ace9 Update license headers to GPLv2+ 2015-05-25 13:22:31 +02:00
Tillmann Karras 6bcdb10eee CMake: simplify some expressions 2015-01-03 13:17:57 +01:00
Shawn Hoffman 266992684d msvc: remove some remnants of SDL and DSound from projects and general cleanup. 2014-09-01 21:27:44 -07:00
Shawn Hoffman f1b82a34b2 Windows: Use a shared precompiled header for dolphin code under Source/ 2014-08-14 23:51:13 -07:00
Tillmann Karras f927af20f2 Fix more warnings from #579 2014-08-07 03:24:42 +02:00
Lioncash 8b13afbb8e Remove the 32-bit config platform from the VS solution and projects 2014-06-24 22:07:26 -04:00
Matthew Parlane 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
Lioncash 76b2dde3d7 Fix DSPTool string output for disassembly.
Would previously print that assembly had succeeded.
2014-03-09 15:01:56 -04:00
Lioncash 440efaa5f5 Fix DSPTool.
Forgot to adjust the stubs.
2014-03-09 13:00:51 -04:00
Lioncash ed9eea72a1 Forgot to move DSPTool over. Fixed now. 2014-02-20 01:01:11 +01:00