Commit graph

19426 commits

Author SHA1 Message Date
Léo Lam
346ca009f9 Remove NANDContentManager 2017-10-24 11:41:54 +02:00
Léo Lam
c03aa78c8f [Cleanup] WX: Remove usage of NANDContentManager
Also clean up the way the system menu label is updated. We don't want
to access the NAND while emulation is running, and especially not
that many times per second on an unpredictable timing.
2017-10-24 11:41:54 +02:00
Léo Lam
ff6b3eb9ac [Cleanup] IOS: Clean up the way ARM binaries are loaded
This commit removes the last usage of NANDContentManager in IOS code.

Another cleanup change is that loading ARM (IOS) binaries is now done
by the kernel in the BootIOS syscall, instead of being handled as a
special case in the MIOS code. This is more similar to how console
works and lets us easily extend the same logic to other IOS binaries
in the future, if we decide to actually load them.
2017-10-24 11:41:54 +02:00
Léo Lam
63a52fa707 [Cleanup] IOS/ES: Remove usages of NANDContentManager 2017-10-24 11:41:54 +02:00
Léo Lam
a7e21bca13 IOS/ES: Add a helper function to get a content path 2017-10-24 11:41:54 +02:00
Léo Lam
44fc6d878a IOS/ES: Fix a missing check in ReadCertStore
Without this, some operations can fail when trying to read an existing
cert store, as it may not exist when signature checks are disabled.
2017-10-24 11:41:54 +02:00
Léo Lam
689ed2a0ce [Cleanup] Move FindSignedTicket to IOS/ES
For consistency and because NANDContentManager is going to be removed.
2017-10-24 11:41:54 +02:00
Léo Lam
0476c0e60e [Cleanup] Remove static state in ES 2017-10-24 11:41:54 +02:00
Léo Lam
9000a042e4 Drop the direct WAD launch hack
This removes the hack that enables directly booting from WADs
without installing them first for the following reasons:

1. It makes the NAND content handling much more complicated than what
   it should be and makes future changes like permissions or booting
   NAND titles without a WAD more annoying to implement.

   Because of this hack, we needed an extra level of abstraction
   (NANDContent*) which has to read tons of things from the NAND, even
   most of the time it's useless. This in turn forces us to have
   caching, which is known to break titles and requires manual cache
   invalidations. Annoying and error prone.

2. It prevents the WAD boot code from being easily accurate. With this
   change, we can simply reuse the existing launch code, and ask IOS
   to launch the title from the NAND.

3. The hack did not work that well since it did not cover a lot of ES
   commands. And it works even less since the ES accuracy fixes.
   This results in Dolphin returning inconsistent results: a
   lot of the ES "DI" commands will just fail because the active title
   is not installed on the NAND. uid.sys is not changed, etc.

   And I'm not even talking about FS stuff -- where this would still
   totally fail, unless we add even more unnecessary hacks.

   This is not just theoretical -- the system menu and the Wii Shop are
   known to behave strangely because the hack damages the NAND
   structure, and we've already had several users report issues.

