89 Commits

Author SHA1 Message Date
Matthew Stanley a2cdcc0630 Pin merged first-request account networking fix 2026-10-10 22:12:50 -07:00
Matthew Stanley a633f8f435 Use account HTTP socket startup fix for first online sign-in 2026-10-10 21:12:22 -07:00
Alex Vanderveen d008b914f1 bump 2026-10-10 23:36:57 -04:00
Alex Vanderveen 9d6f0d4319 Merge master into fix/rb-multipeer-frontier
Keep both netplay_peer_frontier.h and netplay_fmv_confirm.h includes; advance lib/recomp-net to a48d355 (main, includes #38).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 02:20:17 -04:00
Alex Vanderveen c2408e5d9a sync 2026-10-10 01:38:54 -04:00
Shokunin 1633ecf1d0 Netplay rb: per-seat peer frontier; retire a healed fork cap
Two rollback bookkeeping bugs that only show with more than two seats
over a real link:

- g_peer_resolved_through took the highest RESOLVED from any peer. With
  three seats the fastest follower stood in for the others, so the host
  opened loads past the slower followers' frontiers (3P WAN: load 2400 vs
  frontiers 2344 and 2319); every follower refused, episodes aborted and
  the session diverged at 2496 before the race started. Adverts are now
  kept per seat (netplay_peer_frontier.h) and the lowest across the
  peer roster is the frontier.

- The §55 bisect cap (next load < L after a baseline mismatch at L) was
  only cleared by an episode commit. An abort followed by a Live heal
  left it armed for the rest of the session; once its loads left the
  snapshot ring every episode was refused with "no confirmed snap"
  (4P WAN: cap 1928, agreed 3136, ring 2656..3166) and a later fork at
  3150 was never repaired. A live hash-confirmed agreed ADVANCE at or past
  the cap now retires it.

Bumps lib/recomp-net for RB_RESOLVED sender attribution and rb_* queue
retransmit coalescing (RetroPortingToolKit/recomp-net fix/rb-ctrl-queue-dedupe).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:54:57 -07:00
Shokunin c37b827e97 netplay rollback: every seat answers the episode handshake
The episode kept one peer-baseline / ready / POST latch, so with three or
four seats the first reply answered for everyone, and the one early
BASELINE stash was overwritten by the next seat's. In R4's 4-peer run with
the host loaded every frame, two guests replayed a light-tip episode and
resumed while the host had not opened it; host and guests then waited on
each other (pcap_freeze / wire_hole) until the stall timeout.

- BASELINE, ready-ACK and POST go through rnet_rb_quorum: the episode moves
  on only when every other occupied seat has answered, and a digest from
  any seat that differs fails the comparison. Early BASELINEs stash per
  seat. Two seats behave as before.
- Light tip skips the ready RTT only with one peer; with more, every seat's
  ready is how the others know it rolled back to the same load.
- A follower that has not simulated the load tick yet defers and joins when
  it gets there (no NACK, no zombie-load refusal for that join).
- Seal, ready and verify timeouts restart while a seat still owing a reply
  advances its input tip: they fire only when nothing moves.
- psx_netplay_peer_seats(); pins recomp-net rb_quorum.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 08:09:13 -07:00
Shokunin 465f926ecf netplay: confirm against every peer, shed the own view when behind, progress-based stall timeout
Four-peer rollback desynced under load (R4, host behind): the guests
predicted the slow host's pad, hash-confirmed the tick among themselves
through the one shared peer ring, then promoted the host's real pad into
history only (hc-silent promote) while the host simulated it. The host
stayed forked; its recovery episode was then refused as a "zombie load"
behind the guests' (wrongly) agreed tip.

- Hash confirm is a quorum over every occupied peer seat
  (rnet_hc_set_peer_mask / note_peer_from, recomp-net) for three or more
  seats; two seats keep the one-peer chain.
- A peer more than 4 ticks behind the others' inputs sheds its own view
  (psx_mod_render_local_view status FAST_FORWARD, held 60 ticks), so the
  presentation-only pass goes before the simulation slips.
  PSX_NET_LOCAL_VIEW_SHED=0 keeps it.
- The admit-stall watchdog counts time without progress: a remote input tip
  that advances restarts it, so a slow peer is waited for.
  PSX_NET_ADMIT_STALL_MS (20000) and PSX_NET_LIVENESS_MS (1500) configure it.
