Commit Graph

159 Commits

Author SHA1 Message Date
LillyJadeKatrin 84b3df0af2 Added Achievement Manager with Login
Added AchievementManager class. Upon startup (currently only in DolphinQt), logs into RetroAchievements with the login credentials stored in achievements.ini.

Co-authored-by: AdmiralCurtiss <AdmiralCurtiss@users.noreply.github.com>
2023-04-03 21:17:44 -04:00
LillyJadeKatrin 07d2f3d305 Added Initial Achievement Settings
Added AchievementSettings in Config with RA_INTEGRATION_ENABLED, RA_USERNAME, and RA_API_TOKEN. Includes code to load and store from Achievements.ini file in config folder.
2023-04-03 21:17:44 -04:00
Admiral H. Curtiss 655cc7f75c
DiscIO: Add support for CleanRip-style split ISOs. 2023-03-05 19:23:55 +01:00
iwubcode 42cb3f3904 VideoCommon: remove HiResTexture DDS loading, update hirestexture logic to use custom texture data 2023-03-01 12:11:04 -06:00
iwubcode 3e35255983 VideoCommon: add class to load custom texture data 2023-03-01 11:58:37 -06:00
iwubcode af313f8419 VideoCommon: add constant value to set the allowed maximum number of pixel samplers 2023-02-10 00:46:11 -06:00
Scott Mansell 9c1fe59cc9 Insert a more solid abstraction between Qt and Imgui 2023-02-09 18:36:20 +13:00
Scott Mansell 8c8bd0e7ac Rename to HookableEvent. Because naming conflict 2023-02-09 18:36:20 +13:00
Scott Mansell 9b5397abdb Move WidescreenHeuristic to it's own class
It's about the only thing left in renderer
2023-02-09 18:36:20 +13:00
Scott Mansell 154cb4f722 Introduce an Event system to VideoCommon
A lot of the remaining complexity in Renderer is the massive Swap function
which tries to handle a bunch of FrameBegin/FrameEnd events.

Rather than create a new place for it. This event system will try
to distribute it all over the place
2023-01-31 19:41:24 +13:00
Scott Mansell 8ad59f8ccf Add AbstractGfx for DX12 2023-01-31 19:41:24 +13:00
Scott Mansell 5a2d119bda Implement AbstractGfx for Dx11 2023-01-31 19:41:24 +13:00
Scott Mansell 2a2014af09 Implement AbstractGfx for Vulkan 2023-01-31 19:41:23 +13:00
Scott Mansell d37f83ffeb Implement AbstractGfx for Software & Null 2023-01-31 19:41:23 +13:00
Scott Mansell f0336a3129 Implement AbstractGfx for OpenGL
Mostly involves moving contents of OGLRender
to OGLGfx and OGLConfig
2023-01-31 18:46:04 +13:00
Scott Mansell 8a23629345 Split AbstractGfx out of Renderer
Almost all the virtual functions in Renderer are part of dolphin's
"graphics api abstraction layer", which has slowly formed over the
last decade or two.

Most of the work was done previously with the introduction of the
various "AbstractX" classes, associated with texture cache cleanups
and implementation of newer graphics APIs (Direct3D 12, Vulkan, Metal).
We are simply taking the last step and yeeting these functions out
of Renderer.

This "AbstractGfx" class is now completely agnostic of any details
from the flipper/hollywood GPU we are emulating, though somewhat
specialized.

