Commit Graph

1325 Commits

Author SHA1 Message Date
JosJuice 11768e3dd3
Merge pull request #11829 from lioncash/strutil
Common/StringUtil: Move some utilities into the Common namespace
2023-05-17 09:13:36 +02:00
Mai fede2ab9a9
Merge pull request #11828 from JosJuice/wia-convert-comments
DiscIO: Improve comments in WIARVZFileReader::Convert
2023-05-16 14:39:59 -04:00
Lioncash 21df3ca572 StringUtil: Move IsPrintableCharacter() into Common namespace 2023-05-16 14:17:54 -04:00
JosJuice 192081d2f1 DiscIO: Improve comments in WIARVZFileReader::Convert
Just some clarifications and typo fixes.
2023-05-16 18:58:07 +02:00
Admiral H. Curtiss 6a339cbdb3
IOS/ES: Split ESDevice into ESCore and ESDevice.
ESCore implements the core functionality that can also be used outside of emulation. ESDevice implements the IOS device and is only available during emulation.
2023-05-15 20:41:05 +02:00
Admiral H. Curtiss c97c80d1cb
NANDImporter: Check data bounds. 2023-04-02 03:45:34 +02:00
Admiral H. Curtiss 8dabd1a025
PowerPC/MMU: Refactor to class, move to System. 2023-03-28 03:47:51 +02:00
Admiral H. Curtiss 655cc7f75c
DiscIO: Add support for CleanRip-style split ISOs. 2023-03-05 19:23:55 +01:00
Admiral H. Curtiss a0974c18cd
RiivolutionPatcher: Use capitalization of file that exists in the host file system if possible.
Fixes https://bugs.dolphin-emu.org/issues/13138
2023-02-28 00:56:34 +01:00
Admiral H. Curtiss bdb19085c4
Common: Add utility function for case-insensitive string comparison. 2023-02-28 00:56:33 +01:00
Pokechu22 8802f96b7e Fix uninitialized variable warnings (C26495) 2023-02-15 19:18:39 -08:00
Scott Mansell a4729a026f
Merge pull request #11554 from JosJuice/host-lock-cpu
DolphinQt: Properly lock CPU before accessing emulated memory
2023-02-13 16:08:36 +13:00
Admiral H. Curtiss 300d63b492
DiscIO/FileBlob: Make m_size unsigned. 2023-02-12 20:51:08 +01:00
JosJuice 7cecb28bdf DolphinQt: Properly lock CPU before accessing emulated memory
This fixes a problem I was having where using frame advance with the
debugger open would frequently cause panic alerts about invalid addresses
due to the CPU thread changing MSR.DR while the host thread was trying
to access memory.

