Commit Graph

94 Commits

Author SHA1 Message Date
twinaphex
35aa4191ac (WiiU) Add HAVE_SLANG=1 2019-07-21 13:46:51 +02:00
twinaphex
b2bf822f13 Add HAVE_AUDIOMIXER switch 2019-07-11 11:51:06 +02:00
Ash Logan
4ef9258b63 wiiu: Add libfat/iosuhax to Griffin, always use builtins 2019-05-29 18:23:34 +10:00
Ash Logan
ab63d34e2e wiiu: Add inputs and ifaddrs to griffin build
Gets a little closer to fixing it, still has issues with the input 
drivers though
2019-05-28 09:06:31 +10:00
Ash Logan
e2c479987c Makefile.wiiu: Formatting/readability pass 1
Actual meaning is mostly the same, aside from cleaning up the include 
paths and portlibs handling. Griffin build does not work, salamander 
builds OK.
2019-05-28 09:06:31 +10:00
Ash Logan
e00d1f01e4 Makefile.wiiu: Remove -mwup (removed from devkitPPC)
See 8903cf8ec0
This got removed from devkitPPC a while ago, this should allow
people on newer toolchains to build.
These changes also need to be done to all the cores.
2019-05-28 09:06:31 +10:00
twinaphex
ebaa5b9941 Undefine HAVE_VIDEO_LAYOUT for now instead of implicitly enabling
it for every platform - will have to be individually enabled for
each platform first after rigorous testing
2019-05-13 01:57:26 +02:00
Huw Pascoe
7e0592198d video_layout build 2019-05-11 09:58:46 +01:00
orbea
98f6aecec2 Remove the zarch menu driver. 2019-02-02 22:15:10 -08:00
twinaphex
ef35cf5ac0 Add fopen_utf8 for Salamander builds 2019-01-08 21:42:52 +01:00
orbea
bfc366decc Squeeze extra blank lines with cat(1).
Example:

find . -type f -iname '*.c' | while read -r i; do
  cat -s "$i" > "$i.new"
  mv "$i.new" "$i"