(Will not build, this commit only contains changes outside VideoBackends)
2023-01-31 18:46:02 +13:00
Scott Mansell e57eb04ed3 Rename FrameDump.{cpp,h} to FrameDumpFFMpeg.{cpp,h}
The name kind of conflicts with a new FrameDumper class
2023-01-31 18:45:29 +13:00
Scott Mansell 0d4537d60f Move Presenting, Dumping and ImGui out of Renderer 2023-01-31 18:45:21 +13:00
MayImilae 37859ec1da Cleanup: Remove CDUtils
This is a cleaning followup for #11456.
2023-01-28 03:50:57 -08:00
Pierre Bourdon 9c9310bf44
Merge pull request #11208 from TellowKrinkle/CPUCull
Cull vertices on the CPU
2023-01-26 23:15:23 +01:00
TellowKrinkle b170ef9651 VideoCommon: Add class for quickly transforming and culling vertices on the CPU 2023-01-25 02:21:56 -06:00
Admiral H. Curtiss d4d6f3db63
Merge pull request #11331 from deReeperJosh/skylandersportal
Emulate Skylanders Portals within Dolphin
2023-01-24 06:56:00 +01:00
Pierre Bourdon 8d477c65c9
Merge pull request #11458 from shuffle2/winuver
windows: prefer os version from registry
2023-01-23 15:53:41 +01:00
Joshua de Reeper 18fd0d7dcd Use Core timing instead of thread
Skylander code tidy ups

Convert c array to std::array and fix comments

Formatting fixes/review changes

Variable comment

Migrate portal to System Impl and code tidy ups

Use struct

Restore review changes

Minor fix to schedule transfer method

Change descriptors to hex and fix comments
2023-01-22 14:50:30 +13:00
Joshua de Reeper f76a6789a0 Emulate Skylanders within Dolphin
Ported the code from RPCS3, with improvements made to the handling of control messages and audio transfers, Co-Authored with @mandar1jn

Missing new line chars

Co-Authored-By: mandar1jn <49076509+mandar1jn@users.noreply.github.com>
2023-01-22 14:50:30 +13:00
Shawn Hoffman dff7f20f9d windows: prefer os version from registry
this value is not modified by compatibility mode
drop reporting service pack numbers. no longer used
2023-01-17 01:38:00 -08:00
MayImilae dcc10cff11 Remove Boot from DVD Backup
This should be a fairly easy merge, assuming I didn’t mess anything up. TL:DR no one uses it and it’s not great.

Boot from DVD Backup is an ancient feature with origins in the Megacommit. Back then, GameCube and Wii games were quite large relative to drives of the time. For example, in 2008, the most common hard drive sizes were 320GB and 512GB. On the 320GB drive I personally had at the time, as little as 42 Wii ISOs could have filled it entirely! And that’s ignoring any other files one might want to put onto a drive. Backup DVDs allowed users to burn relatively cheap DVD media and store their GameCube and Wii dumps in a Dolphin accessible way that didn’t eat into their precious HDD space. It had compromises, even then, but in 2008… I mean honestly users probably wouldn’t even notice those compromises with how Dolphin barely even worked at all back then.

Obviously, today the storage space concerns are not as big of an issue. According to seagate the average hard drive it sells today is 8TB. For typical laptops purchased now, the -minimum- selection for storage is usually 1TB. You can even buy a name brand 4TB external hard drive for $100. GC and Wii ISOs are not as big as they once were, relatively anyway. Plus flash drives and SD cards are super cheap and way faster than disc drives ever were. For anyone that has limited drive space, removable flash media can fulfill this offloading role far better than backup DVD media ever could.

Also no one has DVD drives anymore. That’s kind of an important detail.

But to see if Booting from DVD Backup even still worked, I decided to give it a try. I have an ASUS BW-16D1HT, a badass Bluray XL reading and burning drive, connected to my Windows 11 Threadripper 5975WX machine. A super fast drive on a super fast machine is as good as it possibly can get for this feature. So I bought a spindle of DVD-Rs, burned a couple of discs and gave it a try. Surprisingly, it does still work. However, as expected, it introduces a lot of stuttering. Testing Prime 1 and Prime 3, in both games stuttering was introduced whenever the DVD Drive had to suddenly seek. Spikes of 50ms occurred constantly, but I observed 150ms and even over 1000ms stutters! The worst was a three second stutter, when loading Elysia in Prime 3. I could even hear the stutters - any time the drive suddenly made a harsh seeking noise, the game would have a hard stutter. It worked but, it has some serious compromises.

