Commit Graph

27979 Commits

Author SHA1 Message Date
75d032161f DiscIO: Rework the implementation of TGC reading
Fixes https://bugs.dolphin-emu.org/issues/10654.

To quote the documenation file included with the program tgctogcm:

"TGC's are miniaturized .gcm images with a 32kB header.
The embedded gcm contains some bogus data, namely:
-FST Location (0x424 in gcm)
-DOL Location (0x420 in gcm)
-FST File offsets (all files are offset/spoofed by a certain amount)"

Dolphin has been handling the values at 0x420 and 0x424 by simply
overwriting them with a working value (just like tgctogcm does),
but it has used a different approach for the file offsets in the FST.
Instead of changing the offsets that are stored in the FST, Dolphin
changed where the files actually are placed on the virtual disc.
My hope was that this would make the loading times more accurate to
how they are when running a TGC file as part of a larger disc.
However, there are TGC files where we would need to move files
backwards on the disc in order to do this (this is what issue
10654 is about), so the approach we have been using is flawed.

This change makes Dolphin overwrite offsets in the FST instead, like
tgctogcm does. Other than making Dolphin handle the affected TGC files
correctly, this change also makes it so that unnecessary padding data
isn't written if you use Dolphin to convert a TGC file to an ISO file.
This feature is not actually implemented in Dolphin as of now, but I'm
planning to add it in the near future as part of a larger feature.
2020-06-17 12:32:39 +02:00
1f505870a9 Merge pull request #8873 from AdmiralCurtiss/gcmemcard-namespace
GCMemcard: Move into a Memcard namespace.
2020-06-16 19:55:06 +01:00
de5941d6f8 Merge pull request #8878 from JosJuice/actually-disable-tgc-conversion
DolphinQt: Actually disable converting from TGC
2020-06-16 19:39:40 +01:00
a2b7627d66 Merge pull request #8860 from Ebola16/Emu
Android: Disallow multiple launcher activities
2020-06-16 19:38:55 +01:00
914ebdf0dd GCMemcard: Move from global namespace into a Memcard namespace. 2020-06-16 20:18:39 +02:00
2e1bfe073c GCMemcard: Split out MemoryCardBase into its own header, which is the base class for the raw and folder memory cards and has little to do with the actual memory card data structures. 2020-06-16 20:18:39 +02:00
851b438419 Merge pull request #8844 from Ebola16/RGL
Android: Refresh game library when resuming (Tv)MainActivity
2020-06-16 18:08:48 +02:00
1e6925e423 Android: Disallow multiple launcher activities 2020-06-16 11:52:58 -04:00
c236d89f64 DolphinQt: Actually disable converting from TGC
When I made PR 8773, I only covered the case where multiple files
are selected, not the more common case where one file is selected.
Oops
2020-06-16 11:21:44 +02:00
d4418a2b43 Merge pull request #8877 from JosJuice/convert-fail-message
DolphinQt: Make conversion error messages actually show up
2020-06-16 09:59:03 +01:00
20a3119d7a DolphinQt: Make conversion error messages actually show up
I don't know why QErrorMessage doesn't work, but ModalMessageBox
works, so let's use ModalMessageBox.
2020-06-16 10:39:40 +02:00
2b25e1d6b9 DolphinQt: Don't show success message when converting missing file 2020-06-16 10:35:00 +02:00
349cdd5136 DolphinQt: Fix crash on right-clicking multiple games
GetSelectedGames() constructs a new list each time you call it.
2020-06-16 10:33:18 +02:00
f9f4734237 Merge pull request #8850 from JosJuice/block-size-warning
Show an OSD message when running a disc image with a large block size
2020-06-14 15:03:32 +01:00
ad85012172 Merge pull request #8843 from Techjar/fastmem-ui
DolphinQt: Add fastmem option to debugger UI
2020-06-14 14:54:32 +01:00
9f5e6edc34 Merge pull request #8809 from Ebola16/ABB
Replace some acronyms
2020-06-14 14:30:52 +01:00
2a70d86d55 Replace some acronyms 2020-06-14 08:37:24 -04:00
bf83e3eea0 Merge pull request #8845 from Ebola16/DISC2
Android: Display disc number instead of company if mulipart disc
2020-06-14 12:20:36 +01:00
63c53ebc87 Merge pull request #8836 from Ebola16/REC
Android: Add recursive game paths to UI
2020-06-14 12:16:08 +01:00
cb54fc7543 Merge pull request #8857 from JosJuice/qt-bounding-box-width
DolphinQt: Use QFontMetrics::boundingRect instead of QFontMetrics::width
2020-06-14 12:10:33 +01:00
0ef9b998ce Merge pull request #8658 from orbea/glslang
Externals: Update glslang.
2020-06-13 18:43:53 +01:00
bf11c2b74b Merge pull request #8842 from Tilka/dsp
DSPSpy usability improvements
2020-06-10 09:14:30 +02:00
87330ae524 DolphinQt: Use QFontMetrics::boundingRect instead of QFontMetrics::width
See https://kdepepo.wordpress.com/2019/08/05/about-deprecation-of-qfontmetricswidth/
2020-06-08 12:32:36 +02:00
1c89e61d53 Android: Add option to disallow SD card writes 2020-06-08 03:45:59 -04:00
a56e6be999 DSPSpy: sync Makefile with current devkitPro template 2020-06-08 04:21:41 +01:00
fb041f75e5 DSPSpy: save and restore $sr properly 2020-06-08 04:21:41 +01:00
3118a68246 DSPSpy: show register names instead of numbers
also print summed $prod and individual $sr bits
2020-06-08 04:21:41 +01:00
d5c00b8909 DSPSymbols: fix off-by-one error 2020-06-08 03:41:45 +01:00
162e3be82b Show an OSD message when running a disc image with a large block size
This is intended to catch WIA files which have been created using
wit's default parameters (40 MiB block size), once the WIA PR is
merged. The check does however also work for GCZ files – not that
I think anyone has a GCZ file with a block size that large.
2020-06-07 14:11:00 +02:00
94f317010e Merge pull request #8847 from Techjar/faster-file-path
Qt/GameListModel: Use absolutePath for file path column
2020-06-06 22:56:38 +01:00
d89162c8ad Merge pull request #8848 from JosJuice/fix-build
Fix build
2020-06-06 15:46:32 +02:00
b4584abaa6 Fix build
There was a race condition between two PRs incrementing the
array size. CI didn't catch it because the PR that was merged
last (PR #8824) wasn't rebuilt after the first PR was merged.
2020-06-06 15:09:48 +02:00
9f7c72b7eb Merge pull request #8824 from Techjar/sd-read-only
Add option to disallow SD card writes
2020-06-06 07:02:02 -04:00
fa208c4acd Qt/GameListModel: Use absolutePath for file path column
canonicalPath is orders of magnitude slower as it has to perform actual
disk I/O to resolve symlinks, which makes sorting by this column
ridiculously slow for large game lists, especially if the games are on
a NAS. We probably don't need that, simply resolving relative paths
should be sufficient.
2020-06-06 05:24:23 -04:00
3b1e6f3b7f Android: Display disc number instead of company if mulipart disc 2020-06-04 04:12:12 -04:00
9ee0740c2d Android: Refresh game library when resuming (Tv)MainActivity 2020-06-02 16:45:23 -04:00
5c38727651 DolphinQt: Add fastmem option to debugger UI 2020-06-02 06:18:52 -04:00
209308a4d6 Replace usage of std::result_of with std::invoke_result
std::result_of is deprecated in C++17, and removed in C++20. Microsoft
has gone ahead with the removal as of Visual Studio 16.6.0, so before
this change our code is broken there.
2020-06-01 17:33:18 -04:00
9ea8f29765 Android: Conditionally respond to modified settings 2020-06-01 07:43:19 -04:00
b0258af530 DSP/Interpreter: fix comments not matching opcode table 2020-05-31 15:21:20 +01:00
198a307db3 DSP/Interpreter: simplify switch 2020-05-31 15:21:20 +01:00
89de40a22e DSP/Interpreter: remove redundant masking 2020-05-31 15:21:19 +01:00
ce1846e53f DSPSpy: fix register editing using GC pad on Wii 2020-05-31 15:21:19 +01:00
77f539355d Android: Add recursive game paths to UI 2020-05-31 10:00:09 -04:00
ba2d04b793 Externals: Fix build failures with the newer glslang.
v2: Don't include glslang project wide.
2020-05-30 18:54:21 -07:00
52e0294166 Add option to disallow SD card writes 2020-05-28 15:11:37 -04:00
b3c705fa96 Merge pull request #8829 from stenzek/fix-macos-again
Core: Use window instead of surface for ControllerInterface updates
2020-05-28 16:56:13 +10:00
b4e063311e Merge pull request #8827 from stenzek/adreno-more-like-brokenreno
FramebufferManager: Fix invalid readback of EFB D24S8 depth
2020-05-28 16:55:42 +10:00
53aff81c45 Merge pull request #8821 from Ebola16/TV
Android TV: Add Open File and Install WAD
2020-05-27 21:41:09 +02:00
86f8768268 VideoCommon/ShaderGenCommon: Make template functions regular functions
These are only ever used with ShaderCode instances and nothing else.
Given that, we can convert these helper functions to expect that type of
object as an argument and remove the need for templates, improving
compiler throughput a marginal amount, as the template instantiation
process doesn't need to be performed.

We can also move the definitions of these functions into the cpp file,
which allows us to remove a few inclusions from the ShaderGenCommon
header. This uncovered a few instances of indirect inclusions being
relied upon in other source files.

One other benefit is this allows changes to be made to the definitions
of the functions without needing to recompile all translation units that
make use of these functions, making change testing a little quicker.

Moving the definitions into the cpp file also allows us to completely
hide DefineOutputMember() from external view, given it's only ever used
inside of GenerateVSOutputMembers().
2020-05-25 21:12:29 -04:00