1
0
mirror of https://github.com/libretro/RetroArch synced 2024-07-05 09:48:42 +00:00
Commit Graph

910 Commits

Author SHA1 Message Date
jdgleaver
ea77410037 Add 'Manage Remap Files' submenu + automatically save input remaps when closing content 2022-03-16 18:59:49 +01:00
jdgleaver
1490ad18a2
Prevent log spam when using rewind hotkey with cores that don't support rewind if rewind functionality itself is disabled (#13741) 2022-03-14 18:17:43 +01:00
Nikos Chantziaras
b094c58081
Add hotkey for toggling sync to exact content framerate (#13725)
* Add hotkey for toggling sync to exact content framerate

* CHANGES.md: add sync to exact content framerate toggle hotkey
2022-03-10 17:21:08 +01:00
Vladimir Serbinenko
4a53c6771c
Several fixes and improvements do NGC and Wii (#13698)
* Support new elf2dol path in Makefile.griffin

* Fix NULL pointer dereference when no core info is available

* Fix double include of different versions of libogc

* Move ngc and wii to Makefile.common

Resulting binary is 60K *smaller*. This is surprising but probably due to
less inlining happening

* gx_gfx: Fix hang on gfx initialization

* Remove sthread_isself on NGC/Wii

It relies on pthread_equal that is not there for either legacy pthreads
or normal pthreads on those platforms

* Wii networking

* Missing includes in split

* Network fixes

* Fix logging of non-format string as a format

* Support for gx netlogger

* Network fix

* Network fixes

* Network info

* gx: Move config files to app directory

Otherwise it clashes between wiiU and vWii version with unpredictable
effects
2022-03-04 13:43:00 +01:00
Tony
977a7d3eb6
Volume hotkey logic+response improvement (#13667) 2022-02-24 23:09:17 +01:00
jdgleaver
9b0cb0fc92
Add 'Standalone Cores' menu (#13655) 2022-02-22 19:23:48 +01:00
Vladimir Serbinenko
f0d8af0d34
Remove gong now that it has been successfully extracted into a standalone core (#13637) 2022-02-18 17:03:35 +01:00
jdgleaver
e541dd5ab1
Disable run-ahead and rewind based on save state support level defined in core info files (#13594)
* Disable run-ahead based on save state support level defined in core info files

* Disable rewind based on save state support level defined in core info files
2022-02-05 00:25:33 +01:00
jdgleaver
a953b27614
Rework optional fast-forward frame skipping: Drop frames based on frame timing (#13578) 2022-01-31 16:32:17 +01:00
Tony
84f558db0b
Add optional frame skipping when fast-forwarding (#13550) 2022-01-26 18:30:33 +01:00
Tony
940f7553fd
Add delay + acceleration to volume hotkeys (#13434) 2021-12-31 18:17:32 +01:00
twinaphex
689057a9b2 Fix iOS/CocoaTouch builds 2021-12-24 15:42:00 +01:00
twinaphex
43d0fa6248 remove unused variable 2021-12-24 12:51:23 +01:00
Jamiras
7ad71a4a05
fix memory map conversion (#13386) 2021-12-21 21:15:03 +01:00
Nikos Chantziaras
0357b6c922
Add on-screen statistics toggle hotkey (#13381)
* Add on-screen statistics toggle hotkey

* CHANGES.md: Add technical statistics hotkey
2021-12-21 00:03:35 +01:00
Cthulhu-throwaway
690c802921
Netplay Stuff (#13375)
* Netplay Stuff

## PROTOCOL FALLBACK
In order to support older clients a protocol fallback system was introduced.
The host will no longer send its header automatically after a TCP connection is established, instead, it awaits for the client to send his before determining which protocol this connection is going to operate on.
Netplay has now two protocols, a low protocol and a high protocol; the low protocol is the minimum protocol it supports, while the high protocol is the highest protocol it can operate on.
To fully support older clients, a hack was necessary: sending the high protocol in the unused client's header salt field, while keeping the protocol field to the low protocol. Without this hack we would only be able to support older clients if a newer client was the host.
Any future system can make use of this system by checking connection->netplay_protocol, which is available for both the client and host.

## NETPLAY CHAT
Starting with protocol 6, netplay chat is available through the new NETPLAY_CMD_PLAYER_CHAT command.
Limitations of the command code, which causes a disconnection on unknown commands, makes this system not possible on protocol 5.
Protocol 5 connections can neither send nor receive chat, but other netplay operations are unaffected.
Clients send chat as a string to the server, and it's the server's sole responsability to relay chat messages.
As of now, sending chat uses RetroArch's input menu, while the display of on-screen chat uses a widget overlay and RetroArch's notifications as a fallback.
If a new overlay and/or input system is desired, no backwards compatibility changes need to be made.
Only clients in playing mode (as opposed to spectating mode) can send and receive chat.

## SETTINGS SHARING
Some settings are better used when both host and clients share the same configuration.
As of protocol 6, the following settings will be shared from host to clients (without altering a client's configuration file): input latency frames and allow pausing.

## NETPLAY TUNNEL/MITM
With the current MITM system being defunct (at least as of 1.9.X), a new system was in order to solve most if not all of the problems with the current system.
This new system uses a tunneling approach, which is similar to most VPN and tunneling services around.

Tunnel commands:
RATS[unique id] (RetroArch Tunnel Session) - 16 bytes -> When this command is sent with a zeroed unique id, the tunnel server interprets this as a netplay host wanting to create a new session, in this case, the same command is returned to the host, but now with its unique session id. When a client needs to connect to a host, this command is sent with the unique session id of the host, causing the tunnel server to send a RATL command to the host.
RATL[unique id] (RetroArch Tunnel Link) - 16 bytes -> The tunnel server sends this command to the host when a client wants to connect to the host. Once the host receives this command, it establishes a new connection to the tunnel server, sending this command together with the client's unique id through this new connection, causing the tunnel server to link this connection to the connection of the client.
RATP (RetroArch Tunnel Ping) - 4 bytes -> The tunnel server sends this command to verify that the host, whom the session belongs to, is still around. The host replies with the same command. A session is closed if the tunnel server can not verify that the host is alive.

Operations:
Host -> Instead of listening and accepting connections, it connects to the tunnel server, requests a new session and then monitor this connection for new linking requests. Once a request is received, it establishes a new connection to the tunnel server for linking with a client. The tunnel server's address and port are obtained by querying the lobby server. The host will publish its session id together with the rest of its info to the lobby server.
Client -> It connects to the tunnel server and then sends the session id of the host it wants to connect to. A host's session id is obtained from the json data sent by the lobby server.

Improvements (from current MITM system):
No longer a risk of TCP port exhaustion; we only use one port now at the tunnel server.
Very little cpu usage. About 95% net I/O bound now.
Future backwards compatible with any and all changes to netplay as it no longer runs any netplay logic at MITM servers.
No longer operates the host in client mode, which was a source of many of the current problems.
Cleaner and more maintainable system and code.

Notable functions:
netplay_mitm_query -> Grabs the tunnel's address and port from the lobby server.
init_tcp_socket -> Handles the creation and operation mode of the TCP socket based on whether it's host, host+MITM or client.
handle_mitm_connection -> Creates and completes linking connections and replies to ping commands (only 1 of each per call to not affect performance).

## MISC
Ping Limiter: If a client's estimated latency to the server is higher than this value, connection will be dropped just before finishing the netplay handshake.
Ping Counter: A ping counter (similar to the FPS one) can be shown in the bottom right corner of the screen, if you are connected to a host.
LAN Discovery: Refactored and moved to its own "Refresh Netplay LAN List" button.

## FIXES
Many minor fixes to the current netplay implementation are also included.

* Remove NETPLAY_TEST_BUILD
2021-12-19 16:58:01 +01:00
Tony
8cc423e036
Logging cleanups (#13370) 2021-12-17 18:04:24 +01:00
Tilman M. Jaeschke
682bbab233
[New Feature] Load save states from command-line or playlist (#13354)
* load save states from command-line or playlist

* load save states from command-line or playlist

* removed some brackets
2021-12-14 14:08:06 +01:00
Tony
09880e92d2
Logging cleanups (#13320) 2021-12-04 14:21:12 +01:00
Tony
41838ef544
Refresh rate switch addition on startup (#13316) 2021-12-03 17:52:46 +01:00
Tony
121ca3a482
'Automatic Frame Delay' improvements: (#13297)
- swap interval handling
- d3dx handling
2021-12-02 02:32:39 +01:00
Autechre
5bb4df3a42
Move translation task code to tasks/task_translation.c (#13274) 2021-11-22 15:19:20 +01:00
twinaphex
9982452c18 Move code from retroarch.c to runloop.c 2021-11-22 03:33:58 +01:00
Autechre
2b87cd9313
Create runloop.c and split up runloop code to this new file; (#13269)
* Create runloop.c and split up runloop code to this new file;
retroarch.c now 207Kb and runloop.c 301Kb

* Define empty runloop_secondary_core_destroy
2021-11-22 03:27:23 +01:00
twinaphex
0a5d4288f5 Rollback runloop changes - will require a rethink in how we approach
this
2021-05-25 20:41:39 +02:00
twinaphex
2b4f2525d0 move more runloop functions over to runloop.c 2021-05-24 02:57:40 +02:00
twinaphex
75175ddbce move more runloop functiosn to runloop.c 2021-05-24 02:27:55 +02:00
twinaphex
b48ab663b0 Move BSV runloop code over to runloop.c 2021-05-23 02:20:01 +02:00
twinaphex
d1c7d97b10 Split up code to runloop.c 2021-05-22 23:09:00 +02:00
twinaphex
42ebe7a7ad Merge runloop.c and retroarch.c 2017-05-11 09:11:46 +02:00
twinaphex
2906bec7a8 Create input_driver_get_uint 2017-05-11 07:36:21 +02:00
twinaphex
5e7f175545 Remove some obsolete RUNLOOP_CTL_ actions 2017-05-08 04:41:24 +02:00
twinaphex
9605c01c49 Rename command_event_quit to retroarch_main_quit 2017-05-08 03:54:51 +02:00
twinaphex
0815055906 Pressing hotkey should invoke same operation as manually selecting
'Quit' from the menu - should hopefully fix issues with flushing
SRAM to disk/saving autostate
2017-05-08 03:41:23 +02:00
Twinaphex
12027bf1a8 Merge pull request #4889 from leiradel/master
Reverted cheevos changes in preparation for conversion to task; fixed 4884
2017-05-07 20:28:32 +02:00
Andre Leiradella
844d1475e6 Reverted cheevos changes in preparation for conversion to task; fixed 4884 2017-05-07 19:06:03 +01:00
twinaphex
f97d084290 Create camera_driver_poll 2017-05-07 19:24:03 +02:00
twinaphex
a2fe3dcaaf Revert "Refactor BSV movie code"
This reverts commit 7dca09d6f8.
2017-05-07 18:28:07 +02:00
twinaphex
7dca09d6f8 Refactor BSV movie code 2017-05-07 18:21:58 +02:00
twinaphex
ce8083fd2e Create runloop_{set|unset} - only do autosave lock/unlock if
autosaves are actually active
2017-05-07 18:05:37 +02:00
twinaphex
d349ea61cf Create bsv_movie_end_of_file 2017-05-06 18:11:18 +02:00
twinaphex
d9c5013d42 Pass settings struct around 2017-05-06 06:46:48 +02:00
twinaphex
33f2fe8029 Move cheevos.c to tasks/task_cheevos.c and add TODO/FIXME note 2017-05-06 05:50:46 +02:00
twinaphex
e6ab06a701 Move path variables 2017-04-29 00:39:29 +02:00
twinaphex
05e4ec733e Move uint variables 2017-04-28 21:03:04 +02:00
twinaphex
7bbd20b31d Move int settings 2017-04-28 19:12:48 +02:00
twinaphex
0da40fb3aa Move all float settings 2017-04-28 14:57:55 +02:00
twinaphex
ed53be7c81 Move all bool settings 2017-04-28 14:11:34 +02:00
twinaphex
cc095e56fc Start refactoring bool variables 2017-04-28 00:53:20 +02:00
twinaphex
3087ceb482 Don't go through all these slow wrapper functions 2017-04-25 20:47:21 +02:00