Boot from DVD Backup isn’t great, using removable flash media or external hard drives is a FAR better option for anyone with limited storage space today, and no one can even use this feature anymore because their computers don’t even have disc drives. It’s time for Boot from DVD Backup to go!

So I did my best on the cleanup but I’m bound to have left some bits. Especially in translation - I didn’t get any warnings or anything there that could help point me to where to clean that up. Please review!
2023-01-16 18:32:43 -08:00
Pokechu22 d20b71c296 Move x64 DSP JIT into DolphinLib.x64.props
Before, it was also compiled on ARM builds, but since it was unused it wasn't linked (and thus its dependency on the nonexistent x64Emitter didn't cause any link issues).
2023-01-06 22:42:21 -08:00
JosJuice e0fba20f1f
Merge pull request #11360 from shuffle2/vs
msvc: remove workaround for arm64 sha1 compiler bug
2022-12-24 22:55:47 +01:00
Sam Belliveau 673f81c18a New FrameTime/VBlank Analyzer + Graph 2022-12-23 19:52:53 -05:00
Shawn Hoffman 9dcae0b1c3 msvc: remove workaround for arm64 sha1 compiler bug 2022-12-22 00:44:29 -08:00
Admiral H. Curtiss 2a81fa6c26
Merge pull request #11015 from TryTwo/Conditional_Breakpoints
Conditional breakpoints
2022-11-13 01:06:52 +01:00
Admiral H. Curtiss 431301add3
Merge pull request #10771 from TryTwo/PR_AutoStep
Debugger: Implement base code tracing logic. and feature to auto-step through code.
2022-11-04 23:32:54 +01:00
Jordan Woyak 44a4573303 ControllerInterface: Add InputBackend interface and SDL implementation. 2022-11-01 21:59:08 -05:00
Admiral H. Curtiss c0476fdac3
Merge pull request #11072 from SketchMaster2001/wiiconnect24
Add initial WiiConnect24 support
2022-10-16 04:31:28 +02:00
SketchMaster2001 e413d7f5ec
Add initial WiiConnect24 support 2022-10-16 04:19:36 +02:00
iwubcode bc360584a3 VideoCommon: add structures to graphics mods to allow for future adding or removing parameters with less code overhead 2022-10-09 00:00:01 -05:00
TryTwo fb79c04cf1 MemoryView auto updateDebugger. Implement base codetrace logic. Add register breakpoints. Add CodeViewWidget autostepping to track a value.Debugger 2022-10-06 22:17:22 -07:00
smurf3tte 7842f9a715 Debugger: Initial implementation of conditional breakpoints
Expression class to store compiled expressions and associated variable list.

Co-authored-by:  TryTwo <taolas@gmail.com>
2022-10-06 21:34:44 -07:00
Admiral H. Curtiss f8518b2ff6
WiimoteEmu: Add serialization for DesiredWiimoteState. 2022-10-02 23:14:36 +02:00
Admiral H. Curtiss 466f0b377b
WiimoteEmu: Update extensions from DesiredWiimoteState. 2022-10-02 23:14:35 +02:00
Admiral H. Curtiss a39f82cb1f
WiimoteEmu: Update button status from DesiredWiimoteState. 2022-10-02 23:14:34 +02:00
Mai 1f2ec9afd6
Merge pull request #11052 from Tilka/shinkansen
Add emulated Shinkansen controller
2022-09-29 09:21:27 -04:00
Pokechu22 56fce3ba8a Software: Remove dedicated texture/frame dumping infrastructure
Texture dumping can already be done using VideoCommon's system (and in fact the same setting already enabled *both* of these). Dumping objects/TEV stages/texture fetches doesn't currently have an equivalent, but could be added to the FIFO player instead.
2022-09-26 18:25:54 -07:00
Tillmann Karras f5670f870e Add emulated Shinkansen controller 2022-09-11 17:12:19 +01:00
JosJuice 939fa1ed1c
Merge pull request #10941 from shuffle2/crypto-cleanup
Crypto cleanup
2022-08-05 12:12:34 +02:00
JosJuice 3a6df63e9b DiscIO: Add support for the NFS format
For a few years now, I've been thinking it would be nice to make Dolphin
support reading Wii games in the format they come in when you download
them from the Wii U eShop. The Wii U eShop has some good deals on Wii
games (Metroid Prime Trilogy especially is rather expensive if you try
to buy it physically!), and it's the only place right now where you can
buy Wii games digitally.

