Commit Graph

131 Commits

Author SHA1 Message Date
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
FIX94 b29cdef8ec (WiiU) continuation of the audio driver changes from yesterday 2016-11-21 22:47:29 +01:00
aliaspider 3cb5ab32f5 (WiiU) add missing file. 2016-11-16 20:12:45 +01:00
aliaspider 3cc1ddbdd1 (WiiU) simplify memory.c 2016-11-16 18:25:23 +01:00
aliaspider 418787e6ca (WiiU) can't use start files with rpx buidls yet (this also means, no C+
+ static constructors support).
2016-11-16 17:44:54 +01:00
aliaspider 4089f9ec63 (WiiU) use the already defined __init and __fini symbols. 2016-11-16 17:43:04 +01:00
aliaspider 286a1887a9 (WiiU) change linker script, add calls to _init() and _fini().
fixes cores relying on C++ static constructors/destructors. (only for
elf builds)
2016-11-15 19:37:30 +01:00
aliaspider 6f7f6a363b (WiiU) only wait for vsync when not missed. 2016-11-10 14:24:20 +01:00
aliaspider 225edffce1 (WiiU) fix wiiload script. 2016-11-10 08:32:45 +01:00
aliaspider deb9ea4453 (WiiU) netlog scripts. 2016-11-09 14:28:39 +01:00
aliaspider dbd8a87ebb (WiiU) can compile as rpx. (doesn't exit properly) 2016-11-09 14:26:38 +01:00
aliaspider 8b07cf5fd6 (WIIU) calling FSFlushFile each write doesn't seem to be necessary
anymore.
2016-11-08 09:51:05 +01:00
aliaspider 5a17f0ba3c add missing copyright notice. 2016-11-06 19:03:08 +01:00
aliaspider a0383e6b6a (WIIU) keep the dynlib handles. 2016-11-06 18:59:39 +01:00
aliaspider 31edafde03 (WIIU) add timers, fix retro_sleep. 2016-11-06 11:55:56 +01:00
aliaspider 2aa555fb95 (WIIU) forgot to add this file too. 2016-11-05 15:09:37 +01:00
aliaspider d3b3c18a6f (WIIU) GX2 rendering. 2016-11-05 15:05:46 +01:00
aliaspider 0433cae3c9 (WIIU) misc. 2016-11-05 15:01:43 +01:00
aliaspider 176dd79f33 (WIIU) misc. 2016-11-02 22:06:15 +01:00
aliaspider e055b7cbc1 (WIIU) cleanup. adapt dynamic symbol loading to be able to use headers
from WUT.
2016-10-29 02:56:40 +01:00
aliaspider ac915abb5d (WIIU) edit netloader script. 2016-10-28 00:28:44 +01:00
aliaspider cf1e9f38ce (WIIU) flush to file after each write, this is a temporary fix as it
seems to hang in FSWriteFile after writing 0x8000 bytes otherwise.
2016-10-28 00:25:47 +01:00
aliaspider 30d31538b1 (WIIU) add an alternative exception handler (source: https://github.com/
QuarkTheAwesome/URetro)
2016-10-27 23:19:54 +01:00
aliaspider 8bdc40d5f8 (WIIU) exception handler: use net_print directly 2016-10-27 23:03:56 +01:00
aliaspider 2a7f5d8ba3 (WIIU) alternative memory allocation functions (from wut) 2016-10-27 23:03:21 +01:00
aliaspider 844c6ed582 (WIIU) misc. 2016-10-27 19:53:56 +01:00
aliaspider 02c38d23c1 (WIIU) enable the exception handler. 2016-10-27 19:53:27 +01:00
aliaspider 0c3dc1e6b2 (WIIU) edit the .ld script to keep the debug symbols. 2016-10-27 19:37:53 +01:00
aliaspider 962baabe5d (WIIU) add missing files in dynamic_libs, add exception_handler 2016-10-27 18:58:19 +01:00
aliaspider cb7e880df6 (WIIU) update dynamic_libs (https://github.com/Maschell/dynamic_libs) 2016-10-27 18:17:20 +01:00
aliaspider 094b725ad6 (WIIU) disable mem2/frontend driver 2016-10-27 15:49:21 +01:00
aliaspider 185849d5ff (WIIU) add frontend driver, allocate mem2 2016-10-27 15:33:40 +01:00
aliaspider a4d745a471 preliminary port to the wiiu platform 2016-10-27 01:34:10 +01:00