82 Commits

Author SHA1 Message Date
gblues
7954dab835 Progress on I/O handling
== DETAILS

Starting to implement the I/O handling on the HID driver.

The old implementation basically had a never-ending HIDRead() callback
set up, so that callback N would start the read process for invocation
N+1.

We will take the same approach here; but now that the I/O thread is
happenning on its own core, we should be able to let it run full-
throttle without impacting emulator performance.

Of course, this hinges on the callback actually running on the same
core as the syscall was initiated on.

== TESTING
Can confirm that the read_loop_callback gets invoked on the same core
that the HIDRead() was invoked on.
2017-12-30 04:41:25 +01:00
gblues
661e5bf50b Implement new functions in hid_driver_t in WiiU driver
== DETAILS

This implements the WiiU-specific functions.

Since the wiiu_hid_t data structure contains the handle and interface
index, the method signatures can be simplified quite a bit. And since
(at least for now) we want these to be synchronous, we don't need to
expose the callback parameters.
2017-12-30 04:41:19 +01:00
gblues
678c4093c1 Start adapting the dual shock 3 driver to use the new driver format.
== DETAILS

The handshake stuff is derived from the old HID2VPAD, just in knowing
what data goes in what report.

- Added the HID_REPORT_ flags to syshid.h
- Renamed the generic "REPORT_TYPE" flags to be meaningful
- also fixed incorrect parameter list for set_protocol
== TESTING
The functions aren't implemented in wiiu_hid.c just yet,
so this is gonna crash if you try to run it.
2017-12-30 04:41:12 +01:00
gblues
192f5875b9 Simplify, add logging, revert some of the changes
== DETAILS
The old code was crashing; I did a minimalized branch and the crash
went away, so I'm bringing that over here. Meaning I'll have to
redo some of the other work I'd put in, but oh well.

(now watch it start crashing again)

== TESTING
Can confirm it builds. Wii U is busy ATM so I can't test.
2017-12-30 04:40:23 +01:00
gblues
d0368124e6 Add OSFastMutex WiiU calls to list of imports 2017-12-30 04:40:10 +01:00
Nathan Strong
e80d99dbae Delete controller_patcher; start on proper HID driver
== DETAILS

We discovered that the controller_patcher code was causing
the WiiU to intermittently crash when switching ROMs.

Changes:

- Completely extricates the controller_patcher code
- Create a skeleton wiiu_hid driver
- Wire up the build system to build/link it successfully

== TESTING

Has not been tested. Probably doesn't crash, since the
skeleton driver is just a copy of the null driver.
2017-12-30 04:38:57 +01:00
gblues
6904101c44 Clean up trailing whitespace
== DETAILS

Really simple code cleanup, because my editor flags trailing whitespaces
and it's pretty annoying.
2017-12-12 00:24:18 -08:00
Ash
52fb8276d7
[WiiU] Exception handler: minor comment tweak 2017-12-01 11:03:09 +11:00
Ash
469662345f
[WiiU] Exception handler: remove opcodes; fix strcmp misuse
Thanks for @gblues for finding the strcmp bug.
I've removed the opcode display since it's a bit unsafe - if the
exception handler causes a DSI; Cafe OS will take over and freeze up the
console. This is obviously not a good thing. There are possible
situations where memory is executable and not readable; so this is just
about covering all bases until a better solution can be implemented.
Maybe we can experiment a bit more once this handler isn't being used so
often ;)
2017-12-01 10:56:54 +11:00
Ash
a79d3aa8aa
[WiiU] Exception handler: fix coreinit handles, add opcode to DSIs
Coreinit seems to get special handles, so adding a special case should
make its relative addresses actually become helpful again. Let's just
hope __PPCExit stays at 0x180!
Also added the violating opcode to the DSI message; may have to move it
in case it pushes stuff off the end of the screen.

Untested at time of commit. Hopefully this should make debugging #5357 a
bit easier...
2017-12-01 10:54:21 +11:00
Ash
5f00e2f6bb
[WiiU] Reformat fs_utils.c
Was getting warnings around misleading indentation when there
was none, so just redid the whole file.
2017-11-04 20:37:30 +11:00
Ash
0d38612f4a
[WiiU] Various warning/format string fixes
All things from unsigned comparisons to missing initializers; we got it
here.
2017-11-04 20:37:30 +11:00
Ash
b49268a9e9
[WiiU] Redo exception handler format strings
Deals with the infamous devkitPPC "int32_t = long int" thing, and
future-proofs in case they ever change it back.
2017-11-04 20:37:30 +11:00
Maschell
6fa80376e0 [Wii U]Added some more checks while parsing the configuration files for the HID controller
This hopefully fixes the crashes when starting retroarch with (faulty)
.ini files
2017-10-25 21:16:31 +02:00
Brad Parker
19af87214a wiiu: only one dash for gcc -std 2017-10-20 23:43:33 -04:00
Maschell
05ef63fd08 [WII U] Fix for Issue #5556
This hopefully fixes the issues when you try to use 2 Controllers with
the same vid/pid at the same time.