Of course, Nintendo being Nintendo, next year they're going to shut down
this only place where you can buy Wii games digitally. I kind of wish I
had implemented this feature earlier so that people would've had ample
time to buy the games they want, but... better late than never, right?

I used MIT-licensed code from the NOD library as a reference when
implementing this. None of the code has been directly copied, but
you may notice that the names of the struct members are very similar.
c1635245b8/lib/DiscIONFS.cpp
2022-08-04 22:00:58 +02:00
Shawn Hoffman bf5076eb01 crypto/sha1: add real workaround for msvc/arm64 bad codegen 2022-08-02 23:05:45 -07:00
Shawn Hoffman dd29a54cf6 introduce wrapper for SHA1 functionality 2022-07-26 22:16:37 -07:00
Shawn Hoffman acb10f0006 replace libpng with libspng 2022-07-25 18:32:16 -07:00
Pokechu22 6eaa4a4e89 DSPHLE: Add HLE version of libaesnd ucode 2022-07-20 18:41:47 -07:00
Admiral H. Curtiss 77d4591fb4
Core: If configured, sync SD card image with SD card folder on emulation start and end.
Co-authored-by: Pablo Stebler <pablo@stebler.xyz>
2022-07-11 23:11:41 +02:00
Admiral H. Curtiss fdc327c252
Externals/FatFs: Build as part of Dolphin.
Co-authored-by: Pablo Stebler <pablo@stebler.xyz>
2022-07-11 23:11:37 +02:00
Jun Bo Bi ceed42a0ee Add SDL as a submodule 2022-07-10 15:38:59 -07:00
Admiral H. Curtiss 5a7759e359
Merge pull request #10690 from schthack/BBA-tapless
BBA: Added BuiltIn device that allow BBA emulation without the need o…
2022-07-09 23:20:53 +02:00
JMC47 828afc6735
Merge pull request #10673 from iwubcode/spirv-backends
D3D: Generate HLSL from SPIRV*
2022-07-08 15:29:58 -04:00
schthack 01ada3850f BBA: Added BuiltIn device that allow BBA emulation without the need of a TapDevice Configuration include a dns server setting 2022-07-02 18:02:50 -04:00
iwubcode f416b71925 VideoCommon: add logic to handle a GraphicsMod while Dolphin is running 2022-06-27 18:20:52 -05:00
iwubcode 254246b814 VideoCommon: add logic to read a GraphicsMod from configuration 2022-06-27 18:20:52 -05:00
iwubcode f92beb611f VideoCommon: add game mod constants 2022-06-26 21:53:21 -05:00
iwubcode 3790c99a7d VideoCommon: add common spirv helper functions
Co-authored-by: tellowkrinkle <tellowkrinkle@gmail.com>
2022-06-24 17:52:31 -05:00
Pokechu22 8a144a735f DSPHLE: Add HLE version of libasnd ucode 2022-06-23 10:50:24 -07:00
Vicki Pfau 6a26b0ce8a HW: Initial HSP implementation with ARAM expansion 2022-05-21 17:05:49 -07:00
Shawn Hoffman 64cd4cc86f msbuild: use default Project attrs
maybe it makes the xml less scary :D
2022-04-27 15:26:43 -07:00
Pokechu22 6e83e36beb msbuild: Move WGInput to DolphinLib.props
It was accidentally put into the main DolphinLib.vcxproj in #7614.
2022-04-07 11:37:12 -07:00
Shawn Hoffman 09432ef098 windows: move ffmpeg bins to submodule
udpate ffmpeg to b1cbeabf5e4b3234e895a58bafa371bfb792baf0
enable ffmpeg on arm64
2022-03-29 17:27:46 -07:00
JosJuice 1bc057614e Move parts of MappingCommon out of DolphinQt
Some of the functions in MappingCommon would be useful to use on
mobile in the future.
2022-03-06 14:30:49 +01:00
JosJuice aff45c91fc Port Wiimote source settings to the new config system
This lets us finally get rid of BootManager's ConfigCache!
2022-02-18 21:27:10 +01:00
Pokechu22 140c8217f6 Common: Create HRWrap
HRWrap now allows HRESULT to be formatted, giving useful information beyond "it failed" or a hex code that isn't obvious to most users.  This commit does not add any uses of it, though.
2022-01-09 12:44:15 -08:00
Mai M 7bd14c5d9f
Merge pull request #10338 from Pokechu22/natvis-improvements
Natvis improvements
2022-01-06 04:01:25 -05:00
Pokechu22 8e2b06906b Create EnumMap natvis 2022-01-02 15:36:47 -08:00
Pokechu22 301bc49efe Common: Remove MD5.h
It uses DiscIO, and Common shouldn't depend on DiscIO.  Instead, put this code in NetPlayClient.cpp.
2022-01-01 11:52:53 -08:00
Pokechu22 2652aed85c Common: Merge CRC32.h into Hash.h
This makes it easier to find the relevant functions.
2022-01-01 10:36:38 -08:00
Admiral H. Curtiss 812cc8b632
MemArena: Split into three separate files for each OS. 2021-12-25 20:20:36 +01:00
Pokechu22 b5fd35f951 Refactor OpcodeDecoding and FIFO analyzer to use callbacks 2021-12-18 15:21:36 -08:00
Pokechu22 94ccf765af Add option for setting the PNG zlib compression level 2021-11-18 13:10:22 -08:00
Pokechu22 6236a0d494 Eliminate SamplerCommon 2021-11-17 20:04:34 -08:00
Emmanuel Gil Peyrot 3d662e746b Core: Fix a -Wshadow warning in gcc 11
This moves the only direct call to zlib’s crc32() into its own
translation unit, but that operation is cold enough that this won’t
matter in the slightest.  crc32_z() would be more appropriate, but
Android has an older zlib version…
2021-11-02 13:50:21 +01:00
Pokechu22 ba107819ec Create EnumMap 2021-10-24 11:48:36 -07:00
Admiral H. Curtiss 6394960f54
Core: Add ability to specify and launch a riivolution-modded game via a .json file. 2021-10-24 00:09:07 +02:00
Admiral H. Curtiss 783b180dc8
Core: Add RiivolutionPatcher to apply Riivolution-style patches to a game's file system and memory. 2021-10-24 00:09:06 +02:00
Admiral H. Curtiss e26b59bab3
Core: Add RiivolutionParser to parse a Riivolution XML. 2021-10-24 00:09:06 +02:00
Scott Mansell 88bd10cd30 Extend TMEM cache implementation
Now works with games that deliberately avoid invalidating TMEM because
they know textures are too large to fit:

 * Sonic Riders
 * Metal Arms: Glitch in the System
 * Godzilla: Destroy All Monsters Melee
 * NHL Slapshot
 * Tak and the Power of Juju
 * Night at the Museum: Battle of the Smithsonian
 * 428: Fūsa Sareta Shibuya de