done
2019-01-08 11:04:58 -08:00
orbea
65c6caf5a6 qb: Add '--disable-menu'. (#7910)
This adds '--disable-menu' which will disable all of the menu drivers
including Qt. This will also allow disabling only rgui and not the other
menu drivers.
2019-01-06 17:30:50 -05:00
twinaphex
ba020720db Add HAVE_NETPLAYDISCOVERY 2018-10-12 18:29:52 +02:00
Nathan Strong
c5f9fc0a34 WiiU: fix network information
== DETAILS

For local netplay, it's useful to have your IP address easily
available. This commit makes the Information > Network Information
menu display the Wii U's IP address.

Change summary:
- Fix the logging init to be reentrant to avoid socket consumption
- Add implementation of POSIX `getifaddrs()` and `freeifaddrs()`
  to `missing_libc_functions.c`
- Remove compiler directives protecting the code paths that call
  `getifaddrs()` from being used in Wii U builds

== TESTING

Have tested locally, successfully get IP address information in
the Information > Network Information.

I think this may also fix NAT traversal. Will need to be tested.
2018-10-11 15:37:15 -07:00
Twinaphex
893dbc6bee
Revert "Revert "(wiiu) Use portlibs zlib and libpng"" 2018-06-25 23:26:43 +02:00
Twinaphex
3c6c9a8b08
Revert "(wiiu) Use portlibs zlib and libpng" 2018-06-25 22:33:45 +02:00
opendata26
707855beda
(wiiu) add back HAVE_BUILTINZLIB but disabled by default 2018-06-18 21:41:30 +01:00
opendata26
cbc804783f (wiiu) Use portlibs zlib and libpng
Zlib needed for libpng to work, used in some cores.

Signed-off-by: Craig Tatlor <ctatlor97@gmail.com>
2018-06-15 18:53:45 +01:00
gblues
23f0a85446 Implement UDP broadcast network logging on Wii U
== DETAILS

The broadcast address is a standard part of TCP/IP that is used to
send messages to everyone on the subnet. This patch updates the
logging code to do the following:

1. Derive the broadcast address from the Wii U's own IP address
   and subnet mask. These can all be obtained at runtime, which
   means we can...
2. Remove the PC_DEVELOPMENT_IP_ADDRESS define from Wii U's
   Makefile, because compiling in an IP is no longer needed.
3. Rewrite the net_listen script to listen for broadcast packets
   and print them out with timestamps.

Since it's using the broadcast address, the only requirement is
that the PC be on the same network subnet as the Wii U.

Because of the low overhead of UDP, I've made logging on by
default. This will make it a ton easier to get useful bug
reports from users.
2018-05-06 14:39:48 -07:00
gblues
58e298ab8d Fix Salamander build
- move non-salamander objects out of salamander scope
- move the missing libc functions to general scope
- fix salamander_main inline invocation

TESTING: Ran 'make -f Makefile.wiiu SALAMANDER=1' successfully
2018-05-06 10:01:20 -07:00
gblues
7448fd3157 More code re-organization
=== DETAILS
Since @aliaspider wants the `wiiu/` to be something of a mini-SDK, I've
reorganized the code I put in there:

- `wiiu/main.c` now only has the ELF/RPX entrypoints, and the code used
  by those entrypoints, with RA code removed (e.g. swapped retro_sleep()
  for usleep()). These entrypoints then call main() ...
- Moved `main()` and its support functions back into `frontend/drivers/platform_wiiu.c`
  I also renamed some of the support functions I wrote, and better
  organized them within the code.
- Moved `wiiu/input/` into the `input/` hierarchy:

  * The joypad drivers now live in `input/drivers_joypad/wiiu/`
  * The HID driver now lives in `input/drivers_hid/`
  * The Wii U specific headers now live in `input/include/wiiu`
  * I added `input/include` into the include search path to avoid
    using really ugly relative includes
2018-05-01 23:23:40 -07:00
gblues
04cefd27d1 Cleanup of Wii U launcher code
== DETAILS

The Wii U main entrypoints were embedded in the frontend driver,
which isn't a great place for them. Also, the `main()` method was
pretty long and monolithic. Now it's (much) less so.

Changes:

- Refactor out the main entrypoints into their own source files
  (`wiiu/main.c` and `wiiu/main.h`)
- Optimize includes in both files, so only the minimum needed to
  compile are included.
- The `main()` method is a lot easier to understand now. It's no longer
a confusing mess of ifdefs.
- There's a small amount of changes in the headers for future work, which
  is switching kpad_driver to be callback-driven. The only change here is
  to import the function that will be used, and define some data types.

Testing:
- Did local builds and confirmed build is successful
- Successfully loaded a core and switched among a few games
2018-04-30 21:56:06 -07:00
gblues
1d84c0eca1 Fix analog for DS3, plus some cleanups
== DETAILS

- DS3 analog wasn't working mainly because I forgot to actually declare the
  axes in input/input_autoconfig.c when declaring the pad. Whoops.
- I also moved the axis decoding logic to a more central place, because it
  clearly is not Wii U specific.
- Removed some dead commented-out code

== TESTING

Can use analog inputs on both GCA and DS3. Tested in Mario 3 on Nestopia core.

Haven't tested with any actual analog games, but I did confirm via logging
that the correct ranges are produced.
2018-04-23 23:22:27 -07:00
gblues
fb5b31faf3 Merge branch 'master' into gblues/hid 2018-04-14 14:18:03 -07:00
gblues
dca36ebaf8 Add small snippet for atomic value swapping
Fortunately, the gcc port implements the builtins and, from basic
testing, they seem to work.

This is only really useful on Wii U--other platforms have more
robust atomic operations, or aren't using gcc to build.
2018-04-14 01:26:26 -07:00
twinaphex
368becbc42 (wiiu) Potential build fix 2018-04-08 20:29:07 +02:00
radius
3792a5e502 remap-redux part2: cleanup 2018-04-08 12:13:49 -05:00
twinaphex
816d805f58 (wiiu) Only build these files in for non-Griffin build 2018-04-08 17:26:34 +02:00
twinaphex
23096e00a3 (wiiu) Add HAVE_RUNAHEAD object files 2018-04-08 07:15:59 +02:00
twinaphex
f069eeb017 (Wii/WiiU) Add HAVE_RUNAHEAD 2018-04-08 00:48:27 +02:00
gblues
ae19eed00f implement hid device search 2018-03-29 23:37:11 -07:00
gblues
51c01df815 Turn off WIIU_HID on master 2018-01-19 21:58:22 -08:00
gblues
86ac651edf Fix disabled HID code, add defensive programming
== DETAILS

1. Noticed that the HID driver wasn't loading after setting WIIU_HID=1. Found
   that the HID driver init was ifdef'd out. Removed that.

2. Current theory around "System Memory Error 160-2203" is in-memory
   corruption. So, to try to identify it:

   - Created a routine that does a hex dump of the RPX over the logger. (I
     have a python3 script that can extract the hex dump back into a binary
     file). If a SME occurs with this routine enabled, we can see if the
     corruption is happening at read-time, or somewhere between when we send
     the RPX to the loader and try to execute it.

   - I noticed that we allocate slightly more memory than the RPX actually
     needs, and we don't zero the memory, which means there's a handful of
     bytes at the end that could be anything. I added a call to memset() to
     zero out the memory prior to loading the RPX off the SD card.

And, of course, after adding those, I haven't been able to reproduce the
System Memory Error, so maybe the uninitialized memory was the problem?

Here's hoping.
2018-01-18 19:57:19 -08:00
gblues
1515bd8c1b Minor cleanups
== DETAILS
- Add *.swp to gitignore so editor swap files don't get committed
- Remove unneeded commented-out defines from WiiU build
- Start on fix for DSI when switching cores on WiiU

== TESTING
Sigh. I'm back at "System Memory error", which makes me think the problem
might be the SD card. (On the plus side, I manually verified the hash so
at least the copy process is working).

So, that's to say that I can't actually test to see if the DSI error is
fixed.
2018-01-13 12:16:37 -08:00
aliaspider
24cb240079 (WIIU) add remaining menu shaders.
- move some files around.
2018-01-12 02:54:45 +01:00
aliaspider
eac088696a (WIIU) add ribbon shader. fix menu bg gradient. 2018-01-11 02:09:03 +01:00
gblues
5894d0ef86 Remove all HID code from WiiU build via ifdef
== DETAILS
We're trying to track down the source of crashes when switching cores.
To rule out the HID code, this commit does the following:

- Wraps the library imports in an ifdef
- Wraps the object files in conditionals in Makefile.wiiu
- In wiiu_joypad, calls into the hidpad driver are wrapped in ifdef

== TESTING
This didn't solve the "System memory error" crash I've been experiencing.
But, maybe it will impact the other flavors of crashes others are seeing.
2018-01-07 20:26:24 -08:00
aliaspider
55d262f5d8 (WIIU) add preliminary multi-pass shader support.
can load *.slangp and *.slang files. since there is no runtime compiler,
precompiled shaders (*.gsh) need to be present next to each *.slang
source file.
2018-01-06 03:39:53 +01:00
aliaspider
8e095164e0 (WIIU) add a frame shader to match the shaders used by the gl/vulkan
drivers.
2018-01-05 13:18:55 +01:00
aliaspider
a7632620da (WIIU) add a sprite shader. 2018-01-04 17:38:04 +01:00
aliaspider
f9e06725fa (WIIU) rework makefile. 2017-12-31 14:07:14 +01:00
gblues
65c177a0ee Move HID driver into wiiu/ code
== DETAILS

RetroArch's general HID drivers are intended as a full-on substitute for
other input drivers such as XInput, DInput, SDL, etc. The Wii U port is,
to my knowledge, the first case of heterogenous input drivers working
concurrently.

As such, I've moved things around:

- The HID driver source is moved into the wiiu/input/ directory alongside
  the joypad subdrivers.
- We no longer use the input_hid_init_first() method to instantiate; instead
  we just init the wiiu HID driver directly.
- The HID pad driver and HID subsystem driver enjoy a tighter coupling,
  mainly having to do with the initialization of the joypad connections
  list, because there's no way to inform the HID driver's init() method
  how many slots to allocate.

== TESTING
Will test in a moment, but at  least it compiles cleanly. ;)
2017-12-30 04:43:38 +01:00
gblues
52c754cfa8 Split wiiu_gamepad into three sub-drivers
== DETAILS
Well, after a lot of code analysis, this seems like the
best way to handle things on the Wii U without also completely
re-architecting the I/O handling in RetroArch.