To aid in tracking down all the places where we weren't properly locking
the CPU, I've created a new type (in Core.h) that you have to pass as a
reference or pointer to functions that require running as the CPU thread.
2023-02-12 11:27:50 +01:00
Admiral H. Curtiss 1eb69ea0a0
Merge pull request #10936 from TellowKrinkle/FixIncludeDirs
CMake: Actually use the include directories specified by dependencies
2023-01-30 09:19:06 +01:00
MayImilae 37859ec1da Cleanup: Remove CDUtils
This is a cleaning followup for #11456.
2023-01-28 03:50:57 -08:00
Admiral H. Curtiss 7fd552081f
HLE function hooking: Avoid ppcState global. 2023-01-27 15:22:46 +01:00
Lioncash e5b91f00b0 Common: Replace StringBeginsWith/StringEndsWith with std equivalents
Obsoletes these functions in favor of the standard member functions
added in C++20.
2023-01-24 14:58:20 -05:00
Pierre Bourdon caca662dbf
Merge pull request #10994 from shuffle2/fs
get rid of HAS_STD_FILESYSTEM
2023-01-24 12:18:25 +01: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
Shawn Hoffman d51e4e5236 get rid of HAS_STD_FILESYSTEM
just use std::filesystem
2023-01-10 05:17:43 -08:00
Admiral H. Curtiss 839db591d9
HW/Memmap: Refactor Memory to class, move to Core::System. 2022-12-03 13:27:02 +01:00
Tillmann Karras cacdd18ca0 VolumeVerifier: fix bogus "serial/version missing" error
When searching for a disc where the revision doesn't match any disc in
the datfile, the loop would never get to the part where serials_exist is
set to true, leading to a bogus error message.
2022-10-29 21:32:57 +01:00
GaryOderNichts 88c57a00a3 Show vWii System Menu version in Menu Bar 2022-10-22 13:36:55 +02:00
Admiral H. Curtiss 4cb8914ad3
VolumeVerifier: Add missing assignment to summary_text. 2022-09-23 14:57:55 +02:00
Admiral H. Curtiss aba87ba1e3
Merge pull request #10997 from JosJuice/nfs-check
DiscIO: Fix an incorrect error check in NFSBlob
2022-08-22 15:14:15 +02:00
JosJuice 052fdfa00d DiscIO: Fix an incorrect error check in NFSBlob 2022-08-21 00:06:53 +02:00
JosJuice aca624ef9c DiscIO: Fix calculation of NFS raw size 2022-08-20 21:18:36 +02:00
TellowKrinkle 1bc133f3ae CMake: Properly include lzma include directories 2022-08-18 21:06:57 -05:00
TellowKrinkle 048f6fac52 CMake: Properly include zstd include directories 2022-08-18 21:06:57 -05:00
Shawn Hoffman 4ae475b6a1 fix verifying wii dev signatures
allows verifying dev-signed discs and wads
2022-08-16 12:47:26 -07:00
Admiral H. Curtiss 7ac042d00b
DirectoryBlob: Fix partition size mixup for encrypted Wii discs. 2022-08-10 20:43:52 +02:00
JosJuice 6fc3bbbdd9 DiscIO/VolumeVerifier: Add a note about NFS bad dumps 2022-08-04 22:01:00 +02:00
JosJuice 02e3125f23 DiscIO/VolumeVerifier: Small logic cleanup
Just for ease of reading. No behavioral difference.
2022-08-04 22:00:59 +02:00
JosJuice 40a4eb3893 DiscIO: Adjust GetDataSizeType logic for NFS 2022-08-04 22:00:59 +02:00
JosJuice a87dffe52d DiscIO: Replace IsDataSizeAccurate with GetDataSizeType
Previously, we had WBFS and CISO which both returned an upper bound
of the size, and other formats which returned an accurate size. But
now we also have NFS, which returns a lower bound of the size. To
allow VolumeVerifier to make better informed decisions for NFS, let's
use an enum instead of a bool for the type of data size a blob has.
2022-08-04 22:00:59 +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
JosJuice bb27d4cc95 DiscIO/VolumeWii: Decouple "is encrypted" from "is hashed"
Needed for the next commit. NFS disc images are hashed but not encrypted.

While we're at it, also get rid of SupportsIntegrityCheck.
It does the same thing as old IsEncryptedAndHashed and new HasWiiHashes.
2022-08-04 20:29:22 +02:00
Shawn Hoffman d71797154a VolumeVerifier: enable fast hash functions by default
sets defaults based on cpu support.
2022-08-02 22:23:49 -07:00
Tilka 7d2d5d914b
Merge pull request #10903 from shuffle2/hash-reorg
Common/Hash: use zlib-ng for adler32. small cleanups.
2022-08-02 18:29:04 +01:00
Shawn Hoffman 17c554c165 Common/Hash: use zlib-ng for adler32. small cleanups. 2022-08-01 10:07:27 -07:00
Shawn Hoffman 46ad8b9d68 Implement hw accelerated AES 2022-08-01 10:00:42 -07:00
Admiral H. Curtiss a9d9f5c0da
Merge pull request #10899 from shuffle2/sha1
add hw-accelerated SHA1
2022-07-30 14:11:37 +02:00
JMC47 3bf1ddc549
Merge pull request #10730 from AdmiralCurtiss/riivolution-sysfile-patches
Riivolution: Add custom extension to patch boot.bin, bi2.bin, and apploader.img.
2022-07-28 20:29:31 -04:00
JosJuice 14c1a1c658 VolumeVerifier: Fix read_succeeded condition
We shouldn't set m_read_errors_occurred to true just because
is_data_needed was false.
2022-07-28 09:57:17 +02:00
Shawn Hoffman bfa2a66c98 WIABlob: remove outdated mbedtls workaround 2022-07-26 22:16:37 -07:00
Shawn Hoffman dd29a54cf6 introduce wrapper for SHA1 functionality 2022-07-26 22:16:37 -07:00
Shawn Hoffman f92541fbd9 StripSpaces: only strip spaces
StripWhitespace maintains old behavior
2022-07-25 18:40:12 -07:00
Admiral H. Curtiss ec3cfc01c1
DiscIO/DirectoryBlob: Add callback to modify sys files before they're added to the disc. 2022-07-19 00:55:04 +02:00
Admiral H. Curtiss cc315cb7af
DiscIO/Riivolution: Add dolphin-specific extensions "dolphin_sys_file" and "dolphin_sys_folder" to patch sys files like you would patch regular files. 2022-07-19 00:55:04 +02:00