- Pins recomp-net fix/rollback-span-stall.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 06:59:03 -07:00
Shokunin d54bf48068 Pin recomp-net feat/rb-frame-full-pad (#28)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 19:35:45 -07:00
Shokunin 514cf5deda Carry the NeGcon type through PsxNetPad and one shared SIO apply
PsxNetPad type 3 is NeGcon, packed lx = twist, rx = I, ry = II, ly = L
(the rollback row's stick view carries twist and L). Every decoder accepts
up to PSX_NETPAD_TYPE_MAX instead of clamping at JogCon, and normalization
keeps NeGcon pressures exact (only twist gets the centre deadzone).

psx_pad_apply_to_sio() is now the one PsxNetPad -> SIO path for offline
sampling, netplay delay/rollback apply and selfcheck replay, so a type
added once reaches the guest the same way everywhere. Selfcheck replay now
matches offline sampling on multitap seats with the analog-on-tap hack.
psx_netplay_normalize_pad moves to a pure TU so tests link the real one
instead of a mirror. Pins recomp-net to the branch that keeps type 3.

Other titles: pads never carry type 3, so SIO bytes are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 19:28:13 -07:00
Shokunin b710f4b154 Pin recomp-net to the JogCon rollback source type
RetroPortingToolKit/recomp-net feat/jogcon-source-type keeps pad type 2
(JogCon) through rollback input history and the seal wire instead of
folding it to DualShock.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 13:14:13 -07:00
Alex Vanderveen d173af4e5a sync 2026-10-03 12:58:42 -04:00
Alex Vanderveen 1982e7dcb5 netplay: host relay for online rooms (amends §108 "online is always SFU")
An online room this build hosts asks the lobby server for transport "host"
(match_caps.relay): the host carries the match on its own UDP port and
guests dial it; the server's relay (SFU) is the fallback when a guest's
probe fails (recomp-net-server WS_LOBBY.md "Host relay"). The mechanics are
recomp-net's recomp_net/host_relay.h, pinned here (lib/recomp-net b0751b7);
this engine's own lobby-client copy gets the same glue as rnet_lobby_client:
the cap (emitted only when asked), the launch's transport ->
PsxLobbyJoinInfo.transport_host (force_input_relay 0; the host accepts
first / hubs instead of dialling the guest's LAN address), each seat's
published path / path_fresh, host_relay_step() from psx_lobby_pump, and
unmap on leave / disconnect.

psx_netplay: transport_host takes the LAN / hub path instead of the "MotK
online needs the SFU" rule. main.cpp: relay_host_get/set + relay_status
for recomp-ui (Network Settings / MATCH SETTINGS / ROOM "Match Relay"),
transport_host on the launch and into PsxNetplayConfig, and the
host==guest-advertise SFU inference skipped on a host launch; all under
RECOMP_LAUNCHER_HAS_HOST_RELAY so older recomp-ui pins still build.

Compile-checked against workspace recomp-ui 58604b0 (MOTK scratch
configure: full build and link).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-01 19:10:30 -04:00
Alex Vanderveen c9445d00cb chore: sync 2026-09-30 23:52:33 -04:00
Alex Vanderveen 5002187c17 bump 2026-09-27 00:00:46 -04:00
Alex Vanderveen 94552532a2 bump 2026-09-26 23:57:20 -04:00
Alex Vanderveen b5ef7b86d9 netplay: take the scheduler, input history and hash-confirm from recomp-net
recomp-net now carries the peer-facing rollback modules that used to live in
retcomm-rbengine (RetroPortingToolKit/recomp-net#14). Switch the MotK shims and
psx_netplay_sched.c from rbe_sched_* / rbe_ih_* / rbe_hc_* /
rbe_rb_peer_post_tip_ok to their rnet_* names and recomp_net/ headers, and bump
lib/recomp-net to c2338c6.

The netplay_* / np_sched_* surface the rest of the runtime calls is unchanged.
The snap ring and rbe_mono_ms still come from retcomm-rbengine, which stays at
a7b9850 for now; the three moved-module unit tests link recomp_net directly
instead of reaching it through rbengine. RBE_RB_* env knobs keep their names.

Checked with PSX_NETPLAY=ON: psx-runtime links and the netplay tests pass
against both the current rbengine and the split one (rbengine
refactor/launcher-core), and the binary's 33 scheduler / history /
hash-confirm functions now resolve to rnet_* where they were rbe_*.
lobby_chat_ring_test does not compile on master either (chat_push arity) and
is untouched here.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 22:06:27 -04:00
Alex Vanderveen 84bc48df5b sync 2026-09-12 19:14:50 -04:00
Alex Vanderveen 51125849ad yes 2026-09-08 17:45:01 -04:00
Alex Vanderveen 1dcd10bf0a yes 2026-09-08 17:44:57 -04:00
Alex Vanderveen 003b743d3f ok 2026-09-08 17:44:57 -04:00
Alex Vanderveen 0f1fd021a8 patch lobby chat 2026-09-06 03:31:56 -04:00
Alex Vanderveen 8f266efe27 netplay: bring-your-own memory card, lobby chat, and the fullscreen lobby glue
Seat 1 (P2) can bring its LOCAL slot-1 card to a match: it uploads the card
to the host at launch over the new recomp-net MEMCARD op, the host installs
it as the match's slot-2 card, and the usual card broadcast carries it to
everyone. The host's real slot-2 file is rebound to netplay/guest_card2.mcd
for the session and restored on shutdown; guests already sandbox both slots.
Lobby side: a per-seat memcard_offer on set_ready (has_card, share), a host
allow flag in match_caps, and guest_memcard_active settled ONCE by the host
at start and shipped with the launch, so a toggle racing the start cannot
split the room. LAN carries the same over MOTK5 UPDATE / MEMCARD / JOIN
tail / a trailing START line. PSX_NET_GUEST_MEMCARD=1 for CLI sessions;
a host waiting on a card that never comes stalls at a named phase
(mc_guest_wait), not a silent "ok".

Two latent guest-sandbox bugs fixed on the way: a disabled slot 2 had no
bound path, so a host blob carrying a card for it failed to import and the
guest stalled forever; and leaving the sandbox re-bound a disabled slot to
the sandbox file. Both slots are now bound in the sandbox and restored per
slot (memcard_rebind_path, which can also unbind).

Lobby chat: the client keeps a ring fed by the server's echo (op:chat);
LAN rooms relay through the host (MOTK5 CHATREQ guest->host, MOTK5 CHAT
host->everyone). Wired to the launcher's chat_send/chat_count/chat_get.

Also carries the spectator-seat work that was in the tree alongside this
(spectator seats in the lobby client, spectator_wire_slot in the launch).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1dT6h1ZshMVUUVKTPxsCD
2026-09-05 21:18:20 -04:00
Alex Vanderveen 6419e5d2a9 bumprecomp-net and update README 2026-09-03 19:54:19 -04:00
Alex Vanderveen b420752574 rebump 2026-09-02 10:19:09 -04:00
Alex Vanderveen cb4762c53f bump 2026-08-25 14:33:07 -04:00
Alex Vanderveen 9913b146cd chore: sync 2026-08-18 12:20:20 -04:00
Alex Vanderveen 5d954866d5 Merge branch 'master' of https://github.com/mstan/psxrecomp 2026-08-16 22:35:41 -04:00
Alex Vanderveen 6aed4c5c70 Update recomp-net 2026-08-16 22:35:40 -04:00
Alex Vanderveen 95657b6dfd bump 2026-08-16 22:32:41 -04:00
Alex Vanderveen a1292dfb32 fix crash path from bad splash screen bug, and optimize cross platform pacing + rollback 2026-08-14 02:26:34 -04:00
Alex Vanderveen 0a7790a574 chore: bump recomp-net for occupied_mask sparse-seat fix
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-12 22:37:14 -04:00
Alex Vanderveen c4f412be17 project studio, harden prefetch sdl3 2026-08-12 16:49:03 -04:00
Alex Vanderveen ce4b7e8d8a chore: update submodule 2026-08-12 04:22:09 -04:00
Alex Vanderveen 4e7c3e9e74 bump 2026-08-12 04:20:41 -04:00
Alex Vanderveen 75e943b4a4 chore: update submodule 2026-08-12 03:52:46 -04:00
Alex Vanderveen 3acb8f6d59 Integrate retcomm-rbengine as shared rollback host policy.
Wire lib/retcomm-rbengine beside recomp-net and replace MotK in-tree sched,
hash_confirm, input hist, snap ring, and rb_post with thin PSX shims so the
ecosystem can share invent/pacing policy outside each title facade.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-11 23:52:31 -04:00
Alex Vanderveen 48272f5bbd rematch hardening & bios switching 2026-08-11 19:01:51 -04:00
Alex Vanderveen 4eb08813de bump recomp-net, and netplay hardening 2026-08-11 14:21:51 -04:00
Alex Vanderveen 281f6d2ff6 bump 2026-08-09 14:03:17 -04:00
Alex Vanderveen 46540c77d2 Windows scheduling paths 2026-08-07 16:42:43 -04:00
Alex Vanderveen ca3de47924 bump sub 2026-08-07 03:11:37 -04:00
Alex Vanderveen 5170fedf5a Update recomp-net 2026-08-07 02:13:55 -04:00
Alex Vanderveen 2112b91474 new URL 2026-08-07 01:43:25 -04:00
Alex Vanderveen 652be7ba02 rollback FMV patches and overlay 2026-08-06 00:52:14 -04:00
Alex Vanderveen ff0e934712 recomp-net and new connectivity 2026-08-05 19:32:03 -04:00
Alex Vanderveen 2f7a2d6026 new 3+p architecture 2026-08-05 19:07:06 -04:00
Alex Vanderveen c82c6deb35 rollback SFU using recomp-net-server 2026-08-03 18:18:18 -04:00
Alex Vanderveen 0feb7709f6 rollback opengl render path, ICE patches, resim optimizations 2026-08-03 05:04:48 -04:00
Alex Vanderveen 6917d4a620 scheduler optimization on WAN 2026-08-02 17:49:36 -04:00