88 Commits

Author SHA1 Message Date
twinaphex
4ec216dc0b Get rid of file_path_str 2020-08-22 01:06:10 +02:00
twinaphex
855351de9e Reorder g_defaults, alignment 2020-08-16 04:38:02 +02:00
twinaphex
d93cf0d9dc Cleanups 2020-07-24 04:44:49 +02:00
twinaphex
a3242daa5d Silence more warnings 2020-07-23 05:51:04 +02:00
twinaphex
1ae20ea17c Style nits - turn macro names into upper-case - some while style nits 2020-06-26 20:00:19 +02:00
twinaphex
33cf0e160c Style nits 2020-05-07 20:13:02 +02:00
Roet-Ivar
ad34f4845b Added access to WiiU-formated storage to be browsed by RetroArch 2020-05-07 12:49:04 +02:00
twinaphex
2d274f1369 Move accessibility features to platform frontend driver 2020-02-14 00:17:55 +01:00
twinaphex
85d64602ff Move retroarch_get_launch_arguments() function call outside
of frontend driver - should be called by Salamander too which
has no conception of RetroArch launch arguments
2020-02-01 17:42:18 +01:00
twinaphex
ca83be1db4 Cleanups 2020-02-01 04:19:22 +01:00
jdgleaver
569014c5d2 (Filebrowser) Fix file selection issues when starting from (or navigating to) the top level directory 2019-12-31 12:34:03 +00:00
Nathan Strong
bff8e8204d Automatically rename asset directory
== DETAILS
For users upgrading--particularly via the online updater--we should
smoothly migrate them to the new name. If the "media" directory
exists and the "assets" directory doesn't, then rename "media" to
"assets".

== TESTING
none yet
2019-11-20 23:33:20 -08:00
Nathan Strong
4cd3934610 Change the default asset directory
On every other platform, retroarch uses "assets" but wiiu got stuck with "media"
and it's never been fixed.

So I'm fixing it.
2019-11-20 23:33:20 -08:00
twinaphex
ca3a80091a Cleanup runloop_iterate
NOTE/CHECK: Hopefully wiiu is unaffected by the change
in sleeping
2019-08-11 19:39:48 +02:00
twinaphex
9a89279ac2 Revert "Update platform_wiiu.c"
This reverts commit e13b58a0776a90198d7545b66f38edddaac7f5ae.
2019-07-29 02:43:52 +02:00
Twinaphex
e13b58a077
Update platform_wiiu.c 2019-07-29 02:11:13 +02:00
twinaphex
db4f0eff24 Cleanup 2019-06-19 05:28:20 +02:00
twinaphex
ee3208ac39 Integrate video_driver.c into retroarch.c 2019-06-17 15:10:22 +02:00
Brad Parker
aa588dec35 set default language on first startup according to OS setting (initial *nix implementation) 2019-04-15 23:14:49 -04:00
jdgleaver
2c65068be0 More 'Log to File' Additions:
- Add optional timestamped log files

- Handle errors if log file cannot be opened

- Android: flush log file immediately

- 3DS: log to file tested and fully working

- Default log paths added for all platforms
2019-03-25 17:22:59 +00:00
Brad Parker
e22148fed4 show cpu model name in log, implemented for x86/64 on windows/linux so far 2019-02-23 16:50:42 -05: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
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
a3ae537c02
Merge pull request #6862 from gblues/master
WIIU: cleanups to wiiu bootstrap code
2018-06-30 14:31:22 +02:00
Brad Parker
aa083d1e4c android: add configurable setting for Sustained Performance Mode 2018-06-19 02:50:33 -04:00
gblues
8b87a53366 Replace hokey "hooks" struct with weak symbol annotations
- Did a test build to ensure RA built
- Copied over to my FTPservU sources and ensured no compile issues there

Looks solid. A lot cleaner, too.

@aliaspider
2018-06-07 18:41:16 -07:00
gblues
f22c337cfc WIIU: cleanup and build-out of wiiu bootstrap code
I used the code in `wiiu/` to bootstrap my own WiiU homebrew app; this
PR reflects some changes I needed to make, that might be useful upstream.

1. Clean up filesystem initialization

Filesystem driver initialization was lumped in with filesystem mounting;
and that was a problem in my project, because I needed to be able to remount
the SD card on the fly. So, now it's split up.

