17 Commits

Author SHA1 Message Date
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
Ash
8e1437ad86
[WiiU] Add build information to exception handler 2018-04-15 17:19:39 +10:00
twinaphex
4f7f237644 (Wiiu) uniquely name global variable 'pos' to prevent collissions with
variables in other cores (like freeintv)
2018-02-03 15:40:54 +01:00
Alfredo Monclus
bbd9a6566c WiiU: C89 style comments 2018-01-06 09:44:03 -03:00
twinaphex
cf8e7cd362 (wiiu) small style nits; declare variables at top; C comments 2018-01-05 13:09:05 +01: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
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
Ash
40a4a5a733
[WiiU] Rewrite exception handler 2017-08-04 21:30:49 +10:00
Ash
7f5986e1d5 Rename Wii U log functions (conflict in DOSBox) 2017-06-15 15:20:58 +10:00
aliaspider
021b510452 (WiiU) refactors/cleanups. 2017-01-23 16:14:05 +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
8bdc40d5f8 (WIIU) exception handler: use net_print directly 2016-10-27 23:03:56 +01:00
aliaspider
02c38d23c1 (WIIU) enable the exception handler. 2016-10-27 19:53:27 +01:00
aliaspider
962baabe5d (WIIU) add missing files in dynamic_libs, add exception_handler 2016-10-27 18:58:19 +01:00