Files
psxrecomp/runtime/include/netplay_input_hist.h
T
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

44 lines
1.2 KiB
C

#ifndef PSX_NETPLAY_INPUT_HIST_H
#define PSX_NETPLAY_INPUT_HIST_H
/*
* MotK input history: portable ring/invent in recomp-net; PSX pad
* conversion stays in netplay_input_hist.c.
*/
#if defined(PSX_HAS_RECOMP_NET)
#include <stdint.h>
#include "psx_netplay.h"
#include "recomp_net/input_hist.h"
#ifdef __cplusplus
extern "C" {
#endif
#define NETPLAY_INPUT_HIST_DEPTH RNET_INPUT_HIST_DEPTH
#define NETPLAY_INPUT_HIST_MAX_SLOTS RNET_INPUT_HIST_MAX_SLOTS
typedef RNetInputHist NetplayInputHist;
#define netplay_ih_reset rnet_ih_reset
#define netplay_ih_frame_to_contract rnet_ih_frame_to_contract
#define netplay_ih_put rnet_ih_put
#define netplay_ih_get rnet_ih_get
#define netplay_ih_invent_hold_last rnet_ih_invent_hold_last
#define netplay_ih_invent_idle rnet_ih_invent_idle
#define netplay_ih_promote rnet_ih_promote
/* PsxNetPad ↔ RNetRbFrame (LX/LY only; RX/RY stay on the pad blob path). */
void netplay_ih_pad_to_frame(const PsxNetPad *pad, uint32_t tick, uint8_t predicted,
RNetRbFrame *out);
void netplay_ih_frame_to_pad(const RNetRbFrame *frame, PsxNetPad *pad);
#ifdef __cplusplus
}
#endif
#endif /* PSX_HAS_RECOMP_NET */
#endif /* PSX_NETPLAY_INPUT_HIST_H */