This commit makes it so WADs are always installed prior to launching.
A future commit will remove any code that was there only for the hack.
2017-10-24 11:41:54 +02:00
Léo Lam
60ba382799 Boot: Add support for booting NAND titles with just the ID 2017-10-24 11:41:54 +02:00
Léo Lam
62be010ac6 WiiUtils: Improve the error message on import failure
Now shows the import return code and also skips showing the message
altogether if the user cancelled the import for an unsigned WAD.
2017-10-24 11:41:54 +02:00
Léo Lam
dd5c468c63 WiiUtils: Allow reusing existing IOS/WAD instance 2017-10-24 11:41:54 +02:00
Léo Lam
6a03a24822 WiiUtils: Warn before overwriting during WAD import 2017-10-24 11:41:54 +02:00
Léo Lam
0bdeb63894 WiiUtils: Skip WAD import if it's already installed
The check is fairly quick, and this allows saving a lot of time and
resources for larger WADs.
2017-10-24 11:41:54 +02:00
Anthony
5fdb19f3db Merge pull request #6108 from JosJuice/tgc-negative-file-area-shift
Fix TGC support for Zelda OoT Master Quest
2017-10-23 18:57:54 -07:00
JMC47
a8bf9c5cbe Fix GameCube Sample Rate
The GameCube's sample rate is slightly different due to a hardware bug.
The exact numbers are (54000000 / 1124) for GameCube and (54000000 / 1125)
on Wii.  I also modified 32KHz mode.  This fixes audio desyncs in several
GameCube games and severe issues in Sonic Mega Collection.
2017-10-23 13:16:40 -04:00
Leo Lam
6e9e681438 Merge pull request #6124 from stenzek/vulkan-shutdown-vxfb
Vulkan: Fix crash on shutdown with Virtual XFB enabled
2017-10-22 16:42:24 +02:00
Leo Lam
b002d9d94f Merge pull request #6132 from ligfx/updatecubeb
Externals: update cubeb to kinetiknz/cubeb@c2bd582
2017-10-22 15:39:39 +02:00
Leo Lam
a596424dc2 Merge pull request #6133 from ligfx/soundstreamsetrunning
AudioCommon: rename ClearAudioBuffer(mute) to SetSoundStreamRunning(running)
2017-10-22 15:38:34 +02:00
Michael M
82129d30c9 TextureCache: don't create texture decoding resources if not enabled 2017-10-21 23:06:44 -07:00
Michael M
b031d3316c SoundStream: rename Clear(mute) to SetRunning(running) 2017-10-21 16:28:04 -07:00
Michael M
d6985fc3e8 AudioCommon: rename ClearAudioBuffer(mute) to SetSoundStreamRunning(running) 2017-10-21 16:28:04 -07:00
Michael M
7bcdd1a46a SoundStream: remove unused m_muted and IsMuted 2017-10-21 16:28:04 -07:00
Michael M
aa40c4a7ce Externals: update cubeb to kinetiknz/cubeb@c2bd582
A bunch of changes, looks mainly like bug fixes and code cleanup.

Notable changes:
- `cubeb_get_min_latency`'s signature was changed to take params via
  pointer, requiring Dolphin code to be tweaked in two places.