2021-10-12 15:51:24 +13:00
Techjar 1161af8059 VideoCommon: Abstract bounding box
This moves much of the duplicated bounding box code into VideoCommon,
leaving only the specific buffer implementations in each backend.
2021-10-04 15:51:24 -04:00
Admiral H. Curtiss f3346262d2 Core/CheatSearch: Implement cheat searching functionality. 2021-09-15 19:05:48 +02:00
Pokechu22 e9c6c13886 msbuild: Move DivUtils to DolphinLib.props
It was accidentally put into the main DolphinLib.vcxproj in #9566.
2021-08-31 22:48:07 -07:00
JMC47 a1e806ed76
Merge pull request #9600 from Bonta0/mgba-pr
Full GBA Controllers Integration with mGBA
2021-07-21 02:36:43 -04:00
Shawn Hoffman e1bddd4c18 remove DSP::Profiler*
this is not used anywhere and seems trivial to
ressurect if it's ever needed again.
2021-07-17 18:26:32 -07:00
Bonta d0f0b4c0e0 SI: Implement GBAEmu device 2021-07-13 16:42:57 +02:00
Bonta 9a22ff653f Core: Implement GBA Core using libmgba 2021-07-13 16:42:52 +02:00
Bonta 8ee21acf34 Pad: GBA config 2021-07-13 16:42:35 +02:00
Techjar 3d5cf5286b NetPlay: Refactor some functions into a common header 2021-07-06 06:41:23 -04:00
JosJuice ac28b89fa5 NetPlay/Jit64: Avoid using software FMA
When I added the software FMA path in 2c38d64 and made us use
it when determinism is enabled, I was assuming that either the
performance impact of software FMA wouldn't be too large or CPUs
that were too old to have FMA instructions were too slow to run
Dolphin well anyway. This was wrong. To give an example, the
netplay performance went from 60 FPS to 30 FPS in one case.

