Commit Graph

4354 Commits

Author SHA1 Message Date
Twinaphex bc0185c313
Merge pull request #6782 from meepingsnesroms/master
Make 3DS launch cores like a normal system
2018-05-17 01:34:48 +02:00
meepingsnesroms ce0d8bb5e0 Remove quote parsing 2018-05-16 16:26:38 -07:00
meepingsnesroms 8617690499 Fix tab where spaces should be 2018-05-16 10:41:25 -07:00
meepingsnesroms 756db4f264 Fix broken path handling when launching a core with a file or with spaces 2018-05-15 11:46:13 -07:00
meepingsnesroms 052de6bcd2 3ds now has proper core launching 2018-05-15 10:30:34 -07:00
meepingsnesroms 1a6f572405 Fixes 2018-05-09 18:23:35 -07:00
meepingsnesroms 5f234f0dd1 Start using proper 3ds executable formats (doesnt work properly yet) 2018-05-09 15:55:48 -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
Twinaphex 8484ea4154
Merge pull request #6672 from gblues/master
Cleanup of Wii U launcher code
2018-05-06 15:24:00 +02:00
Twinaphex 356cd47ce8 Silence some unused variable warnings 2018-05-03 19:35:27 +02: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
Brad Parker a1aefc901c Qt WIMP GUI 2018-04-30 14:33:05 -04:00
twinaphex 5a80a6046f (Android) Remove no longer needed machine/cpu-features.h 2018-04-28 19:29:30 +02:00
twinaphex 7b1ad55b20 Try to use snprintf instead of sprintf 2018-04-25 11:31:50 +02:00
twinaphex 8e7b1ede7f Silence Clang warnings 2018-04-09 17:35:27 +02:00
twinaphex 167b977c4d Fix some build errors with MSVC 2003/2005 cores 2018-03-28 16:22:35 +02:00
twinaphex 72dc03a1c6 Try to fix Coverity warnings 2018-03-19 06:58:36 +01:00
twinaphex 33f0009a11 Fix UNIX build 2018-02-25 20:49:44 +01:00
twinaphex 78406bef69 (platform_unix.c) Remove lots of hashes 2018-02-25 17:58:36 +01:00
twinaphex b0f29a6743 (platform_unix.c) Remove more hashes 2018-02-25 13:16:17 +01:00
twinaphex 6fc6bfbb24 (XDK1) Set default assets dir too 2018-02-19 13:43:32 +01:00
twinaphex 6c02dfd84c (XDK1) Setup some default dirs 2018-02-19 13:29:16 +01:00
twinaphex 56cbaefd05 Change this back 2018-02-18 02:12:15 +01:00
twinaphex c0f79d2032 Update 2018-02-18 02:11:41 +01:00
Brad Parker 1923ec11a9 platform_unix: remove HAVE_NETWORKING requirement 2018-02-08 11:44:26 -05:00
twinaphex e01416a0da Split up code to platform_xdk.h 2018-02-05 01:33:54 +01:00
aliaspider 5549b136c2 (msvc) CXX_BUILD + griffin fixes. 2018-02-05 00:25:03 +01:00
twinaphex 3ff3cada71 CXX_BUILD is fixed again for Windows 2018-02-04 21:13:41 +01:00
twinaphex 5bfa63e4bd (Darwin) Fix warnings 2018-01-31 11:23:57 +01: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
twinaphex fc0ea0c63f Cut down unnecessary _XBOX ifdefs 2018-01-26 15:15:03 +01:00
Brad Parker 9ef75473e0 fix coverity warnings 2018-01-26 00:14:59 -05:00
Brad Parker 9e347ec71f detect shader file changes on move and delete as well, and wait a few frames before re-applying changes 2018-01-25 19:09:55 -05: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
twinaphex 6a46065162 (MSVC 2013) Add more non_HAVE_DYNAMIC codepaths 2018-01-24 01:52:44 +01:00
Toad King 55334aeffd fix black frame insertion in emscripten 2018-01-20 13:01:48 -06:00
kwyxz b9585df325 Update Haiku port to allow it to build again 2018-01-20 00:19:01 -08:00
twinaphex 61ff51be2f Start using string_is_equal predominantly 2018-01-16 22:53:38 +01:00
Toad King 28b2bf537f fix warning 2018-01-15 04:17:01 -06:00
Toad King 0256156a6b fix rwebaudio time drift
fixes audio getting stuck in an always fast state
2018-01-15 03:08:30 -06:00
Toad King 19facdb066 reset drivers shortly after toggling fullscreen mode
fixes black screen after going fullscreen in game
2018-01-15 02:12:53 -06:00
Toad King d23faff8d6 set the main loop first before calling rarch_main 2018-01-15 00:43:20 -06:00
Toad King 2738c79aa0 switch to RGUI as default menu for emscripten 2018-01-15 00:07:12 -06:00
Toad King b75f4b4f67 implement setting vsync and swapinterval
vsync is not "true" vsync (that's always on in browsers) but changes the main loop timer from immediate to window.requestAnimationFrame
2018-01-14 23:29:20 -06:00
Toad King 2d27a8c3e2 fix exiting not terminating emscripten runtime 2018-01-14 02:53:34 -06:00
Toad King 5ef595be1a fix fullscreen 2018-01-14 02:33:22 -06:00
meepingsnesroms 74c8506391 Add frontend, battery level and memory amount detection to 3ds port
Also fix white spaces in led drivers, make led drivers use standard driver format.
Begin work on translation driver.
Add salamander files to gitignore.
2018-01-10 16:52:32 -08: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
twinaphex 6c5d303a07 (Xbox OG) Fix Salamander build 2018-01-03 14:31:41 +01:00
meepingsnesroms 7ac985e9be Add all xmb menu options to rgui and glui, 3ds warning fix, move start directory to top of load content 2018-01-01 10:38:16 -08:00
Twinaphex 0389bc64fe
Merge pull request #5997 from libretro/new_hid
New HID system (courtesy of gblues)
2017-12-30 15:30:03 +01:00
twinaphex b788bf71bd (3DS) Implement frontend rating - will return 6 for New 3DS/2DS,
and 3 for Old 3DS/2DS
2017-12-30 11:23:47 +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
meepingsnesroms d18ee7eaed Fix new 3ds xl not being detected, others
Also fixes whitespace in makefile and platform_ctr.c and compiles with debug libctru when DEBUG=1
2017-12-29 19:30:54 -08:00
twinaphex 2768f639a2 Fix csnd corrupting dsp audio driver on failure, add 3dsx/smdh to
gitignore
2017-12-26 21:36:46 +01:00
Twinaphex 6fc71b6b55
Merge branch 'master' into master 2017-12-26 21:35:25 +01:00
meepingsnesroms f8b9c8fa6d Fix csnd corrupting dsp audio driver on failure, add 3dsx/smdh to gitignore 2017-12-26 05:31:51 -08:00
twinaphex 08d9ee9600 (PSP) Add thread support 2017-12-26 09:45:45 +01:00
twinaphex 3f281bb31f Cleanups 2017-12-25 07:49:07 +01:00
twinaphex 513885d465 (PS3) Set up cheat dir/autoconfig dir 2017-12-20 16:11:59 +01:00
twinaphex f6e9a624ca (PS3) Add default dir for core download assets 2017-12-20 16:02:40 +01:00
Brad Parker 03970ddacd Show BSD OSes in frontend OS info 2017-12-16 10:46:52 -05:00
twinaphex c7c4b723d6 Move path_file_exists to filestream and do away with filestream
dependencies in file/file_path
2017-12-14 20:05:46 +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
Andrés 305cb6d647 fix OS identification (#5880) 2017-12-07 18:49:35 -05:00
Brad Parker 55b738a07a implement frontend get_architecture() for windows 2017-12-07 16:32:13 -05:00
Brad Parker fa7cd77d7d win32: improve version reporting under System Information 2017-12-07 13:49:07 -05: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
Brad Parker 9aeddb781a GlobalMemoryStatusEx only exists for 2000 and up 2017-11-29 19:33:39 -05:00
Justin Weiss 4069ddc926 Expand symlinks in default configuration paths for iOS devices
CFSearchPathForDirectoriesInDomains returns a path in /var, while
getenv(HOME) returns the same path in /private/var. /var is a symlink
to /private/var, but when config is generated, the difference in paths
means they won't be abbreviated correctly.

This change expands symlinks before filling in the default
directories, so those paths will match.
2017-11-22 20:07:27 -08:00
Francisco José García García b975cb43a7
Change platform driver for vita 2017-11-14 19:49:50 +01: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
Roman Kalashnikov cdc61bc206
Simplified condition in `while`
if `*ptr` value equals ' ', then condition `if(*ptr != '\0')` will always true
2017-10-28 20:56:04 +03:00
Brad Parker 3f27e5d7bb CXX_BUILD fix 2017-10-23 21:48:38 -04:00
twinaphex be5d3cb0ba Convert platform_xdk.cpp to C 2017-10-03 04:36:43 +02:00
Alcaro b97853a536 Rename STRING_REP_ULONG to STRING_REP_USIZE 2017-10-02 22:51:51 +02:00
twinaphex 550a140405 (Xbox) Silence warning 2017-09-13 04:35:57 +02:00
twinaphex e193f7a22a Style nits 2017-08-19 12:27:24 +02:00
twinaphex 822e2fd0d4 Put this around an HW_RVL ifdef 2017-08-19 12:13:03 +02:00
twinaphex ae2435cf16 Silence some more C89_BUILD warnings 2017-08-12 18:15:26 +02:00
twinaphex 2f832d145f Make DragAcceptFiles go through function pointer 2017-08-09 16:25:23 +02:00
radius 4387dd7c15 fix new android paths 2017-08-05 21:56:52 -05:00
radius 8bb3852944 update android platform driver 2017-08-05 14:52:16 -05:00
radius a17e23dc6c update win32 platform driver 2017-08-05 14:39:17 -05: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
twinaphex 6aa99ebb37 Take out <sys/cdefs.h> 2017-06-21 05:02:03 +02:00
Charlton Head e8976762a5 include command.h when !HAVE_MENU 2017-06-20 20:52:04 -05:00
twinaphex f087419165 Rename platform_linux.c to platform_unix.c 2017-06-19 17:38:49 +02:00
twinaphex 6af5bd01bf Merge retro_stat and file_path 2017-06-16 15:00:11 +02:00
Ash 7f5986e1d5 Rename Wii U log functions (conflict in DOSBox) 2017-06-15 15:20:58 +10:00
Brad Parker d5a1ad0a73 android: delay loading of RetroActivity until after permissions are granted 2017-06-14 20:19:52 +00:00