Tested with 2 DS4 controller via the Hid to VPAD Network Client.
Adapters with multiple ports (like the official GC-Adapter) are still
working
2017-10-17 21:38:42 +02:00
Ash
6b5aef09a1
[WiiU] DRC touch support as pointer device
Allow using the Gamepad's touch screen as a RETRO_DEVICE_POINTER.
Methodology could use some work, had to add an extra axis to
joypad in order to get the data transferred into the input driver.
Feel free to change this.
Needs to emulate RETRO_DEVICE_LIGHTGUN to really be useful.
Potential for Wiimote IR in future.

Partially addresses libretro/RetroArch#5294
2017-08-19 17:40:56 +10:00
not6
10492c1ee7 Update imports.h
add additional imports  (semaphore)
2017-08-07 23:25:05 +02:00
Ash
40a4a5a733
[WiiU] Rewrite exception handler 2017-08-04 21:30:49 +10:00
Ash
2492f3d6b3 Add missing_libc_functions.c (for DOSBox) 2017-06-15 15:21:38 +10:00
Ash
7f5986e1d5 Rename Wii U log functions (conflict in DOSBox) 2017-06-15 15:20:58 +10:00
aliaspider
f589c50043 (WiiU) misc. 2017-05-28 12:42:19 +01:00
aliaspider
5a92ec15cf (WiiU) fix netplay. 2017-05-26 12:32:45 +01:00
aliaspider
934f7c58ba (WiiU) enable networking. 2017-05-23 10:24:23 +01:00
aliaspider
b17e76d8b7 (WiiU) add freetype and stb font support.
freetype disabled by default due to requiring an external library.
2017-05-21 04:22:32 +01:00
aliaspider
8dee95651f (WiiU) add a font driver. 2017-05-21 03:05:41 +01:00
Maschell
bd8d3d66d7 [Wii U] Using the controller_patcher lib files directly instead of including it as a submodule 2017-05-20 20:23:01 +02:00
Maschell
7a2c09e9ce [Wii U ] Proper order of the HID devices.
Added individual names for the HID devices.
2017-05-20 19:26:12 +02:00
Maschell
fa0d82b188 [Wii U] Fixing the .rpx build 2017-05-20 13:13:52 +02:00
Maschell
4393e17ea7 [Wii U] Using the HID Controller as a own controller. Currently the stick only work when it's bind manually. Mapping from controller to retroarch input port may change when you attach a new device. 2017-05-08 21:46:34 +02:00
Maschell
11a0610d13 [Wii U] Updating to new controller patcher. Removing debug stuff. 2017-05-08 12:32:02 +02:00
Maschell
e695d4e8ad [WiiU] Initial controller patcher support (HID via USB and network)
- Reading config from sd cards currently broken
- Not implemeted as a driver, currently all devices will be mapped to the WiiU Gamepad driver
2017-05-08 12:24:06 +02:00
Maschell
da0f3620bc [Wii U] Adding missing includes and defines 2017-05-08 12:18:28 +02:00
xhp-creations
4915f452f5 WiiU Initial Keyboard Support
WiiU Initial Keyboard Support
2017-02-09 12:34:12 -05:00
aliaspider
8f88d8fb4d (WiiU) implement the missing requirement for core loading: exec,
exitspawn, set_fork and salamander.
2017-01-25 19:52:31 +01:00
aliaspider
021b510452 (WiiU) refactors/cleanups. 2017-01-23 16:14:05 +01:00
aliaspider
272f7c0a85 (WiiU) cleanups. 2017-01-23 16:01:53 +01:00
aliaspider
1601febabc (WiiU) buildfix for devkitPPC r29.
- add wut headers and elf2rpl to source tree.
2017-01-23 16:01:53 +01:00
aliaspider
8cb692622a (WiiU) add support for bluetooth controllers (Wiimote, nunchuk, classic
controller, wiiu pro controller).
2017-01-16 18:52:39 +01:00
FIX94
c0b023a1cf (WiiU) added basic libiosuhax support 2016-12-17 18:42:04 +01:00
FIX94
df956efd43 (WiiU) properly set audio offset before starting playback 2016-11-30 02:37:42 +01:00
FIX94
53042b58b0 (WiiU) changed linker script to now properly generate a small rpx elf file instead of a 243mb one every time 2016-11-24 09:09:23 +01:00
aliaspider
f43c7254ee (WiiU) add a helper macro for DisassemblePPCRange. 2016-11-24 00:34:03 +01:00
FIX94
19ab43ae90 (WiiU) added additional imports 2016-11-23 23:53:22 +01:00
aliaspider
2b4e4d56cd (WiiU) no need to specify library name for IMPORT_END() anymore. 2016-11-23 08:47:02 +01:00
aliaspider
ea248559e0 (WiiU) rpx update:
- c++ static constructors/destructors fix for rpx builds.
- building both rpx and hbl elf formats doesn't require a clean step
inbetween anymore, both can be now built in a single make call.
2016-11-23 03:21:01 +01:00
aliaspider
eedbea4527 (WiiU) build RPX imports from imports.h. 2016-11-23 00:06:35 +01:00
aliaspider
3acdf3d1cb (WiiU) import only the needed symbols. 2016-11-22 22:48:44 +01:00
FIX94
b3eb8ec3be (WiiU) use some more direct callback for audio updates and added safety into it 2016-11-22 02:39:12 +01:00
FIX94
0c314d0159 (WiiU) more audio driver cleanup 2016-11-22 00:37:22 +01:00