Commit Graph

285 Commits

Author SHA1 Message Date
Léo Lam 2fc5047d26 IOS: Convert the IOS kernel HLE code to a class
This changes the main IOS code (roughly the equivalent of the kernel)
to a class instead of being a set of free functions + tons of static
variables.

The reason for this change is that keeping tons of static variables
like that prevents us from making an IOS instance and reusing IOS
code easily.

Converting the IOS code to a class also allows us to mostly decouple
IOS from the PPC emulation.

The more interesting changes are in Core/IOS/IOS. Everything else is
mostly just boring stuff required by this change...

* Because the devices themselves call back to the main IOS code
  for various things (getting the current version, replying to a
  request, and other syscall-like functions), just like processes in
  IOS call kernel syscalls, we have to pass a reference to the kernel
  to anything that uses IOS syscalls.

* Change DoState to save device names instead of device IDs to simplify
  AddDevice() and get rid of an ugly static count.

* Change ES_Launch's ack to be sent at IOS boot, now that we can do
  this properly.
2017-04-30 17:18:53 +02:00
Léo Lam 3124f3c4d8 WX: Add the ability to uninstall WADs from the game list
Simple quality-of-life addition that allows "uninstalling" WADs
(removing the corresponding installed title) from the NAND.

The option is only enabled when the WAD can be uninstalled