- A fix for kinetiknz/cubeb#320, as reported by @shuffle2
- Fixed build on FreeBSD (kinetiknz/cubeb#344), as contributed by @endrift
2017-10-21 14:28:39 -07:00
Stenzek
271f1af8c9 Vulkan: Fix crash on shutdown with Virtual XFB enabled 2017-10-18 22:11:59 +10:00
Dane Z. Bush
4dfe6c0875 MemArena: Name shared memory handle
Assign a name to the CreateFileMapping handle on Win32 so third party
applications can read from Dolphin's memory and integrate with the
current emulation.

Built and tested, multiple sessions are still possible without
collisions.
2017-10-11 16:35:32 +02:00
Stenzek
90ca2e8042 Merge pull request #6066 from stenzek/vulkan-resize
Vulkan: Fixes for window resizing
2017-10-11 23:02:48 +10:00
Leo Lam
d26eda3023 Merge pull request #6096 from leoetlino/wii-fsck
Add a way to check the NAND for issues and fix them
2017-10-11 13:01:39 +02:00
Leo Lam
ceed4d6f93 Merge pull request #6101 from sepalani/symbol-map-data
PPCSymbolDB: Handle data symbols in SymbolMap properly
2017-10-11 13:00:40 +02:00
Leo Lam
bc6846ce3b Merge pull request #5922 from sepalani/mem-base
MemoryWindow: base address search added
2017-10-11 12:17:57 +02:00
Leo Lam
1fb9e793ac Merge pull request #6104 from CyberShadow/pull-20171006-091319
CheatSearchTab: Add UI for manually adding an address
2017-10-11 11:51:49 +02:00
Vladimir Panteleev
3c51560857 CheatSearchTab: Add UI for manually adding an address
Sometimes an address is already known, e.g. from existing cheat
codes, and only inspecting the variable's value is desired.
2017-10-11 11:41:26 +02:00
Ethan Lee
322c395f33 Qt: Check showFileNameColumn, sort Hidden/ResizeMode calls by enum value 2017-10-11 11:40:07 +02:00
Leo Lam
53ccd41049 Merge pull request #6099 from leoetlino/activate
Qt: Don't crash when pressing the Return key
2017-10-11 11:32:09 +02:00
Leo Lam
8163fa1acc Merge pull request #6100 from leoetlino/vulkan-shutdown
Vulkan: Fix crash when Core initialisation fails
2017-10-11 11:31:16 +02:00
Leo Lam
1c14881cc1 Merge pull request #6105 from CyberShadow/pull-20171006-123219
ActionReplay: Fix implementation of memory-copy zero codes
2017-10-11 11:28:27 +02:00
Leo Lam
0eafb2f2a2 Merge pull request #6110 from lioncash/texture-config-hash
TextureConfig: Specialize std::hash for TextureConfig
2017-10-11 11:07:09 +02:00
Stenzek
edb5f855c2 VideoConfig: Prevent race condition on g_Config when refreshing
There was a race condition between the video thread and the host thread,
if corrections need to be made by VerifyValidity(). Briefly, the config
will contain invalid values. Instead, pause emulation first, which will
flush the video thread, update the config and correct it, then resume
emulation, after which the video thread will detect the config has
changed and act accordingly.
2017-10-10 23:56:33 +10:00
Stenzek
4301b8538d Vulkan: Only use oldSwapchain in response to VK_ERROR_OUT_OF_DATE_KHR
Seems to be required on the latest NV driver, otherwise the presented
images are never shown.
2017-10-10 23:21:40 +10:00
Stenzek
cdf34a79f7 Vulkan: Set a flag to resize the swap chain when presenting fails
Drivers can return VK_ERROR_OUT_OF_DATE_KHR from vkQueuePresentKHR, and
we should resize the image in this case, as well as when getting it back
from vkAcquireNextImageKHR.
2017-10-10 23:21:40 +10:00
Stenzek
80593f502e Vulkan: Fix bug where command buffer wouldn't be started after resize 2017-10-10 23:21:40 +10:00
Lioncash
c8af9e5f7b TextureConfig: Specialize std::hash for TextureConfig
This allows the hashing for TextureConfig instances to automatically be resolved instead of needing to directly specify it all the time.
2017-10-08 23:55:14 -04:00
Léo Lam
02e17594b0 WiiUtils: Attempt to fix the NAND more aggressively
Change the repair logic to fix issues more aggressively by deleting bad
titles. This is necessary because of a bug in Dolphin's WAD boot code.

The UI code was updated to inform the user about titles that will be
deleted if they continue a repair, before deleting anything.
2017-10-08 18:57:58 +02:00
Léo Lam
e1c0b8d011 TitleDatabase: Add GetTitleName for title IDs 2017-10-08 18:31:43 +02:00
Léo Lam
239167245d Add a way to check the NAND for issues and fix them
Old versions of Dolphin are so broken regarding NAND handling that
we need this to repair common issues and avoid issues with titles
like the System Menu or the Wii Shop.

This isn't an exhaustive check, but this will catch most issues
and offer to fix them automatically (if possible).
2017-10-08 18:31:42 +02:00
Léo Lam
2974c56e50 ESFormats: Make Content easier to compare 2017-10-08 18:31:42 +02:00
FoxP
999c23b182 Add some missing WiiWare makers
Some of my WiiWare games does not have a maker :
- Blue's Journey : EAFPJ8
- Magician Lord : EACPJ8
- The King of Fighters '94 : EAGPJ8
- The Last Ninja : C9XPGX
- World Games : C9ZPGX
2017-10-08 13:04:23 +02:00
JosJuice
e743ac80d2 TGCBlob: Fix brace style 2017-10-08 12:38:12 +02:00
Léo Lam
8f56219ea8 Vulkan: Fix crash when Core initialisation fails
The Vulkan backend was not shutting down the AsyncShaderCompiler and
some other instances, causing asserts to hit, followed by a hard crash.
2017-10-08 12:34:06 +02:00
JosJuice
0023d5b5cb TGCBlob: Make m_file_area_shift signed
Part two of fixing TGC files where file_area_virtual_offset is
smaller than file_area_real_offset, such as Zelda OoT Master Quest.
2017-10-08 12:30:53 +02:00