Commit Graph

26241 Commits

Author SHA1 Message Date
Léo Lam dedb61e5bf Boot: Install WADs temporarily
Because the Wii NAND size is finite, mark titles that were installed
only for booting as temporary, and remove them whenever we need to
install another title (to make room). This is exactly what the
System Menu does for temporary SD card title data.
2017-10-24 11:41:55 +02:00
Léo Lam 4b4a9a6486 UI: Implement a command line option to boot NAND title 2017-10-24 11:41:55 +02:00
Léo Lam 8e0869aff6 DiscIO: Remove comments that state obvious facts 2017-10-24 11:41:54 +02:00
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
Leo Lam c6f40fa11c Merge pull request #6040 from JMC47/gcsamplerate
AI: Fix GameCube Sample Rate
2017-10-23 19:37:32 +02: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
Tony Drake b66a72eb8f Update maker information to match the wiki
This updates the maker data to (mostly) mirror that of the Wiki:
https://wiki.dolphin-emu.org/index.php?title=GameIDs

Only maker ids from that page are now included in Dolphin. This
means no homebrew/unofficial makers.

Also, separate multiple maker names with a slash
2017-10-22 11:39:16 -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 b0945c7fb6 Merge pull request #6131 from t27duck/wiiware_ini_file
Add INI file for Midnight Bowling (WiiWare)
2017-10-22 15:41:23 +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
Stenzek d57d7b74d7 Merge pull request #6136 from ligfx/fixtexturecachenogpudecode
TextureCache: don't create texture decoding resources if not enabled
2017-10-22 16:21:37 +10: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
Mat M 78d5dbe032 Merge pull request #6127 from mbc07/android-codestyle-fix
[Android] Don't install Genymotion plugin when importing Code Style preferences file
2017-10-21 18:50:31 -04:00
Mat M bf71d1497e Merge pull request #6123 from hackbar/input-fix
Android: refactor and bugfix for input settings
2017-10-21 18:48:54 -04: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
Tony Drake 43390f62c4 Add INI file for Midnight Bowling (WiiWare)
Without virtual xfb, the game will show distorted graphics once leaving
the title screen. This adds an INI file to make the game playable.

The wiki page for this game also notes the need for virtual xfb.
2017-10-21 16:43:38 -04:00
Michael M 6abd1c8c99 NullSoundStream: don't call Mixer->Mix 2017-10-21 13:32:33 -07:00
Mike Harris fb6274f7bc Android: Refactor onMotionEvent.
This works the same, but only looks for the initial event and ignores
the keyup / return to home. It handles joystick diagonals smarter, in
that it ignore diagonals until the stick moves in a more cardinal
direction.

This fixes an odd bug where the dpad up/down were switched (thread post
I think found it -
https://forums.dolphin-emu.org/Thread-arm64-version-on-shield-tv-x1-local-multiplayer-not-working-d-pad-mappings?pid=379918#pid379918)
2017-10-21 13:01:13 -07:00
Mike Harris b8d45ad4be Android: Refactor the saveInput function.
In its prior state, it had xor parameters, which is confusing.
2017-10-21 13:01:12 -07:00
Mateus B. Cassiano 9eaf95144f [Android] Don't install GenyMotion plugin when importing Code Style preferences file 2017-10-21 02:28:36 -03:00
Stenzek 271f1af8c9 Vulkan: Fix crash on shutdown with Virtual XFB enabled 2017-10-18 22:11:59 +10:00
Pierre Bourdon 774fca4d01 Merge pull request #6107 from hackbar/cleanup
Android UI: lots of cleanups, mainly around how Fragments are handled
2017-10-17 10:12:56 +02:00
Mike Harris 0d78545255 Rename the param to setGamePath. 2017-10-16 20:36:13 -07:00
Mike Harris d73100f0e4 Minor cleanup in EmulationActivity.
Move the parameter extraction earlier on in onCreate. Mostly this moves
setting sIsGameCubeGame to before setContentView, which means
EmulationFragment will always see it in a consistent state. Previously,
there was a race, which mean the controller overlay would randomly be
Wii controls for a GameCube game (since the default is false).

Use the correct support version of things, ActivityOptionsCompat and
transitions

Rename static var mIsGameCubeGame to sIsGameCubeGame. s is static, m is
member.
2017-10-16 20:36:12 -07:00
Mike Harris 94ed30b055 Use the fragment backstack properly, and use fragment animations.
Make the MenuFragment added and removed by fragment transactions only,
instead of being initially present in the XML. This fixes a glitch where
it doesn't animate correctly the first time it's used.
2017-10-16 20:36:12 -07:00
Mike Harris c4d7814afa Collapse layouts with a framelayout root then another viewgroup.
There's no point to this, and it just slow things down (technically).
2017-10-15 16:44:56 -07:00
Mike Harris 4cab718065 Move emulation lifecycle handling into EmulationFragment.
The Activity is responsible for just its views and menus and such. It
signals the Fragment via setGamePath, StartEmulation and StopEmulation.

The Fragment manages the actual emulation lifecycle. It is solely
responsible for calling the NativeLibrary lifecycle methods.

With this lifecycle simplification, the NativeLibrary no longer needs to
kill the Activity. It happens normally now.

This simplifies a lot of things, live handling rotation.
2017-10-15 16:44:56 -07:00
Mike Harris d48c64457a Start the postponed activity transition as soon as Picasso loads the
image.

Doing it on the preDraw for the View is too complicated. This works just
as well.
2017-10-15 16:44:56 -07:00
Mike Harris 25a08fc5cc Only postpone transistions on Activity creation.
This is causing bugs (no UI is rendered) when the Activity is rotated.
2017-10-15 16:44:56 -07:00
Mike Harris 80e1cc56b3 Use weak references for the static Activity in NativeLibrary.
Add in null checks as well.
2017-10-15 16:44:56 -07:00
Mike Harris cde003c5cc Remove EmulationActivity.MenuType. This should have been removed when
SaveLoadStateFragment was refactored.
2017-10-15 16:44:56 -07:00
Mike Harris 80d51c97ab Add dummy View that works around a bug with the nVidia Shield.
Without this View, the emulation SurfaceView acts like it has the
highest Z-value, blocking any other View. This includes the menu
fragments and the screenshot ImageView.
2017-10-15 16:44:56 -07:00