I've added a callback object named "hooks" that can be used by consuming
applications to handle filesystem mounting and unmounting. If these hooks are
not provided, then the existing default behavior occurs.

2. Expand socket handling

- add `SO_NONBLOCK` flag for non-blocking socket I/O
- add normal errno defines like `EWOULDBLOCK` `EAGAIN`.

3. Remove RetroArch dependencies

- the exception handler protects usage of version_git with
  `#ifdef HAVE_GIT_VERSION` but not the include, so I added that.

  It also technically depends on version.h, but I'm not touching that.
  It's easy enough to implement and I needed the same functionality. I'm
  not sure what the best solution for that dependency is.

- missing_libc_functions.c included features/features_cpu.h which is
  a libretro include. This appears to be a stale include though, because
  everything compiles and works without it.

- an ifdef referencing the RA "WIIU" define, rather than the devkitpro
  "__wiiu__" define
2018-06-05 00:06:40 -07:00
gblues
5b3dd70ac3 Use a different packet size
== DETAILS

We had some disagreement on what packet size to use.

The maximum packet size varies depending on the actual network
hardware in use; the typical Ethernet value is relatively safe,
but not 100% compatible.

RFC 791 does, however, define a minimum datagram size that all
IP hosts must be able to handle--and it's large enough for our
needs, since we're generally not writing more than maybe 100
bytes at a time anyway.

I also did a little bit of cleanup for readability.
2018-05-06 19:08:32 -07: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
Ash
3a442af6be
[WiiU] Add missing time/clock libc functions
Add some timing functions so that we can know the time (woo-hoo?)
I use errno here, which worries me a bit. I wouldn't put it past
devkitPPC to have it as a null pointer or something.

Can confirm this makes XMB's clock work, much to @cucholix's delight;
I'm sure ;D
2018-01-30 17:14:58 +11:00
Brad Parker
f087b150c9 Add quick menu option to watch shader files for changes and recompile automatically (Linux only for now) 2018-01-25 15:50:57 -05: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
e63697dca7 (WIIU) fix net logger. 2018-01-04 17:21:16 +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
1beba28d02 Only call HIDSetup/HidTeardown once
== DETAILS
I did a minimalist edit of the HID thread that stripped out all
HID* syscalls, and this stopped the crashing. I then re-added just
the HIDSetup() and HIDTeardown() calls, and the crash came back.

This smells like an OS bug. To work around it, I've put the
HIDSetup() and HIDTeardown() calls into the app init/shutdown
section, so they only get called once in the application lifetime
and not each time the input driver is initialized.
2017-12-30 04:40:15 +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
3f281bb31f Cleanups 2017-12-25 07:49:07 +01:00
Ash
e9a3088a79
[WiiU] Toolchain: Actually fix C++ constructors/destructors (oops!)
Looks like I temporarily forgot how external symbols work. Fixes
https://gbatemp.net/posts/7720955; hopefully we finally have C++ under
control.
2017-12-03 11:31:30 +11: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
Ash
26a006cfac
[WiiU] Toolchain: Fix C++ constructor/destructor handling
The old setup relied on there being at least one constructor *or* the
value of *__CTOR_LIST__ being NULL. Neither of these are guaranteed; and
having no C++ constructors actually resulted in a random value being
read (which passed the NULL check!). This new setup uses the
__CTOR_END__ symbol; which is a pointer to just after the end of the
list. When there are no constructors, it has the same value as
__CTOR_LIST__; so the while loop is never entered.

This fix also allows us to re-enable destructors; in case they're ever
needed.
2017-12-01 18:18:02 +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
40a4a5a733
[WiiU] Rewrite exception handler 2017-08-04 21:30:49 +10:00
twinaphex
b11620e1eb Add retro_timers.h/retro_math.h 2017-06-28 04:41:38 +02:00
Ash
7f5986e1d5 Rename Wii U log functions (conflict in DOSBox) 2017-06-15 15:20:58 +10:00
twinaphex
9f2c15c17c (Frontend) Change MENU_SETTING_ACTION to FILE_TYPE_DIRECTORY 2017-05-26 16:45:28 +02:00
twinaphex
e2a6a7ad17 Add 'load_content' parameter to parse_drive_list 2017-05-26 15:52:38 +02:00
twinaphex
1421d1da30 Use path_mkdir 2017-05-23 20:45:14 +02:00