How it works:

- the top-level wiiu_joypad driver is now nothing more than a
  delegator.
- the wiiu-specific drivers live in `wiiu/input/`
- wpad_driver.c handles the WiiU gamepad
- kpad_driver.c handles the wiimotes
- hidpad_driver.c will handle HID devices like the GC adapter, DS3/DS4, etc.

  (I say "will" because this isn't implemented yet)

== TESTING
Haven't actually tried the build to see if it works, but it does
compile.
2017-12-30 04:43:18 +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
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
twinaphex
4ecb4d5dfb (Wiiu) Add overlays courtesy of r-type, thanks 2017-12-27 08:38:03 +01:00
Ash
46bffb8b12
[WiiU] Add -D__WUT__; fixes integrated libiosuhax
There was some type confusion around IOS_Open with libiosuhax, leading
to it treating the first instruction of that function as an address to
point to. Adding -D__WUT__ lets it know that we are using proper symbols
and not function pointers.
2017-12-20 13:47:30 +11:00
twinaphex
7c73930a87 Add libiosuhax/libfat 2017-12-19 22:12:58 +01:00
twinaphex
951918a245 Reduce size of Makefiles 2017-12-07 05:54:54 +01:00
Ash
bf3e256a43
[WiiU] Input: Make controller_patcher a compile-time option
As discussed in libretro#5357; controller_patcher is now optional. It's
off by default; though this could be changed with a simple makefile
tweak (ENABLE_CONTROLLER_PATCHER ?= 1, perhaps?)

To re-enable controller_patcher; append ENABLE_CONTROLLER_PATCHER=1 to
your usual make command.

controller_patcher was the only user of c++ constructors in the Wii U
port, so you'll need 26a006c in your tree otherwise you will have a
blackscreen on startup.
2017-12-01 18:29:21 +11:00