The motivation for this is actually to encourage proper usage of the
WAD launch feature (installing it to the NAND first), so we can
drop the "direct WAD title launch" hack.
2017-04-25 23:34:32 +02:00
Léo Lam 7a615afe17 Merge pull request #5315 from sepalani/debug-pause
DoStop() shouldn't unpause in debug mode
2017-04-25 16:48:31 +02:00
Léo Lam dd31a403db Merge pull request #5285 from spycrab/fr_9952
Make title column toggleable (Issue #9952)
2017-04-24 23:12:39 +02:00
Sepalani 4a55398069 DoStop() shouldn't unpause in debug mode 2017-04-24 17:32:15 +01:00
Tilka c6bc474c29 Merge pull request #5291 from Starsam80/fix-10221
WX: Don't specify a parent frame for the render frame
2017-04-23 23:40:32 +01:00
JosJuice 26b6b78f3a Delete WXInputBase
It's unused (apparently since cf8f049). Deleting it will
lighten the load for translators.
2017-04-22 19:39:17 +02:00
Léo Lam bca9a9d4d9 Merge pull request #5113 from Starsam80/nand-import
Add BootMii NAND import functionality
2017-04-21 22:02:15 +02:00
Sepalani 694b10da11 Generate Symbols From RSO Modules added 2017-04-21 00:32:06 +01:00
Starsam80 a41c0d3caa
WX: Don't specify a parent frame for the render frame 2017-04-19 20:06:33 -06:00
spycrab 72e92add8a Make title column toggleable (Issue #9952) 2017-04-17 19:34:14 +02:00
spycrab 01e07d7853 Lazily initialize m_main_config_dialog (Issue #10213) 2017-04-16 13:00:11 +02:00
Starsam80 6bccc13f3b
Add BootMii NAND import functionality 2017-04-09 13:14:05 -06:00
Mat M 96e70ad5a3 Merge pull request #5217 from lioncash/cheats
Frame: Make cheat dialog private
2017-04-08 17:30:27 -04:00
Lioncash f7a2f6ad01 FileSearch: Namespace functions under the Common namespace 2017-04-07 01:02:14 -04:00
Lioncash c61d0dfe87 Frame: Make cheat dialog private
Rather than destroy and reinitialize the dialog whenever it's closed,
and opened this dialog can just be hidden from view when it's not
needed, and shown again when it is needed.

Also, a dialog should really not be managing any live instances of
itself, including the one directly in the main frame.

This gets rid of another usage of the main frame global.
2017-04-06 21:25:26 -04:00
Michael Maltese f1dfa7933c FrameTools: unbind KEY_DOWN handler when game stops
Fixes issue 10162: Cannot type window text fields in macOS builds[0]

[0]: https://bugs.dolphin-emu.org/issues/10162
2017-04-02 19:17:35 -07:00
Lioncash 678905764a Movie/Frame: Amend variable naming
Amends variable naming related to translation unit locals and TAS input
dialogs that were modified in the previous commit.
2017-04-02 04:11:58 -04:00
JosJuice f106ba70d4 Move DVD code to a new directory 2017-03-31 17:27:23 +02:00
Sepalani 4cb84d06f0 SignatureDB: Support for WiiTools MEGA files added 2017-03-28 20:16:09 +01:00
Sepalani 5b88782e30 Generate Symbols From menu added 2017-03-28 02:05:27 +01:00
Markus Wick 08351aa334 Merge pull request #5005 from aldelaro5/remove-save-load-debug
Don't save watches and breakpoints on stop and load on boot
2017-03-18 08:45:01 +01:00
Lioncash f0eeb3c63a SI: Namespace device classes
Places all of the SI code under the SerialInterface namespace instead of
only the main source file. This keeps all SI code under a common name,
as well as out of the global namespace
2017-03-16 04:41:39 -04:00
aldelaro5 654f582446 Don't save watches and breakpoints on stop and load on boot
Not only this is pretty pointless because there is a load and save button on the appropriate panels, but for the breakpoints one, it caused an error while mapping the memory since adding memory breakpoint requires to update the DBAT and this is done too early (right after boot).  This also only worked if you had the right panel on making it even more useless because it would fail to laod if you didn't have the right panel on.  It's better to just let the user click load and save.
2017-03-03 05:18:33 -05:00
Léo Lam c1a139e8ac Use ESFormats for TMDs
We already have a TMDReader, so let's actually use it.

And move ESFormats to IOS::ES, since it's definitely part of IOS.
This adds a DiscIO dependency on Core which will be fixed in a
follow-up PR.
2017-02-26 19:46:29 +01:00
Chris Burgener 8bfe2671b2 Remove IsReadOnly check when stop recording 2017-02-17 23:23:42 -05:00
Chris Burgener 28c9f2a44d Add Stop Play/Recording Input Menu 2017-02-11 19:59:19 -05:00
Léo Lam fd49a1b2d5 Get rid of GetUsbPointer for emulated Bluetooth
It held a raw pointer to a IOS::HLE::Device::BluetoothEmu that is not
guaranteed to exist (and of course, nothing checked that it wasn't
nullptr), but what is more, it's totally unnecessary because we have
IOS::HLE::GetDeviceByName().

Since we cannot always inform the host that Wii remotes are
disconnected from ES, that is now done in BluetoothEmu's destructor.
2017-02-08 15:07:33 +01:00
Lioncash ead076d335 NetWindow: Get rid of direct use of the main_window global
Utilizes the event system (which is what should have been done here
initially), in order to prevent coupling between two different window frames.

This also makes booting games more versatile using the UI event system,
as the event can just act as a carrier for the filename, making directly
calling boot functions unnecessary. All that's needed is for the event to
propagate to the frame.
2017-02-06 18:29:20 -05:00
Lioncash e07383a783 Core: Convert State enum into an enum class 2017-02-05 08:32:23 -05:00
Lioncash 794d0a9d7c Core: Move SI source files to their own directory 2017-01-20 19:33:24 -05:00
Léo Lam 49b9c723e2 Put IOS devices in a namespace and drop WII_IPC_HLE prefix 2017-01-18 21:42:33 +01:00
Léo Lam 24199293d3 IOS: Reorganise the source files and IPC_HLE→IOS
IPC_HLE is actually IOS HLE. The actual IPC emulation is not in
IPC_HLE, but in HW/WII_IPC.cpp. So calling IPC_HLE IOS is more
accurate. (If IOS LLE gets ever implemented, it'll likely be at
a lower level -- Starlet LLE.)

This also totally gets rid of the IPC_HLE prefix in file names, and
moves some source files to their own subdirectories to make the file
hierarchy cleaner.

We're going to get ~14 additional source files with the USB PR,
and this is really needed to keep things from becoming a total pain.
2017-01-18 20:43:10 +01:00
Lioncash 722162b54a IPC_HLE: Namespace IOS HLE
Gets all of the IOS HLE code out of the global scope.
2017-01-17 20:46:58 -05:00
Mat M e7359f247b Merge pull request #4595 from aldelaro5/add-debugger-hotkeys
Add debugger hotkeys
2017-01-05 14:33:10 -05:00
PEmu1 2dae72f817 Clarify GameCube Controller in TAS Input 2017-01-03 18:03:17 -08:00
aldelaro5 cc7c410cf1 Add debugging hotkeys
They are separated into 3 groups and will only be shown in the input config dialog if the emulator was in debug mode.
2017-01-02 18:16:52 -05:00
Léo Lam ec729e2ee3 Stop Movie/Netplay before triggering STM shutdown
This fixes a bug which caused Movie (input recording or playback) or
netplay not to be stopped. DolphinWX previously triggered a STM power
event, and then the STM directly stopped the emulation; the code
which stops Movie/Netplay was completely skipped.

This is fixed by moving it /before/ sending the shutdown event.
2016-12-24 00:44:30 +01:00
Anthony ca91b6df52 Merge pull request #4521 from JosJuice/tgc
Add TGC disc image compatibility
2016-12-20 17:45:39 -06:00
Léo Lam adcfefecde DolphinWX: Fix booting from DVD
OnBootDrive used the "drives" member std::vector for drive paths, but
since PR #4363, this vector is not populated anymore, so we were
accessing it out of bounds.

Actually, drives was not needed in the first place, since we can
get the wxMenu from the event, and from there, get the label directly.
2016-12-19 10:45:33 +01:00
JosJuice 9bd514ed1c Add TGC disc image compatibility 2016-12-18 18:57:36 +01:00
Anthony 7a5bb46016 Merge pull request #4030 from clinchergt/fix-setfocus-rendertowindow
Fix focus bug when using the "render to main window" feature
2016-12-09 15:39:31 -06:00
aldelaro5 32a0dae257 Completely redo All configuration dialog
Hotkeys

Make a new class that inherits from InputConfigDialog with a specialised constructor.  The changes are mainly the top portion and it now uses tabs to categorise the hotkeys.

Redo the GCPad configuration dialog

The layout is similar, but it now allows flexibility to change it more easily.

Redo the GC Keyboard configuration dialog

Same layout.

Redo completely the Wiimote configuration dialog

Separated the controls into 2 tabs to make them less imposing overall.

Redo the Nunchuk configuration dialog

Similar layout, except for 2 control group sizers.

Redo the Classic controller configuration dialog

Same layout.

Redo the Guitar input configuration dialog

Stacked 2 sets of group together.

Redo the Turntable configuration dialog

More stacked groups and the window is much less wide.
2016-11-28 08:26:34 -05:00
aldelaro5 00f680b830 Add flexibility to InputConfigDialog
Removed the unecessary forced tabbed layout, removed the layout part of the constructor and remade some method in preparation for tabbed styled input dialog such as the new hotkey configuration one.  It breaks every inputconfigDialog, but this will get fixed in the next commits.

Also moved to a folder since there will be many more files created in the next commits so it gives better separation.
2016-11-28 08:26:27 -05:00
Jules Blok c21efa0cad D3D: Move exclusive mode switching to UI thread.
This prevents deadlocks when switching to exclusive mode.
And it also allows the CPU thread to block until we've completed the switch.
2016-11-11 20:36:04 +01:00
Jules Blok 03878a44e1 Merge pull request #4433 from Armada651/the-emu-that-runs-faster-than-its-race-condition
FrameTools: Avoid deadlock in UpdateGUI().
2016-11-10 16:50:13 +01:00
Lioncash be04215857 FrameTools: Clean up variable naming in UpdateLoadWiiMenuItem 2016-11-08 21:22:17 -05:00
Lioncash 2acf3570e0 PathConfigPane: Eliminate main frame global usage 2016-11-08 21:19:24 -05:00
Jules Blok de50fead5c FrameTools: Avoid deadlock in UpdateGUI(). 2016-11-09 01:45:30 +01:00
Lioncash 5022c0dfb5 DolphinWX: Move common wxUpdateUIEvent functions to WxEventUtils 2016-11-06 09:02:59 -05:00