This change makes netplay clients negotiate whether FMA should
be used. If all clients use an x64 CPU that supports FMA, or
AArch64, then FMA is enabled, and otherwise FMA is disabled.
In other words, we sacrifice accuracy if needed to avoid massive
slowdown, but not otherwise. When not using netplay, whether to
enable FMA is simply based on whether the host CPU supports it.

The only remaining case where the software FMA path gets used
under normal circumstances is when an input recording is created
on a CPU with FMA support and then played back on a CPU without.
This is not an especially common scenario (though it can happen),
and TASers are generally less picky about performance and more
picky about accuracy than other users anyway.

With this change, FMA desyncs are avoided between AArch64 and
modern x64 CPUs (unlike before 2c38d64), but we do get FMA
desyncs between AArch64 and old x64 CPUs (like before 2c38d64).
This desync can be avoided by adding a non-FMA path to JitArm64 as
an option, which I will wait with for another pull request so that
we can get the performance regression fixed as quickly as possible.

https://bugs.dolphin-emu.org/issues/12542
2021-06-09 22:56:26 +02:00
Mat M 964fed77c5
Merge pull request #9707 from JosJuice/remove-atomic-header
Remove Atomic.h
2021-05-14 14:33:24 -04:00
JosJuice b93983b50a Remove Atomic.h
The STL has everything we need nowadays.

I have tried to not alter any behavior or semantics with this
change wherever possible. In particular, WriteLow and WriteHigh
in CommandProcessor retain the ability to accidentally undo
another thread's write to the upper half or lower half
respectively. If that should be fixed, it should be done in a
separate commit for clarity. One thing did change: The places
where we were using += on a volatile variable (not an atomic
operation) are now using fetch_add (actually an atomic operation).

Tested with single core and dual core on x86-64 and AArch64.
2021-05-13 18:56:27 +02:00
Mat M d034c830ac
Merge pull request #9681 from iwubcode/texture-info
VideoCommon: move all texture calculations to a "TextureInfo" class
2021-05-13 06:44:08 -04:00
iwubcode 182dfc38e6 VideoCommon: move all texture calculations to a "TextureInfo" class. This ever so slightly improves readability and allows for the full texture name to be generated outside of the hires texture cache 2021-05-11 22:58:36 -05:00
Pokechu22 0f7c9ef767 Change BitfieldExtract to use a pointer to the bitfield member 2021-05-07 15:11:17 -07:00
JosJuice 27ddf6382b Set console's default language/country/region based on computer settings 2021-03-27 10:05:26 +01:00
JosJuice 49ccc77ebb DiscIO: Move some code from DiscExtractor to new file DiscUtils 2021-03-09 20:34:24 +01:00